Node-Red on OH3

Actually I don’t know if it is really necessary to set the second one, first one is not required.
Mine (default) settings are

For the api security you just use the full token as username and no password? Or do we use the name of the token in user and then the full token within the password? I noticed there is a prefix of oh.username as a part of the token - do we include that text with the rest ?

Thanks for your help! (on and this is for the openhab2 nodes right ? aka green nodes)

Just use the token as username and no password. Yanneck explained it completely here: API
On my phone I can’t make a screenshot of nodered, but you should fill it in when setting up the configuration of the green OH nodes indeed.

To add what @lampy has posted, the password field can be blank with the API token in the user field; and yes you need the prefix of oh.whatIcalledmytoken.random.text.

1 Like

Thanks for all of the help here - something is stuck on my regular install of node-red that was previously going. I think the upgrade or co-existence of my legacy stuff is causing issue. I did a new docker install and everything works perfectly with the new green nodes. Thanks again for your help.

One other question - what is the best way / what is everyone doing to deal with the fact we are now getting UoM with the value on these nodes (ie a dimmer is returning a msg.payload of “67 %” or my current power returns “1.23 kW”) do you just suggest doing a string split based on the space so I can process the number correctly going forward?

In case it helps anyone else - i’ve found that if you happen to have both openhab nodes installed at the same time it doesn’t seem to play nice. My green nodes didn’t return any items until i removed the ‘white nodes’ from the pallete


How can I create the API key in OH3? I have absolutely no experience in REST; I just would like to enable Node Red rule coding in OH3.
Thanks :slight_smile:

Will I get the code from the updated archive when installing Node Red from openhabian?

There is GitHub - QNimbus/node-red-contrib-openhab-v2 vs. GitHub - pdmangel/node-red-contrib-openhab2 where only the latter seems to be the updates one…?

I concur with that. Had to delete all white OH nodes before Greens would work. Many Thanks

1 Like

Please read the link in my post 4 up to yours.

Ah, thanks. Lower left corner… this is hidden very well :wink:

1 Like

My OH3 with Node-Red had issues, the openhab2-get nodes weren’t working, causing “ReferenceError: headers is not defined” error, and I found this alternative OH3 nodeset which you can install from the palette and works without issues:

I’m liking this Node-Red thing very much. This is the kind of simple visual editing I was looking for to automate the house.

Can anyone vouch the way to get OH3.1 working with nodered again?

I asume the palette that needs to be used is the one with openhab3 in the name (updated last week?)

I can get the event stream but can’t select items…
if you guys have a clear a → b → walkthrough please pin it as an answer :slight_smile:

I used this node via the palette manager:

In OH3 Administration > Settings > System Services > API Security
Verify that Allow Basic Authentication is turned on

Admin (In bottom left) > Create new API token > Create API Token
Create your token, make sure to copy it down before you leave the page

Go into node red and add one of the OH nodes to the flow.
Double click the node
Controller > Click the pencil
Change the OpenHAB version to v3
And paste your token in there.

I think I might have rebooted, then my items started showing up just fine.


Well… I somehow missed the Documentation on how to do this. This will be a better resource and should stay up to date.

1 Like

hmn did you fill it in as Username or as Token?

the wierd part is the events etc work super

actually I just looked at my setup and I did both…


Same here… Node-red can’t select itemName · Issue #27 · jeroenhendricksen/node-red-contrib-openhab3 (

and here

Node-red can’t select itemName - Off-Topic - openHAB Community

I have to add that i have NodeRed 2.1.3 in a docker container, and 1.3.4 not in a docker…

Pcap traces showing that the Docker container is doing the request to items, OH answers with the json file, but the openhab node does not handling the answer corect …

still trubelshooting, maybe i finde the differentce betwenn 1.3.4 and 2.1.3 Nodred …


Hi All,

Found the reason for the problem…

has nothing todo with the Node or NodeRed !

i am using a Docker Nodered instance in combination with Hassio … in that case all the NodeRed Entpoints get prefixed with /endpoint/ … so i had to change
line 545 in 77-openhab2.html from

$.getJSON("/openhab3/items", config)
$.getJSON("/endpoint/openhab3/items", config)

Hope this helps someone else doing the same thing and facing the same problem !


I’ve just created this post:

But it seems it’s the wrong place.

Can you please tell me where is located: ** 77-openhab2.html ** ?

Thanks, BR