The add-on utilizes the API acquired through reverse engineering from the Connectlife mobile app to control AC devices and integrates seamlessly with Home Assistant through MQTT, leveraging its discovery feature.
The reason for the add-on was the lack of official support for device integration.
I welcome pull requests, bug reports, and feature requests. Please feel free to submit them in the issues section.
https://github.com/bilan/home-assistant-addons/
.docker build . --build-arg='BUILD_FROM=alpine:3.20' -t ha-connectlife-addon
docker run -it \
-p 8000:8000 \
-e CONNECTLIFE_LOGIN=connectlife-login-email \
-e CONNECTLIFE_PASSWORD=your-password \
-e LOG_LEVEL=info \
-e MQTT_HOST=host \
-e MQTT_USER=login \
-e MQTT_PASSWORD=mqtt-pass \
-e MQTT_PORT=1883 \
-e MQTT_SSL=false \
-e DEVICES_CONFIG='{"117":{"t_work_mode":["fan only","heat","cool","dry","auto"],"t_fan_speed":{"0":"auto","5":"super low","6":"low","7":"medium","8":"high","9":"super high"},"t_swing_direction":["straight","right","both sides","swing","left"],"t_swing_angle":{"0":"swing","2":"bottom 1\/6 ","3":"bottom 2\/6","4":"bottom 3\/6","5":"top 4\/6","6":"top 5\/6","7":"top 6\/6"}}}' \
ha-connectlife-addon /bin/ash -c '/usr/bin/supervisord -c /home/app/docker-files/supervisord.conf'
docker run -it \
-p 8000:8000 \
-e CONNECTLIFE_LOGIN=connectlife-login-email \
-e CONNECTLIFE_PASSWORD=your-password \
-e LOG_LEVEL=info \
ha-connectlife-addon /bin/ash -c 'php artisan serve --port=8000 --host=0.0.0.0'
docker run -it \
-e CONNECTLIFE_LOGIN=connectlife-login-email \
-e CONNECTLIFE_PASSWORD=your-password \
-e LOG_LEVEL=info \
-e MQTT_HOST=host \
-e MQTT_USER=login \
-e MQTT_PASSWORD=mqtt-pass \
-e MQTT_PORT=1883 \
-e MQTT_SSL=false \
-e DEVICES_CONFIG='{"117":{"t_work_mode":["fan only","heat","cool","dry","auto"],"t_fan_speed":{"0":"auto","5":"super low","6":"low","7":"medium","8":"high","9":"super high"},"t_swing_direction":["straight","right","both sides","swing","left"],"t_swing_angle":{"0":"swing","2":"bottom 1\/6 ","3":"bottom 2\/6","4":"bottom 3\/6","5":"top 4\/6","6":"top 5\/6","7":"top 6\/6"}}}' \
ha-connectlife-addon /bin/ash -c 'php artisan app:mqtt-loop'
GET /api/devices
example: curl -v http://0.0.0.0:8000/api/devices
POST /api/devices/{DEVICE_ID}
example: curl -v http://0.0.0.0:8000/api/devices/pu12345 -d '{"t_temp":32}' -H "Content-Type: application/json"
Values for my personal split air conditioner (
deviceFeatureCode
117,deviceTypeCode
009)
Property | Description | Type | Example |
---|---|---|---|
t_power | on / off | uint | 0 - off, 1 - on |
t_temp | temperature | uint | 21 |
t_beep | buzzer | uint | 0, 1 |
t_work_mode | mode | uint | 3 |
t_tms | ? | ||
t_swing_direction | horizontal swing | ||
t_swing_angle | vertical swing | ||
t_temp_type | temp unit | string | "0" - fahr, "1" - celsius |
t_fan_speed | fan speed | uint | 0 |
t_fan_mute | silence mode | uint | 0, 1 |
t_super | fast mode | uint | 0,1 |
t_eco | eco mode | uint | 0,1 |
t_work_mode
t_fan_speed
t_swing_direction
t_swing_angle