HDL Smartbus via NodeRed and MQTT


I control it on HDL APP. I get these from HDL Buspro software. The red circle is color temperature control. Outside the red circle is the brightness control.
Dali module address is 2.11

Thats two codes i have not seen before and i do not have any documentation on it, but we can try.

The code 6626 (19 E2) is the Command.
The code 6627 (19 E3) is the responce.

But need to get more info on the values in red on your screenshot.

1st one (Hex: 01 - Dec: 01) i expect is channel 1(Is it channel 1 you are adjusting on)?
2nd one (Hex: 17 - Dec: 23) What is this?
3rd one (Hex: D4 - Dec: 212) What is this?

I was expecting only one value for the temperature and here it apears to be 2.

Can you try and take some more screenshots with the color temperature set to known values, so that we can make sence off the values in red?

How does the app look, is it a slider or fixed values?

@Linax I eventually managed to find the issue and to get it to work. In smart-bus-mrgadget/lib/bus.js Constants.write(‘HDLMIRACLE’) needed to be changed to Constants.write(‘SMARTCLOUD’); I noticed that it was the UDP header that was the issue, and that Smart-Bus G4 IP Network device would only recognize messages with ‘SMARTCLOUD’ in the header. Thanks for the assistance!


Sorry to reply you so late

These two groups are the data when I set the color temperature to the lowest and highest through HDL ON. Both are channel 1
APP uses slider to adjust color temperature

Ok, it apears to me as the 2 indexes are combined to get a range of 2100 - 7000.

Strange if this is the case as a 0-255 would give good enough resolution for the intended use.

I think i have made a functioning commands.js for the command and responce.

Before we start with home assistant integration we need to verify it works from nodered so please change the commands.js file to this one (Path: \IP\config\node-red\node_modules\smart-bus-mrgadget\lib), restart nodered and test with this flow:

