MQTT not processed in the background
Closed this issue · 4 comments
When the homekit app is active, changes are working when MQTT is configured. Both on and off work.
When the homekit app is not active, the status changes are not processed. When you open the homekit app, it loads with the previous state, not the updated one.
For now I fall back to statusurl, but would love this the work propperly
Could you maybe provide some details about your configuration?
This sounds like intended behavior. The Home App will only subscribe to event notifications if it is open. When it closes, after a while, it will unsubscribe from any notifications (so the device could for example also go to sleep and save battery).
When the Home App reopens it will make a READ request (and also subscribe to future event notifications). And that's where your initial configuration would be important, as typically it would call the statusUrl
to retrieve the latest state. But there are plugin configurations possible where you can omit the statusUrl and then the last known value (should) be returned.
Just had a look at the code, and yes, indeed toggle switches (this without statusUrl) didn't properly return values coming from MQTT or notification server on read requests.
Fixed v0.5.32