Flashing
Using Tasmotizer
pip3 install --upgrade pip wheel pip3 install tasmotizer tasmotizer.py
Setup
From Console on Tasmota UI
Issue the following commands:
module 54 so97 1 tuyamcu 11,1 tuyamcu 12,9 tuyamcu 21,10 ledtable 0 dimmerrange 10,1000 so59 1 so68 0
Add the following rule, this should be all on ONE line.
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
Enable the rule with the following
Rule1 1
Homebridge Config
Light
{ "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
{ "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/POWER2": "", "cmnd/johnlight/Dimmer": "" }, "confirmationPeriodms": 1000 }
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 |
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 |