PS-16-DZ Dimmer
Available from:
Amazon.ca
GPIO # | Component |
---|---|
GPIO00 | User |
GPIO01 | Serial Tx |
GPIO02 | User |
GPIO03 | Serial Rx |
GPIO04 | User |
GPIO05 | User |
GPIO09 | None |
GPIO10 | None |
GPIO12 | User |
GPIO13 | Led1 |
GPIO14 | User |
GPIO15 | User |
GPIO16 | User |
FLAG | None |
Configuration (old format, will be converted to new template when applied)
{"NAME":"PS-16-DZ","GPIO":[255,148,255,149,255,255,0,0,255,52,255,255,255],"FLAG":0,"BASE":58}
The PS-16-DZ dimmer uses eWeLink app same as Sonoff devices.
Opened it up, found a ESP8285 and a Nuvoton N76E003.
Serial Flashing
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.