To work fully, the home-assistant-websocket nodes require matching (ideally the latest) versions of HA, Node-RED, the home-assistant-websocket (pallet) nodes and the node-RED companion integration.
As Node-RED is provided in a modified state for the HA addon, the most up to date version of this includes a bundled matching set of websocket nodes, but not necessarily the latest. Going through the pallet and updating the HA websocket nodes to a newer version manually is possible, but there is always a risk that the latest websocket nodes require something that is not yet provided in Node-RED.
The one component you have not mentioned is the NR companion. My limited understanding is that this integration holds the code that physically executes the connection layer from inside HA, so this is a likely contender for connection issues. I added this integration manually (not HACS) and I typically forget that it, too, has to be updated in line with HA websocket node updates. Major updates to HA websocket nodes have failed for me in the past, as the latest nodes are looking for execution code in the NR companion that is not there.
At the time of writing, the latest Node-RED addon is 14.4.5, which includes the latest HA websocket nodes v0.56.0. The latest companion version is v2.2.0
https://github.com/zachowj/hass-node-red
Finding out the installed version of the companion is tricky. Manually looking for ‘manifest.json’ in config>custom_components>nodered will provide the version number in the file. Alternatively kermit provided me with a simple API call that fetches this information (of course, the catch 22 is that this API call uses the HA websocket to work, and if the websocket is not working…)
See the bottom part of the following post. We were at 1.1.1 less than one year ago!