HE v2.2.9.133 - Logsocket Stopped Working

I'm using a logsocket function in NodeRed to store my Hubitat logs into an InfluxDB database. Updating to the latest HE firmware (2.2.9.133) seems to have broke the logsocket connection.

Anyone else seeing this?

What was the last prior firmware version for which it was working?

It was working with 2.2.9.131. Maybe @gopher.ny can shed some light on this issue?

Two hours later the logsocket connection started working again on its own…. weird.

No changes in logsocket between 131 and 133.

2 Likes

Thanks for the response.

I have seen logsocket stop working with Node-RED when HE is restarted. I don't think the issue is with HE though. I put in logic in Node-RED to restart the flows when HE is restarted and that fixed the issue. What would happen is that Node-RED would show that it was still connected to HE but no data would flow through the node.

Thanks for responding. Can you share your restart logic?

Edit,,, Never mind I think I found it here:

Let me know if you have any questions on the flow. The "restart" logic is after the manual inject node and is also triggered by the systemStart event from HE

One thing - in the function node, the "id" and "label" is for the specific tab that has the websocket node listening to HE. I'm not sure if that is required or it restricts the restart (redeploy?) to that specific flow, but that is what the API documentation seemed to indicate.


Got it, thanks!

@Vettester @rakeshg I have had my NodeRed event socket disconnect on reboot and stay that way. I mention this because the restart solution you are using could be impacted by this because it’s expecting to reconnect to HE. Instead I have my HE hub restart NodeRed when it reboots:

1 Like

Initially when I noticed that the logsocket connection had stopped the first thing I did was restart NR, but this didn’t help. I don’t think adding logic to restart NR will help resolve what I experienced. However, adding this type of logic would improve the functionality of my flows.

Thanks again to both of you for your suggestions!

Interesting - it has been working for me :crossed_fingers:. I wonder what the difference could be?

I think our solutions are similar. None of my rules are in HE, so it just makes sense for me to keep it all in NR.

EDIT: One thing that I have noticed (and put in code in NR to handle). I have a weekly hub "reboot" process (the same as selecting "Reboot Hub" from the HE settings menu)- in this case the websocket does stay connected. However, if HE was to restart (shutdown/restart), then the connection does get hung up and the restart of the flow fixes that.

Download the Hubitat app