Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How about direct connect to AC unit over RS485? #1

Open
straga opened this issue Jun 20, 2022 · 5 comments
Open

How about direct connect to AC unit over RS485? #1

straga opened this issue Jun 20, 2022 · 5 comments

Comments

@straga
Copy link

straga commented Jun 20, 2022

I have Hisense AC with AEH-W4E1.
Now I try direct connect RS485 to AC.

May you have new information about the XM protocol.

@straga straga changed the title How about drirect connect ESP32 to AC unit? How about direct connect to AC unit over RS485? Jun 20, 2022
@straga
Copy link
Author

straga commented Jun 20, 2022

ESP32+uart<->RS485

WIFI Module Connect

Request: to AC
INFO:AC_XM: Data:               f4 f5 00 40 0b 00 00 01 01 fe 01 00 00 0a 04 00 01 5a f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    0 :  0x0
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      11 == 11 :  0xb
INFO:AC_XM: padding_byte_2:     00 00 01 01 fe 01 00 00
INFO:AC_XM: m_packet_type: dec: 10 : 0xa - m_sub_type: dec: 4 : 0x4
INFO:AC_XM: padding_byte_3:     0x0
INFO:AC_XM: msg_data:
INFO:AC_XM: msg_sum:            01 5a
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  0

Response: from AC
INFO:AC_XM: Data:               f4 f5 01 40 0d 01 00 fe 01 01 01 01 00 0a 04 01 01 01 01 62 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    1 :  0x1
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      13 == 13 :  0xd
INFO:AC_XM: padding_byte_2:     01 00 fe 01 01 01 01 00
INFO:AC_XM: m_packet_type: dec: 10 : 0xa - m_sub_type: dec: 4 : 0x4
INFO:AC_XM: padding_byte_3:     0x1
INFO:AC_XM: msg_data:           01 01
INFO:AC_XM: msg_sum:            01 62
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM: packet_msg_length:  16


Request: to AC
INFO:AC_XM: Data:               f4 f5 00 40 0b 00 00 01 01 fe 01 00 00 07 01 00 01 54 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    0 :  0x0
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      11 == 11 :  0xb
INFO:AC_XM: padding_byte_2:     00 00 01 01 fe 01 00 00
INFO:AC_XM: m_packet_type: dec: 7 : 0x7 - m_sub_type: dec: 1 : 0x1
INFO:AC_XM: padding_byte_3:     0x0
INFO:AC_XM: msg_data:
INFO:AC_XM: msg_sum:            01 54
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  0

Response: from AC
INFO:AC_XM: Data:               f4 f5 01 40 0f 01 00 fe 01 01 01 01 00 07 01 01 01 10 02 15 01 84 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    1 :  0x1
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      15 == 15 :  0xf
INFO:AC_XM: padding_byte_2:     01 00 fe 01 01 01 01 00
INFO:AC_XM: m_packet_type: dec: 7 : 0x7 - m_sub_type: dec: 1 : 0x1
INFO:AC_XM: padding_byte_3:     0x1
INFO:AC_XM: msg_data:           01 10 02 15
INFO:AC_XM: msg_sum:            01 84
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  32



Request: to AC
INFO:AC_XM: Data:               f4 f5 00 40 0b 00 00 01 01 fe 01 00 00 66 40 00 01 f2 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    0 :  0x0
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      11 == 11 :  0xb
INFO:AC_XM: padding_byte_2:     00 00 01 01 fe 01 00 00
INFO:AC_XM: m_packet_type: dec: 102 : 0x66 - m_sub_type: dec: 64 : 0x40
INFO:AC_XM: padding_byte_3:     0x0
INFO:AC_XM: msg_data:
INFO:AC_XM: msg_sum:            01 f2
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  0

