Automate Alorair Sentinel HD55 dehumidifier

I have connected up an ESPHome with CANBUS to my dehumidifier, but I am not getting any information from the dehumidifier. Anyone poked around with this since the thread was started?

Here is my code:

light:
  - platform: neopixelbus
    pin: GPIO0 
    variant: WS2812
    id: statusled
    num_leds: 1
    type: rgb

spi:
  id: McpSpi
  clk_pin: GPIO5
  mosi_pin: GPIO19
  miso_pin: GPIO21

sensor:
  - platform: template
    name: Temperature
    id: temp
  - platform: template
    name: Humidity
    id: humid
  - platform: template
    name: Pump
    id: pump

canbus:
  - platform: mcp2515
    id: my_mcp2515
    clock: 20MHZ
    spi_id: McpSpi
    cs_pin: GPIO32
    can_id: 5
    #mode: LOOPBACK
    bit_rate: 50kbps
    use_extended_id: false
    on_frame:
    - can_id: 0x3b0 #0x3b0 to remote
      then:
      - if:
          condition:
            lambda: 'return x[5] == 0x10 ? true : false;'
          then:
            - sensor.template.publish:
                id: pump
                state: true
      - logger.log: x
      - sensor.template.publish:
          id: temp
          state: !lambda 'return x[3];'
      - sensor.template.publish:
          id: humid
          state: !lambda 'return x[0];'
      - light.addressable_set:
            id: statusled 
            red: 100%
            green: 100%
            blue: 0%

I assume you need to send a frame to get something back. Since the remote is an option the HD55 is likely just listening. I havenā€™t connected up yet but my approach would be cyclic sending of the remote telegram to see if each generates a response with the info you need.

My AlorAir HD55ā€™s canbus is set to 125kbps. The unit was manufactured April 2023 and with serial starting with S38.

After sending any canbus message, the unit responds with the following

123 RHactual RHset Temp D3 Status D5 D6 D7

Temp is in celsius

Statusbit0 = 1 ā†’ Unit is on
Statusbit0 = 0 ā†’ Unit is off
(bit0 is Least Significant Bit)

To set humidity and turn on send message:

123 Humidity D1 Control D4 D5 D6 D7

To set Humidity, add 128 to desired humidity set point
Controlbit0 = 1 toggles machine on or off depending on current state
Set all other bytes to 0 (e.g. D1, D4, etc)

I have not completely decoded Status nor Control nor the other data bytes. Sending Controlbit4 to 1 (0x8) seems to turn on Cont Defrost and if Cont Defrost is on 0x3 in Control seems to turn it off.

These results seem much different than what tinymicros.com found and I have no explanation.

However, I can now control my HD55 from a Raspberry Pi 3B+ running python-can and a Waveshare CAN HAT. :+1:

Hope this helps someone avoid the many futile hours I spent sending canbus messages at 50kbps :smiley:

Harry

1 Like

Any chance you could share the code you are using for this? I am undertaking the exact same thing with an HDi65S.

Billy

Hi Billy,

Do you still need code or have you figure it out? My code is ugly but if you still need help, let me know and I will cleanup and post some snippets.

Harry

I have a HDi65S and got it hooked up via
T-CAN485 ā€“ LILYGOĀ®.
Mine is also operating at 50kbps and following the tinymicros docs. :man_shrugging:

I havenā€™t experimented with the controls yet ā€“ just monitoring. The unit is in my crawlspace, so itā€™s a little hard to experiment.

thanks @disruptivepatternmat and @dw4417 !

esphome:
  name: hd55
  platformio_options:
    build_unflags: -Werror=all
    board_build.flash_mode: dio

esp32:
  board: esp32dev

preferences:
  flash_write_interval: 10min

logger:
  level: DEBUG

api:
  password: ""
ota:
  password: ""
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Dashboard Fallback Hotspot"
    password: ""
web_server:
  port: 80

captive_portal:

light:
  - platform: neopixelbus
    type: GRB
    variant: WS2812
    pin: GPIO04
    num_leds: 1
    name: "Status LED"
    effects:
      - pulse:

