...
Integration with Homebridge
Configure MQTT
Using the mqttthing homebridge plugin, we configure our fan using the following:
Code Block |
---|
{ "accessory": "mqttthing", "type": "fan", "name": "fireplace-fan", "url": "http://192.168.1.50:1883", "username": "homebridge", "password": "pass", "topics": { "getOn": { "topic": "stat/fireplace-fan/RESULT", "apply": "return JSON.parse(message).FanSpeed > 0 ? true : false;" }, "setOn": { "topic": "cmnd/fireplace-fan/FanSpeed", "apply": "return message ? '' : 0" }, "getRotationSpeed": { "topic": "stat/fireplace-fan/RESULT", "apply": "return Math.round(JSON.parse(message).FanSpeed * 33.3);" }, "setRotationSpeed": { "topic": "cmnd/fireplace-fan/FanSpeed", "apply": "return Math.round(message / 33.3);" } }, "confirmationPeriodms": 1000 }, |
...
Reference | URL |
---|---|
Flashing Tasmota | https://tasmota.github.io/docs/devices/Sonoff-iFan02/ |
Tasmota Commands | https://tasmota.github.io/docs/Commands/ |
Issue | https://github.com/arachnetech/homebridge-mqttthing/issues/78 |