andrei-tatar / node-red-contrib-smartnora

Node Red Google Home integration
https://smart-nora.eu/
109 stars 24 forks source link

Lost all devices except 1, but have an active subscription #259

Closed osvedman closed 1 year ago

osvedman commented 1 year ago

I lost all my devices in Smart NORA except 1 yesterday, but my subscription is active. Can you please look into it?

My user id is: t7WJolzaFqMUs6VFcvFzRNi2qnF2

andrei-tatar commented 1 year ago

Hi @osvedman That's weird. I can see only one device is synced. What version of NORA are you using? Any logs in node-red? Are you using multiple node-red instances or subflows?

osvedman commented 1 year ago

nora: - unhandled error (trying again in 36.8 sec): HTTP response (404 {"description":"device missing","id":"409ebfca:1a912"}) Error: HTTP response (404 {"description":"device missing","id":"409ebfca:1a912"}) at FirebaseSync.doHttpCall (/home/pi/.node-red/node_modules/node-red-contrib-smartnora/build/nora/sync.js:229:27) at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) at async FirebaseSync.handleJob (/home/pi/.node-red/node_modules/node-red-contrib-smartnora/build/nora/sync.js:173:21)

I tried simply rebooting the entire Raspberry Pi 4 just now, and it seems to have fixed it...

Weird, indeed.

osvedman commented 1 year ago

In the Google Home logs, all the devices were removed at 8:51 PM, May 4th 2023

andrei-tatar commented 1 year ago

I can see in the logs there were 2 sync calls with 3 seconds between them for the same group. The 1st call had 43 devices and the 2nd call had only 1 device and it override the 1st call. This was reported once, before, but I wasn't able to find the issue or reproduce it.

https://github.com/andrei-tatar/node-red-contrib-smartnora/issues/198

Will look further into it.

It might be that for the 1st call, your node-red instance never got a response and it tried again 3 sec later but it doesn't explain why it tried again with only 1 device.

andrei-tatar commented 1 year ago

@osvedman published version 1.19.0 which fixes the issue.

osvedman commented 1 year ago

Okay, cool! I've updated to 1.19.0 now and hopefully I won't see this again :)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 7 days since being marked as stale.