# https://tinymicros.com/wiki/AlorAir_Sentinel_HD55_Dehumidifier
# https://community.home-assistant.io/t/automate-alorair-sentinel-hd55-dehumidifier/306084/23
canbus:
  - platform: esp32_can
    tx_pin: GPIO27
    rx_pin: GPIO26
    can_id: 0x05
    bit_rate: 50kbps
      #bit_rate: 125kbps
    use_extended_id: false
    on_frame:
    - can_id: 0x123
      then:
      - logger.log:
          format: "%02x %02x %02x %02x %02x %02x %02x %02x"
          args: [ 'x[0]', 'x[1]', 'x[2]', 'x[3]', 'x[4]', 'x[5]', 'x[6]', 'x[7]' ]
      - sensor.template.publish:
          id: humidity_actual
          state: !lambda 'return x[0];'
      - sensor.template.publish:
          id: humidity_setpoint
          state: !lambda 'return x[1];'
      - sensor.template.publish:
          id: byte_2
          state: !lambda 'return x[2];'
      - sensor.template.publish:
          id: temperature
          state: !lambda 'return x[3];'
      - sensor.template.publish:
          id: byte_4
          state: !lambda 'return x[4];'
      - sensor.template.publish:
          id: byte_5
          state: !lambda 'return x[5];'
      - binary_sensor.template.publish:
          id: draining
          state: !lambda 'return (x[5] & 0x10) == 0x10;'
      - sensor.template.publish:
          id: byte_6
          state: !lambda 'return x[6];'
      - sensor.template.publish:
          id: byte_7
          state: !lambda 'return x[7];'

