fdegier / homebridge-jablotron-alarm

Homebridge plugin for connecting Jablotron JA-100 alarm systems to Homekit.
The Unlicense
26 stars 6 forks source link

Not responding after some days - need to restart Homebridge #73

Closed acresp closed 2 years ago

acresp commented 2 years ago

Hello, I don't know if there were some changes recently that could be the reason, but I keep the plugin up to date as much as possible. And since few weeks, I noticed that the plugin does not respond anymore after few days, I need to restart Homebridge to get it working again. And here is the error I see in Homebridge when the plugin does not work:

[3/14/2022, 1:35:33 PM] [Jablotron] Error: TypeError: Cannot read properties of undefined (reading '0') [3/14/2022, 1:35:33 PM] [Jablotron] Unable to parse JSON [3/14/2022, 1:36:33 PM] [Jablotron] Error: TypeError: Cannot read properties of undefined (reading '0') [3/14/2022, 1:36:33 PM] [Jablotron] Unable to parse JSON

Thanks for your help :-)

fdegier commented 2 years ago

Hi, I just noticed as well. Jablotron has been doing some maintenance / work on their API and it seems to have broken this plugin. Last week the update was to upgrade from 1.6 to 1.8 but it seems one of the data structures has changed now. Hang tight, working on it.

acresp commented 2 years ago

Wouaw, you're fast 👍 Thanks a lot for your work!! 🙂

fdegier commented 2 years ago

Interim solution Restart your homebridge.

Interesting, so originally I did not read your message fully as I thought the issue was on Jablotron side again as they had maintenance over the weekend. When I restarted my homebridge it also starting working again so it seems to be that we have the exact same issue.

Will need to dive deeper into this issue later, tagging @misncz for awareness.

misncz commented 2 years ago

Yes, this is what happened to me and other guy too. I haven't seen this error till then. I raised PR to add enhanced error handling that might explain what's going on. I just hope Jablotron isn't moving to API 1.9 as that's quite different

fdegier commented 2 years ago

I finally got the issue again and the error is quite clear. Seems like a regression.

image

misncz commented 2 years ago

Looks like cloud now invalidates sessions after some time

misncz commented 2 years ago

@fdegier I raised PR with the fix. Please check

fdegier commented 2 years ago

Fixed in #75

acresp commented 2 years ago

Thanks a lot for your work!! @misncz @fdegier