node-red-contrib-home-assistant-websocket icon indicating copy to clipboard operation
node-red-contrib-home-assistant-websocket copied to clipboard

After upgrading to 0.67.1 debug nodes / inject are greyed out, HA nodes shows no status

Open cpuks opened this issue 1 year ago • 37 comments

Documentation URL

No response

The problem

Problem/Motivation

Running latest version of NR within HA as and add-on I decided to upgrade node-red-websocket to latest which is 0.67.1 and after that I've been prompted to upgrade HA nodes and I did but realized that all of my debug nodes and inject nodes are grayed out, nothing displays inside debug window nor any HA node shows connection status. Nodes work as intended, but there's no feedback is provided by Node-Red. I've enabled heartbeat - set 60 sec and for over 10 min I had no connection drop.

I don't have anything fancy installed and didn't change anything except nr-websocket upgrade - double checked that.

Expected behavior

Proper feedback from NR<->HA connection, debug nodes / inject nodes work as intended, providing data.

Actual behavior

No feedback from NR - debug/inject and no connection status on any of HA nodes.

Steps to reproduce

Latest HA NR addon 18.0.5 - go to palette and upgrade node-red-ha-websocket to 0.67.1, then restart NR.

Proposed changes

Unknown

cpuks avatar Aug 18 '24 09:08 cpuks

Are you using the NR UI through the iframe in Home Assistant? If so, try connecting directly to NR. Check your browser console for errors.

This package doesn't modify anything related to the inject/debug nodes.

zachowj avatar Aug 18 '24 09:08 zachowj

Are you using the NR UI through the iframe in Home Assistant? If so, try connecting directly to NR. Check your browser console for errors.

This package doesn't modify anything related to the inject/debug nodes.

I am experiencing the same issue but can confirm that connecting directly to Node-RED makes the nodes non-grayed again. I am afraid I don't know how to check browser console for errors.

jjvelar avatar Aug 18 '24 10:08 jjvelar

Are you using the NR UI through the iframe in Home Assistant? If so, try connecting directly to NR. Check your browser console for errors.

This package doesn't modify anything related to the inject/debug nodes.

I think I hacve this eaxact same issue... When using NR addon and nodered via HA I get not status... When I go to IP:1880 all is fine... I started after I updated to node-red-contrib-home-assistant-websocket 0.67.2 (from the latest in the addon).

Problem is not with cache or browser as it is consistent in inprivate and among browsers. It always works with IP:1880... weird though?

sanderlv avatar Aug 25 '24 17:08 sanderlv

I had the same issue after upgrading from 0.65 to 0.68. I downgraded to 0.67.2 and the inject nodes started working again as they should.

However...there is no auto complete now within the nodes for action, entity, device id, area, floor, or label. it will give me a list of entities...but only about 10 or so. Nothing at all is listed under action, even if I put in a light for the entity. I have to type in the entire light.office_lamp and light.turn_on. Even typing them out fully doesn't bring up any match.

Disabled autocaching in server config node...restarted nodered...no change...re-enabled it...restarted...no change.

But when I connect to IP:1880 autocomplete works fine. Any thoughts? Not unusable...but a pain.

Update...was able to fix the issue by deleting all the browser data...then disabled caching of autocomplete...restarted node red...renabled caching...restarted nodered (entities worked after this but only entities)...restarted node red again...then everything else started working.

mike5879 avatar Aug 27 '24 10:08 mike5879

I had the same issue after upgrading from 0.65 to 0.68. I downgraded to 0.67.2 and the inject nodes started working again as they should.

However...there is no auto complete now within the nodes for action, entity, device id, area, floor, or label. it will give me a list of entities...but only about 10 or so. Nothing at all is listed under action, even if I put in a light for the entity. I have to type in the entire light.office_lamp and light.turn_on. Even typing them out fully doesn't bring up any match.

Disabled autocaching in server config node...restarted nodered...no change...re-enabled it...restarted...no change.

But when I connect to IP:1880 autocomplete works fine. Any thoughts? Not unusable...but a pain.

Update...was able to fix the issue by deleting all the browser data...then disabled caching of autocomplete...restarted node red...renabled caching...restarted nodered (entities worked after this but only entities)...restarted node red again...then everything else started working.

So debug and inject nodes are all working fine after you deleted browser data and played with caching?

cpuks avatar Aug 27 '24 15:08 cpuks

Today, I've updated to 68.6 and run into the same problem. I would appreciate if the next release will fix this issue, otherwise I'll try the solution of @mike5879

Update: Solution of @mike5879 doesn't work for me, so I've to wait until the developers will fix this issue.

HaraldGithub avatar Aug 28 '24 15:08 HaraldGithub

@HaraldGithub Are you accessing the Node-RED UI through an iframe, such as within Home Assistant, or directly? If it's through an iframe, have you tried accessing it directly to see if the issue persists? If it works directly, the problem may not be with this package but with the add-on.

zachowj avatar Aug 30 '24 14:08 zachowj

The problem persists if i connect by iframe, directly over HA sidebar. If i connect to NR by HA-IP:1880 connection closes within 10 seconds, so I couldn't adjust the above mentioned work around.

1. Update: Connection over Chrome works, so I'll try it again on weekend.

2. Update The solution above don't work for me. After starting NR or reload i've to wait 15 to 25 minutes before inject-node is working and NR display node-status. Also with 0.69.1!

HaraldGithub avatar Aug 30 '24 14:08 HaraldGithub

Still seeing this in 0.72.0. Using IP:port works, but seemingly intermittently, or only after waiting a while after a restart? Haven't nailed down a pattern yet.

