Circadian Lighting with Hue

Brand new to node-red... installed last night on my RPi 4 that also runs Homebridge and Pi-hole.

I read a post a while back on Reddit where someone mentioned how they used node-red to control Adaptive Lighting. Intrigued, I installed tonight to attempt to set it up using a rough guide here bypassing the Home Assistant part, of course.

However, I am not quite sure I'm grasping this correctly. I installed Hue Magic and I played around with this.... but its not quite working.

Here's the flow I have so far

[{"id":"8d58273f.4c5978","type":"tab","label":"Hue Circadian Lights","disabled":false,"info":""},{"id":"13b2fdcb.0ccce2","type":"sun-position","z":"8d58273f.4c5978","name":"","positionConfig":"f88adf40.80bc6","rules":[],"onlyOnChange":"true","topic":"","outputs":1,"start":"","startType":"none","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"end":"","endType":"none","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"x":270,"y":40,"wires":[["3eab8beb.e3ece4","27c30c04.b0f354"]]},{"id":"edf3791b.302ec8","type":"inject","z":"8d58273f.4c5978","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":40,"wires":[["13b2fdcb.0ccce2"]]},{"id":"3eab8beb.e3ece4","type":"debug","z":"8d58273f.4c5978","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":430,"y":40,"wires":[]},{"id":"27c30c04.b0f354","type":"change","z":"8d58273f.4c5978","name":"","rules":[{"t":"set","p":"payload.kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":100,"wires":[["530a54c0.525b8c"]]},{"id":"530a54c0.525b8c","type":"range","z":"8d58273f.4c5978","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.kelvin","name":"change percent to kelvin","x":450,"y":100,"wires":[["e8639623.239c68","a628442f.ba9678"]]},{"id":"e8639623.239c68","type":"debug","z":"8d58273f.4c5978","name":"kelvin","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":590,"y":40,"wires":[]},{"id":"a481181a.b3e648","type":"hue-bridge-node","z":"8d58273f.4c5978","name":"","bridge":"f8ec1cc7.4d691","autoupdates":true,"skipglobalevents":false,"x":270,"y":160,"wires":[["80806337.e88ce"]],"inputLabels":["any"]},{"id":"80806337.e88ce","type":"debug","z":"8d58273f.4c5978","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payloadhue","targetType":"msg","statusVal":"","statusType":"auto","x":480,"y":160,"wires":[]},{"id":"d9db2635.d4b518","type":"hue-group","z":"8d58273f.4c5978","name":"Living Room","bridge":"f8ec1cc7.4d691","groupid":"1","colornamer":true,"skipevents":false,"universalevents":false,"x":110,"y":220,"wires":[["80806337.e88ce"]]},{"id":"a628442f.ba9678","type":"change","z":"8d58273f.4c5978","name":"","rules":[{"t":"set","p":"colorTemp","pt":"msg","to":"payload.kelvin","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":100,"wires":[["d9db2635.d4b518"]]},{"id":"f88adf40.80bc6","type":"position-config","name":"StargateWest","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"},{"id":"f8ec1cc7.4d691","type":"hue-bridge","name":"Philips hue","bridge":"192.168.4.22","key":"8poyndteKDzXYZp68oReUynDcXI473HoHFBW91qi","interval":"3000","disableupdates":false}]

If anybody has any ideas... that'd be great. Thanks!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.