HDL Smartbus via NodeRed and MQTT

I got it working with a restart of the system. I made a group in HA where I have placed all persons in the family. Their mobile phones are detected by a device tracker from Unifi when they enters the wlan in the house. When one family member arrives home the state of the group “familie” is changed to “home”, lights turns on and heating temp is increased.

I don`t know how to paste the code here, so I could need a little help

Hello Linax.
Regarding the messages I have been running the debug for quite a while now. The module doesn`t seem to send all channel status in one message sadly. However, I think I discovered something else:
I receive two different “types” of messages from the module.
Type 1 is code: “7261”. This seems to be channel status with various information (see full message below):

As seen above (this is message 7261 for channel 1 & 2. However I receive channel status from all 6ch. It varies from 15 to 30min between every recurring message for all channel (which is OK)…
The message actually contains the data that I am looking for, but it is a bit “hidden”, because as you see above there is a lot of “unnecessary” information. I have pasted a full expanded snag of the message below:
*****(see attachment in reply post as I couldnt paste more than one img pr message)

You may think that the value under “Temperature” - “Now” is the data I am looking for, but this is actually the current SET temperature, and not the current “IS” temperature.
However, under “Watering” - “Time” there is a value which is actually the current IS temperature.
So in conclusion, the data-value is “hidden behind a wrong description” but it is there.

Now for the next message code →

Type 2 is code: 5834* (*is a channel identifier number, so for ch1 the code is 58341):
As you see in the message below this message gives me exactly what I need, only channel and temperature. *****(See next post)

However, my problem is that I receive this message only for channel 1 (which is recurring every 2minutes). AND now and then I get a single update from channel 4 through message “58344”. Do not understand why its not sending on the other channels (as you mention I also suspect a firmware bug causing this error).

To sum up, I guess my best option will be to make use of the “Time” value in the 7261 message code?
If you dont have a better suggestion against the missing “5834*” messages?

Thanks in advance, and sorry about the long report

Screenshot 2022-11-04 at 12-44-48 Node-RED

Found out now, here is my flow for light and presence detection.
I don`t know if it is working correct yet.
I would also like to have a lovelace button to inject the lights on flow from dashboard in HA, any ideas how to do that?

[{"id":"532bfd0c9ea62df5","type":"tab","label":"Borte-Hjemme","disabled":false,"info":"","env":[]},{"id":"89397c70091c729a","type":"inject","z":"532bfd0c9ea62df5","name":"06:20 mon - sun","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"20 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":520,"wires":[["f9b7af1c7eb3d532"]]},{"id":"b8240f357a2130e1","type":"function","z":"532bfd0c9ea62df5","name":"200.25 Spot sofa","func":"msg.target = \"200.25\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":420,"wires":[["21608755ce8aed8a","79410d7a354c1253","dcd0cd667d9ba413"]]},{"id":"21608755ce8aed8a","type":"hdl-raw-out","z":"532bfd0c9ea62df5","controller":"6e986e87.b7a2a","name":"","x":1250,"y":620,"wires":[]},{"id":"3cb158c9628db607","type":"function","z":"532bfd0c9ea62df5","name":"200.25 Spot sofa","func":"msg.target = \"200.25\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":780,"wires":[["21608755ce8aed8a","79410d7a354c1253","e1b2e9c93a517ead"]]},{"id":"f6f5192c0e391c97","type":"comment","z":"532bfd0c9ea62df5","name":"Lights on","info":"","x":120,"y":520,"wires":[]},{"id":"dfcd73c093b12342","type":"hdl-channel-get","z":"532bfd0c9ea62df5","controller":"6e986e87.b7a2a","address":"200.0","channel":"1","name":"","x":1600,"y":140,"wires":[["608adecf11031e1c","02a5716e41c63a30"]]},{"id":"79410d7a354c1253","type":"delay","z":"532bfd0c9ea62df5","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1320,"y":140,"wires":[["ed315d4fc1ad92b4"]]},{"id":"608adecf11031e1c","type":"debug","z":"532bfd0c9ea62df5","name":"4","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1750,"y":80,"wires":[]},{"id":"ed315d4fc1ad92b4","type":"function","z":"532bfd0c9ea62df5","name":"check","func":"// Save target value to msg.targetlevel as \n// msg.payload.level will be changed in the \"hdl ch get node\".\nmsg.targetlevel = msg.payload.level\n\n//Change the adress so that the \"hdl ch get node\" \n//knows what adress to check\nmsg.payload.address = msg.target \n\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1450,"y":140,"wires":[["dfcd73c093b12342","3647e90aeb12c6c2"]]},{"id":"874fdbe425c4fde2","type":"comment","z":"532bfd0c9ea62df5","name":"Check if answerback recived or resend command","info":"","x":1320,"y":80,"wires":[]},{"id":"3647e90aeb12c6c2","type":"debug","z":"532bfd0c9ea62df5","name":"3","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1590,"y":80,"wires":[]},{"id":"02a5716e41c63a30","type":"switch","z":"532bfd0c9ea62df5","name":"Done?","property":"payload.level","propertyType":"msg","rules":[{"t":"neq","v":"targetlevel","vt":"msg"}],"checkall":"false","repair":false,"outputs":1,"x":1750,"y":140,"wires":[["175138097c4391df","393753f6b04481b8"]]},{"id":"175138097c4391df","type":"debug","z":"532bfd0c9ea62df5","name":"6 Resend","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1920,"y":80,"wires":[]},{"id":"393753f6b04481b8","type":"function","z":"532bfd0c9ea62df5","name":"rebuild","func":"//Change the new level target for new attempt \n//if the values did not match\nmsg.payload.level = msg.targetlevel\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1890,"y":140,"wires":[["f8d5bdd9ff45cb3d","21608755ce8aed8a","b0e91754a3352fce"]]},{"id":"f8d5bdd9ff45cb3d","type":"debug","z":"532bfd0c9ea62df5","name":"7","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2110,"y":100,"wires":[]},{"id":"a0e0123f256ce5f2","type":"hdl-channel-get","z":"532bfd0c9ea62df5","controller":"6e986e87.b7a2a","address":"200.0","channel":"1","name":"","x":1600,"y":200,"wires":[["25705bdec88e0ea6"]]},{"id":"b0e91754a3352fce","type":"delay","z":"532bfd0c9ea62df5","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1320,"y":200,"wires":[["0a76e40fbbd84c52"]]},{"id":"0a76e40fbbd84c52","type":"function","z":"532bfd0c9ea62df5","name":"check","func":"// Save target value to msg.targetlevel as \n// msg.payload.level will be changed in the \"hdl ch get node\".\nmsg.targetlevel = msg.payload.level\n\n//Change the adress so that the \"hdl ch get node\" \n//knows what adress to check\nmsg.payload.address = msg.target \n\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1450,"y":200,"wires":[["a0e0123f256ce5f2"]]},{"id":"25705bdec88e0ea6","type":"switch","z":"532bfd0c9ea62df5","name":"Done?","property":"payload.level","propertyType":"msg","rules":[{"t":"neq","v":"targetlevel","vt":"msg"}],"checkall":"false","repair":false,"outputs":1,"x":1750,"y":200,"wires":[["312b645a77c0fafe"]]},{"id":"312b645a77c0fafe","type":"function","z":"532bfd0c9ea62df5","name":"rebuild","func":"//Change the new level target for new attempt \n//if the values did not match\nmsg.payload.level = msg.targetlevel\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1890,"y":200,"wires":[["21608755ce8aed8a","f8d5bdd9ff45cb3d"]]},{"id":"3937c03a144c0eee","type":"function","z":"532bfd0c9ea62df5","name":"200.29 Spot Kjøkken","func":"msg.target = \"200.29\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 20\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":540,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"6c75a78e20ece6c6","type":"function","z":"532bfd0c9ea62df5","name":"200.27 Lamper gang oppe","func":"msg.target = \"200.27\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 20\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":940,"y":500,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"ec486d1d6317bbaa","type":"function","z":"532bfd0c9ea62df5","name":"200.26 Spot Spisebord","func":"msg.target = \"200.26\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":460,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"f9f458dfe2a83f11","type":"function","z":"532bfd0c9ea62df5","name":"200.29 Spot Kjøkken","func":"msg.target = \"200.29\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":900,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"62beca2650b51f6f","type":"function","z":"532bfd0c9ea62df5","name":"200.27 Lamper gang oppe","func":"msg.target = \"200.27\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":940,"y":860,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"43d025edb0c5bb23","type":"function","z":"532bfd0c9ea62df5","name":"200.26 Sofa Spisebord","func":"msg.target = \"200.26\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":820,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"c5feaaee3e75b9ea","type":"comment","z":"532bfd0c9ea62df5","name":"Sjekk om det er noen hjemme","info":"","x":180,"y":620,"wires":[]},{"id":"077c2735d0a4edaa","type":"server-state-changed","z":"532bfd0c9ea62df5","name":"Det er noen hjemme!","server":"4c09bc30.df07b4","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.familie","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":540,"y":620,"wires":[["b8240f357a2130e1","3937c03a144c0eee","6c75a78e20ece6c6","ec486d1d6317bbaa","5b16bbe3f119df0f","acbcc3738477319a","a420c4852870502c","99acaab6ead930ac"],["3cb158c9628db607","f9f458dfe2a83f11","62beca2650b51f6f","43d025edb0c5bb23","2529fcec7ba1b42c","54d6efb6ebc627b2","f02a9fbcc7ef6159","fa21e77b1288a5e3","1c18221b.713e5e","14fb1f507450450e"]]},{"id":"5b16bbe3f119df0f","type":"function","z":"532bfd0c9ea62df5","name":"200.22 Spot Hall","func":"msg.target = \"200.22\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":380,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"acbcc3738477319a","type":"function","z":"532bfd0c9ea62df5","name":"200.13 Spot kjellerstue","func":"msg.target = \"200.13\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 15\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":340,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"2529fcec7ba1b42c","type":"function","z":"532bfd0c9ea62df5","name":"200.22 Spot Hall","func":"msg.target = \"200.22\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":740,"wires":[["21608755ce8aed8a","79410d7a354c1253"]]},{"id":"54d6efb6ebc627b2","type":"function","z":"532bfd0c9ea62df5","name":"200.13 Spot kjellerstue","func":"msg.target = \"200.13\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":700,"wires":[["21608755ce8aed8a","79410d7a354c1253"]]},{"id":"dcd0cd667d9ba413","type":"debug","z":"532bfd0c9ea62df5","name":"Lys på","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1230,"y":540,"wires":[]},{"id":"1c18221b.713e5e","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Elias rom = Spiller","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.elias_rom","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":910,"y":1060,"wires":[["fdf3da66.581118"],[]]},{"id":"fdf3da66.581118","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Pause Elias rom","server":"ac20270b.4d8de8","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":[],"deviceId":[],"entityId":["media_player.elias_rom"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1120,"y":1060,"wires":[[]]},{"id":"14fb1f507450450e","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Stue = Spiller","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.stue","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":900,"y":1120,"wires":[["fc83998b72e6946a"],[]]},{"id":"fc83998b72e6946a","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Pause Stue","server":"ac20270b.4d8de8","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":[],"deviceId":[],"entityId":["media_player.stue"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1110,"y":1120,"wires":[[]]},{"id":"a420c4852870502c","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Mill ovn","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.mill_panel"],"data":"{\"temperature\":\"20\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":280,"wires":[[]]},{"id":"f02a9fbcc7ef6159","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Mill ovn","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.mill_panel"],"data":"{\"temperature\":\"18\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":940,"wires":[[]]},{"id":"99acaab6ead930ac","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Varmepumpe","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.harald_s_device"],"data":"{\"temperature\":\"22\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":220,"wires":[[]]},{"id":"fa21e77b1288a5e3","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Varmepumpe","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.harald_s_device"],"data":"{\"temperature\":\"18\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":1000,"wires":[[]]},{"id":"f9b7af1c7eb3d532","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Det er noen hjemme!","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"group.familie","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":520,"wires":[[],["b8240f357a2130e1","5b16bbe3f119df0f","acbcc3738477319a","a420c4852870502c","99acaab6ead930ac","ec486d1d6317bbaa","6c75a78e20ece6c6","3937c03a144c0eee"]]},{"id":"d158571a18b0789e","type":"inject","z":"532bfd0c9ea62df5","name":"06:20 mon - sun","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"20 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":720,"wires":[["53419be38d3577b5"]]},{"id":"53419be38d3577b5","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Det er noen hjemme!","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"group.familie","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":720,"wires":[[],["54d6efb6ebc627b2","2529fcec7ba1b42c","3cb158c9628db607","43d025edb0c5bb23","62beca2650b51f6f","f9f458dfe2a83f11","f02a9fbcc7ef6159","fa21e77b1288a5e3","1c18221b.713e5e","14fb1f507450450e"]]},{"id":"9d70fd95018be0da","type":"comment","z":"532bfd0c9ea62df5","name":"Lights off","info":"","x":120,"y":720,"wires":[]},{"id":"e1b2e9c93a517ead","type":"debug","z":"532bfd0c9ea62df5","name":"Lys av","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1230,"y":700,"wires":[]},{"id":"6e986e87.b7a2a","type":"hdl-controller","host":"10.0.0.20","port":"6000","subnetid":"200","deviceid":"0","broadcast":true,"daliId":"92"},{"id":"4c09bc30.df07b4","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Can be done with scenes.

mqtt_scene.yaml:

#Home
- name: Home Scene
  command_topic: "custom/scene/nodered/home/set"
  payload_on: "ON"
#Away
- name: Away Scene
  command_topic: "custom/scene/nodered/away/set"
  payload_on: "ON"
#Morning
- name: Morning Scene
  command_topic: "custom/scene/nodered/morning/set"
  payload_on: "ON"
#Evening
- name: Evening Scene
  command_topic: "custom/scene/nodered/evening/set"
  payload_on: "ON"
#Night
- name: Night Scene
  command_topic: "custom/scene/nodered/night/set"
  payload_on: "ON"
#Sleeping
- name: Sleeping Scene
  command_topic: "custom/scene/nodered/sleeping/set"
  payload_on: "ON"

Incomplete nodered flow (It does not have to be in the same flow but you atleast see the idea):

[{"id":"44198cb83c8bde03","type":"tab","label":"Borte-Hjemme","disabled":false,"info":"","env":[]},{"id":"4ab7c27cf4f9eddb","type":"inject","z":"44198cb83c8bde03","name":"06:20 mon - sun","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"20 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":520,"wires":[["dfdcfacef16b3297"]]},{"id":"8f45a02eb5b9ae48","type":"function","z":"44198cb83c8bde03","name":"200.25 Spot sofa","func":"msg.target = \"200.25\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":420,"wires":[["d1d216854d92079d","a73a23787c2742e2","c8763163453648e5"]]},{"id":"d1d216854d92079d","type":"hdl-raw-out","z":"44198cb83c8bde03","controller":"6e986e87.b7a2a","name":"","x":1390,"y":620,"wires":[]},{"id":"199a5f630c746faf","type":"function","z":"44198cb83c8bde03","name":"200.25 Spot sofa","func":"msg.target = \"200.25\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":780,"wires":[["d1d216854d92079d","a73a23787c2742e2","661e5fc7a4718dd8"]]},{"id":"77e661d5e485bac4","type":"comment","z":"44198cb83c8bde03","name":"Lights on","info":"","x":120,"y":520,"wires":[]},{"id":"b0472a65b301eda1","type":"hdl-channel-get","z":"44198cb83c8bde03","controller":"6e986e87.b7a2a","address":"200.0","channel":"1","name":"","x":1740,"y":140,"wires":[["f5ecef252cd6ac6b"]]},{"id":"a73a23787c2742e2","type":"delay","z":"44198cb83c8bde03","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1460,"y":140,"wires":[["ab7cef9f682eb45e"]]},{"id":"ab7cef9f682eb45e","type":"function","z":"44198cb83c8bde03","name":"check","func":"// Save target value to msg.targetlevel as \n// msg.payload.level will be changed in the \"hdl ch get node\".\nmsg.targetlevel = msg.payload.level\n\n//Change the adress so that the \"hdl ch get node\" \n//knows what adress to check\nmsg.payload.address = msg.target \n\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1590,"y":140,"wires":[["b0472a65b301eda1"]]},{"id":"215339a29c88c717","type":"comment","z":"44198cb83c8bde03","name":"Check if answerback recived or resend command","info":"","x":1460,"y":80,"wires":[]},{"id":"f5ecef252cd6ac6b","type":"switch","z":"44198cb83c8bde03","name":"Done?","property":"payload.level","propertyType":"msg","rules":[{"t":"neq","v":"targetlevel","vt":"msg"}],"checkall":"false","repair":false,"outputs":1,"x":1890,"y":140,"wires":[["10e4290e7bf5627c"]]},{"id":"10e4290e7bf5627c","type":"function","z":"44198cb83c8bde03","name":"rebuild","func":"//Change the new level target for new attempt \n//if the values did not match\nmsg.payload.level = msg.targetlevel\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2030,"y":140,"wires":[["d1d216854d92079d","c9b08b9a8103c97a"]]},{"id":"5d9c7c0e4dd72b31","type":"hdl-channel-get","z":"44198cb83c8bde03","controller":"6e986e87.b7a2a","address":"200.0","channel":"1","name":"","x":1740,"y":200,"wires":[["fed8a311449fbee4"]]},{"id":"c9b08b9a8103c97a","type":"delay","z":"44198cb83c8bde03","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1460,"y":200,"wires":[["f9a96f5656da1e25"]]},{"id":"f9a96f5656da1e25","type":"function","z":"44198cb83c8bde03","name":"check","func":"// Save target value to msg.targetlevel as \n// msg.payload.level will be changed in the \"hdl ch get node\".\nmsg.targetlevel = msg.payload.level\n\n//Change the adress so that the \"hdl ch get node\" \n//knows what adress to check\nmsg.payload.address = msg.target \n\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1590,"y":200,"wires":[["5d9c7c0e4dd72b31"]]},{"id":"fed8a311449fbee4","type":"switch","z":"44198cb83c8bde03","name":"Done?","property":"payload.level","propertyType":"msg","rules":[{"t":"neq","v":"targetlevel","vt":"msg"}],"checkall":"false","repair":false,"outputs":1,"x":1890,"y":200,"wires":[["5d0d1023be7d3340"]]},{"id":"5d0d1023be7d3340","type":"function","z":"44198cb83c8bde03","name":"rebuild","func":"//Change the new level target for new attempt \n//if the values did not match\nmsg.payload.level = msg.targetlevel\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2030,"y":200,"wires":[["d1d216854d92079d"]]},{"id":"737194c1b87a6f14","type":"function","z":"44198cb83c8bde03","name":"200.29 Spot Kjøkken","func":"msg.target = \"200.29\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 20\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":540,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"0db21a0861dd6d99","type":"function","z":"44198cb83c8bde03","name":"200.27 Lamper gang oppe","func":"msg.target = \"200.27\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 20\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":500,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"44829e50a57c3969","type":"function","z":"44198cb83c8bde03","name":"200.26 Spot Spisebord","func":"msg.target = \"200.26\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":460,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"f37b374a440c2c2b","type":"function","z":"44198cb83c8bde03","name":"200.29 Spot Kjøkken","func":"msg.target = \"200.29\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":900,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"5c966a0d5bba7a51","type":"function","z":"44198cb83c8bde03","name":"200.27 Lamper gang oppe","func":"msg.target = \"200.27\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":860,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"85f4520c8d98ee2f","type":"function","z":"44198cb83c8bde03","name":"200.26 Sofa Spisebord","func":"msg.target = \"200.26\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":820,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"1b6802e929c3b30b","type":"comment","z":"44198cb83c8bde03","name":"Sjekk om det er noen hjemme","info":"","x":180,"y":620,"wires":[]},{"id":"b9ba01d9e2f03820","type":"server-state-changed","z":"44198cb83c8bde03","name":"Det er noen hjemme!","server":"704bb71b774e2b32","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.familie","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":680,"y":620,"wires":[["8f45a02eb5b9ae48","737194c1b87a6f14","0db21a0861dd6d99","44829e50a57c3969","ae6b11eea5ca9d9e","7421d91705ff97cd","9b72937315a49ae8","f1fb16ced6db13db"],["199a5f630c746faf","f37b374a440c2c2b","5c966a0d5bba7a51","85f4520c8d98ee2f","39d9bbd3f35e149b","134f8f8076de01f8","b0766310ae240721","e44c2774ecddde95","4fe425ddd79a2af6","2454b9329b18558f"]]},{"id":"ae6b11eea5ca9d9e","type":"function","z":"44198cb83c8bde03","name":"200.22 Spot Hall","func":"msg.target = \"200.22\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":380,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"7421d91705ff97cd","type":"function","z":"44198cb83c8bde03","name":"200.13 Spot kjellerstue","func":"msg.target = \"200.13\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 15\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":340,"wires":[["a73a23787c2742e2","d1d216854d92079d"]]},{"id":"39d9bbd3f35e149b","type":"function","z":"44198cb83c8bde03","name":"200.22 Spot Hall","func":"msg.target = \"200.22\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":740,"wires":[["d1d216854d92079d","a73a23787c2742e2"]]},{"id":"134f8f8076de01f8","type":"function","z":"44198cb83c8bde03","name":"200.13 Spot kjellerstue","func":"msg.target = \"200.13\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":700,"wires":[["d1d216854d92079d","a73a23787c2742e2"]]},{"id":"c8763163453648e5","type":"debug","z":"44198cb83c8bde03","name":"Lys på","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1370,"y":520,"wires":[]},{"id":"4fe425ddd79a2af6","type":"api-current-state","z":"44198cb83c8bde03","name":"Elias rom = Spiller","server":"4013ef885bb9cf6f","version":3,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.elias_rom","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":1050,"y":1060,"wires":[["77113f3b77a9a75a"],[]]},{"id":"77113f3b77a9a75a","type":"api-call-service","z":"44198cb83c8bde03","name":"Pause Elias rom","server":"4013ef885bb9cf6f","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":[],"deviceId":[],"entityId":["media_player.elias_rom"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1260,"y":1060,"wires":[[]]},{"id":"2454b9329b18558f","type":"api-current-state","z":"44198cb83c8bde03","name":"Stue = Spiller","server":"4013ef885bb9cf6f","version":3,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.stue","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":1040,"y":1120,"wires":[["6c40ff94df4a042c"],[]]},{"id":"6c40ff94df4a042c","type":"api-call-service","z":"44198cb83c8bde03","name":"Pause Stue","server":"4013ef885bb9cf6f","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":[],"deviceId":[],"entityId":["media_player.stue"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1250,"y":1120,"wires":[[]]},{"id":"9b72937315a49ae8","type":"api-call-service","z":"44198cb83c8bde03","name":"Mill ovn","server":"704bb71b774e2b32","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.mill_panel"],"data":"{\"temperature\":\"20\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":280,"wires":[[]]},{"id":"b0766310ae240721","type":"api-call-service","z":"44198cb83c8bde03","name":"Mill ovn","server":"704bb71b774e2b32","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.mill_panel"],"data":"{\"temperature\":\"18\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":940,"wires":[[]]},{"id":"f1fb16ced6db13db","type":"api-call-service","z":"44198cb83c8bde03","name":"Varmepumpe","server":"704bb71b774e2b32","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.harald_s_device"],"data":"{\"temperature\":\"22\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":220,"wires":[[]]},{"id":"e44c2774ecddde95","type":"api-call-service","z":"44198cb83c8bde03","name":"Varmepumpe","server":"704bb71b774e2b32","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.harald_s_device"],"data":"{\"temperature\":\"18\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":1000,"wires":[[]]},{"id":"dfdcfacef16b3297","type":"api-current-state","z":"44198cb83c8bde03","name":"Det er noen hjemme!","server":"4013ef885bb9cf6f","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"group.familie","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":520,"wires":[[],["8f45a02eb5b9ae48","ae6b11eea5ca9d9e","7421d91705ff97cd","9b72937315a49ae8","f1fb16ced6db13db","44829e50a57c3969","0db21a0861dd6d99","737194c1b87a6f14"]]},{"id":"b58dc2293e2f2dc9","type":"inject","z":"44198cb83c8bde03","name":"06:20 mon - sun","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"20 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":720,"wires":[["2726ed199cbbb6ae"]]},{"id":"2726ed199cbbb6ae","type":"api-current-state","z":"44198cb83c8bde03","name":"Det er noen hjemme!","server":"4013ef885bb9cf6f","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"group.familie","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":720,"wires":[[],["134f8f8076de01f8","39d9bbd3f35e149b","199a5f630c746faf","85f4520c8d98ee2f","5c966a0d5bba7a51","f37b374a440c2c2b","b0766310ae240721","e44c2774ecddde95","4fe425ddd79a2af6","2454b9329b18558f"]]},{"id":"52e6a27d9e13149e","type":"comment","z":"44198cb83c8bde03","name":"Lights off","info":"","x":120,"y":720,"wires":[]},{"id":"661e5fc7a4718dd8","type":"debug","z":"44198cb83c8bde03","name":"Lys av","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1370,"y":700,"wires":[]},{"id":"3d90bc0407d93418","type":"mqtt in","z":"44198cb83c8bde03","name":"From HA","topic":"custom/scene/nodered/+/set","qos":"0","datatype":"auto","broker":"d110fe62.0ec2","nl":false,"rap":false,"inputs":0,"x":240,"y":400,"wires":[["0aabe9f01739db0c"]]},{"id":"0aabe9f01739db0c","type":"switch","z":"44198cb83c8bde03","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"custom/scene/nodered/home/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/away/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/morning/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/evening/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/night/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/sleeping/set","vt":"str"}],"checkall":"false","repair":false,"outputs":6,"x":370,"y":400,"wires":[["dfdcfacef16b3297"],["2726ed199cbbb6ae"],[],[],[],["199a5f630c746faf"]]},{"id":"a4de310661b6bfd5","type":"comment","z":"44198cb83c8bde03","name":"Scenes","info":"","x":110,"y":400,"wires":[]},{"id":"6e986e87.b7a2a","type":"hdl-controller","host":"192.168.10.250","port":"6000","subnetid":"1","deviceid":"98","broadcast":false,"daliId":"97"},{"id":"704bb71b774e2b32","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"},{"id":"4013ef885bb9cf6f","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"d110fe62.0ec2","type":"mqtt-broker","name":"hassio.local","broker":"localhost","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]

Grid card:

square: true
columns: 3
type: grid
cards:
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: scene.home_scene
    icon: mdi:home-account
    name: Home
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: scene.away_scene
    icon: mdi:home
    name: Away
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: scene.morning_scene
    icon: mdi:lightbulb-outline
    show_state: false
    name: Morning
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: scene.evening_scene
    icon: mdi:ceiling-light
    name: Evening
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: scene.night_scene
    icon: mdi:weather-night
    name: Night
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: scene.sleeping_scene
    icon: mdi:sleep
    name: Sleep

Thank you, Linax! Very helpful.

I try to find out the best way to set up the presence detection. Instead of my event node setup, wouldn`t it be better if Node-red told HA to activate the home scene when someone in the family enters the house? And when the last person in the family leaves (the family group changes to away), then Nodered tells HA to activate the away scene?

Is it possible to show which scene is active on the grid card?

Tried a little setup now. Node- red tells HA to activate Home scene, every day at 06:20. If there is no people in the family detected, the scene will not be activated. I can also change light manually when toggling the buttons in HA. Think it works now, but haven`t tested all functions yet.

[{"id":"532bfd0c9ea62df5","type":"tab","label":"Borte-Hjemme","disabled":false,"info":"","env":[]},{"id":"89397c70091c729a","type":"inject","z":"532bfd0c9ea62df5","name":"06:20 mon - sun","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"20 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":650,"y":420,"wires":[["3f6cca8f8a6c198d"]]},{"id":"b8240f357a2130e1","type":"function","z":"532bfd0c9ea62df5","name":"200.25 Spot sofa","func":"msg.target = \"200.25\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1390,"y":820,"wires":[["21608755ce8aed8a","79410d7a354c1253"]]},{"id":"21608755ce8aed8a","type":"hdl-raw-out","z":"532bfd0c9ea62df5","controller":"6e986e87.b7a2a","name":"","x":1730,"y":1020,"wires":[]},{"id":"3cb158c9628db607","type":"function","z":"532bfd0c9ea62df5","name":"200.25 Spot sofa","func":"msg.target = \"200.25\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1390,"y":1180,"wires":[["21608755ce8aed8a","79410d7a354c1253"]]},{"id":"dfcd73c093b12342","type":"hdl-channel-get","z":"532bfd0c9ea62df5","controller":"6e986e87.b7a2a","address":"200.0","channel":"1","name":"","x":2080,"y":720,"wires":[["608adecf11031e1c","02a5716e41c63a30"]]},{"id":"79410d7a354c1253","type":"delay","z":"532bfd0c9ea62df5","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1800,"y":720,"wires":[["ed315d4fc1ad92b4"]]},{"id":"608adecf11031e1c","type":"debug","z":"532bfd0c9ea62df5","name":"4","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2230,"y":660,"wires":[]},{"id":"ed315d4fc1ad92b4","type":"function","z":"532bfd0c9ea62df5","name":"check","func":"// Save target value to msg.targetlevel as \n// msg.payload.level will be changed in the \"hdl ch get node\".\nmsg.targetlevel = msg.payload.level\n\n//Change the adress so that the \"hdl ch get node\" \n//knows what adress to check\nmsg.payload.address = msg.target \n\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1930,"y":720,"wires":[["dfcd73c093b12342","3647e90aeb12c6c2"]]},{"id":"874fdbe425c4fde2","type":"comment","z":"532bfd0c9ea62df5","name":"Fullt lys","info":"","x":1330,"y":240,"wires":[]},{"id":"3647e90aeb12c6c2","type":"debug","z":"532bfd0c9ea62df5","name":"3","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2070,"y":660,"wires":[]},{"id":"02a5716e41c63a30","type":"switch","z":"532bfd0c9ea62df5","name":"Done?","property":"payload.level","propertyType":"msg","rules":[{"t":"neq","v":"targetlevel","vt":"msg"}],"checkall":"false","repair":false,"outputs":1,"x":2230,"y":720,"wires":[["175138097c4391df","393753f6b04481b8"]]},{"id":"175138097c4391df","type":"debug","z":"532bfd0c9ea62df5","name":"6 Resend","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2400,"y":660,"wires":[]},{"id":"393753f6b04481b8","type":"function","z":"532bfd0c9ea62df5","name":"rebuild","func":"//Change the new level target for new attempt \n//if the values did not match\nmsg.payload.level = msg.targetlevel\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2370,"y":720,"wires":[["f8d5bdd9ff45cb3d","21608755ce8aed8a","b0e91754a3352fce"]]},{"id":"f8d5bdd9ff45cb3d","type":"debug","z":"532bfd0c9ea62df5","name":"7","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2590,"y":680,"wires":[]},{"id":"a0e0123f256ce5f2","type":"hdl-channel-get","z":"532bfd0c9ea62df5","controller":"6e986e87.b7a2a","address":"200.0","channel":"1","name":"","x":2080,"y":780,"wires":[["25705bdec88e0ea6"]]},{"id":"b0e91754a3352fce","type":"delay","z":"532bfd0c9ea62df5","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1800,"y":780,"wires":[["0a76e40fbbd84c52"]]},{"id":"0a76e40fbbd84c52","type":"function","z":"532bfd0c9ea62df5","name":"check","func":"// Save target value to msg.targetlevel as \n// msg.payload.level will be changed in the \"hdl ch get node\".\nmsg.targetlevel = msg.payload.level\n\n//Change the adress so that the \"hdl ch get node\" \n//knows what adress to check\nmsg.payload.address = msg.target \n\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1930,"y":780,"wires":[["a0e0123f256ce5f2"]]},{"id":"25705bdec88e0ea6","type":"switch","z":"532bfd0c9ea62df5","name":"Done?","property":"payload.level","propertyType":"msg","rules":[{"t":"neq","v":"targetlevel","vt":"msg"}],"checkall":"false","repair":false,"outputs":1,"x":2230,"y":780,"wires":[["312b645a77c0fafe"]]},{"id":"312b645a77c0fafe","type":"function","z":"532bfd0c9ea62df5","name":"rebuild","func":"//Change the new level target for new attempt \n//if the values did not match\nmsg.payload.level = msg.targetlevel\n//Return\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2370,"y":780,"wires":[["21608755ce8aed8a","f8d5bdd9ff45cb3d"]]},{"id":"3937c03a144c0eee","type":"function","z":"532bfd0c9ea62df5","name":"200.29 Spot Kjøkken","func":"msg.target = \"200.29\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 20\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":940,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"6c75a78e20ece6c6","type":"function","z":"532bfd0c9ea62df5","name":"200.27 Lamper gang oppe","func":"msg.target = \"200.27\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 20\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1420,"y":900,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"ec486d1d6317bbaa","type":"function","z":"532bfd0c9ea62df5","name":"200.26 Spot Spisebord","func":"msg.target = \"200.26\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":860,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"f9f458dfe2a83f11","type":"function","z":"532bfd0c9ea62df5","name":"200.29 Spot Kjøkken","func":"msg.target = \"200.29\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":1300,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"62beca2650b51f6f","type":"function","z":"532bfd0c9ea62df5","name":"200.27 Lamper gang oppe","func":"msg.target = \"200.27\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1420,"y":1260,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"43d025edb0c5bb23","type":"function","z":"532bfd0c9ea62df5","name":"200.26 Sofa Spisebord","func":"msg.target = \"200.26\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":1220,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"c5feaaee3e75b9ea","type":"comment","z":"532bfd0c9ea62df5","name":"Sjekk om det er noen hjemme","info":"","x":660,"y":760,"wires":[]},{"id":"077c2735d0a4edaa","type":"server-state-changed","z":"532bfd0c9ea62df5","name":"Det er noen hjemme!","server":"4c09bc30.df07b4","version":4,"exposeToHomeAssistant":true,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.familie","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":640,"y":480,"wires":[["3f6cca8f8a6c198d","e1b2e9c93a517ead"],["470849a34d0308db","e1b2e9c93a517ead"]]},{"id":"5b16bbe3f119df0f","type":"function","z":"532bfd0c9ea62df5","name":"200.22 Spot Hall","func":"msg.target = \"200.22\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 10\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1390,"y":780,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"acbcc3738477319a","type":"function","z":"532bfd0c9ea62df5","name":"200.13 Spot kjellerstue","func":"msg.target = \"200.13\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 15\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":740,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"2529fcec7ba1b42c","type":"function","z":"532bfd0c9ea62df5","name":"200.22 Spot Hall","func":"msg.target = \"200.22\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1390,"y":1140,"wires":[["21608755ce8aed8a","79410d7a354c1253"]]},{"id":"54d6efb6ebc627b2","type":"function","z":"532bfd0c9ea62df5","name":"200.13 Spot kjellerstue","func":"msg.target = \"200.13\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 0\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":1100,"wires":[["21608755ce8aed8a","79410d7a354c1253"]]},{"id":"1c18221b.713e5e","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Elias rom = Spiller","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.elias_rom","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":1390,"y":1460,"wires":[["fdf3da66.581118"],[]]},{"id":"fdf3da66.581118","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Pause Elias rom","server":"ac20270b.4d8de8","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":[],"deviceId":[],"entityId":["media_player.elias_rom"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1600,"y":1460,"wires":[[]]},{"id":"14fb1f507450450e","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Stue = Spiller","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.stue","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":1380,"y":1520,"wires":[["fc83998b72e6946a"],[]]},{"id":"fc83998b72e6946a","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Pause Stue","server":"ac20270b.4d8de8","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":[],"deviceId":[],"entityId":["media_player.stue"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1590,"y":1520,"wires":[[]]},{"id":"a420c4852870502c","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Mill ovn","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.mill_panel"],"data":"{\"temperature\":\"20\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":680,"wires":[[]]},{"id":"f02a9fbcc7ef6159","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Mill ovn","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.mill_panel"],"data":"{\"temperature\":\"18\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":1340,"wires":[[]]},{"id":"99acaab6ead930ac","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Varmepumpe","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.harald_s_device"],"data":"{\"temperature\":\"22\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1370,"y":620,"wires":[[]]},{"id":"fa21e77b1288a5e3","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Varmepumpe","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.harald_s_device"],"data":"{\"temperature\":\"18\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1370,"y":1400,"wires":[[]]},{"id":"f9b7af1c7eb3d532","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Det er noen hjemme!","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"group.familie","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":1020,"y":760,"wires":[["3937c03a144c0eee","6c75a78e20ece6c6","ec486d1d6317bbaa","b8240f357a2130e1","5b16bbe3f119df0f","acbcc3738477319a","a420c4852870502c","99acaab6ead930ac"],[]]},{"id":"d158571a18b0789e","type":"inject","z":"532bfd0c9ea62df5","name":"Aktiver borte scene","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"20 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":660,"y":540,"wires":[["470849a34d0308db"]]},{"id":"53419be38d3577b5","type":"api-current-state","z":"532bfd0c9ea62df5","name":"Alle er borte!","server":"ac20270b.4d8de8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"group.familie","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":1050,"y":1320,"wires":[["54d6efb6ebc627b2","2529fcec7ba1b42c","3cb158c9628db607","43d025edb0c5bb23","62beca2650b51f6f","f9f458dfe2a83f11","f02a9fbcc7ef6159","fa21e77b1288a5e3","1c18221b.713e5e","14fb1f507450450e"],[]]},{"id":"e1b2e9c93a517ead","type":"debug","z":"532bfd0c9ea62df5","name":"Beskjed fra HA","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":480,"wires":[]},{"id":"0b1b2d7a8d8811c8","type":"comment","z":"532bfd0c9ea62df5","name":"Scenes","info":"","x":590,"y":1060,"wires":[]},{"id":"70207436b361a4f2","type":"mqtt in","z":"532bfd0c9ea62df5","name":"From HA","topic":"custom/scene/nodered/+/set","qos":"0","datatype":"auto","broker":"d110fe62.0ec2","nl":false,"rap":false,"inputs":0,"x":720,"y":1060,"wires":[["24cd70dfaf769139"]]},{"id":"24cd70dfaf769139","type":"switch","z":"532bfd0c9ea62df5","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"custom/scene/nodered/hjemme/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/borte/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/ferie/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/av/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/dempet/set","vt":"str"},{"t":"cont","v":"custom/scene/nodered/fullt/set","vt":"str"}],"checkall":"false","repair":false,"outputs":6,"x":850,"y":1060,"wires":[["f9b7af1c7eb3d532"],["53419be38d3577b5"],[],["54d6efb6ebc627b2","2529fcec7ba1b42c","3cb158c9628db607","43d025edb0c5bb23","62beca2650b51f6f","f9f458dfe2a83f11"],["acbcc3738477319a","5b16bbe3f119df0f","b8240f357a2130e1","ec486d1d6317bbaa","6c75a78e20ece6c6","3937c03a144c0eee"],["31164b3faac1d0fa","d7b7df24cfa4a023","da02aef939676ac9","1082e6a26ce3fd6a","d45dde31119b4db6","b12f35e369e44ad7"]]},{"id":"106a9b26045ffbca","type":"comment","z":"532bfd0c9ea62df5","name":"Sjekk om det er noen hjemme","info":"","x":660,"y":1320,"wires":[]},{"id":"1082e6a26ce3fd6a","type":"function","z":"532bfd0c9ea62df5","name":"200.25 Spot sofa","func":"msg.target = \"200.25\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 100\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1370,"y":360,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"d7b7df24cfa4a023","type":"function","z":"532bfd0c9ea62df5","name":"200.29 Spot Kjøkken","func":"msg.target = \"200.29\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 100\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1380,"y":480,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"da02aef939676ac9","type":"function","z":"532bfd0c9ea62df5","name":"200.26 Spot Spisebord","func":"msg.target = \"200.26\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 100\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1380,"y":400,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"d45dde31119b4db6","type":"function","z":"532bfd0c9ea62df5","name":"200.22 Spot Hall","func":"msg.target = \"200.22\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 100\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1370,"y":320,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"b12f35e369e44ad7","type":"function","z":"532bfd0c9ea62df5","name":"200.13 Spot kjellerstue","func":"msg.target = \"200.13\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 100\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1380,"y":280,"wires":[["79410d7a354c1253","21608755ce8aed8a"]]},{"id":"bb51c1284c04baec","type":"comment","z":"532bfd0c9ea62df5","name":"Hjemme scene","info":"","x":1380,"y":580,"wires":[]},{"id":"e94b46bb72313511","type":"comment","z":"532bfd0c9ea62df5","name":"Borte scene","info":"","x":1370,"y":1060,"wires":[]},{"id":"31164b3faac1d0fa","type":"function","z":"532bfd0c9ea62df5","name":"200.27 Lamper gang oppe","func":"msg.target = \"200.27\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 1,\n    level: 100\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":440,"wires":[[]]},{"id":"3f6cca8f8a6c198d","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Aktiver Hjemme scene","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.hjemme_scene"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":420,"wires":[[]]},{"id":"470849a34d0308db","type":"api-call-service","z":"532bfd0c9ea62df5","name":"Aktiver Borte scene","server":"4c09bc30.df07b4","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.borte_scene"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":540,"wires":[[]]},{"id":"6e986e87.b7a2a","type":"hdl-controller","host":"10.0.0.20","port":"6000","subnetid":"200","deviceid":"0","broadcast":true,"daliId":"92"},{"id":"4c09bc30.df07b4","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"d110fe62.0ec2","type":"mqtt-broker","name":"hassio.local","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]

This is a bit strange as the debuging of the code was done and verified by 2x persons before. But i remember there was some errors with the documentation at the time. This might be a firmware issue as well. Witch firmware are you running on the module, and is the model HDL-MFH06.432?

If you have a look at this norwegian page the firmware V04.14U_2014/09/21: has support for broadcast on ch 1-6. The firmware is also updated twice since and the newest file on the page here is V04.27U_2016/02/24.

To clarify i am not recomending to update the firmware unless you know what you are doing since you will have to reprogram the module and there is a chance of bricking the device, but this could explain the difference.

I can make an example using the time value if you want but expect that this would only be relevant for you.

For the saving to a file each hour have you tought about using the Home Assistant Statistics instead? I have not tried it but seems to do what you want.

I dont want to say what is best to run the logic between HA and nodered, i ques it is up to you what you like. I currently have mostly of my house logic on the oldHDL logic module but plan is to move it all to Nodered(It is possible to program it all in home assistant as well but i have used nodered before HA and that is what i understand.)

I dont belive scenes can be active. But it is possible to use Mqtt selector instead.

I currently have my house programed with different modes (Normal, Away, Night and Vacation) each mode is controled by US switches and when i activate one the others turn off. This makes one of them always be on.

Grid Card:
image

square: true
columns: 4
type: grid
cards:
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.husmodus_normal
    icon: mdi:home-account
    name: Normal
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.husmodus_borte
    name: Borte
    icon: mdi:home
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.husmodus_ferie
    name: Ferie
    icon: mdi:airplane
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.husmodus_natt
    name: Natt
    icon: mdi:weather-night

mqtt_switch.yaml

#1 - Husmodus Normal
- name: "Husmodus Normal"
  state_topic: "hdl/us/1.22/1"
  command_topic: "hdl/us/1.22/1/set"
#2 - Husmodus Natt
- name: "Husmodus Natt"
  state_topic: "hdl/us/1.22/2"
  command_topic: "hdl/us/1.22/2/set"
#3 - Husmodus Borte
- name: "Husmodus Borte"
  state_topic: "hdl/us/1.22/3"
  command_topic: "hdl/us/1.22/3/set"
#4 - Husmodus Ferie
- name: "Husmodus Ferie"
  state_topic: "hdl/us/1.22/4"
  command_topic: "hdl/us/1.22/4/set"

When i get some time and motivation i plan on moving all my logic to Nodered and use the scenes attached on previous post instead.

I think MQTT Select would be better and run the logic in nodered but have not been able to make the card apear as above and only have gotten it to work as dropdown(Pic below) so have not changed any thing here yet.
image

This look good, i think this is almost the same as i want to end up with.

Hi again.
Okay I`m more and more certain of a firmware issue then, because something is very strange with the “7261” code. I have verified again now, just to be 100% sure, and the current temperature is the value in “Payload → Watering → Time” of the 7261 code message.

I had already checked the “Eldi.no” site for firmware update, but my module is actually running a firmware which is later than whats available for download. (Im running V04.38U:2018/03/07).
And yes, my module is HDL-MFH06.432.

There might be a firmware glitch in the latter version of the firmware for sure, but anyway my current temperature is in the 7261 code message, so I will be able to extract it from there (well I have actually already succeeded in doing so by using your Excel-flow from your last reply.
I modified it to read all channels and also extract value from “Payload-Watering-Time”. And now I get the values that I want! So thank you!

(PS: Just wanted to correct what I wrote in my last message about the “5834x” code message. They arent exacly how I wrote in my message (the last digit doesnt represent the channels. I discovered this when I did a bit more debugging, and just wanted to clarify).

By the way, do you have a copy of the HDL code documentation?

I tried activate the state for the buttons. Do you know how to format the date to a shorter format:

image

I do not know how to do that. Have tried using the MQTT select and keep runnning in to the same issue. Easyest is for me to just use universal switch and then they get get yellow when active.

Hi @Linax and thanks again for your excellent contribution to this topic. I have implemented color temperature control through the HDL-DALI module using your code :+1:

It seems to be working very well but there is one tiny detail that would be nice to fix. In the Light Card in Home Assistant the temperature scale seems to be inverted - i.e when dragging the slider towards warm the lamp will get colder. Also the Kelvin information in the card seems to have completely different values than the ones specified in the yaml file (2700-6500K). The color of the icon is stuck as solid red instead of reflecting the temperature value.

When dragging the slider the Kelvin values are shown in the “info box” above the temperature scale - but the values that are set (visible in “attributes” section) are different and not Kelvin - maybe mired? As an example 4000K will be set as 250. I have attached a screenshot from the iOS dashboard.

Is this easy to fix somewhere in the config?

Thanks :slight_smile:

Bumping this thread again :wink: Have anyone managed to reverse the color temperature slider? When sliding towards blue the lights will go warm - and vice versa.

Looks like there are som changes to the lighting control regarding color temperature as well. Any input on how to update yaml files and nodered (if required) to support the new config would be highly appreciated.

Light Entities

I have a MRCU.433

Two questions

Do I need to put the device ID of the module? or a device ID of a module that is not listed

image

Second

I get this error

TypeError: Cannot read properties of null (reading ‘bus’)

@Linax - Is it possible to modify the NodeRed config to include decimal values from HDL raw data? According to HDL support the decimal values (i.e floor temp 20,4C instead of simply 20) is included in the last bytes. See attached photo from HDL.

Hi

Sorry if this is listed elswehere as I was unable to find.

I have HDL Buspro and am looking for a way to use the HDL switches to provide master and local control of an Airtouch 4 zone system, using the AT4 room sensors im hoping to be able to program buttons on switches both touch and DLP to provide zone on/off, set temperature and master control to provide entire system on/off, mode, temp, fan speed etc.

Would the HA Node Blue or other provide this functionality by using the plugins for both systems?

If not is this something that could be added?

Thanks in advance

Hello,
I have noticed that nodered addon restarts with the following log:

This happens when curtain motor starts running.
Even if I delete all dependencies with curtain control in node red and yaml file problem still persists, when I control curtains with switches in house.
Curtain motor model: HDL-MWM65B.20

1 Like