dannycohn avatar Sep 12 '24 15:09 dannycohn

Same problem for me....

tomadan1968 avatar Sep 12 '24 15:09 tomadan1968

I know this is an HA problem... still hoping for the next add=on update to resolve this. In the meantime, does anyone know where to mention this to get some help to resolve this from HA side?

sanderlv avatar Sep 14 '24 17:09 sanderlv

I had this same issue when accessing NR through HA. I then went to homeassistant.local:1880, entered in my HA user credentials when prompted and then NR loaded and everything is working again.

nappyjim avatar Sep 15 '24 03:09 nappyjim

I know, but that's a workaround and not a solution.

sanderlv avatar Sep 15 '24 05:09 sanderlv

@sanderlv you could try the node-red add-on repo. There's already several issues posted about it there.

https://github.com/hassio-addons/addon-node-red

zachowj avatar Sep 15 '24 06:09 zachowj

I Have the same Problem: In the Web Interface the Status of the Nodes after 45 Minutes. And high 40% Nodred Cpu usage Starting with this Versions: HA: 2024.8 Node red 18.0.5 Node-RED Companion Integration v4.02 node-red-contrib-home-assistant-websocket 0.67.2

Markus730 avatar Oct 01 '24 15:10 Markus730

I resolved this by going to node-red directly through the 1800 port (http://node-red-ip:1800). Once into node-red, in the upper right corner, node-red showed a yellow warning sign with X number of issues. Clicking this shows you all nodes with errors or references to Home Assistant entities that are missing/wrong.

I went through all these issue and resolved them. When I got the the last one and hit 'deploy', node-red automatically restarted the node-red service. When it came back up, I check Node-red through HA and everything is working again!

twister36 avatar Oct 03 '24 16:10 twister36

I have no issues and problem persistent.

sanderlv avatar Oct 03 '24 17:10 sanderlv

Is everyone accessing the Home Assistant UI through a domain or an IP address? If you're using a domain, try accessing the UI via the IP address—does that resolve the issue with Node-RED?

zachowj avatar Oct 04 '24 10:10 zachowj

I'm using HA with IP-adress and I had the same problem when using the embedded link within HA. If i connected directly to Node-Red then it works fine.

I restored a snapshot so I'm at an old version that works for the moment.

blaxxor avatar Oct 04 '24 10:10 blaxxor

Is everyone accessing the Home Assistant UI through a domain or an IP address? If you're using a domain, try accessing the UI via the IP address—does that resolve the issue with Node-RED?

In my case IP address is same so doesn't work correctly. Tried on Edge and Chrome, cleared cache, tried Windows/Android/iOS.

cpuks avatar Oct 04 '24 10:10 cpuks

The inject node, debug window, and other similar features all rely on WebSocket communication between the frontend and backend. You'll likely see WebSocket connection errors if you check your browser's developer tools under the Network tab.

Can someone share the specific errors that are happening?

zachowj avatar Oct 04 '24 11:10 zachowj

The inject node, debug window, and other similar features all rely on WebSocket communication between the frontend and backend. You'll likely see WebSocket connection errors if you check your browser's developer tools under the Network tab.

Can someone share the specific errors that are happening?

Ok so you want me to dump those errors: {B91248AE-791A-4BB0-8912-C5B9BE2ABDEA}

cpuks avatar Oct 04 '24 11:10 cpuks

I also have the issue when connecting directly via ip

KevinHurts avatar Oct 04 '24 11:10 KevinHurts

I can access via :1880 at home, but how do I do that remotely via NabuCasa? I would like to be able to use NR away from home.

bkr1969 avatar Oct 04 '24 15:10 bkr1969

Try inst

I can access via :1880 at home, but how do I do that remotely via NabuCasa? I would like to be able to use NR away from home.

Easiest way is to setup zerotier or tailscale or some kind of VPN to get inside home network while away - OpenVPN, Wireguard etc. Zerotier / Tailscale / Wireguard are available in addon store. Why do you need access to such things as NR while away ?

cpuks avatar Oct 04 '24 15:10 cpuks

@cpuks

Sorry for my comment, but I would appreciate if the developer team will fix this issue instead of discussing VPN-access to my home-assistant-instance. ;-)

HaraldGithub avatar Oct 04 '24 16:10 HaraldGithub

Well HA is free and open source - anyone can help no one can expect miracles to be honest....

cpuks avatar Oct 04 '24 16:10 cpuks

Try inst

I can access via :1880 at home, but how do I do that remotely via NabuCasa? I would like to be able to use NR away from home.

Easiest way is to setup zerotier or tailscale or some kind of VPN to get inside home network while away - OpenVPN, Wireguard etc. Zerotier / Tailscale / Wireguard are available in addon store. Why do you need access to such things as NR while away ?

I access NR from work sometimes when schedule is slow/thigs in automations break. Not going to do VPN, just wondered if Nabu had the ability to connect to a specific port.

bkr1969 avatar Oct 04 '24 16:10 bkr1969

This is not a chatbox. Got to a forum then. This is about an issue, please provide info about the issue only.

sanderlv avatar Oct 04 '24 16:10 sanderlv

@cpuks That's the console output, but what I need is from the Network tab. Depending on your browser, it will look like the image below. Open the browser's developer tools before loading the Node-RED page, then switch to the Network tab. You can filter by type and look for "WS" (WebSocket). I'm specifically looking for the file /comms.

image

zachowj avatar Oct 04 '24 22:10 zachowj