HDL Smartbus via NodeRed and MQTT

Did that fix the issue so that you now can control FH and AC?

Nice catch, to mutch copy paste from my side there.

New config for HA:
Add this line to the configuration.yaml file:

cover: !include cover.yaml

Add a new file in the config folder named cover.yaml and add something like this to it:

# Bedroom blinds
- platform: mqtt
  name: "Blind Bedroom"
  device_class: shade
  command_topic: "hdl/cc/1.5/1/set"
  state_topic: "hdl/cc/1.5/1/state"
#
# Living Room blinds
- platform: mqtt
  name: "Blind Living Room"
  device_class: shade
  command_topic: "hdl/cc/1.5/2/set"
  state_topic: "hdl/cc/1.5/2/state"

Device_class should match what ever you physically have on this page, this is for icons etc.

Example card for ch 1 closed and ch 2 open:
Blinds

Here is a new flow, try disabling your current MQTT - HDL flow and import this instead(Select import to new flow :smiley: ). Update the HDL in and out nodes and the MQTT in and out nodes to match your settings.

The feedbacks are a bit stupid in that it reports only status and not level even though according to the HDL documentation it should report level also. Therefore you will not be able to ask the module for current status on deployment or restart.

This could be issue in the firmware on the module or bug in the commands.js file. To find out and possible fix it one would have to check the byte messages on the bus and decode it from HEX +++. This is quite some work especially as i dont have a module myself, so instead i used the command answerback message and added a manual 10s timer. Now when you click close or it is closed from a sensor, switch etc. it will report status closing for 10s before changing to closed etc. This will be the same time for each blind even if they have different running time. One other option would be to change it straight to closed and ignore the closing and opening status.

Please let me know how it works for you as i have not been able to run a full test.

Fantastic work @Linax ! The relays are now triggered from the card👍 There seem to be some issue with the status reporting though.

As you can see from the screenshot one of the blinds are not reporting state «open». The relay ran for 10 seconds - so the blind is open - but seems to be stuck in «opening» state. This happens to both channels in what seems to be random order - both when opening and closing. The state in the entity card is indicating the same state as shown in MQTT explorer. The question is what is causing the state to not update. It seems to happen every time I run both the channels at the same time - but also when running them one at a time (but less frequent).


Unfortunately - No. I still have a blank card on the FH/AC. The FH is also visible in the MQTT explorer as 1.91.

Think the issue is that i used timer instead of delay, a timer will restart on every message in so if you send two messages only last will be retained. Have changed the flow to use a delay node instead, this will delay every message.

For the floorheat i think the problem is you have “hdl/fh”(fh is short for floorheat this is the DLP thermostats witch is what i have) in your HA config instead of “hdl/hm” (hm is short for heatmodule) Sorry i did not spot this earlier.

For the AC i can see that you dont have any data on the MQTT server so this could be an error from HDL to MQTT, and since you need the raw message in nodered “context data” to send a new message this will not work. There is two ways to get the initial state:

  1. Run a Read AC Status (6456) on startup. And you should get responce(6457) with current status. Try adding this command to your flow.

  2. Update the AC module from a DLP or something like this and you should get the Response Control AC Status (6459).

