Add integration for Hisense devices using ConnectLife

Just as a follow up - thanks again. All credits for the code and the process go to @bilan

I will just try to describe the process for others let’s say “my level of knowledge” who want to run it in docker compose.

First create a directory for the project. Then either git pull or just download the zip file from github and extract it there.

Then run
#docker build . --build-arg='BUILD_FROM=alpine:3.19' -t ha-connectlife-addon

Then create the compose.yml

version: '3.8'

services:
  ha-connectlife-addon:
    image: ha-connectlife-addon
    environment:
      - CONNECTLIFE_LOGIN=connectlife-login-email
      - CONNECTLIFE_PASSWORD=your-password
      - LOG_LEVEL=info
      - MQTT_HOST=host
      - MQTT_USER=login
      - MQTT_PASSWORD=mqtt-pass
      - MQTT_PORT=1883
      - MQTT_SSL=false
    command: /bin/ash -c 'php artisan app:mqtt-loop'

Then just a docker compose up -d command and you are done. The AC unit will be added to the HA automatically in matter of seconds

Hello everyone! maybe someone who already managed to get devices popped up after installing the Add-On could give me a hint what to do now.

I installed the Add-On, typed in my connectlife credentials, AC is a split AC airconditioner, all devices are online in the connectlife app.
mqtt credentials were left blank as suggested.

However I cannot see my AC devices in HA.
Would be really nice to get some assistance.

thanks
djm193

Now the API is not available because Connectlife has turned it off.

I got info that someone (ip from Hungary) was abusing the integration and flooding the API with requests so they had to turn it off until proper public API will be available.

So guys please, when you are doing anything with unofficial APIs, please take care what are you are doing. They knew about this integration but they did not limit us until someone started to abuse it…

Same here

Dear Andrey,
API is under the development but because of the community interest for API, we left ‘’ unauthorized ‘’ gate open. Unfortunately integration was abused from HU and we had to close it down until we will make it as it should be to protect users and the system.
We appreciate your understanding and your input!
Kind regards
Neda Mijatović

Is anyone here from Hungary? :smiley:

Hi there, did they reported some expected period of this implementation?

I got answer that by the end of the year since now they will implement additional security layers to avoid further abuses

1 Like

Yeah but as can be seen above it is not connected to this attack from HU. Also question on their plan to implement it by 2025. Guess it’s easier to switch to an alternative wiii adapter.

I managed to integrate with API from Connectlife mobile app and the add-on works again.

3 Likes

Finally it was possible! After two years, I can integrate my machine with the rest of my home.

You made the integration working! Thank you Bilan!!! Congrats!!!
:clap: :clap: :clap: :clap: :clap:

Great!

Can this work also with other appliances or only AC?

Addon has API interface on port 8000 (default), you can try to control other appliances than AC.

can you please recap the instructions used

this is a recap.
create a directory for the addon
download the zip from git
unzip it
execute docker build . --build-arg=‘BUILD_FROM=alpine:3.19’ -t ha-connectlife-addon
create compose.yml like this one

version: ‘3.8’

services:
ha-connectlife-addon:
image: ha-connectlife-addon
environment:
- CONNECTLIFE_LOGIN=YOUR CONNECTLIFE EMAIL
- CONNECTLIFE_PASSWORD=YOUR CONNECTLIFE PWD
- LOG_LEVEL=info
- MQTT_HOST=YOUR MQTT IP (dont use 127.0.0.1, it fail to me)
- MQTT_USER=YOUR MQTT USER
- MQTT_PASSWORD=YOUR MQTT PWD
- MQTT_PORT=1883
- MQTT_SSL=false
command: /bin/ash -c ‘php artisan app:mqtt-loop’

now launch with docker compose up -d

now you should have all a/c in HA under mqtt :slight_smile:

What’s wrong with these instructions?

Install in Home Assistant with Supervisor

ha_badge

  1. Make sure your Connectlife appliances are online.
  2. In Supervisor, navidate to the Add-on Store.
  3. From the overflow menu, select “Repositories”.
  4. Add https://github.com/bilan/home-assistant-addons/.
  5. Wait for Add-on to appear or click “Reload” in the same overflow menu.
  6. Install / build thhe add-on.
  7. Turn on the add-on watchdog - Connectlife API is not stable and sometimes times out.
  8. In the Configuration section, fill in the necessary fields. If you leave the fields blank, the add-on will attempt to fetch MQTT credentials from the Supervisor API.
1 Like

Hello,
I followed the instructions and did have the MQTT integration appear but nothing was discovered:


I can confirm that the API add-on is receiving information from Connectlife with the A/C information.

1 Like

Hi

I used the instructions in the formal help…

