Openhab and node-red

what exactly have you changed, I’m having the same issues.

or is the answer somewhere in this topic? because then I’ve must have mist it

Hi All,

I have some zigbee devices which do not have channels for some actions but are sending events.
i would like to catch these events in nodered. For that the openhab events node seems to be the right one, but have not much idea how to filter to the specific events.
Can someone help, please?
Thanks in advance

Yes you may try this. I am doing it as well for some long/short press events.
I did it by using the ‘filter’ node, which can filter out the right message for you. But you need to find the right naming to filter it.

  1. use the events node and place debug behind it
  2. start debug, trigger the event, and fast stop the debug node.
  3. find the right event and copy that name

For me the event was called: smarthome/channels/mihome:sensor_switch:xxxxxxxx:button/triggered

Afterwards I used the switch node to direct it into the right path.

image

Hi

That’s a really good way of doing that.

Can you export the filter and Switch nodes and paste then here?

I’d love to see how you’ve set that up.

(Currently, I use a function node to filter the traffic, but your solution seems a lot easier)

Cheers,

Stuart

@lampy many thanks for confirming that I am on the right track.
It seems like I can e only 50% successful as if I am not wrong it could only work if the thing has a channel. Unfortunately the IKEA symfonisk remote has only a dimmer channel so capturing the knob event will be not possible

I am not sure, I do catch also the events of the Fibaro dimmers with setup. In that case the filter text is smarthome/items/ZWaveNode015LivingroomCenter_SceneNumber/state.

I would say, just try the debug item, try if you can find something related to you handling.

Yes no problem:

   [{"id":"162e9146.8f096f","type":"switch","z":"7a84deb3.0e4318","name":"Filter Button","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"smarthome/channels/mihome:sensor_switch:xxxxx:button/triggered","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":339.9500427246094,"y":855.9499359130859,"wires":[["fcefb49e.71f84"]]},{"id":"fcefb49e.71f84","type":"switch","z":"7a84deb3.0e4318","name":"1=short ; 2=long ; 3=double","property":"payload.event","propertyType":"msg","rules":[{"t":"eq","v":"SHORT_PRESSED","vt":"str"},{"t":"eq","v":"LONG_PRESSED","vt":"str"},{"t":"eq","v":"DOUBLE_PRESSED","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":552.9500427246094,"y":854.6165618896484,"wires":[["2662deb4.8ddd4a"],["c7e1c2c9.731ee8"],["c818fbba.ec684"]]}]
2 Likes

That’s very kind of you.

Thank you

I’ve seen a version for OH3 has been updated last week, it says “check credentials” but with these credentials I can access the web pages of OH.

[SOLVED]

1 Like

I haven’t had to edit anything like this for a while, but I think you’ll find that creating an API token is the easiest solutions, so that your Node-RED openHAB controller configuration looks something like this —

You can create a new token from the homepage of your openHAB instance.

Click on the bottom left hand corner, to find something like this

Then click on “Create new API token” at the bottom.

You should be able to follow the pop-ups from there.

Just past the API token into Node-RED and REMOVE the username and password that you have currently.

Good luck

2 Likes