interval:
  - interval: 5s
    then:
      - canbus.send:
          data: [ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
          can_id: 0x123

sensor:
  # Uptime sensor.
  - platform: uptime
    name: Uptime
    disabled_by_default: true

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: WiFi Signal
    update_interval: 60s
    disabled_by_default: true

  - platform: template
    name: Humidity
    id: humidity_actual
    accuracy_decimals: 0
    unit_of_measurement: "%"
    device_class: "humidity"
    state_class: "measurement"
  - platform: template
    name: Humidity Setpoint
    id: humidity_setpoint
    accuracy_decimals: 0
    unit_of_measurement: "%"
    device_class: "humidity"
    state_class: "measurement"
  - platform: template
    name: Temperature
    id: temperature
    accuracy_decimals: 0
    unit_of_measurement: "Ā°C"
    device_class: "temperature"
    state_class: "measurement"

  - platform: template
    name: Byte 2
    id: byte_2
    accuracy_decimals: 0
  - platform: template
    name: Byte 4
    id: byte_4
    accuracy_decimals: 0
  - platform: template
    name: Byte 5
    id: byte_5
    accuracy_decimals: 0
  - platform: template
    name: Byte 6
    id: byte_6
    accuracy_decimals: 0
  - platform: template
    name: Byte 7
    id: byte_7
    accuracy_decimals: 0

binary_sensor:
  - platform: template
    name: Draining
    id: draining

      #switch:
      #  - platform: gpio
      #    pin: GPIO23
      #    name: "CAN SE"

2 Likes

Thank you, I got it set up in a few minutes with this.

I think Byte 6, tells when the Fan is running with a value of 0x04.

Now I just need to send commands to it. Iā€™m going to reread the Guy who sniffed off the remote control.

I emailed the company and they said they could not provide the CAN information. Send pdfs that were on their web site. I wish they could see if they were more open on their specs, it would encourage more product sales with DIYers.

URL Tag for bots - [https://www.alorair.com] (https://www.alorair.com)

1 Like

Did you ended up decoding any more of the fields?

Hi, trying to get my HD55 to report itā€™s status data to my HA. Can you share how you made the physical connections to the dehumidifier? I see you are using GPIO27 for TX and GPIO26 for RX, but what are they connected to on the dehumidifier unit?

Thanks!

1 Like

I just got an HD35P, and I am doing the same research myself. I guess from Marksā€™s post that they are pulling the can data from the RJ45.

Iā€™m not having any luck getting my unit (HD35P) to respond to the send command from my Lilygo. Do you have any troubleshooting suggestions on where I may be going wrong?

[canbus:035]: send standard id=0x123 rtr=FALSE size=8

Notes:

  • I took the unit apart, and the RJ45 Pinout is the same as the Tinymicros example.(PIN 4,5)
  • Tried the 50 and 125kbps speeds.
  • neopixel works :smiley:

ooooo I am finally coming back to this! excited people figured more outā€¦I went deep on the Mitsubishi split unit controls for a while and back to this finally. Going to try out your work as I have 2 units and would love to control them.

1 Like

hey @dw4417 Iā€™d love to see the code when you have a moment

canbus:
  - platform: mcp2515
    id: my_mcp2515
    spi_id: MCPSPI
    cs_pin: GPIO14
    can_id: 0x05
    #bit_rate: 50kbps
    bit_rate: 125kbps
    clock: 16MHZ

That is how I got my HDi90 to work with the Adafruit CAN wing.

In case this helps someone else, if you use an old ethernet cable:

4/blue is lo
5/blue stripe is high
8/brwn grnd

Iā€™m seeing the basics, now to try to control!

Is the power and ground needed to see the data? I have mine hooked up like this, with jjhuffs config above.

normally just those 3 wires are needed, you might have a setup more like mine, which is something like this

canbus:
  - platform: mcp2515
    id: my_mcp2515
    spi_id: MCPSPI
    cs_pin: GPIO14
    can_id: 0x05
    #bit_rate: 50kbps
    bit_rate: 125kbps
    clock: 16MHZ
    use_extended_id: false
    on_frame:
    - can_id: 0x123
      then:
      - logger.log:
          format: "%02x %02x %02x %02x %02x %02x %02x %02x"
          args: [ 'x[0]', 'x[1]', 'x[2]', 'x[3]', 'x[4]', 'x[5]', 'x[6]', 'x[7]' ]
      - sensor.template.publish:
          id: humidity_actual
          state: !lambda 'return x[0];'
      - sensor.template.publish:
          id: humidity_setpoint
          state: !lambda 'return x[1];'
      - sensor.template.publish:
          id: temperature
          state: !lambda 'return x[2];'
      - sensor.template.publish:
          id: byte_3
          state: !lambda 'return x[3];'
      - sensor.template.publish:
          id: status
          state: !lambda 'return x[4];'
      - sensor.template.publish:
          id: byte_5
          state: !lambda 'return x[5];'
      - binary_sensor.template.publish:
          id: draining
          state: !lambda 'return (x[5] & 0x10) == 0x10;'
      - sensor.template.publish:
          id: byte_6
          state: !lambda 'return x[6];'
      - sensor.template.publish:
          id: byte_7
          state: !lambda 'return x[7];'

the 5th byte x[4]

x01 - on
x03 - on and running
x13 - on / running / drain pump

I think :slight_smile:

This is getting towards the edge of my bitwise understanding, so if someone knows the super slick way to turn that byte into booleans for statusā€¦please!

Here are some basicsā€¦

canbus:
  - platform: mcp2515
    id: my_mcp2515
    spi_id: MCPSPI
    cs_pin: GPIO14
    can_id: 0x05
    #bit_rate: 50kbps
    bit_rate: 125kbps
    clock: 16MHZ
    use_extended_id: false
    on_frame:
    - can_id: 0x123
      then:
      - logger.log:
          format: "%02x %02x %02x %02x %02x %02x %02x %02x"
          args: [ 'x[0]', 'x[1]', 'x[2]', 'x[3]', 'x[4]', 'x[5]', 'x[6]', 'x[7]' ]
      - sensor.template.publish:
          id: humidity_actual
          state: !lambda 'return x[0];'
      - sensor.template.publish:
          id: humidity_setpoint
          state: !lambda 'return x[1];'
      - sensor.template.publish:
          id: temperature
          state: !lambda 'return x[2];'
      - sensor.template.publish:
          id: byte_3
          state: !lambda 'return x[3];'
      - sensor.template.publish:
          id: status
          state: !lambda 'return x[4];'
      - sensor.template.publish:
          id: byte_5
          state: !lambda 'return x[5];'
      - sensor.template.publish:
          id: byte_6
          state: !lambda 'return x[6];'
      - sensor.template.publish:
          id: byte_7
          state: !lambda 'return x[7];'

      - binary_sensor.template.publish:
          id: draining
          state: !lambda 'return (x[4] & 0x10) == 0x10;'

      - binary_sensor.template.publish:
          id: running
          state: !lambda 'return (x[4] & 0x02) == 0x02;'

      - binary_sensor.template.publish:
          id: power
          state: !lambda 'return (x[4] & 0x01) == 0x01;'


Thanks for the info, much appreciated. Still no still no data from my tinkering.

I am seeing this in the logs:

[13:55:23][D][canbus:035]: send standard id=0x123 rtr=FALSE size=8
[13:55:27][D][api:102]: Accepted 10.10.20.30
[13:55:27][W][api.connection:107]: : Reading failed: BAD_INDICATOR errno=11

Iā€™ve removed and readded the device, as some folks noted in other posts; Iā€™m not sure if itā€™s related to not getting data or something else HA API-wise. Iā€™ll keep tinkeringā€¦

EDIT: I think this was due to my API: section being empty. Iā€™ve not seen the message since Iā€™ve populated it.

You dont need the api for this to work. I never add in the api until I am done because I dont want to clean up HA, which is a real PITA.