Table of Contents |
---|
Flashing
Using Tasmotizer
Code Block |
---|
pip3 install --upgrade pip wheel pip3 install tasmotizer tasmotizer.py |
Setup
From Console on Tasmota UI
...
Enable the rule with the following
Code Block |
---|
Rule1 1 |
Homebridge Config
Light
Code Block |
---|
{ "accessory": "mqttthing", "type": "lightbulb", "name": "John's Light", "url": "http://192.168.1.60:1883", "username": "homebridge", "password": "pass", "topics": { "getOn": "stat/johnlight/POWER2", "setOn": "cmnd/johnlight/POWER2", "getBrightness": { "topic": "stat/johnlight/RESULT", "apply": "return JSON.parse(message).Dimmer;" }, "setBrightness": "cmnd/johnlight/Dimmer" }, "onValue": "ON", "offValue": "OFF", "startPub": { "cmnd/johnlight/POWER2": "", "cmnd/johnlight/Dimmer": "" }, "confirmationPeriodms": 1000 } |
Fan
Code Block |
---|
{ "accessory": "mqttthing", "type": "fan", "name": "John's Fan", "url": "http://192.168.1.60:1883", "username": "homebridge", "password": "pass", "topics": { "getOn": "stat/johnlight/POWER1", "setOn": "cmnd/johnlight/POWER1", "getRotationSpeed": { "topic": "stat/johnlight/speed", "apply": "return( ( message == '3,0' ) ? 25 : null || ( message == '3,1' ) ? 50 : null || ( message == '3,2' ) ? 75 : null || ( message == '3,3' ) ? 100 : null );" }, "setRotationSpeed": { "topic": "cmnd/johnlight/tuyasend4", "apply": "return( ( message <= 25 ) ? '3,0' : null || ( message > 25 && message <= 50 ) ? '3,1' : null || ( message > 50 && message <= 75 ) ? '3,2' : null || ( message > 75 && message <= 100 ) ? '3,3' : null );" } }, "onValue": "ON", "offValue": "OFF", "startPub": { "cmnd/johnlight/POWER1": "", "cmnd/johnlight/speed": "" }, "confirmationPeriodms": 1000 } |
Investigating Tuya Messages
> weblog 4
Manipulating the fan
Console Output
Code Block |
---|
02:06:52 {"TuyaReceived":{"Data":"55AA03070005030400010218","Cmnd":7,"CmndData":"0304000102","DpType4Id3":2,"3":{"DpId":3,"DpIdType":4,"DpIdData":"02"}}} 02:06:52 RUL: TUYARECEIVED#DATA=55AA03070005030400010218 performs "publish2 stat/johnlight/speed 3,2" 02:06:52 SRC: Rule 02:06:52 CMD: Group 0, Index 2, Command "PUBLISH", Data "stat/johnlight/speed 3,2" 02:06:52 MQT: stat/johnlight/speed = 3,2 (retained) |
...
Code Block |
---|
Rule1 on TuyaReceived#Data=55AA03070005030400010016 do publish2 stat/%topic%/speed 3,0 endon on TuyaReceived#Data=55AA03070005030400010117 do publish2 stat/%topic%/speed 3,1 endon on TuyaReceived#Data=55AA03070005030400010218 do publish2 stat/%topic%/speed 3,2 endon on TuyaReceived#Data=55AA03070005030400010319 do publish2 stat/%topic%/speed 3,3 endon |
Manipulating light brightness
Code Block |
---|
1:49:08 {"TuyaReceived":{"Data":"55AA030700080A020004000003183C","Cmnd":7,"CmndData":"0A02000400000318","DpType2Id10":792,"10":{"DpId":10,"DpIdType":2,"DpIdData":"00000318"}}} 01:49:08 TYA: fnId=21 is set for dpId=10 01:49:08 TYA: RX value 792 from dpId 10 01:49:09 {"TuyaReceived":{"Data":"55AA030700080A020004000002D2F5","Cmnd":7,"CmndData":"0A020004000002D2","DpType2Id10":722,"10":{"DpId":10,"DpIdType":2,"DpIdData":"000002D2"}}} 01:49:09 TYA: fnId=21 is set for dpId=10 01:49:09 TYA: RX value 722 from dpId 10 |
...
Code Block |
---|
Rule2 on TuyaReceived#Data=5AA030700080A020004000000 do publish2 stat/%topic%/bb 1,1 endon Rule2 1 |
References
Reference | URL |
---|---|
The Tasmota Fan Controller I've been waiting for... | https://www.digiblur.com/2020/07/the-tasmota-fan-controller-ive-been.html |
Blakadder's DS03 | https://templates.blakadder.com/treatlife_DS03.html |
Combo Speed Fan Controller/Dimmer with Tasmota - How to Flash Shelly devices with NO wires! | https://www.youtube.com/watch?v=o813Kjw76_I |
Tasmotizer | https://github.com/tasmota/tasmotizer |