Install in Home Assistant with Supervisor

  1. Make sure your Connectlife appliances are online.
  2. In Supervisor, navidate to the Add-on Store.
  3. From the overflow menu, select “Repositories”.
  4. Add https://github.com/bilan/home-assistant-addons/.
  5. Wait for Add-on to appear or click “Reload” in the same overflow menu.
  6. Install / build thhe add-on.
  7. Turn on the add-on watchdog - Connectlife API is not stable and sometimes times out.
  8. In the Configuration section, fill in the necessary fields. If you leave the fields blank, the add-on will attempt to fetch MQTT credentials from the Supervisor API.

The only thing I would add is that, in my case, leaving field blank did not work, and I had to fill username and password (as I expected) manually. Also you need MQTT installed… But it was very “easy” if you have a little HomeAssistant experience.

Good luck!
Raul

1 Like

I had left this effort alone for a few days.
Now today, all of a sudden, the MQTT integration discovered the portable A/C.
Very odd!
Working great, thank you for the addon!

Under MQTT there were still no ConnectLife devices discovered. I tried also manually adding MQTT ip, username and password. My MQTT server is working, already are there 88 devices.

In log I can see many reports like this but I believe this is because I have different type of AC (feature code 109) and a few other products in my ConnectLife account


2024-03-04 15:32:34,912 DEBG 'mqtt' stdout output:
                                     
  [ErrorException]                   
  Undefined array key "t_temp_type"  
                                     

Exception trace:
  at /home/app/app/Services/AcDevice.php:28
 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:255
 Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}() at /home/app/app/Services/AcDevice.php:28
 App\Services\AcDevice->__construct() at /home/app/app/Services/ConnectlifeApiService.php:139
 App\Services\ConnectlifeApiService->getOnlineAcDevices() at /home/app/app/Services/MqttService.php:18
 App\Services\MqttService->__construct() at n/a:n/a
 ReflectionClass->newInstanceArgs() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:952
 Illuminate\Container\Container->build() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:795

2024-03-04 15:32:34,912 DEBG 'mqtt' stdout output:
 Illuminate\Container\Container->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:957
 Illuminate\Foundation\Application->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:731
 Illuminate\Container\Container->make() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:942
 Illuminate\Foundation\Application->make() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:181
 Illuminate\Container\BoundMethod::addDependencyForCallParameter() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:124
 Illuminate\Container\BoundMethod::getMethodDependencies() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Util.php:41
 Illuminate\Container\Util::unwrapIfClosure() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
 Illuminate\Container\BoundMethod::callBoundMethod() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35
 Illuminate\Container\BoundMethod::call() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:662
 Illuminate\Container\Container->call() at /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php:211
 Illuminate\Console\Command->execute() at /home/app/vendor/symfony/console/Command/Command.php:326
 Symfony\Component\Console\Command\Command->run() at /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php:180
 Illuminate\Console\Command->run() at /home/app/vendor/symfony/console/Application.php:1096
 Symfony\Component\Console\Application->doRunCommand() at /home/app/vendor/symfony/console/Application.php:324
 Symfony\Component\Console\Application->doRun() at /home/app/vendor/symfony/console/Application.php:175
 Symfony\Component\Console\Application->run() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201
 Illuminate\Foundation\Console\Kernel->handle() at /home/app/artisan:35


2024-03-04 15:32:34,912 DEBG 'mqtt' stdout output:
 Illuminate\Container\Container->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:957
 Illuminate\Foundation\Application->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:731
 Illuminate\Container\Container->make() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:942
 Illuminate\Foundation\Application->make() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:181
 Illuminate\Container\BoundMethod::addDependencyForCallParameter() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:124
 Illuminate\Container\BoundMethod::getMethodDependencies() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Util.php:41
 Illuminate\Container\Util::unwrapIfClosure() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
 Illuminate\Container\BoundMethod::callBoundMethod() at /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35
 Illuminate\Container\BoundMethod::call() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:662
 Illuminate\Container\Container->call() at /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php:211
 Illuminate\Console\Command->execute() at /home/app/vendor/symfony/console/Command/Command.php:326
 Symfony\Component\Console\Command\Command->run() at /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php:180
 Illuminate\Console\Command->run() at /home/app/vendor/symfony/console/Application.php:1096
 Symfony\Component\Console\Application->doRunCommand() at /home/app/vendor/symfony/console/Application.php:324
 Symfony\Component\Console\Application->doRun() at /home/app/vendor/symfony/console/Application.php:175
 Symfony\Component\Console\Application->run() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201
 Illuminate\Foundation\Console\Kernel->handle() at /home/app/artisan:35


2024-03-04 15:32:35,914 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-04 15:32:35,914 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)