Node-RED auth from API password to Long-Lived access token

I’ve been successfully using “node-red-contrib-home-assistant” with API password for a long time. That said, it looks like I now have to move to Long-Lived Access Tokens which requires “node-red-contrib-home-assistant-websocket”.

My issue is that I already have a lot of automation configured under the wrong palette. And I can’t figure out how to move to the websocket library without breaking all my current automation flows.

Any pointers on how to proceed would be appreciated.

shut down node-red, install the new palette, uninstall the old one. You will have to do it from the command line because you have flows in use.

I had some issues with installing the library from command line because I am running Node-RED in a container. Not sure what I did wrong but my library wasn’t getting loaded properly.

In case somebody else has the same issue, I just fixed it by backing up my data folder (all config files), deleting all files, generated new files by restarting my container, re-install all libraries and then overwriting my flows using my previous flow file. That worked for me.

You can install NPM on the host running docker, cd to the data directory where the .node_modules directory resides, and run the npm install commands for the palettes. You don’t need node-red installed/running on the host in order to do that.

This is what I ended up doing too.