HowTo: Controlling hue scenes through OH

Good Morning!

I am not able to import the Node-Red code…

You have a PM! :wink:

Hi!

To bring my issue to an end…

I was not able to import the config from @smooney but i figured out by myself how to implement the function via Node-Red, Openhab and Hue Bridge. Following setup is working for me!

I added following thing to openhab:

Number Hue_WZ_Scenes "Hue Scenen" <sofa>

Sitemap:

        Selection item=Hue_WZ_Scenes label="Hue Scenen" mappings=[1="Fernsehen", 2="Standard", 3="Gedimmt", 4="Konzentration", 5="aus"]

In node red following setup:

[{"id":"2a5ae6ee.6218fa","type":"tab","label":"Phillips Hue Scenes","disabled":false,"info":""},{"id":"de2f3190.fc1c6","type":"openhab2-in","z":"2a5ae6ee.6218fa","name":"","controller":"8820b937.b012e8","itemname":"Hue_WZ_Scenes","x":160,"y":140,"wires":[["334025a0.273182"],[]]},{"id":"96926d28.164bc","type":"function","z":"2a5ae6ee.6218fa","name":"Szene EIN","func":"msg.payload={\"on\":true};\nreturn msg;","outputs":1,"noerr":0,"x":550,"y":120,"wires":[["bb412a37.bd12b8"]]},{"id":"bb412a37.bd12b8","type":"hue-scene","z":"2a5ae6ee.6218fa","name":"Fernsehen","bridge":"419f815d.b0356","sceneid":"XCtu5Rkn0y8YwCo","x":704,"y":120,"wires":[[]]},{"id":"72f0db35.a8475c","type":"hue-group","z":"2a5ae6ee.6218fa","name":"Wohnzimmer","bridge":"419f815d.b0356","groupid":"1","colornamer":true,"x":710,"y":300,"wires":[[]]},{"id":"5e4ab71b.8483e8","type":"function","z":"2a5ae6ee.6218fa","name":"Szene AUS","func":"msg.payload={\"on\":false};\nreturn msg;","outputs":1,"noerr":0,"x":556,"y":300,"wires":[["72f0db35.a8475c"]]},{"id":"334025a0.273182","type":"switch","z":"2a5ae6ee.6218fa","name":"Weiche","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":361,"y":143,"wires":[["96926d28.164bc"],["d53da596.0fbe38"],["b4e6b20f.4828e"],["69dea59d.ced37c"],["5e4ab71b.8483e8"]]},{"id":"d53da596.0fbe38","type":"function","z":"2a5ae6ee.6218fa","name":"Szene EIN","func":"msg.payload={\"on\":true};\nreturn msg;","outputs":1,"noerr":0,"x":558,"y":162,"wires":[["727f0aa5.adcee4"]]},{"id":"727f0aa5.adcee4","type":"hue-scene","z":"2a5ae6ee.6218fa","name":"Standard","bridge":"419f815d.b0356","sceneid":"XnbAdiemkJRgZWk","x":702,"y":162,"wires":[[]]},{"id":"69dea59d.ced37c","type":"function","z":"2a5ae6ee.6218fa","name":"Szene EIN","func":"msg.payload={\"on\":true};\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["9822b507.6e0d28"]]},{"id":"9822b507.6e0d28","type":"hue-scene","z":"2a5ae6ee.6218fa","name":"Konzentration","bridge":"419f815d.b0356","sceneid":"niEDwOH0tSPaupl","x":734,"y":260,"wires":[[]]},{"id":"b4e6b20f.4828e","type":"function","z":"2a5ae6ee.6218fa","name":"Szene EIN","func":"msg.payload={\"on\":true};\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":220,"wires":[["4b805a5d.351744"]]},{"id":"4b805a5d.351744","type":"hue-scene","z":"2a5ae6ee.6218fa","name":"Gedimmt","bridge":"419f815d.b0356","sceneid":"GTvyOnZ6xyOQ5QF","x":714,"y":220,"wires":[[]]},{"id":"8820b937.b012e8","type":"openhab2-controller","z":"","name":"Openhab","protocol":"http","host":"localhost","port":"8080","path":"","username":"openhabian","password":"openhabian"},{"id":"419f815d.b0356","type":"hue-bridge","z":"","name":"Philips hue","bridge":"10.0.0.57","key":"VWLLVKv2C33dGtcOwXBL7EFAIgL4E5u2AkvRy4fb","interval":"3000"}]

This is working for me… Some tuning and it is wife friendly… :wink:

1 Like

Hi all,

I want to try this However I`m not using Openhabian, how do I install node-red on a debian stretch the easiest way?

Thank you!

Kind regards,
Thomas