[{"id":"38efeef5ae3ba114","type":"tab","label":"Test Color temperature","disabled":false,"info":"","env":[]},{"id":"3522e966d53ddca1","type":"hdl-raw-in","z":"38efeef5ae3ba114","controller":"","name":"","x":190,"y":360,"wires":[["8c3f934356962343"]]},{"id":"2b0c188c2eee6ae3","type":"hdl-raw-out","z":"38efeef5ae3ba114","controller":"","name":"","x":710,"y":120,"wires":[]},{"id":"2d2a45bd995687d7","type":"debug","z":"38efeef5ae3ba114","name":"From HDL","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":360,"wires":[]},{"id":"535769cbd577133a","type":"inject","z":"38efeef5ae3ba114","name":"Set Color temperature Min 2100","props":[{"p":"target","v":"2.11","vt":"str"},{"p":"code","v":"6626","vt":"num"},{"p":"payload.channel","v":"1","vt":"num"},{"p":"payload.colortemp","v":"2100","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":160,"wires":[["2b0c188c2eee6ae3"]]},{"id":"8c3f934356962343","type":"switch","z":"38efeef5ae3ba114","name":"","property":"code","propertyType":"msg","rules":[{"t":"eq","v":"6624","vt":"num"},{"t":"eq","v":"6625","vt":"num"},{"t":"eq","v":"6626","vt":"num"},{"t":"eq","v":"6627","vt":"num"}],"checkall":"true","repair":false,"outputs":4,"x":390,"y":360,"wires":[["2d2a45bd995687d7"],["2d2a45bd995687d7"],["2d2a45bd995687d7"],["2d2a45bd995687d7"]]},{"id":"752b82dcaf5c362b","type":"inject","z":"38efeef5ae3ba114","name":"Read color temperature","props":[{"p":"target","v":"2.11","vt":"str"},{"p":"code","v":"6624","vt":"num"},{"p":"payload.channel","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":260,"y":120,"wires":[["2b0c188c2eee6ae3"]]},{"id":"3979fedca967f22f","type":"inject","z":"38efeef5ae3ba114","name":"Set Color temperature Max 7000","props":[{"p":"target","v":"2.11","vt":"str"},{"p":"code","v":"6627","vt":"num"},{"p":"payload.channel","v":"1","vt":"num"},{"p":"payload.colortemp","v":"7000","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":240,"wires":[["2b0c188c2eee6ae3"]]},{"id":"9104a5113da86920","type":"inject","z":"38efeef5ae3ba114","name":"Set Color temperature Mid 4550","props":[{"p":"target","v":"2.11","vt":"str"},{"p":"code","v":"6626","vt":"num"},{"p":"payload.channel","v":"1","vt":"num"},{"p":"payload.colortemp","v":"4550","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":200,"wires":[["2b0c188c2eee6ae3"]]}]

You should be able to inject the 3x temperatures and change the light with this flow.

Thank you for the examples! Very helpful. I have now splitted the yaml files and got the configuration to work. My DPL panel with floor heating am I not able to control. I can only see the temp value on them, they are not reacting when I push the on/off button or change temp degrees. Is there something I need to change in Node-red also?

Strange, it works for me with above example.

Is the DLP the master or do you have a heating module as the master? hdl/fh if the DLP is the master but if it is a heating module it should be hdl/hm. No changes should be neded in nodered. Have you checked how it looks with MQTT explorer?

Messages looks correct in Mqtt explorer, but it looks like the dlp is not reacting to the messages. If I change temp in HA it will show up in Mqtt explorer, but in HA it will return to what it was before I changed.

Then there might be something wrong in nodered. Can you add a debug node on the floorheat outputs with complete message and run the command again, there might be something broken and we should be able to see it then.

Also check under the flow context store it should be something like this (PS: You need to press the refresh button)

Here is the result in Node red

It might be that you dont have data in your context store.

HDL needs the complete settings on the termostat on the commands. So when you change one value in Home assistant nodered still needs all the other values or it will not be able to send a complete and valid command to HDL. The way it is set up now is everytime there is a change on the DLP it sends the current status witch is stored in the context data. This is the data we recover and modify wih the new value from home assistant when sending the command.

Are you polling the original state of the DLP on startup, if not you will have to change a value on the DLP for it to get the original state? I suspect the error could be that there is now data in the storage.

image
When I replace this file to/config/node red/node_ modules/smart-bus-mrgadget/lib/commands.js

Flows stopped due to missing node types are displayed after restart

hdl-controller

hdl-raw-in

hdl-raw-out

I use home assistantOS


Because I don’t know how to uninstall the node
I reinstalled noded. The js file was not imported. Introduced flow resolution, adjusted the minimum color temperature and maximum color temperature

How did you import the file? Did you copy paste to a non code editor or download the zip an copyed the file. That error will come if the file is not valid.

When adjusting the temperatures on the screenshot did you use the flow or did you adjust from the app? Cant se on the screenshot as the payloads are not expanded.

Hello

Found out now! My fault, I didn`t write the addresses correct on all settings. in your example there is a 0 before some of the channel numbers. In example: "mode_state_topic: “hdl/fh/1.100/01”
I dropped the 0 in channel. I went through it word for word and made it exactly equal to yours and it worked well. Thank you!

Another question:
One of my hdl-dlp temp sensors is showing a temperatur with many decimals. How can i format the output so it shows only two decimals after comma?image

Try with this line to the config of the sensor:

value_template: "{{ value | round(2) }}"

Thank you! Worked perfect!

Another issue, looks like the wireless dlp temperature sensors is not updating.


I added the “state class” line to the code to get them as a statistics in lovelace:

#2 - Temp Hall
- name: "Temp Hall"
   state_topic: "hdl/temp/200.12/1"
   state_class: "measurement"
   unit_of_measurement: "°C"
   value_template: "{{ value | round(2) }}"

The wired sensor is working fine.
Is there something to do with the nodered code?