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

Loss of push notifications after "deploy" and first event #8

Open
mcr-ksh opened this issue Nov 7, 2021 · 3 comments
Open

Loss of push notifications after "deploy" and first event #8

mcr-ksh opened this issue Nov 7, 2021 · 3 comments

Comments

@mcr-ksh
Copy link

mcr-ksh commented Nov 7, 2021

Hi,

I've been able to track down a weird issue that occurs only after the flow has changed and "deployed". The node reconnects and I'm able to receive only 1 or 2 events (motion, person, crying etc.). After that I won't be able to receive any more events.

On deploy:

4 Nov 10:48:15 - [info] Push notification connection closed
4 Nov 10:48:15 - [info] Disconnect from station T8410P..........C
4 Nov 10:48:15 - [info] Disconnect from station T8410P..........8
CLEANUP
4 Nov 10:48:15 - [info] Disconnected from station T8410P..........C
4 Nov 10:48:15 - [info] Disconnected from station T8410P..........8
... more log events
4 Nov 10:48:18 - [info] Connected to station T8410P..........8 on host 192.168.x.5 and port 27457
4 Nov 10:48:18 - [info] Connected to station T8410P..........C on host 192.168.x.7 and port 27457
4 Nov 10:48:19 - [info] Push notification connection successfully established

It is clear that the push notification and local network connection is disconnected and reconnected. Being connected using https://github.com/bropat/eufy-security-ws for debugging I was able to see that the camera still sends the events (iOS app also receives push notifications), just node-red won't receive any more events.

If I stop node-red and restart without any changes to the flow (no "deploy") the notifications work properly. Anyone else experienced that behaviour?

@recallfx
Copy link
Owner

Very strange, did not see such behaviour, I see that there is an update to eufy-security-client (1.4.0), perhaps that would help.

@mcr-ksh
Copy link
Author

mcr-ksh commented Nov 29, 2021

@recallfx its not the eufy-security-client. I've already updated the library to latest and the problem still occurs.
It seems to me it happens because the library is reconnecting to fast to the UDP socket and thus causing problems on the push notifications stream.

i've put this into initialise() function and seems to help in my case. This is not a bug fix but more a indication where to look.

const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
wait delay(30000);`

Furthermore i've also added this.driver.isPushConnected in connect():

if (this.initialised && !this.driver.isConnected() && !this.driver.isPushConnected()) {

UPDATE: unfortunately this did not really worked permanently. after a couple of hours the connection is gone again

@xeryax
Copy link

xeryax commented Apr 27, 2022

I am also having this problem--- I just got my eufy t8520 lock, so i dont know much about it... but it seems that the connection is closing to the eufy device, then only updating whenever the poll timer is reached, and the PUSH notifications aren't really doing anything.

I get: 27 Apr 14:04:20 - [info] Push notification connection successfully established

and when my device is connected for polling:
27 Apr 14:01:25 - [info] Connected to station T8520 on host 192.168. and port 28019
I get status updates instantly... but not when the device is disconnected for powersave...

I also think this is related to eufy-security-client, as this was happening in the HomeAssistant integration, which is based on the same backend.

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

No branches or pull requests

3 participants