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"

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