Flow "conflicts"

Disclaimer: This is my first post here and I might use some wrong terms, I'm not a coder.

I'm trying to create circadian light flows based on this tutorial.

My problem is that there is some sort of conflict so that whenever I have multiple flows inside the same tab (or not actually) doing the same thing but controlling different entities (in Home Assistant) all lights are set to max defined brightness and max kelvin. If I only have one flow it works as it should.

This works:

[{"id":"3dd078d0.94ecd8","type":"tab","label":"Works","disabled":false,"info":""},{"id":"ae66a1e1.9ab87","type":"api-current-state","z":"3dd078d0.94ecd8","name":"Lux Yttergang","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.lux_yttergang","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":440,"y":580,"wires":[["9cf5fa8b.b554b8"]]},{"id":"9cf5fa8b.b554b8","type":"switch","z":"3dd078d0.94ecd8","name":"Lux Level","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"160","v2t":"num"},{"t":"btwn","v":"165","vt":"num","v2":"99999","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":620,"y":580,"wires":[["5ffaaa4a.0f56c4","e13a7285.e3d71"],["fb27e809.08cfe8"]]},{"id":"635396a4.1e55a8","type":"api-call-service","z":"3dd078d0.94ecd8","name":"Yttergang på (circadian)","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1830,"y":520,"wires":[[]]},{"id":"fb27e809.08cfe8","type":"api-call-service","z":"3dd078d0.94ecd8","name":"Yttergang av","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":830,"y":620,"wires":[[]]},{"id":"2316cb77.a2dce4","type":"api-current-state","z":"3dd078d0.94ecd8","name":"Home Mode","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.home_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":150,"y":700,"wires":[["35420fdb.b13f5"]]},{"id":"35420fdb.b13f5","type":"switch","z":"3dd078d0.94ecd8","name":"Mode","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Morgen","vt":"str"},{"t":"eq","v":"Formiddag","vt":"str"},{"t":"eq","v":"Ettermiddag","vt":"str"},{"t":"eq","v":"Kveld","vt":"str"},{"t":"eq","v":"Natta","vt":"str"},{"t":"eq","v":"Hjemmekontor","vt":"str"},{"t":"eq","v":"TV Kveld","vt":"str"},{"t":"nempty"}],"checkall":"true","repair":false,"outputs":8,"x":310,"y":700,"wires":[["ae66a1e1.9ab87"],["ae66a1e1.9ab87"],["ae66a1e1.9ab87"],["ae66a1e1.9ab87"],[],[],[],[]]},{"id":"44ee7f9c.a76d9","type":"function","z":"3dd078d0.94ecd8","name":"Color Temp Kelvin","func":"var newMsg =  {\n    payload: {\n        \"data\": {\n            \"kelvin\": msg.payload.kelvin,\n            \"brightness_pct\": msg.payload.percent\n        }\n    }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1590,"y":520,"wires":[["635396a4.1e55a8"]]},{"id":"5ffaaa4a.0f56c4","type":"sun-position","z":"3dd078d0.94ecd8","name":"","positionConfig":"2bc3093e.108386","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":830,"y":500,"wires":[["20b99878.39c6d8"]]},{"id":"20b99878.39c6d8","type":"change","z":"3dd078d0.94ecd8","name":"","rules":[{"t":"set","p":"payload.kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":500,"wires":[["836133f8.c11ba"]]},{"id":"836133f8.c11ba","type":"range","z":"3dd078d0.94ecd8","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.kelvin","name":"percent to kelvin range","x":1260,"y":500,"wires":[["b53d1feb.d5e76"]]},{"id":"e13a7285.e3d71","type":"sun-position","z":"3dd078d0.94ecd8","name":"","positionConfig":"2bc3093e.108386","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":830,"y":540,"wires":[["64ef3f44.208c6"]]},{"id":"2417928d.75ae2e","type":"range","z":"3dd078d0.94ecd8","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.percent","name":"percent to brightness","x":1260,"y":540,"wires":[["b53d1feb.d5e76"]]},{"id":"64ef3f44.208c6","type":"change","z":"3dd078d0.94ecd8","name":"","rules":[{"t":"set","p":"payload.percent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":540,"wires":[["2417928d.75ae2e"]]},{"id":"b53d1feb.d5e76","type":"join","z":"3dd078d0.94ecd8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1430,"y":520,"wires":[["44ee7f9c.a76d9"]]},{"id":"61329aac.44e694","type":"server","name":"Home Assistant","addon":true},{"id":"2bc3093e.108386","type":"position-config","name":"REDACTED","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]

This does not:

[{"id":"85e34f67.f682","type":"tab","label":"Not work","disabled":false,"info":""},{"id":"b4b88cc1.2e393","type":"api-current-state","z":"85e34f67.f682","name":"Lux Yttergang","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.lux_yttergang","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":340,"wires":[["b82be78c.625e58"]]},{"id":"b82be78c.625e58","type":"switch","z":"85e34f67.f682","name":"Lux Level","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"160","v2t":"num"},{"t":"btwn","v":"165","vt":"num","v2":"99999","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":580,"y":340,"wires":[["30a78a5b.12d336","d345b82e.71cfb8"],["3728d3ca.704dfc"]]},{"id":"6bd0e6cf.1b46d8","type":"api-call-service","z":"85e34f67.f682","name":"Yttergang på (circadian)","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1790,"y":280,"wires":[[]]},{"id":"3728d3ca.704dfc","type":"api-call-service","z":"85e34f67.f682","name":"Yttergang av","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":380,"wires":[[]]},{"id":"4330ac40.4e3de4","type":"api-current-state","z":"85e34f67.f682","name":"Home Mode","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.home_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":110,"y":660,"wires":[["b13e6ff.0c3239"]]},{"id":"b13e6ff.0c3239","type":"switch","z":"85e34f67.f682","name":"Mode","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Morgen","vt":"str"},{"t":"eq","v":"Formiddag","vt":"str"},{"t":"eq","v":"Ettermiddag","vt":"str"},{"t":"eq","v":"Kveld","vt":"str"},{"t":"eq","v":"Natta","vt":"str"},{"t":"eq","v":"Hjemmekontor","vt":"str"},{"t":"eq","v":"TV Kveld","vt":"str"},{"t":"nempty"}],"checkall":"true","repair":false,"outputs":8,"x":270,"y":660,"wires":[["b4b88cc1.2e393","cacc873c.b79b38"],["b4b88cc1.2e393","cacc873c.b79b38"],["b4b88cc1.2e393"],["b4b88cc1.2e393","cacc873c.b79b38"],[],[],[],[]]},{"id":"cacc873c.b79b38","type":"api-current-state","z":"85e34f67.f682","name":"Lux Innergang","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.lux_innergang","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":560,"wires":[["ee799afb.33a378"]]},{"id":"ee799afb.33a378","type":"switch","z":"85e34f67.f682","name":"Lux Level","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"65","v2t":"num"},{"t":"btwn","v":"66","vt":"num","v2":"99999","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":580,"y":560,"wires":[["673ef14.42bdd1","2f3c40c2.abe53"],["cb309e3f.245d"]]},{"id":"3a3ea83d.dd1088","type":"api-call-service","z":"85e34f67.f682","name":"Innergang på (circadian)","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.innergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1790,"y":500,"wires":[[]]},{"id":"cb309e3f.245d","type":"api-call-service","z":"85e34f67.f682","name":"Innergang av","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.innergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":600,"wires":[[]]},{"id":"345f19ac.125226","type":"function","z":"85e34f67.f682","name":"Color Temp Kelvin","func":"var newMsg =  {\n    payload: {\n        \"data\": {\n            \"kelvin\": msg.payload.kelvin,\n            \"brightness_pct\": msg.payload.percent\n        }\n    }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1550,"y":280,"wires":[["6bd0e6cf.1b46d8"]]},{"id":"30a78a5b.12d336","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","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":790,"y":260,"wires":[["af2b2557.f83e78"]]},{"id":"af2b2557.f83e78","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":260,"wires":[["6b4c75ea.15dd9c"]]},{"id":"6b4c75ea.15dd9c","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.kelvin","name":"percent to kelvin range","x":1220,"y":260,"wires":[["7efa3f9b.4e462"]]},{"id":"d345b82e.71cfb8","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","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":790,"y":300,"wires":[["5151c2c2.617b7c"]]},{"id":"e2cd04b5.a65d78","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.percent","name":"percent to brightness","x":1220,"y":300,"wires":[["7efa3f9b.4e462"]]},{"id":"5151c2c2.617b7c","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.percent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":300,"wires":[["e2cd04b5.a65d78"]]},{"id":"7efa3f9b.4e462","type":"join","z":"85e34f67.f682","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1390,"y":280,"wires":[["345f19ac.125226"]]},{"id":"f12d0fbd.1c9d4","type":"function","z":"85e34f67.f682","name":"Color Temp Kelvin","func":"var newMsg =  {\n    payload: {\n        \"data\": {\n            \"kelvin\": msg.payload.kelvin,\n            \"brightness_pct\": msg.payload.percent\n        }\n    }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1550,"y":500,"wires":[["3a3ea83d.dd1088"]]},{"id":"673ef14.42bdd1","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","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":790,"y":480,"wires":[["73309b09.68cf74"]]},{"id":"73309b09.68cf74","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":480,"wires":[["3ce16c94.0762f4"]]},{"id":"3ce16c94.0762f4","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.kelvin","name":"percent to kelvin range","x":1220,"y":480,"wires":[["8765bec5.16d8a"]]},{"id":"2f3c40c2.abe53","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","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":790,"y":520,"wires":[["9d4a6194.9026"]]},{"id":"7860b2d8.02ce0c","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.percent","name":"percent to brightness","x":1220,"y":520,"wires":[["8765bec5.16d8a"]]},{"id":"9d4a6194.9026","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.percent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":520,"wires":[["7860b2d8.02ce0c"]]},{"id":"8765bec5.16d8a","type":"join","z":"85e34f67.f682","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1390,"y":500,"wires":[["f12d0fbd.1c9d4"]]},{"id":"61329aac.44e694","type":"server","name":"Home Assistant","addon":true},{"id":"2bc3093e.108386","type":"position-config","name":"REDACTED","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]

I've tried to change context back and forth but I'm unable to figure this one out.

Any help is much appreciated, the WAF is at a low now..

Hi i dont use HA and dont have your equipment but I can maybe provide some clues.

Firstly, you should litter your flow with debug nodes - they will tell you what is going on.

Secondly, if you are seeing odd things, then as the payload is an object, potentially you are changing property references in one leg affecting the other leg. Lets rule that out by cloning the messages where the paths split.

Add the below to a function node

var mgs2 = RED.util.cloneMessage(msg);
return [msg, mgs2];

Thanks. I layed out more debug nodes and found this:

First leg:

The output payload from Change is:

kelvin: 2500

The output after hitting Join is:

kelvin: 5500

So in the first leg, after join the value is somehow changed.

This is my config looking at the kelvin bit:

The second leg:

The input to Range is:

kelvin: 2500

The output from Range is:

kelvin: 5500

So to me it seems like the problem area is around Change and/or Join nodes.

The output from the function node with your config is:

1613511178793

You can rule out the join node by simply wiring in series...

Yeah I think I did but I'm still not able to figure it out. I tried to change the Join method to array but that didn't help either.

You don't need a join node.

If you can provide a simplified flow with sample data (using inject nodes in place of HA nodes) and no HA nodes (standard nodes only) that demonstrates the issue I will fix it up for you.

Thanks. I tried to clean up as much as possible and add more debug nodes. After adding more debug nodes and changing the payload names I can see that payload values "flow" over to the other legs.

[{"id":"d1faf7ff.15fac8","type":"tab","label":"Debug forum","disabled":false,"info":""},{"id":"c2b76e45.91224","type":"inject","z":"d1faf7ff.15fac8","name":"every minute","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"3","topic":"","payload":"","payloadType":"date","x":410,"y":620,"wires":[["a488cb8e.dd66d8","2c8d389f.6213c8","713620aa.d5c13","46eea513.48cd1c"]]},{"id":"dcb4cf68.4eb8f","type":"function","z":"d1faf7ff.15fac8","name":"Color Temp Kelvin","func":"var newMsg =  {\n    payload: {\n        \"data\": {\n            \"kelvin\": msg.payload.circadian_kelvin,\n            \"brightness_pct\": msg.payload.circadian_brightpercent\n        }\n    }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1930,"y":380,"wires":[["866f8410.0248a8"]]},{"id":"a488cb8e.dd66d8","type":"sun-position","z":"d1faf7ff.15fac8","name":"","positionConfig":"2bc3093e.108386","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":670,"y":400,"wires":[["330d4f7.16a76b","ccb1a2fe.9831b","fd633c4f.49695"]]},{"id":"330d4f7.16a76b","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":360,"wires":[["cf7264d1.c4de78","777b58da.564e28"]]},{"id":"cf7264d1.c4de78","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.circadian_kelvin","name":"percent to kelvin range","x":1540,"y":360,"wires":[["89fd2e64.e5164","2e8871f.2ea878e"]]},{"id":"15b253b4.cb58ac","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.circadian_brightpercent","name":"percent to brightness range","x":1560,"y":400,"wires":[["2e8871f.2ea878e","79af5732.8aa8b8"]]},{"id":"fd633c4f.49695","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_brightpercent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":400,"wires":[["15b253b4.cb58ac","35d96724.6c13c8"]]},{"id":"70933531.13c9fc","type":"function","z":"d1faf7ff.15fac8","name":"Color Temp Kelvin","func":"var newMsg =  {\n    payload: {\n        \"data\": {\n            \"kelvin\": msg.payload.circadian_kelvin,\n            \"brightness_pct\": msg.payload.circadian_brightpercent\n        }\n    }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1850,"y":660,"wires":[["e66b8c9d.68b6f"]]},{"id":"fc32791c.97b198","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":640,"wires":[["9ff820c2.a54b","c7da87f.b2bdc78"]]},{"id":"9ff820c2.a54b","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.circadian_kelvin","name":"percent to kelvin range","x":1520,"y":640,"wires":[["49f5b371.11838c","be9f3f92.b79d9"]]},{"id":"2c8d389f.6213c8","type":"sun-position","z":"d1faf7ff.15fac8","name":"","positionConfig":"2bc3093e.108386","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":670,"y":540,"wires":[["9a8a76b6.b7fa78","fc32791c.97b198"]]},{"id":"ed2e6cbc.c92c3","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.brightpercent","name":"percent to brightness","x":1520,"y":680,"wires":[["be9f3f92.b79d9"]]},{"id":"9a8a76b6.b7fa78","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_brightpercent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":680,"wires":[["ed2e6cbc.c92c3"]]},{"id":"713620aa.d5c13","type":"sun-position","z":"d1faf7ff.15fac8","name":"","positionConfig":"2bc3093e.108386","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":650,"y":740,"wires":[["7b74c10f.114","daf0a2d8.30c0b"]]},{"id":"46eea513.48cd1c","type":"sun-position","z":"d1faf7ff.15fac8","name":"","positionConfig":"2bc3093e.108386","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":650,"y":780,"wires":[["1c5b8eaf.a63ec1","4f616661.5dcbf8"]]},{"id":"866f8410.0248a8","type":"debug","z":"d1faf7ff.15fac8","name":"Debug first leg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2160,"y":380,"wires":[]},{"id":"3e75c0ff.803d8","type":"debug","z":"d1faf7ff.15fac8","name":"Debug third leg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2080,"y":920,"wires":[]},{"id":"ccb1a2fe.9831b","type":"debug","z":"d1faf7ff.15fac8","name":"Sun position 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":860,"y":340,"wires":[]},{"id":"777b58da.564e28","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1340,"y":280,"wires":[]},{"id":"89fd2e64.e5164","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin range 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1580,"y":280,"wires":[]},{"id":"b7ff30d6.89849","type":"debug","z":"d1faf7ff.15fac8","name":"join function debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1900,"y":140,"wires":[]},{"id":"1d8062b3.1703dd","type":"function","z":"d1faf7ff.15fac8","name":"Color Temp Kelvin","func":"var newMsg =  {\n    payload: {\n        \"data\": {\n            \"kelvin\": msg.payload.circadian_kelvin2,\n            \"brightness_pct\": msg.payload.circadian_brightpercent\n        }\n    }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1870,"y":920,"wires":[["3e75c0ff.803d8"]]},{"id":"7b74c10f.114","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_kelvin2","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":900,"wires":[["3dc6a6b7.26a62a","de2d7e1d.e40e6"]]},{"id":"3dc6a6b7.26a62a","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.circadian_kelvin2","name":"percent to kelvin range","x":1540,"y":900,"wires":[["66fbc4d6.35e3dc","97680123.fd27"]]},{"id":"8b33879b.785358","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.circadian_brightpercent","name":"percent to brightness","x":1540,"y":940,"wires":[["97680123.fd27"]]},{"id":"daf0a2d8.30c0b","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_brightpercent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":940,"wires":[["8b33879b.785358"]]},{"id":"dc52e71b.478228","type":"function","z":"d1faf7ff.15fac8","name":"Color Temp Kelvin","func":"var newMsg =  {\n    payload: {\n        \"data\": {\n            \"kelvin\": msg.payload.circadian_kelvin3,\n            \"brightness_pct\": msg.payload.circadian_brightpercent\n        }\n    }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1870,"y":1160,"wires":[["864377bb.846f38"]]},{"id":"1c5b8eaf.a63ec1","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_kelvin3","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":1140,"wires":[["48907587.feeeac","f98dba55.98eea8"]]},{"id":"48907587.feeeac","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.circadian_kelvin3","name":"percent to kelvin range","x":1540,"y":1140,"wires":[["7a441371.0f0acc","39c28482.cf061c"]]},{"id":"37a7bac7.a12f76","type":"range","z":"d1faf7ff.15fac8","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.brightpercent","name":"percent to brightness","x":1540,"y":1180,"wires":[["39c28482.cf061c"]]},{"id":"4f616661.5dcbf8","type":"change","z":"d1faf7ff.15fac8","name":"","rules":[{"t":"set","p":"payload.circadian_brightpercent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":1180,"wires":[["37a7bac7.a12f76"]]},{"id":"864377bb.846f38","type":"debug","z":"d1faf7ff.15fac8","name":"Debug fourth flow","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2090,"y":1160,"wires":[]},{"id":"e66b8c9d.68b6f","type":"debug","z":"d1faf7ff.15fac8","name":"Debug second leg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2090,"y":660,"wires":[]},{"id":"c7da87f.b2bdc78","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1260,"y":580,"wires":[]},{"id":"49f5b371.11838c","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin range 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1500,"y":580,"wires":[]},{"id":"d218d332.a121e","type":"debug","z":"d1faf7ff.15fac8","name":"join function debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1820,"y":580,"wires":[]},{"id":"de2d7e1d.e40e6","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1260,"y":800,"wires":[]},{"id":"66fbc4d6.35e3dc","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1480,"y":800,"wires":[]},{"id":"e8c982a0.55feb","type":"debug","z":"d1faf7ff.15fac8","name":"join function debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1740,"y":800,"wires":[]},{"id":"f98dba55.98eea8","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1260,"y":1040,"wires":[]},{"id":"7a441371.0f0acc","type":"debug","z":"d1faf7ff.15fac8","name":"Debug kelvin range 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1500,"y":1040,"wires":[]},{"id":"95a2842d.413758","type":"debug","z":"d1faf7ff.15fac8","name":"join function debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1740,"y":1040,"wires":[]},{"id":"39c28482.cf061c","type":"join","z":"d1faf7ff.15fac8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1710,"y":1160,"wires":[["dc52e71b.478228","95a2842d.413758"]]},{"id":"97680123.fd27","type":"join","z":"d1faf7ff.15fac8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1710,"y":920,"wires":[["1d8062b3.1703dd","e8c982a0.55feb"]]},{"id":"be9f3f92.b79d9","type":"join","z":"d1faf7ff.15fac8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1690,"y":660,"wires":[["70933531.13c9fc","d218d332.a121e"]]},{"id":"2e8871f.2ea878e","type":"join","z":"d1faf7ff.15fac8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1770,"y":380,"wires":[["dcb4cf68.4eb8f","b7ff30d6.89849"]]},{"id":"35d96724.6c13c8","type":"debug","z":"d1faf7ff.15fac8","name":"Debug brightness 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1310,"y":460,"wires":[]},{"id":"79af5732.8aa8b8","type":"debug","z":"d1faf7ff.15fac8","name":"Debug brightness range 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1610,"y":460,"wires":[]},{"id":"2bc3093e.108386","type":"position-config","name":"Klaras vei 14","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]

So firstly, the problem I see...

I assume this ↑ is the issue you are seeing?


I told you to remove the join nodes and wire in series (and even showed you an example)...

then you post a demo stillcontaining the join nodes. ok, well, just to demonstrate you dont need to use join nodes, this is what I said you should do...

and this is the result...


Why this version works...

As a msg passes through a node, you can add properties & they are passed to the next node. So instead of taking separate paths (which cause new msgs to be generated) and then having to join the results, just dont!

Thanks again, I misinterpreted what you wrote.

I seem to get it to work now but the payload for each arm needs to be unique for it to work consistently

Appreciate the help!

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