Node red and HomeKit for switch item?

Tags: #<Tag:0x00007efec99b3240> #<Tag:0x00007efec99b3038> #<Tag:0x00007efec99b2e58>

Hi, I started to use node-red for the further HomeKit integration and I like it based on what I have seen. I used the node red and HomeKit and openhab tutorial.

I started well to display if the switch is on or off in HomeKit. First half of the journey mastered!

Overall flow:

The second part of the journey (starting from when the VPN button in HomeKit is turned off or on) I didn’t get right yet: The question is how do I create the flow from the VPN HomeKit node back to update the openhab item called ivpn?

Basically the HomeKit ivpn switch (in the middle of the workflow) sends true on port 1, and false on port 2 (picture 2) based on the template defined (picture 1).

The questions: How do I send the value (the value/command is enablev for On/true, the value disablev is for Off) to the ivpn openhab node (picture 3 and 4)? And which openhab2 node (picture 5) for the item ivpn do I need to take i.e. openhab2 get or openhab2 out? With which settings?

Picture 1:

Picture 2:

Picture 3:

Picture 4:

Picture 5:

Resolved it by sending it two openhab2 out nodes on the right-hand side, using the item command topic with the two concrete payloads (“enablev” and “disablev” in my case). I am sure I could do this smarter / easier with custom functions but will work on this later. I moved all the 30 HomeKit items to node-red as the stability / speed and integration is great. I did uninstall therefore the HomeKit binding in OH2.