Node-Red on OH3

EDIT: Don’t follow the advice of this first post. The integration is finally working for many users. See posts further down. I’m working on a summary post with step by step instructions.

I solved my issue with nodeRED and am posting it here for the benefit of anyone else:

There are a few different versions of the nodeRED openHAB plugin. The one that has been updated for use with OH3 is node-red-contrib-openhab-v2. I only just began using it but so far it works identically.

I hope to reduce my use of nodeRED with the new rules engine, but since a lot of my automations currently depend on nodeRED I can begin the process of transferring them over bit by bit.

Node page: https://flows.nodered.org/node/node-red-contrib-openhab-v2

2 Likes

Did you simply just stop your 2.5OH container, and start the OH3 docker container?
I am also thinking of trying out the OH3 docker setup

Yes, I did exactly that - stopped OH 2.5.9 and started OH 3M1. I also made new directories (I used /opt/oh3 for the new stuff) but otherwise kept the config the same with ports and with exposing my two USB devices (for Z-wave and my MonoPrice 6 zone amplifier). I also spun up a separate frontail container and set it to display logs at port 9002, just since that seemed easier than stopping/starting frontail as well.

1 Like

So you only needed to make changes to you node red, fronttail containers? kept your mqtt container the same? what other docker containers did you use for OH3?

I may have spoken prematurely. I’m having some trouble with NodeRED. The new node puts every out in complex json that is breaking a lot of my automations. I’m still tinkering with it.

I didn’t actually change the NodeRED container, just made changes inside it. Once I’ve successfully moved over to the new node it shouldn’t matter to NodeRED whether it’s talking to OH2 or OH3.

The only other container I changed (duplicated actually) is frontail. My other containers seem to work as is, though I’m still working on moving stuff over and haven’t tested several of them (grafana, influxdb, squeezebox, homebridge, and mosquitto).

Hi @Dome, I’ve been trying to get node red working with OH3. I’ve used the plugin you suggest but items don’t show up in the drop down list. I keep getting 401 errors which I believe are authentication errors? Did you do anything on the openhab end to allow access?
Thanks.

Hello, same error here.
I was also playing around with the api security parameter in the oh3 settigs.
But still no success.

The newest OH3 Snapshots permit basic authentication for the API if you enable it.

I didn’t make any changes to openHAB to allow access to the API. My items are populating but state changes are not making it into NodeRED, so that’s a different problem than you’re having!

I honestly haven’t had a lot of time to troubleshoot but have a few things to try and if I’m still unsuccessful plan on opening an issue (or reopening the OH3 one) over on the GitHub page for the plugin. You could always do that too. Whether it’s user error or some type of bug that way the developer can address it. If there’s some other configuration step necessary it would be nice to make that clear.

Are you sure the described node-red pugin supports OH3? Where do you got this information from?

1 Like

Closed issue in the GitHub page.

I just saw that Node-Red makes a request to the events. But it fails.

So I made a check with the API Explorer. But also there the GET command is not executed. See in printscreen:


Do you also have the same problem? I am running Build 1996
Thank you. BR

Is there any progress on OH3 compatibality with Node-Red ?
I have the same issue with the 401 errors (with or without authentication enabled in OH3)

That is a Node-Red issue. 401 meant Node-Red us not authenticating properly. There are 2 possible paths.

Nothing in openHAB needs to change but Node-Red needs to provide a way to either use API Tokens, like many other REST APIs, or Basic Authentication.

EDIT Please read before posting in the GitHub Issue linked earlier, they explicitly state there is an updated Node-Red version.

I did read and tried and it is NOT working with the updated version, it’s even mentioned in this same topic

I’ve just tried it on docker with same version of nodered as yours. It works perfectly. Thank you very much for fast implementation.

Direct link:

Either way is is a Node-Red fix that is needed and this is not a Node-Red forum.

Did you even try it or just copy/pasting comments.
It is NOT working, I’m already in contact with the author of the plugin

There are no comments on that closed issue. Did you open a new one?

I’ve also not been successful at all using the new plugin with OH3. I have not had a ton of time to troubleshoot but I personally am watching the new issue for updates.