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

Subscription stops and dosent restart #16

Closed
thoj opened this issue Jan 10, 2019 · 14 comments
Closed

Subscription stops and dosent restart #16

thoj opened this issue Jan 10, 2019 · 14 comments

Comments

@thoj
Copy link

thoj commented Jan 10, 2019

Hi

Seems like something is stopping the subscription and the subscription does not start again before i redeploy the flow.

issue1
Here I just redeployed the flow.
issue2
Here is the flow. Nothing fancy.

Any suggestions on what to do?

@chuank
Copy link
Owner

chuank commented Jan 11, 2019

Hi @thoj can you set console logging to trace in your Node-RED server (see ~/.node-red/settings.js) and post the redacted logs of when your SSE loses the connection?

Particle just released v1.0.0 firmware for Core/Photon/P1/Electron with breaking changes to pub/sub. Have your devices upgraded to v1.0.0 when you experience the dropouts?

The nodes have already followed the deprecation notices from the v0.8.0 firmware but this obviously needs a bit of monitoring.

@chuank
Copy link
Owner

chuank commented Jan 13, 2019

I've been testing SSEs sent out via the Publish node and from a Photon running on v1.0.0 firmware. It's been going for two days so far but I'll keep monitoring it.

image

Maybe check your mqtt server, and the QoS and retain settings in your mqtt nodes?

@chuank
Copy link
Owner

chuank commented Jan 13, 2019

also refer to particle-iot/particle-api-js#95

@chuank chuank added the track label Jan 13, 2019
@jbesselm
Copy link

I am also seeing this behavior, In my case this usually happens when there is brief internet disruption. Before the updated nodes I could force a re-connect by sending a message to the input of the SSE node with the message.topic as devid and the message.payload as the device id. This no longer seems to work.
image

@jbesselm
Copy link

I got my re-connect to work by making a change in line 231 of particle.js
The updated node file had
image

I changed line 231 to look like the previous version if (val != null).

I don't know javascript, but this seemed to restore a re-connect with an incomming message to the SSE node.

@chuank
Copy link
Owner

chuank commented Jan 15, 2019

@jbesselm checking for a non-null value will force a reconnect anytime an upstream message payload enters the node. Perhaps allowing just a msg.topic of reconnect to force reconnections will be a good way to filter out unintended upstream messages connected by mistake.

If you can, please post your redacted node-red logs here (set debug level to trace), particularly around the moment your SSE disconnects. I've added some traces to check if abrupt stream disconnections are handled by the event listeners to the Particle JS API.

@GrantsPi
Copy link

GrantsPi commented Feb 8, 2019

I too have the issue of the SSE not being kept alive after a day or so. Looking forward to any suggestions on this issue.

@chuank
Copy link
Owner

chuank commented Feb 9, 2019

@GrantsPi thanks for the report; the key issue is related to particle-iot/particle-api-js#95.

Until it gets resolved, I'll add a keepalive mechanism within the SSE node in the next patch release.

@chuank chuank closed this as completed in 79062cc Feb 9, 2019
@chuank
Copy link
Owner

chuank commented Feb 9, 2019

v1.1.0 is released, which should hopefully address this issue. Upgrading via node-red palette. Please help to test and report back here, thanks.

@GrantsPi
Copy link

chuank, just to let you know that after 24 hours the SSE is still connected/reporting; will keep you posted over the next day or two. Thanks for the fix!

@chuank
Copy link
Owner

chuank commented Feb 11, 2019

Thanks for getting back @GrantsPi, I will keep track on my end too. Cheers

@chuank chuank removed the track label Feb 12, 2019
@thoj
Copy link
Author

thoj commented Feb 12, 2019

Seems to work fine! Thank you! :)

@GrantsPi
Copy link

Still working well! Thank you.

@marc-gist
Copy link

I seem to be getting this issue :(

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

5 participants