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

Evohome devices randomly reset in My Home UI #61

Closed
cjastennett opened this issue Sep 27, 2020 · 37 comments
Closed

Evohome devices randomly reset in My Home UI #61

cjastennett opened this issue Sep 27, 2020 · 37 comments

Comments

@cjastennett
Copy link

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
Copy link

tomsteenbakkers commented Sep 27, 2020

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
Copy link
Author

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
Copy link
Owner

luc-ass commented Oct 7, 2020

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

@rooi
Copy link
Contributor

rooi commented Dec 6, 2020

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
Copy link
Owner

luc-ass commented Jan 17, 2021

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

@djsomi
Copy link

djsomi commented Dec 22, 2021

Same Issue here!

@psculthorpe
Copy link

Same here too

@djsomi
Copy link

djsomi commented Mar 22, 2022

Any news on this? Thanks!

@luc-ass
Copy link
Owner

luc-ass commented Mar 24, 2022

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

@cjastennett
Copy link
Author

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
Copy link
Owner

luc-ass commented May 31, 2022

Seems to be connected to this: homebridge/homebridge#874 (comment)

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

@luc-ass
Copy link
Owner

luc-ass commented May 31, 2022

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

@metaljay
Copy link

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

@luc-ass
Copy link
Owner

luc-ass commented Jul 20, 2022

@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
Copy link

psculthorpe commented Jul 20, 2022

@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
Copy link

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

@luc-ass
Copy link
Owner

luc-ass commented Jul 22, 2022

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
Copy link
Owner

luc-ass commented Aug 20, 2022

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
Copy link

SeaneyC commented Aug 20, 2022 via email

@5xPa
Copy link

5xPa commented Aug 20, 2022 via email

@luc-ass
Copy link
Owner

luc-ass commented Aug 20, 2022

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.

@luc-ass luc-ass added the bug label Aug 20, 2022
@tomsteenbakkers
Copy link

tomsteenbakkers commented Aug 21, 2022

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
Copy link
Owner

luc-ass commented Aug 21, 2022

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
Copy link

SeaneyC commented Aug 21, 2022 via email

@luc-ass
Copy link
Owner

luc-ass commented Aug 23, 2022

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

@luc-ass
Copy link
Owner

luc-ass commented Aug 24, 2022

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
Copy link

ebaauw commented Aug 24, 2022

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
Copy link

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
Copy link

SeaneyC commented Oct 11, 2022 via email

@SeaneyC
Copy link

SeaneyC commented Oct 11, 2022 via email

@luc-ass
Copy link
Owner

luc-ass commented Oct 11, 2022

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!

@luc-ass luc-ass changed the title Evohome devices randomly reset in My Home UI Evohome devices ~~randomly~~ reset in My Home UI Oct 11, 2022
@luc-ass luc-ass changed the title Evohome devices ~~randomly~~ reset in My Home UI Evohome devices randomly reset in My Home UI Oct 11, 2022
@MonsterArtur1
Copy link

MonsterArtur1 commented Oct 12, 2022

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
Copy link
Owner

luc-ass commented Oct 12, 2022

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
Copy link

coolweb commented Oct 14, 2022

@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
Copy link
Owner

luc-ass commented Oct 15, 2022

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

@coolweb
Copy link

coolweb commented Oct 16, 2022

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

@coolweb
Copy link

coolweb commented Oct 26, 2022

@luc-ass I made a PR

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

No branches or pull requests