Response: from AC
INFO:AC_XM: Data:               f4 f5 01 40 1c 01 00 fe 01 01 01 01 00 66 40 01 09 04 d6 05 07 ea 01 70 48 80 80 00 00 00 00 00 00 05 99 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    1 :  0x1
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      28 == 28 :  0x1c
INFO:AC_XM: padding_byte_2:     01 00 fe 01 01 01 01 00
INFO:AC_XM: m_packet_type: dec: 102 : 0x66 - m_sub_type: dec: 64 : 0x40
INFO:AC_XM: padding_byte_3:     0x1
INFO:AC_XM: msg_data:           09 04 d6 05 07 ea 01 70 48 80 80 00 00 00 00 00 00
INFO:AC_XM: msg_sum:            05 99
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  136
INFO:AC_XM: Data binary:    0000100100000100110101100000010100000111111010100000000101110000010010001000000010000000000000000000000000000000000000000000000000000000
INFO:AC_XM:  0   - KWH_YEAR_L
INFO:AC_XM:  234   - KWH_WEEK_L
INFO:AC_XM:  0   - KWH_SH
INFO:AC_XM:  7   - KWH_WEEK_H
INFO:AC_XM:  0   - KWH_YEAR_H
INFO:AC_XM:  214   - ONE_KWH_D
INFO:AC_XM:  4   - ONE_KWH_F
INFO:AC_XM:  0   - KWH_H
INFO:AC_XM:  0   - KWH_SL
INFO:AC_XM:  5   - KWH_DAY
INFO:AC_XM:  1   - KWH_MONTH_H
INFO:AC_XM:  128   - KWH_QUARTER_L
INFO:AC_XM:  9   - ONE_KWH_I
INFO:AC_XM:  128   - KWH_HALFYEAR_H
INFO:AC_XM:  0   - KWH_HALFYEAR_L
INFO:AC_XM:  72   - KWH_QUARTER_H
INFO:AC_XM:  112   - KWH_MONTH_L



Request: to AC
INFO:AC_XM: Data:               f4 f5 00 40 13 00 00 01 01 fe 01 00 00 1e 00 00 80 10 00 00 00 00 00 00 02 02 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    0 :  0x0
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      19 == 19 :  0x13
INFO:AC_XM: padding_byte_2:     00 00 01 01 fe 01 00 00
INFO:AC_XM: m_packet_type: dec: 30 : 0x1e - m_sub_type: dec: 0 : 0x0
INFO:AC_XM: padding_byte_3:     0x0
INFO:AC_XM: msg_data:           80 10 00 00 00 00 00 00
INFO:AC_XM: msg_sum:            02 02
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  64

Response: from AC
INFO:AC_XM: Data:               f4 f5 01 40 13 01 00 fe 01 01 01 01 00 1e 00 01 80 00 00 02 15 00 00 00 02 0d f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    1 :  0x1
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      19 == 19 :  0x13
INFO:AC_XM: padding_byte_2:     01 00 fe 01 01 01 01 00
INFO:AC_XM: m_packet_type: dec: 30 : 0x1e - m_sub_type: dec: 0 : 0x0
INFO:AC_XM: padding_byte_3:     0x1
INFO:AC_XM: msg_data:           80 00 00 02 15 00 00 00
INFO:AC_XM: msg_sum:            02 0d
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  64



Request: to AC
INFO:AC_XM: Data:               f4 f5 00 40 13 00 00 01 01 fe 01 00 00 1e 00 00 80 10 00 00 00 00 00 00 02 02 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    0 :  0x0
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      19 == 19 :  0x13
INFO:AC_XM: padding_byte_2:     00 00 01 01 fe 01 00 00
INFO:AC_XM: m_packet_type: dec: 30 : 0x1e - m_sub_type: dec: 0 : 0x0
INFO:AC_XM: padding_byte_3:     0x0
INFO:AC_XM: msg_data:           80 10 00 00 00 00 00 00
INFO:AC_XM: msg_sum:            02 02
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  64

Response: from AC
INFO:AC_XM: Data:               f4 f5 01 40 13 01 00 fe 01 01 01 01 00 1e 00 01 80 00 00 02 15 00 00 00 02 0d f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    1 :  0x1
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      19 == 19 :  0x13
INFO:AC_XM: padding_byte_2:     01 00 fe 01 01 01 01 00
INFO:AC_XM: m_packet_type: dec: 30 : 0x1e - m_sub_type: dec: 0 : 0x0
INFO:AC_XM: padding_byte_3:     0x1
INFO:AC_XM: msg_data:           80 00 00 02 15 00 00 00
INFO:AC_XM: msg_sum:            02 0d
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  64



Request: to AC
INFO:AC_XM: Data:               f4 f5 00 40 0c 00 00 01 01 fe 01 00 00 66 00 00 00 01 b3 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    0 :  0x0
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      12 == 12 :  0xc
INFO:AC_XM: padding_byte_2:     00 00 01 01 fe 01 00 00
INFO:AC_XM: m_packet_type: dec: 102 : 0x66 - m_sub_type: dec: 0 : 0x0
INFO:AC_XM: padding_byte_3:     0x0
INFO:AC_XM: msg_data:           00
INFO:AC_XM: msg_sum:            01 b3
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  8

Response: from AC
INFO:AC_XM: Data:               f4 f5 01 40 49 01 00 fe 01 01 01 01 00 66 00 01 00 00 02 18 16 16 80 80 00 01 01 00 00 00 00 00 00 00 00 c0 00 00 05 00 00 00 00 00 12 12 12 00 00 00 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 27 f4 fb
INFO:AC_XM: header:             f4 f5
INFO:AC_XM: paket_type: dec:    1 :  0x1
INFO:AC_XM: padding_byte_1:     0x40
INFO:AC_XM: packet_length:      73 == 73 :  0x49
INFO:AC_XM: padding_byte_2:     01 00 fe 01 01 01 01 00
INFO:AC_XM: m_packet_type: dec: 102 : 0x66 - m_sub_type: dec: 0 : 0x0
INFO:AC_XM: padding_byte_3:     0x1
INFO:AC_XM: msg_data:           00 00 02 18 16 16 80 80 00 01 01 00 00 00 00 00 00 00 00 c0 00 00 05 00 00 00 00 00 12 12 12 00 00 00 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
INFO:AC_XM: msg_sum:            05 27
INFO:AC_XM: footer:             f4 fb
INFO:AC_XM:
INFO:AC_XM: packet_msg_length:  496
INFO:AC_XM:  18   - outdoor_condenser_temperature
INFO:AC_XM:  0   - swap
INFO:AC_XM:  1   - up_down
INFO:AC_XM:  0   - voice
INFO:AC_XM:  0   - timer
INFO:AC_XM:  0   - temperature_Fahrenheit
INFO:AC_XM:  0   - ICA
INFO:AC_XM:  0   - display_led
INFO:AC_XM:  0   - keypad_communication
INFO:AC_XM:  0   - expand_threshold
INFO:AC_XM:  0   - rev25
INFO:AC_XM:  0   - outdoor_clear
INFO:AC_XM:  128   - indoor_humidity_status
INFO:AC_XM:  1   - rev23
INFO:AC_XM:  0   - indoor_zero_voltage
INFO:AC_XM:  0   - left_wind
INFO:AC_XM:  0   - wifi_communication
INFO:AC_XM:  0   - time_laps
INFO:AC_XM:  0   - drying
INFO:AC_XM:  128   - indoor_humidity_setting
INFO:AC_XM:  0   - generatrix_voltage_low
INFO:AC_XM:  0   - sample
INFO:AC_XM:  0   - outdoor_machine
INFO:AC_XM:  240   - UAB_LOW
INFO:AC_XM:  0   - UBC_LOW
INFO:AC_XM:  22   - indoor_pipe_temperature
INFO:AC_XM:  0   - indoor_outdoor_communication
INFO:AC_XM:  0   - target_exhaust_temperature
INFO:AC_XM:  0   - rev51
INFO:AC_XM:  0   - rev50
INFO:AC_XM:  0   - rev53
INFO:AC_XM:  0   - generatrix_voltage_high
INFO:AC_XM:  0   - rev52
INFO:AC_XM:  1   - left_right
INFO:AC_XM:  0   - UAB_HIGH
INFO:AC_XM:  0   - rev54
INFO:AC_XM:  0   - indoor_humidity_sensor
INFO:AC_XM:  0   - dew
INFO:AC_XM:  0   - indoor_bars
INFO:AC_XM:  0   - filter_reset
INFO:AC_XM:  0   - poweron_status
INFO:AC_XM:  0   - eeprom_communication
INFO:AC_XM:  0   - poweron_hour
INFO:AC_XM:  0   - wind_machine
INFO:AC_XM:  0   - rev55
INFO:AC_XM:  0   - compressor_frequency_setting
INFO:AC_XM:  0   - rev56
INFO:AC_XM:  0   - heat
INFO:AC_XM:  18   - outdoor_temperature
INFO:AC_XM:  0   - compressor_frequency
INFO:AC_XM:  0   - sleep_status
INFO:AC_XM:  0   - temperature_compensation
INFO:AC_XM:  0   - UCA_HIGH
INFO:AC_XM:  0   - smoke
INFO:AC_XM:  0   - mute
INFO:AC_XM:  0   - UCA_LOW
INFO:AC_XM:  0   - indoor_electric
INFO:AC_XM:  2   - direction_status
INFO:AC_XM:  0   - IAB
INFO:AC_XM:  0   - IUV
INFO:AC_XM:  1   - somatosensory_compensation_ctrl
INFO:AC_XM:  0   - somatosensory_temperature
INFO:AC_XM:  18   - compressor_exhaust_temperature
INFO:AC_XM:  0   - indoor_temperature_sensor
INFO:AC_XM:  0   - smart_eye
INFO:AC_XM:  0   - indoor_water_pump
INFO:AC_XM:  0   - rev47
INFO:AC_XM:  0   - rev48
INFO:AC_XM:  0   - poweroff_minute
INFO:AC_XM:  0   - rev46
INFO:AC_XM:  0   - run_status
INFO:AC_XM:  0   - compressor_frequency_send
INFO:AC_XM:  0   - hour
INFO:AC_XM:  0   - indoor_clear
INFO:AC_XM:  0   - wind_door
INFO:AC_XM:  0   - display_communication
INFO:AC_XM:  0   - indicate_led
INFO:AC_XM:  0   - nature
INFO:AC_XM:  0   - rev49
INFO:AC_XM:  0   - indoor_temperature_pipe_sensor
INFO:AC_XM:  0   - poweron_minute
INFO:AC_XM:  0   - low_power
INFO:AC_XM:  0   - auto_check
INFO:AC_XM:  0   - back_led
INFO:AC_XM:  0   - poweroff_status
INFO:AC_XM:  0   - IBC
INFO:AC_XM:  0   - low_electricity
INFO:AC_XM:  0   - somatosensory_compensation
INFO:AC_XM:  0   - dual_frequency
INFO:AC_XM:  0   - electric_communication
INFO:AC_XM:  0   - indoor_machine_run
INFO:AC_XM:  0   - poweroff_hour
INFO:AC_XM:  0   - right_wind
INFO:AC_XM:  0   - mode_status
INFO:AC_XM:  1   - indoor_eeprom
INFO:AC_XM:  0   - minute
INFO:AC_XM:  24   - indoor_temperature_setting
INFO:AC_XM:  22   - indoor_temperature_status
INFO:AC_XM:  0   - UBC_HIGH
INFO:AC_XM:  0   - efficient
INFO:AC_XM:  0   - wind_status
INFO:AC_XM:  0   - indoor_led
INFO:AC_XM:  0   - four_way

WIFI Module Connect: Done

@straga
Copy link
Author

straga commented Jun 20, 2022

You wrote: "Only the packets to set the on and off timers, which need to be created dynamically, are missing. If it can be useful to implement it, I already have the instructions to create the packets ;)"

May you give the link to that instructions?

@straga
Copy link
Author

straga commented Aug 13, 2022

https://github.com/straga/scrivo_project/tree/master/project/ac_xm_hisense_control - micropython

@mazaxaka
Copy link

mazaxaka commented Mar 8, 2023

Hello! What rs485 parameters do you use? baudrate 9600? Stop bit & parity?

UPD:
9600
1 stop
no parity

@noname-ever
Copy link

Hello!
Did you managed to make it work directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants