luc-ass / homebridge-evohome

Homebridge plugin for Honeywell Evohome
29 stars 16 forks source link

Evohome devices randomly reset in My Home UI #61

Closed cjastennett closed 1 year ago

cjastennett commented 3 years ago

I have been successfully using this plugin with homekit for a while now. Great work on creating this fantastic plugin. However, over the last few months, usually triggered by a reboot of my homebridge, Apple Home forgets all room allocations and updated names of my evohome items - thermostats and evohome mode switches - everything ends up in their default settings, and also dropps out of scenes. It is almost like (and I assume here) that homebridge is forgetting/not caching the old device ids, and issuing new ones which are effectively new to Apple Home, and it treats them as new devices.

I am on the latest version of everything, and am running on Raspberry Pi platform.

Is anyone else struggling with this problem? Is there a resolution through configuration? Or is this a bug?

Thanks for your help,

Chris

tomsteenbakkers commented 3 years ago

I recognize this problem. This also happens to me when I restart Homebridge and the Evohome plugin cannot logon to the Evohome services. Too many attempts are then made and then the accessories are not created. Opening the official app from Honeywell and then restart Homebridge does the trick. But, you need to set al the accessories again πŸ™

cjastennett commented 3 years ago

Thanks tomsteenbakkers - appreciate your comments..

The devices always seem to appear in my case without any interactions with the Evohome app - looking at the log, there don'l seem to be any refused logins to Honeywell on startup that I can see. I'll do some more digging.

luc-ass commented 3 years ago

I've seen this behavior as well. No clear idea where this is coming from...

rooi commented 3 years ago

Could it be caused by changing deviceIDs? Perhaps the homebridge accessory uuid should be changed to the name: e.g. change this.uuid_base = systemId + ":" + deviceId; into this.uuid_base = systemId + ":" + name; or this.uuid_base = "EvoHome" + ":" + name;

luc-ass commented 3 years ago

This sounds like a good idea. Have you tested it?

djsomi commented 2 years ago

Same Issue here!

psculthorpe commented 2 years ago

Same here too

djsomi commented 2 years ago

Any news on this? Thanks!

luc-ass commented 2 years ago

Sadly I wasn't able to invest any time into this. It is still on my to-do list...

cjastennett commented 2 years ago

HI - this is unfortunately happening with regularity now, whenever I have a power cut, and it is a real challenge as I have rules and triggers that rely on evohome devices, and when it this happens all the evohmoe devices are reset and dissapear out of rules and scenes. Sorry to be a pain, but is there anything you can do to expedite fixing this? Thanks for your support - I love this plugin, and I really want to continue to rely on it.

luc-ass commented 2 years ago

Seems to be connected to this: https://github.com/homebridge/homebridge/issues/874#issuecomment-455867267

Could not find a quick way to implement this, but perhaps someone else has the time to work it out?

luc-ass commented 2 years ago

@cjastennett could you have a look at your ~/.homebridge/persists/IdentifierCache.xxxxxxxxxxxx.json and see if the entries are repeating over and over?

metaljay commented 2 years ago

Just a prompt that this is still an issue, anything we can do to assist? Love the plugin 😁

luc-ass commented 2 years ago

@cjastennett could you have a look at your ~/.homebridge/persists/IdentifierCache.xxxxxxxxxxxx.json and see if the entries are repeating over and over?

You could have a look into the file above. I'm still not sure why the identifier includes a randomized part.

psculthorpe commented 2 years ago

@luc-ass I have lots of repeating entries in my IdentifierCache.xxxxx.json file - that's all I can do to help though - I have no idea what the repetition means or how it might fix the issue, but I too get the issue reported. If my Pi running homebridge is restarted, all my sensors default to one room.

I can share the file if it helps (and if safe to do so...) or if not I can do a search and replace on the unique identifiers to protect myself but still show where each one is unique.

metaljay commented 2 years ago

weirdly I don't have any files within ~/.homebridge/ or Pi for that matter

luc-ass commented 2 years ago

Yeah, I noticed as well, that the last update to that file is quite old. Seems homebridge changed something under the hood - it's about time I found some (time) to rewrite this plugin using the modern template.

luc-ass commented 2 years ago

Okay, I think I got a little further. Can someone check in the Home.app if your serial number isn't set as well? Default-SerialNumber Bildschirmfoto 2022-08-20 um 16 31 16

SeaneyC commented 2 years ago

Getting the same

On Sat, 20 Aug 2022 at 15:32, Lucas Gasenzer @.***> wrote:

Okay, I think I got a little further. Can someone check in the Home.app if your serial number isn't set as well? Default-SerialNumber [image: Bildschirmfoto 2022-08-20 um 16 31 16] https://user-images.githubusercontent.com/3263257/185751528-0c4a95de-7f49-4c67-b0cc-a1bc5ab9ac7f.jpg

β€” Reply to this email directly, view it on GitHub https://github.com/luc-ass/homebridge-evohome/issues/61#issuecomment-1221325208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT4A6BJR27A6JDLYO2MHTPLV2DT7DANCNFSM4R3OWNFA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

5xPa commented 2 years ago

Below is the information from my installation

Manufacturer Serial Number Default-SerialNumber Model Firmware HomeKit Certified Honeywell HeatingZone 086

Sent from my iPhone

On 20 Aug 2022, at 15:32, Lucas Gasenzer @.***> wrote:

ο»Ώ Okay, I think I got a little further. Can someone check in the Home.app if your serial number isn't set as well? Default-SerialNumber

β€” Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

luc-ass commented 2 years ago

Okay people, release v0.9.0 does now include a serial number. I have no way of testing wether homebridge will remember thermostats after an outage now, but I have high hopes... 🀞

Please let me know your results. Cheers.

