Closed mdombrowski13 closed 3 years ago
I am not using this method but the documentation states to set the "pullInterval" parameter. I don't see it in your configuration? Without the pullInterval (because I didn't want to make requests every 1 second) and without other push methods, mine does the same where is only refreshes (makes the status call) when I go back in the app.
As @ashishgururani stated this is intended behavior. HTTP is a protocol where the client (in our case the switch) makes a request to the server (in your case the test_switch.local) and the server can respond to whatever the client asks for. But there is no way for the server to actively send new data to the client (how should he know who is even interested in that). So you need to create another mechanism to update the data on the plugin.
MQTT
. If you are having complete control over the devices http server and code yourself, you mal also have a look at the README for the "notification server" settings.Basically everything I just said is also written in the README under the section Updating the switch state in HomeKit (which is like the first section after the Installation). There it is also described in a bit more detail. So closing the issue with a RTFM.
Describe the bug When a users changes the state of the switch from the switch it is not updated on Homebridge or Apple home App unless you leave the accessory page and come back on homebridge or quit and relaunch the apple home app. Once relaunching the app it queries the switch and gets an updated state. No other device (Kasa,Wemo,Hue) respond in this manner they are all responsive of changes.
Expected behavior A status icon update a few seconds of change when changed from device.
To Reproduce Steps to reproduce the behavior:
Version (output of
npm list -g homebridge homebridge-http-switch
)Configuration JSON Config
Additional context Json data from relay_status response
{"relay_status": 1}
relay on{"relay_status": o}
relay off