Open HairBear22 opened 7 years ago
Use topics like this: "topics": {"statusGet":"cmnd/sonoff/light","statusSet":"cmnd/sonoff/light"}
Hi, homekit default off reconnect wifi. Not read status HomeBridge?
@HairBear22 I'm having the exact same problem.
Have put it all on one line as @osvaldoasn suggested but it didn't fix the issue...
Working around by reading the echo of the command instead of reading the status wont update when another HomeKit clients changes the switch. Sonoff-MQTT returns a capital ON or OFF. Line 85 that.switchStatus = (status == "ON") ? true : false; Is a quick fix. I'll work on weaving it in and adding one more configuration to implementing it properly and then do a pull request.
Awesome! Any ETA on that? @TLCary
Great. For me works fine with "ON" in line 85. btw, "ON" "OFF" onValue and offValue gives default true and false. if you set onValue = "off" it will work with default true value. should use "true" and "false" values i config. the same is in case with the "integerValue": "true" onValue = 0 will work in the code like "true"
and MQTT responce are case sensetive.
I have a MQTT switch set up, with the config attached below. When I use the correct get topic, Homekit won't retain the switch being on (when I flip it to on on my phone, it publishes the right topic, but the switch on homekit instantly returns to "off", while the device is "on".