tomsteenbakkers commented 2 years ago

Hi Luc, Great that you're still working on this!

I installed 0.9.0 and this works perfect. I got in serial number in the properties.

The only thing I needed to do is remove the Evohome Child bridge (which removes all accessory's). After the update it's seems everything is working but you can change the thermostat in the Home App. You get an error like Set to follow schedule.

But after adding the bridge and configure the accessory's after works like a charm.

luc-ass commented 2 years ago

That's good to hear! πŸŽ‰

The only thing I needed to do is remove the Evohome Child bridge (which removes all accessory's). After the update it's seems everything is working but you can change the thermostat in the Home App. You get an error like Set to follow schedule.

But after adding the bridge and configure the accessory's after works like a charm.

Please feel free to open another issue, if you keep encountering such problems. Work is slow, but we will eventually get to the bottom of it 😁

SeaneyC commented 2 years ago

Serial number is populated now, everything still seems to be working in Home app fine. Will update if any issues, many thanks!

On Sun, 21 Aug 2022 at 09:22, Lucas Gasenzer @.***> wrote:

That's good to hear! πŸŽ‰

The only thing I needed to do is remove the Evohome Child bridge (which removes all accessory's). After the update it's seems everything is working but you can change the thermostat in the Home App. You get an error like Set to follow schedule.

But after adding the bridge and configure the accessory's after works like a charm.

Please feel free to open another issue, if you keep encountering such problems. Work is slow, but we will eventually get to the bottom of it 😁

β€” Reply to this email directly, view it on GitHub https://github.com/luc-ass/homebridge-evohome/issues/61#issuecomment-1221497102, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT4A6BN3D7BXH5PKBH46ZKLV2HRNBANCNFSM4R3OWNFA . You are receiving this because you commented.Message ID: @.***>

luc-ass commented 2 years ago

Bad news: My Homebridge just reset my Thermostats again. 😞 The journey continues...

luc-ass commented 2 years ago

I talked to @ebaauw (who makes homebridge-hue) and found out, that the plugin as it is right now needs to wait for the evohome-server to be reachable before letting homebridge start (and thereby delaying the start of homebridge). Not exactly an ideal solution. The other way would be a complete refactoring of the code using the dynamic platform accessory model. That's my preferred way but way more work...

ebaauw commented 2 years ago

Not exactly an ideal solution.

Just run evohome in a child bridge. Then the behaviour would be very similar to systems with native HomeKit support: the accessories show as No Response until the server is available.

MonsterArtur1 commented 1 year ago

I've also encounter this issue. When I restart my homebridhe few times, I've got error in log: [Evohome] Error during login: attempt_limit_exceeded and all my automatizations are gone.

SeaneyC commented 1 year ago

This must by why I don’t seem to have any issues then, good to know.

Thanks

On Wed, 24 Aug 2022 at 07:58, Erik Baauw @.***> wrote:

Not exactly an ideal solution.

Just run evohome in a child bridge. Then the behaviour would be very similar to systems with native HomeKit support: the accessories show as No Response until the server is available.

β€” Reply to this email directly, view it on GitHub https://github.com/luc-ass/homebridge-evohome/issues/61#issuecomment-1225280444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT4A6BKURT6IFUDTJNF6FRLV2XBZFANCNFSM4R3OWNFA . You are receiving this because you commented.Message ID: @.***>

SeaneyC commented 1 year ago

Do you know what triggered the reset? I’ve dropped power to my rPi a couple of times by accident as it runs off PoE with no real issues recently.

On Tue, 23 Aug 2022 at 20:57, Lucas Gasenzer @.***> wrote:

Bad news: My Homebridge just reset my Thermostats again. 😞 The journey continues...

β€” Reply to this email directly, view it on GitHub https://github.com/luc-ass/homebridge-evohome/issues/61#issuecomment-1224761855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT4A6BOXMHGDGRPMJSHHWXLV2UUJNANCNFSM4R3OWNFA . You are receiving this because you commented.Message ID: @.***>

luc-ass commented 1 year ago

The reset happens when Honeywell Authentication fails for any reason. It's a known problem happening when: a) The Honeywell server is down and Homebridge is restarted or b) you reboot Homebridge multiple times, causing Honeywell to lock you out for some time

I am aware of this, but have no time to fix it in the coming weeks... Help is greatly appreciated!

MonsterArtur1 commented 1 year ago

Do you know what triggered the reset

I'm resetting this myself. For example, I'm testing a new plugin for another device, I need to restart the HB service a few times to set up everything correctly, and after that, all my Honeywell automation is gone.

I think that after 3-5 restarts honeywell authentication is blocked for API logins due to to many requests or sth. But after that all device are set ups as new one so all automatizations are gone.

maybe there is a way they could stay as "Not responding" in HomeKit? As my WIZ bulb when they are offline?

luc-ass commented 1 year ago

That's exactly what the known issue is. Your input is much appreciated.

As mentioned above this error will persist until either an easy fix is know or I have the time to rewrite the plugin using the new methods. Please be patient. πŸ€—

coolweb commented 1 year ago

@luc-ass As an easy fix as @ebaauw mentioned, as child bridge, if the plugin do not respond it 'll not hang the main homebridge instance and with native HomeKit support: the accessories show as No Response until the server is available. So I think that the callback function from accessories: function (callback) { should not be called in case of error at startup. So the plugin is not started and devices should not be deleted. Something to try...

luc-ass commented 1 year ago

@coolweb could you point me to the line of code you suspected to be the fix? This?

coolweb commented 1 year ago

@luc-ass The line your are pointing, yes, supposing the error did not occur while retrieving locations, zones, thermostats…

coolweb commented 1 year ago

@luc-ass I made a PR