9 PS 16 DZ Dimmer
blakadder edited this page 2019-02-14 10:17:21 +01:00

PS-16-DZ Dimmer

The PS-16-DZ dimmer uses eWeLink app same as Sonoff devices. It's available from Amazon and Aliexpress. It may under different name, but the model number is PS-16-DZ.

Pics

Opened it up, found a ESP8285 and a Nuvoton N76E003.

Flash and GPIO pins

Remove the ESP8285 daughter card DLX-MKCK01 from the main board and flash Tasmota.

pin1 RST -> N76E003 P0.5/PWM2
pin2 TXD -> N76E003 P0.7/RXD
pin3 RXD -> N76E003 P0.6/TXD
pin4 GPIO13/MTCK -> LED
pin5 3.3V
pin6 GND

Communication between ESP8285 and N76E003

It uses AT command to communicate between ESP8285 and N76E003 over UART at 19200 baud.

Turn on the switch from ESP8266:
Send from ESP8266
AT+UPDATE="sequence":"1528335040032","switch":"on"
Receive from MCU
AT+RESULT="sequence":1528335040032"
Send from ESP8266:
AT+SEND=ok
After 0.7s
Receive from MCU
AT+UPDATE="switch":"on","bright":44
Send from ESP8266:
AT+SEND=ok

Turn off the switch from ESP8266:
Send from ESP8266
AT+UPDATE="sequence":"1528335118327","switch":"off"
Receive from MCU
AT+RESULT="sequence":1528335118327"
Send from ESP8266:
AT+SEND=ok
After 0.7s
Receive from MCU
AT+UPDATE="switch":"on","bright":44
Send from ESP8266:
AT+SEND=ok

Change brightness to 44 from ESP8266:
Send from ESP8266:
AT+UPDATE="sequence":"1528335181502","bright":44
Receive from MCU
AT+RESULT="sequence":1528335181502"
Send from ESP8266:
AT+SEND=ok
After 0.7s
Receive from MCU
AT+UPDATE="switch":"on","bright":44
Send from ESP8266:
AT+SEND=ok

Turn on the switch with faceplate button:
Received from MCU
AT+UPDATE="switch":"on","bright":44
Send from ESP8266:
AT+SEND=ok

Turn off the switch with faceplate button:
Received from MCU
AT+UPDATE="switch":"off","bright":44
Send from ESP8266:
AT+SEND=ok

Change the brightness to 52 with faceplate button:
Received from MCU
AT+UPDATE="switch":"on","bright":52
Send from ESP8266:
AT+SEND=ok

Holding the middle button on faceplate to reset the device:
Received from MCU
AT+SETTING=enterESPTOUCH
Send from ESP8266:
AT+SETTING=enterESPTOUCH

The sequence number is a 13 digits unix timestamp (in milliseconds). The data after "bright" is the brightness. The maximum of the brightness is 100 and the minimum is 10. There is one byte 0x1B at the end of each AT command.