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

Node fails to reconnect after power cycle of BSS #7

Open
simcc opened this issue Feb 15, 2024 · 8 comments
Open

Node fails to reconnect after power cycle of BSS #7

simcc opened this issue Feb 15, 2024 · 8 comments

Comments

@simcc
Copy link

simcc commented Feb 15, 2024

After a BSS power cycles or reboots etc. the node thinks it's still connected but isn't.

Only solution I found is to reboot node-red...any ideas?

(Thanks for the nodes BTW, pretty cool! Only just started testing it...)

@dudest
Copy link
Owner

dudest commented Feb 15, 2024

Hi simcc,

I'm semi aware of the issue and know what the problem is. I'm using net.connect() once when a config node is created. If it looses its connection I don't have any logic to reconnect.

I'll add this on my to do for the next revision, for now the only fix is to deploy -> restart flows

@simcc
Copy link
Author

simcc commented Feb 15, 2024

Cool, thanks, look forward to it...I plan on using this a bit

@simcc
Copy link
Author

simcc commented Feb 15, 2024

15 Feb 22:55:21 - [info] [soundweb-server:9e81a359121ca9e6] socket connected
15 Feb 22:55:21 - [info] [soundweb-server:9e81a359121ca9e6] socket ready

(Power cycle BSS at 22:56, wait for it to load up and try send a payload)

15 Feb 22:57:07 - [error] [soundweb-server:9e81a359121ca9e6] Error: read ECONNRESET
15 Feb 22:57:07 - [info] [soundweb-server:9e81a359121ca9e6] socket closed

Maybe that's of any help...

@simcc
Copy link
Author

simcc commented Feb 15, 2024

if you want me to test anything, let me know...have a BLU-160 here.

@dudest
Copy link
Owner

dudest commented Feb 16, 2024

Hi simcc,

Thank you for supporting this project. Access to a blu would indeed be very helpful :-).

Once a have some free time I'll start a new branch and test with a generic tcp server. Are you keen to help testing when I have something that makes sense? This will be prior to publishing to NPM and will involve manually installing the node (not through node-red palette). I can guide you through this if needed.

@simcc
Copy link
Author

simcc commented Feb 17, 2024

Hey Alex, cool thanks, no thank you for writing this!

I wanted to track temperature on my 160 as I run it without fans in a home studio setup...have temps coming back and logged into home assistant on an rpi (and homekit now)...also I've done other stuff in very hacky ways, so this will be a nice way to simplify everything and consolidate, when i get around to it :)...also want to make an eq controller some day (motion control is very limited)...

Anyway, yeah, up for testing, I haven't manually installed nodes yet, if there's a guide you can link me I'm sure i'll be fine...I have node-red on my Mac also, that one I use for messing about, or can set it up on another computer here anyway...

@dudest
Copy link
Owner

dudest commented Mar 9, 2024

Hello @simcc,

I've just release v1.0.7 that doesn't fix this issue. What I did was make the parsing library it's own separate package called hiqnet.

The idea was to be able to use Node-RED's built in tcp request node in conjunction with a function node if one so chooses. See the function documentation here: using-the-functionexternalmodules-option

I will need more time to rework the connection logic and solve the issue. The built in tcp request node does recover properly in case this is a must for your usage.

@simcc
Copy link
Author

simcc commented Mar 10, 2024

Hi, thanks, I'd wouldn't know how to do that TBH. I'm basically beginner node-red lol.

What i did though as a hacky workaround: the blu160 sends out a udp upon boot, and that restarts node-red...actually been working 100% last few weeks, to the extent i totally forgot about it.

Screenshot 2024-03-10 at 17 02 50 Screenshot 2024-03-10 at 17 07 49

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

2 participants