Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can’t get status light on or off at homekit #674

Open
derflerd opened this issue Mar 22, 2024 · 5 comments
Open

can’t get status light on or off at homekit #674

derflerd opened this issue Mar 22, 2024 · 5 comments

Comments

@derflerd
Copy link

I have a problem updating the light switches. Works correctly when I turn on / off the light in the Home App on iOS or in the plugin accessories at homebridge-ui-x. However, it does not work as I turn it off I turn off the light with a physical switch on the wall, can’t get status that update on the homekit

i have zbmini L2.
it work great with zigbee2mqtt but i want to work with mqttthing because i get change from switch to light.

this is the code i make:

{
"type": "lightbulb",
"name": "תאורת כניסה",
"logMqtt": true,
"topics": {
"getOn": {
"topic": "zigbee2mqtt/0x3c2ef5fffeba1064",
"apply": "return JSON.parse(message).state"
},
"setOn": {
"topic": "zigbee2mqtt/0x3c2ef5fffeba1064/set"
}
},
"onValue": "ON",
"offValue": "OFF",
"accessory": "mqttthing"
},
{

@itongjun
Copy link

I also found this problem, how to solve it?

@derflerd
Copy link
Author

Unfortunately I could not find a solution yet. for now i working with zigbee2mqtt that make the job automimic but show me as switch button
I tried every suggestion on the net

@abrownsword
Copy link

I think I'm having the same problem. It is as if state changes aren't being forwarded to HomeKit, but state changes from HomeKit are being forwarded to other mqtt clients. My "device" has all the lights in the house (~60) and HomeKit generally shows the wrong state, but you can turn them on/off and then it is correct (until they are controlled via something other than HomeKit).

@GithHobby
Copy link

I had the same problem due the difference between the status and the command.
I mean the onVlaue is ON but the status for on is true.
So I had to parse the reply to match true with ON and false with Off.
Now all works fine

@abrownsword
Copy link

That wasn't my issue as my parser of the messages from HomeKit/homebridge-mqtt forces the text to lowercase and then checks for "off", "false", "0", or "0.0" to indicate an off state.

I believe I just fixed my issue though by sending "0" or "1" back through mqtt to HomeKit/homebridge-mqtt. Now HomeKit correctly updates its app UI (albeit with ~1 second of latency) when my system changes the state of a light. So clearly whatever ends up actually parsing the value is sensitive to its representation.

I'm fairly sure this used to work, so I'm wondering if HomeKit became less flexible somewhere along the way? Or maybe that was from before I was using homebridge-mqtt, as I was using a different MQTT-based HomeKit integration solution before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants