bilan/connectlife-api-connector

[Feature] Adding support for Heat pump

bartashevich opened this issue · 0 comments

Hi, I have Hisense Heat Pump and I've managed to make it work with your API rest (big thanks). But know I'm thinking of integrating with HA as a entity, instead of using rest sensors.

I've good experience with programming, but not with HA specifically.

Can you give me quick tip which file should I adapt? It works in a similar way as an AC unit. You can set temperature, fan, work mode, away, etc...

I've manually mapped following modes and outcomes.

Set modes:
t_work_mode: 8 - AUTO, 9 - ECO, 11 - FAST, 12 - ELECTRICHEATING
t_power: 0/1
t_air: 0/1
t_fan_speed: 0/1
...

Read values:
f_electric_heating: 0 - OFF/ECO/AUTO, 1 - ELECTRICHEATING/FAST
f_heat_pump: 0 - OFF, 1 - ELECTRICHEATING, 2 - ECO/AUTO/FAST
...

/devices API

[{"wifiId":"xxxxxxxxxxx","deviceId":"yyyyyyyyyyyyy","puid":"zzzzzzzzzzz","deviceNickName":"Heat\u00a0pump","deviceFeatureCode":"502","deviceFeatureName":"502\u81ea\u7814\u70ed\u6c34\u5668","deviceTypeCode":"016","deviceTypeName":"","bindTime":1693922922378,"role":1,"roomId":2716250,"roomName":"default_room","statusList":{"t_work_mode":"9","t_power":"1","t_temp":"35","f_backwater":"0","t_backwater_set":"0","t_vacation":"0","t_air":"0","t_fan_speed":"0","t_sterilization":"0","f_sterilization":"1","t_beep":"0","t_vacation_timeset":"1","t_vacation_timeleft":"0","f_electricity":"0","f_votage":"0","f_power_consumption":"0","f_electric_heating":"0","f_heat_pump":"1","f_water_tank_temp":"60","f_e_push":"0","f_e_displaycom_fault":"0","f_e_coiltemp":"0","f_e_env_temp":"0","f_e_exhaust":"0","f_e_suctiontemp_fault":"0","f_e_solar_temperature":"0","f_e_fan_fault":"0","f_e_upwatertank_fault":"0","f_e_downwatertank_fault":"0","f_e_e2data_fault":"0","f_e_drivecom_fault":"0","f_e_drive_fault":"0","f_e_returnwatertemp_fault":"0","f_e_clockchip_fault":"0","f_e_eanode_fault":"0","f_e_powermodule_fault":"0","oem_host_version":"S1798.6.01.06.RB","daily_energy_kwh":0},"useTime":0,"offlineState":1,"seq":0,"createTime":0}]