I do not have a AC module myself but but run a virtual AC in Node-RED(and forward the command to IR via an arduino) to be able to control my Heatpump from the DLP`s and Home Assistant, so have not done any testing on the actual module myself.

Can see that there have not been added parcer/decoder for the read and responce codes in the commands.js file. Would you be willing to try and get me the debugs of the codes 6456 and 6457? Should be able to use this flow. If there is a refresh button on the ac module in HDL buspro tool i think this should trigger the read command.

[{"id":"c8e5a62fcb5fb706","type":"hdl-raw-in","z":"641980b9a6a75af9","controller":"","name":"","x":90,"y":1040,"wires":[["2f56a10e55062696","ed1e957e136a4d4b"]]},{"id":"2f56a10e55062696","type":"switch","z":"641980b9a6a75af9","name":"code","property":"code","propertyType":"msg","rules":[{"t":"eq","v":"6456","vt":"str"},{"t":"eq","v":"6458","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":960,"wires":[["dbf0a12520abf499"],["475dbfb3485b2009"]]},{"id":"dbf0a12520abf499","type":"debug","z":"641980b9a6a75af9","name":"6456 Read Status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":940,"wires":[]},{"id":"ad37da2b41b29aff","type":"debug","z":"641980b9a6a75af9","name":"6457 Read responce","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":660,"y":1080,"wires":[]},{"id":"ed1e957e136a4d4b","type":"switch","z":"641980b9a6a75af9","name":"code","property":"code","propertyType":"msg","rules":[{"t":"eq","v":"6457","vt":"str"},{"t":"eq","v":"6459","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":1100,"wires":[["ad37da2b41b29aff"],["3a0134c59eb4da18"]]},{"id":"f776c1b50fea68bc","type":"comment","z":"641980b9a6a75af9","name":"Command to AC module","info":"","x":370,"y":920,"wires":[]},{"id":"29c18d6e22f0c391","type":"comment","z":"641980b9a6a75af9","name":"Answers from AC module","info":"","x":370,"y":1040,"wires":[]},{"id":"475dbfb3485b2009","type":"debug","z":"641980b9a6a75af9","name":"6458 Control AC","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":980,"wires":[]},{"id":"3a0134c59eb4da18","type":"debug","z":"641980b9a6a75af9","name":"6459 Control Responce","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":1120,"wires":[]}]

Great news - the thermostat card is now working. You are correct about the «hdl/hm». Also the addressing of the device/channel had to be changed to 1.91.1 instead of 1.91/1. Once that was changed everything seems to work.

This is my working config for controlling the Floorheating module directly:


# Floorheat Thermostat
climate:
  - platform: mqtt
    name: Floorheat ch1
    modes:
      - "off"
      - "heat"
    mode_state_topic: "hdl/hm/1.91.1"
    mode_state_template: "{{value_json.status}}"
    mode_command_topic: "hdl/hm/1.91.1/mode/set"
    #current_temperature_topic: "hdl/hm/1.91.1"
    #current_temperature_template: "{{value_json.temperature.current}}"
    current_temperature_topic: "hdl/temp/1.91.1"
    temperature_state_topic: "hdl/hm/1.91.1"
    temperature_state_template: "{{value_json.temperature.now}}"
    temperature_command_topic: "hdl/hm/1.91.1/temperature/set"
    preset_modes:
      - "Normal"
      - "Day"
      - "Night"
      - "Away"
      - "Timer"
    preset_mode_state_topic: "hdl/hm/1.91.1"
    preset_mode_value_template: "{{value_json.textmode}}"
    preset_mode_command_topic: "hdl/hm/1.91.1/textmode/set"
    min_temp: 5
    max_temp: 35
    precision: 0.1

The curtain controller is now behaving much better - good job👍 The status seems to be more correct. The only issue seems to be related to stopping the curtain between fully open/fully closed position. When I hit down/close the curtain will start to close. If I thereafter hit the stop icon the curtain will stop at the current position. After 10 seconds the state will still update to closed - but the curtain is neither (fully) open or closed.

The close/down button will also be greyed out - so in order to make the curtain continue towards down/closed I first have to click open/up. By doing that the curtain will move up and the down/close button will be reactivated. Since I wanted to continue to close the curtain from where I paused I hit the down/close button. The curtain will reverse direction and head towards down/closed - good. But the sate will report open/up 10 seconds after starting the up command - despite the curtain is actually closed. I see the logic behind that due to the delay function - and maybe there is no easy way to avoid it?

It would be perfect if one could click down - then stop the curtain - and then have the option to continue in either direction (not have the down button disabled/greyed out).

Regarding the AC module. I have an old HDL SB-DN-HVAC module. I found the quoted information below which maybe could explain why there is no MQTT data from the AC. Looks like the SB-DN-HVAC module will only communicate directly with a DLP of Enviro panel. There is a newer AC module available (MAC01.331) that seem to have better functionality. I might have to upgrade😎

Q: Apart from the relay totality is different from that of SB-DN-HVAC, I can see the MAC01.331 has terminal for digital temperature sensor. *

A: Yes, the MAC01.331 has terminal for digital temperature sensor DS18B20, and has built-in control logic, which means once a desired temperature is set (via user panel, e.g., a DLP panel) to it, it can regulate itself and control the room temperature. This is not true for SB-DN-HAVC, the SB-DN-HAVC requires a DLP panel to be online always, because the SB-DN-HVAC has no built-in the control logic, the control logic is in DLP panel.

Thanks, will add this as example to the first post to avoid any confusion in future. Did you also get the current temperature working like that?

I see that there is some issues with the current blinds logic that i did not think of, will try to make a fix for it. Would be intresting to see if there is a bug in the decoding of the codes for curtain controller first tho. Could you run the “command test”(Under tools) function in Buspro software while closing a blind to get me the raw hex value for the commands sendt from clicking close until it is fully closed and also get the debugs from the Nodered test flow at the same time?

I think you can try to add “optimistic: true” under config for the blind for now and then you should be able to run it all ways.

For the AC can you run the flow bellow and check the debug window when updating status from a DLP? Think you should get some messages atleast and do not think it is needed to upgrade the module.

[{"id":"abe9a13397912ead","type":"tab","label":"AC Test v1","disabled":false,"info":"","env":[]},{"id":"5f6b3ac78f77f3bc","type":"hdl-raw-out","z":"abe9a13397912ead","controller":"","name":"","x":670,"y":580,"wires":[]},{"id":"14bf1182cdd9510c","type":"inject","z":"abe9a13397912ead","name":"Read AC status","props":[{"p":"code","v":"6456","vt":"num"},{"p":"target","v":"1.106","vt":"str"},{"p":"payload.ac","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":200,"y":620,"wires":[["5f6b3ac78f77f3bc"]]},{"id":"c3bfb169da985d60","type":"hdl-raw-in","z":"abe9a13397912ead","controller":"","name":"","x":130,"y":220,"wires":[["4226e66306f2bb6e","567c80210457e484"]]},{"id":"4226e66306f2bb6e","type":"switch","z":"abe9a13397912ead","name":"code","property":"code","propertyType":"msg","rules":[{"t":"eq","v":"6456","vt":"num"},{"t":"eq","v":"6458","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":160,"wires":[["f2814864d5123a07"],["7b63dee7c3fa0f45"]]},{"id":"567c80210457e484","type":"switch","z":"abe9a13397912ead","name":"code","property":"code","propertyType":"msg","rules":[{"t":"eq","v":"6457","vt":"num"},{"t":"eq","v":"6459","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":300,"wires":[["ab75cccd1e6dd1fa"],["3ec86a1575dcaaf7"]]},{"id":"2c156a3804a61641","type":"comment","z":"abe9a13397912ead","name":"Command to AC module","info":"","x":370,"y":120,"wires":[]},{"id":"8851fce670426043","type":"comment","z":"abe9a13397912ead","name":"Answers from AC module","info":"","x":370,"y":240,"wires":[]},{"id":"3ec86a1575dcaaf7","type":"debug","z":"abe9a13397912ead","name":"6459 Control Responce","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":320,"wires":[]},{"id":"ab75cccd1e6dd1fa","type":"debug","z":"abe9a13397912ead","name":"6457 Read responce","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":660,"y":280,"wires":[]},{"id":"7b63dee7c3fa0f45","type":"debug","z":"abe9a13397912ead","name":"6458 Control AC","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":180,"wires":[]},{"id":"f2814864d5123a07","type":"debug","z":"abe9a13397912ead","name":"6456 Read Status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":140,"wires":[]},{"id":"1810c2d651082e22","type":"comment","z":"abe9a13397912ead","name":"Need to update commands.js file for read to work","info":"  // 10.1.1 Read AC Status\n  0x1938: {\n    parse: function(buffer) {\n      return { ac: buffer.readUInt8(0) };\n    },\n\n    encode: function(data) {\n      return new Buffer([data.ac]);\n    },\n\n    response: 0x1939\n  },\n  // 10.1.2 Response Read AC Status","x":260,"y":580,"wires":[]},{"id":"f77db578d25054a4","type":"comment","z":"abe9a13397912ead","name":"Debug of AC codes","info":"","x":120,"y":60,"wires":[]},{"id":"70b5c163af262e18","type":"comment","z":"abe9a13397912ead","name":"Test commands for AC","info":"","x":140,"y":460,"wires":[]},{"id":"bbdcae056f8751a8","type":"change","z":"abe9a13397912ead","name":"AC Default parameters","rules":[{"t":"set","p":"sender","pt":"msg","to":"1.106","tot":"str"},{"t":"set","p":"target","pt":"msg","to":"1.99","tot":"str"},{"t":"set","p":"code","pt":"msg","to":"6458","tot":"num"},{"t":"set","p":"payload.acstatus","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.acno","pt":"msg","to":"1","tot":"num"},{"t":"set","p":"payload.setupmode","pt":"msg","to":"1","tot":"num"},{"t":"set","p":"payload.setupspeed","pt":"msg","to":"2","tot":"num"},{"t":"set","p":"payload.temperature.type","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"payload.temperature.now","pt":"msg","to":"23","tot":"num"},{"t":"set","p":"payload.temperature.cooling","pt":"msg","to":"19","tot":"num"},{"t":"set","p":"payload.temperature.heating","pt":"msg","to":"23","tot":"num"},{"t":"set","p":"payload.temperature.auto","pt":"msg","to":"23","tot":"num"},{"t":"set","p":"payload.temperature.dry","pt":"msg","to":"21","tot":"num"},{"t":"set","p":"payload.modeandfan","pt":"msg","to":"48","tot":"num"},{"t":"set","p":"payload.currentmode","pt":"msg","to":"23","tot":"num"},{"t":"set","p":"payload.sweep","pt":"msg","to":"OFF","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":500,"wires":[["5f6b3ac78f77f3bc"]]},{"id":"0b78e68747fe8af0","type":"inject","z":"abe9a13397912ead","name":"Test AC update","props":[{"p":"test","v":"","vt":"date"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":200,"y":500,"wires":[["bbdcae056f8751a8"]]}]

Can you also give me some more info on The AC setup,

  • Subnet and Device id for the AC module?

  • How is it connected from HDL to the AC?

  • How do you control the HDL AC module now?

  • What type of AC is it?

Good catch :slight_smile: I did not - I had to remove # before “current_temperature_topic” and the “current temperature_template”. Added # in front of “current_temperature_topic” with reference to hdl/temp. Requested temperature is shown in big numbers, actual temperature just over “Heat - Normal”.

To clarify here’s the code:

  - platform: mqtt
    name: Floorheat 1.91.2
    modes:
      - "off"
      - "heat"
    mode_state_topic: "hdl/hm/1.91.2"
    mode_state_template: "{{value_json.status}}"
    mode_command_topic: "hdl/hm/1.91.2/mode/set"
    current_temperature_topic: "hdl/hm/1.91.2"
    current_temperature_template: "{{value_json.temperature.current}}"
    #current_temperature_topic: "hdl/temp/1.91.2"
    temperature_state_topic: "hdl/hm/1.91.2"
    temperature_state_template: "{{value_json.temperature.now}}"
    temperature_command_topic: "hdl/hm/1.91.2/temperature/set"
    preset_modes:
      - "Normal"
      - "Day"
      - "Night"
      - "Away"
      - "Timer"
    preset_mode_state_topic: "hdl/hm/1.91.2"
    preset_mode_value_template: "{{value_json.textmode}}"
    preset_mode_command_topic: "hdl/hm/1.91.2/textmode/set"
    min_temp: 5
    max_temp: 35
    precision: 0.1

Screenshot for running curtain channel 1 down and then up:


Screenshot for running curtain channel 2 down and then up. After it reached the up position the state did not update in HomeAssistant. I pressed the stop button to see if it would trigger an entry in the log:


The status reporting and general control seems to be a bit unstable for some reason.

I will follow up with AC info/logs shortly :slight_smile:

Hey team, good to see some more dev going on with this - I published the node-red module node-red-contrib-hdlbus a couple of years back (forked from node-red-contrib-buspro - that dev and I couldn’t agree on directions at the time unfortunately), haven’t had a need to update it really to date. I saw a PR pop up a few weeks back - but it’s gone now - that one of you?

I use DALI for lighting - hence why there’s a virtual DALI groups device - this is necessary to store/recall levels as they’re not reported correctly on the HDL network. Drop the node on a page and read the info pane if you’d like to understand it more - basically just makes the 16 DALI groups function as a virtual 16ch dimmer.

I use the addin slightly differently (I think?) - I have a generic flow for lights that creates a 2-way conduit between HDL and MQTT without knowing about any of the devices - then I create mqtt lights in HA YAML. I’ve recently got into autodiscovery in HA, so would love to look at being able to auto-create entities, just need to find the time.

The YAML for a light/channel - this is in the ‘light’ domain:

- platform: mqtt
  name: "Flat Hall"
  command_topic: "lights/20/1/cmd"
  state_topic: "lights/20/1/state"
  state_value_template: "{{value_json.power}}"
  on_command_type: brightness
  brightness_scale: 100
  brightness_command_topic: "lights/20/1/cmd"
  brightness_state_topic: "lights/20/1/state"
  brightness_value_template: "{{value_json.brightness}}"

I do have DLP AC control working for 2-way control also - by this I mean I’m using HA to control my AC, then interfacing with the DLP to facilitate control/display via that interface. 1.95 (in the below image) is the address I gave the aircon control in my DLP.

I did get motor controllers working too for a friend - I can dig into that if people are still looking for that.

Will keep an eye on this topic and happy to answer any questions. :+1:

1 Like

Hi Ben, nice to se you here :smiley:

I created a pull request to implement a buxfix(Current temperature was missing and also had a indexing fault towards the end) for the Heatingmodule MFH06 codes, so if you could implement the PR that would be appreciated. Are you not able to see the PR anymore? I might have deactivated it by accident or something.

I also figured out some of the undocumented codes for DLP`s (Panel Brightness, Eco Mode +++) for some reason that also made its way in to the PR(i am not to familiar with github)

I think it is the same way as i have published here on the forum. I filter the HDL messages by the different answeerback codes for lights, US, sensors thermostats etc. and send it over to the MQTT server.(Thermostats and AC are also saved to the nodered flow context data so that it can be used when changing those messages later from HA as HDL needs the whole config and not only the change for those messages)

The traffic from HA to HDL is also switched by different MQTT topics.

This makes it so that you do not have to do any changes in nodered and all changes are done in the yaml files for the HA interfacing.

That would be cool, where you planning on running only in HA then or still use nodered alongside? I have also looked at those codes slightly and planned to make a addon in HA bypassing nodered stuff but gave it up as i found the nodered route to be more easy as i dont have any HA development skills. Was in the start thinking a auto discovery addon would be great(Names for channels etc could also be taken straight from the channel remarks).

I was also one thime thinking on making a script for nodered that auto created the configuration.yaml file witch would be doable but in the end desided that individual configuration of the yaml files to be quick and good enough.

I dont have DALI but i have DMX for some led strips etc. and they operate same as normal dimmers.
I therfore tought that dali worked on the same codes as a normal dimmer or relay.

Think you forgot to add the flows, would very mutch like to see it if you would be willing to share it?

I think this is the same as i am doing now, you do not have a HDL ac module? I do not own a AC module and my Panasonic heatpump uses extra long IR codes witch is not able to be sendt from HDL. I therfore made a flow in my old openhab setup that listens for the AC command and then sends the answeerback and then forward the message to the Arduino IR sender. It also takes the commands from openhab and update the DLP`s.

When moving to HA i keept my old PI running openhab on the network and only made a flow that works by listening for the HDL answeerback message to update status on the MQTT server. Also commands from MQTT/HA are sendt the same way as a DLP sends the message. (This shold also then work for the persons running an actual HDL AC module)

I was planning on removing my old PI running the Openhab/nodered setup and use the old flow but was not able to. The message on a “HDL raw out” does not show up on a “HDL raw in” on the same nodered instance. Could you therfore also share the flow on how you use the virtual HVAC nodes so that i might be able to use some of it :smiley:

Would like to see the flows for that if you still have them.(Infact i would like to see all of your HDL flows if you are willing to share :smiley:) Do you remember if you got the % feedback from the module? The way i read the HDL docs it should also report the % status of the blinds on the messages. (Have not yet had time to check the raw Hex messages provided by @Cregeland to check if the % value is reported there but will look into it now.)

1 Like

Thanks @Cregeland

Unfortunately the motor controller does not send current state.

Went down the rabbit hole and have done some changes.

Instead of the delay timer i now save the command value and use it again when the broadcast message reports stopped to know if it the state state is open or closed. Also added position of 0%(Closed) 100%(Open) or 50%(Stopped) You should now be able to stop the blinds midway and continue with open or close.

You will have to change the cover.yaml file to something like this:

#Test blind HDL curtain controller
#
# Bedroom blinds
- platform: mqtt
  name: "Blind Bedroom"
  device_class: shade
  command_topic: "hdl/cc/1.5/1/set"
  state_topic: "hdl/cc/1.5/1/state"
  optimistic: true
  position_topic: "hdl/cc/1.5/1/position"
#
# Living Room blinds
- platform: mqtt
  name: "Blind Living Room"
  device_class: shade
  command_topic: "hdl/cc/1.5/2/set"
  state_topic: "hdl/cc/1.5/2/state"
  optimistic: true
  position_topic: "hdl/cc/1.5/2/position"

Here is the new flow.

Can you report how it works for you now?

hi
I found a new device, code 5195, which is a fresh air system
The current node cannot find this device
Through the mobile phone, I found some control codes


01 01 00 03 A4 00 41 A8 00 00 00 00 00 00 42 38 00 00 00 00 00 00 43 5F 00 00 43 EE 00 00 AE 6C
01 01 00 <-(fan speed) 03 A4 00 41 A8 00 00 00 00 00 00 42 38 00 00 00 00 00 00 43 5F 00 00 43 EE 00 00 AE 6C
00 = auto , 01 min , 02 mid , 03 max

01 01 00 03<-(mode) A4 00 41 A8 00 00 00 00 00 00 42 38 00 00 00 00 00 00 43 5F 00 00 43 EE 00 00 AE 6C

00 is ai mode
01 is manual mode
02 Internal circulation mode
03 constant temperature mode

hope update command.js
new problem
looks contrid-hdlbus can’t support devicetype
default typeid is 00 00

    "payload": {
        "opCode": 0x002,
        "sender": {
            "deviceType": 0x00B,
            "subnetId": 1,
            "deviceId": 2,
            "wasSendToThisDevice": true/false

hdlbus can’t get typeid
i use hdl setup tools , get packet like this
1A 01 33 11 B6 FF 02 FF FF 01 04 0A 12 00 41 01 00 F0 00 00 00 E9 25 85 11 AA
01 33 >>> subnet 01 device 51
11 B6 is type id , but can’t show on node-red debug tab
FF 02 is code
FF FF boardcast
and sender ip show wrong , is show 1.X
{“sender”:“1.X”,“target”:“255.255”,“code”:55876,“payload”:{“date”:“2022-05-01T10:10:02.000Z”},“topic”:“command”,"_msgid":“3bdb6b0988422f31”}

need update bus.js for show typeid , and custom type in msg.payload.typeid better

Hi @ritech

I dont think any of those codes are control codes, they are all broadcasting from the device id 51. And none of the messages are adressed to device id 51. Think the code 144B is not sendt from the sensor but from the software? But the code FF02 apears to be a brodcast from the device

I did not know HDL had any fresh air systems.
Do you have a model nr or anything on the unit?
Do you have a datasheet?
Are you trying to change the modes or do you only want to know what status it is at now?
What all the data is after the Mode(If you want to control the unit you will most likely have to send all the fields)?
Do you have any way of controling or reading the status from the unit now?
How does the unit 51 apear from the HDL buspro tool?

I think this is due to the fact that you have selected 0 as the target device id in the test software(Top left corner). Do you have a device with ID 0?

I dont think this is the same message as above this is 55873(DA44) code witch is the “Broadcast System Date and Time” and apears to be decoded correctly. This will start sending if you clicked the Broadcast computer time button on the command test software?

If you run this flow can you see anything in you nodered debug window when operating the unit from your phone?

[{"id":"2028b4409a28faca","type":"tab","label":"Ritech","disabled":false,"info":"","env":[]},{"id":"99c349440d10726e","type":"hdl-raw-in","z":"2028b4409a28faca","controller":"","name":"","x":150,"y":220,"wires":[["85c09ce6ab7f25a3","bec07bf6e3510bc3"]]},{"id":"85c09ce6ab7f25a3","type":"switch","z":"2028b4409a28faca","name":"sender","property":"sender","propertyType":"msg","rules":[{"t":"eq","v":"1.51","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":240,"wires":[["66a1f288d6695412"]]},{"id":"bec07bf6e3510bc3","type":"switch","z":"2028b4409a28faca","name":"target","property":"target","propertyType":"msg","rules":[{"t":"eq","v":"1.51","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":140,"wires":[["6ac1dbc2c178b255"]]},{"id":"346d7a1441e18b88","type":"comment","z":"2028b4409a28faca","name":"Command to module","info":"","x":410,"y":100,"wires":[]},{"id":"4d01437c34be4341","type":"comment","z":"2028b4409a28faca","name":"Answers from Module","info":"","x":420,"y":200,"wires":[]},{"id":"6ac1dbc2c178b255","type":"debug","z":"2028b4409a28faca","name":"To Device 51","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":550,"y":140,"wires":[]},{"id":"66a1f288d6695412","type":"debug","z":"2028b4409a28faca","name":"From Device 51","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":560,"y":240,"wires":[]},{"id":"665659ea9e40cdaf","type":"comment","z":"2028b4409a28faca","name":"Debug","info":"","x":130,"y":60,"wires":[]}]

i am a chinese user


i have decode new type , code 5195

0x144B: {
parse: function(buffer) {
return {
acstatus: Boolean(buffer.readUInt8(1)), //Status. 1 on. 0 off.
acno: buffer.readUInt8(0), //AF No.
setupmode: buffer.readUInt8(3),//0 ai 1 manual 2 inside 3 constant temperature
setupspeed: buffer.readUInt8(2),//Fan Speed. 0 Auto. 1 High. 2 Medium. 3 Low.
temperature: {
insidetemp: buffer.readUInt32BE(26),//insidetemp
pm25: buffer.readUInt8(27),//pm25
tvoc: buffer.readUInt8(28),//tvoc
co2: buffer.readUInt8(29),//co2
humidity: buffer.readUInt8(25)//湿度
},
};
},
encode: function(data) {
var buffer = new Buffer(30);
var temperature = data.temperature;
buffer.writeUInt8(data.acstatus, 1);
buffer.writeUInt8(data.acno, 0);
buffer.writeUInt8(data.setupmode, 3);
buffer.writeUInt8(data.setupspeed, 2);
return buffer;
}
},

air fan sensor data is wrong , becos hdl decode this value

I just moved into this room. I’ll check the model of the new HDL device
Do you know what code 65282 stands for? I can see this message every few seconds in tools
1A 01 33 11 B6 FF 02 FF FF 01 04 0A 12 00 82 02 00 A0 00 00 00 DF 1A DA 38 2C

11 B6

this code have bug for few ac system
can’t resolve “acno”
if create two ac panel , when click no2 power , mqtt send acno = 1 to hdl
i dont’t know command.js how to check acno , topic?

I do not know the codes for the unit and they are not in any of the documentation i have available, but from other HDL devices i would expect up to 5 different codes.

  • Read Status message
  • Responce read status message
  • Control message
  • Responce control message
  • Status Broadcast message. That could be the code 65282 if it comes regulary.

If you import the flow attached on above message you should see all the messages going to the device id 51 and all the responces from the device. That way you can see what the control and responce messages are when changing the unit from the phone app.

Is this on the Fresh air module or are you trying to interface Air condition modules?

  • Read Status message
  • Responce read status message
  • Control message
  • Responce control message
  • Status Broadcast message. That could be the code 65282 if it comes regulary.

air fresh module read and write use same message
this message includes switch, speed, cycle mode and current PM2 5. TVOC, indoor temperature, etc
no responce message
you are right , 65282 is broadcast message from air fresh module
I plan to dismantle the weak current box recently and find out the specific model

To display the current temperature i recomend using the sensor that the AC module uses for each room. You should find the temperatures on the MQTT explorer under temp or you will have to use the one from the ac message i dont have access to my installation now but you should also see it in the mqtt explorer.

Are you not able to access the fresh air module from HDL buspro tool? It should show the model nr there.

If you use the flow above you should see all the traffic going in and out to the fresh air module?

6457 code is the “Response Read AC Status” So that means that when you open the phone app the app sends the code 6456 " Read AC Status" To get the value without the app you just need to send the same message from nodered.
I can see that the codes are not implemented but should be easy to implement if you send me some debug data.

If you could use the debug flow above and change the switch nodes with target and sender to the device id of the AC module and post what you get in the debug window. (I would like to get screenshots of the codes 6456, 6457, 6458 and 6459)

Thank you again @Linax, I really appreciate the effort you are putting in here :+1:

The curtain controller now seem to work correctly (up, stop, down). But the position indication is acting a bit weird:

  • Curtain is up. I click down. The motor runs in down direction
  • If I do not click stop - the relay will stop after 10 seconds (timer set in HDL config).
  • The status still shows the curtain is in down operation (arrow down).
  • If I click stop the curtain motor will not do anything (already stopped by timer) - but the status will then show «down» icon. If I click stop once more the curtain icon will show «open» icon.
  • The same thing happens on the way up. I run the curtain up - the motor stops by timer - but status stuck with up arrow icon. If i then click stop - the status icon will show up. If I click stop again it will stay in up status.

It seems that the status will not update unless I click stop - and somehow the down status will switch to up if pressing «stop» twice on the way down.