Node-RED to connect Hue Sensors with openHAB

Hi all,

i find out a way to connect the Hue Sensors via Node-RED with openHAB with the Flows node-red-contrib-huemagic and node-red-contrib-openhab2 from the Node-RED library:

To get the Luminance there was a Switch that get the Values (Example:lightLevel) from the Hue-Sensor:
lightlevel

This Node was linked to an openHAB-Output-Node:
openhab

To get the Motion-Values there is function to convert the Values “true” or “false” to “ON” and “OFF”:

switch (msg.payload)
{
    case false:
        msg.payload = "OFF";
        break;
    case true:
        msg.payload = "ON";
        break;
    default:
    break;
}
return msg;

functionmotion

Regards
Heiko

4 Likes