-
Notifications
You must be signed in to change notification settings - Fork 43
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
Homebridge not updating status of switches #275
Comments
Kind of having the same here. My configuration is not to use MQTT, so everything goes directly between domoticz and edomoticz/homebridge. When i switch on a device in the domoticz UI (the device is switched on...), this status is not reflected in homebridge device dashboard (within domoticz it is shown switched on). The same, when a switch on the device by itself (these are shelly devices), the status is updated correctly within domoticz but not in homebridge (and also not in homekit app on iOS device). After reloading the dashboard within homebridge the device status is shown correctly (with some delay, firstly the device on the iOS homekit app is updated, then homekits dashboard). Switching from within homebridge or homekit app instantly shows correct status (also within domoticz). It seems that there is no async status signaling as a background process from domoticz to edomoticz/homebridge, or might there be some other issue? (i did wait some specific time to see if the status is fetched on an interval based way, but that did also not update the device status). Homebridge 1.7.0 |
Separate issue. If you don’t use MQTT you have to pull to refresh. If you want things to update automatically in a timely fashion you MUST use MQTT. |
Well, I do have MQTT enabled. Either just by MQTT: true or with manual config: Both work exactly the same. When a switch is changed in domoticz the Homebridge UI isn't reflected until several seconds after the page is refreshed. |
Yes, i expected that. Thus, as the plugin only subscribes to one topic (e.g. Switching the device via domoticz via its UI works now (immediately within homebridge), but switching of the device itself is not recognized that way. When i switch the device remotely, it will send it's status via Any hint here? |
Another interesting observation (mqtt enabled (
I remember darkly that this has been my reason not to use mqtt, as without at least switching devices via homebridge does work. mqtt disabled:
mqtt enabled (
So it seems that mqtt status update via domoticz/in is the right way, but for some reason switching via homebridge does not work then, domoticz does not create switching messages in that case. |
Some debug logs exams: (1) Switching the device via domoticz or by itself creates mqtt domoticz/in messages on which edomoticz correctly reacts:
(2) Switching via homebridge creates some error messages:
There was a mqtt message generated (on
on which Domoticz updates its status, but no mqtt message to trigger the switch (i guess due to domoticz' configuration not to mirror mqtt messages). Don't know what the error message could mean, as there is no incoming, but a outgoing message (which does not hold nvalue oder svalue). I think this is a result of having mqtt configured to subscribe to From the debug line i tried the domoticz URL-API myself (which is i guess is used when mqtt is disabled) This URL (with On or Off) does what it should, it updates domoticz, it switches the switch correctly (via domdoticz), and as a result the status within homebridge is also correctly updated (as there is that incoming mqtt message again). As the mqtt-topic for outgoing messaged is hardcoded to Will try to get around that with node-red, doubling/redirecting some messages. |
With configured mqtt, edomoticz will inform domoticz via mqtt-messages (as shown above), otherwise via the shown URL above. This results in missing outgoing mqtt messages for the devices itself, as domoticz will not mirror these messages (to I gave it a try and commented out the mqtt-part within Domoticz.updateDeviceStatus (file domoticz.js, the only location where mqtt-messages are sent), giving the desired behaviour. Maybe it is worth a though to stick for URLs for outgoing commands and for mqtt for incoming status, and/or having the outgoing message topic also being configurable (instead of fixed In the meantime i am helping myself with doubling For outgoing commands, i am converting the
mqtt messages into their URL-based counterparts (yes, domoticz is triggered twice now because of this...) Both is done via node-red which i already have at place. |
You might enable the DEBUG environment variable and then have a look into the logs, to see if mqtt messages are being received. |
I don't even know how to do that. I would think they're received because the status is up-to-date after a page refresh in homebridge |
I'm still a bit stuck here. Should I see anything in the /logs view if I enable debug? |
Hi all,
Because I moved my Homepod mini to the bathroom I wanted it to start playing music as soon as I turn on the light from the bathroom.
That's when I noticed that the status of the light isn't updated in homebridge/homekit anymore.
When I send a switch command in domoticz homebridge and homekit don't see this until I refresh the homebridge ui accessoires page.
When I send the command from within the home app all is instantly up-to-date.
Tried returning to previous versions from homebridge and from edomoticz plugin but none works.
I also tried with 2 browser windows open. Refreshing one of them results in both being up-to-date. Strange thing...
MQTT Explorer instantly receives the new status.
Any ideas?
The text was updated successfully, but these errors were encountered: