GithubHelp home page GithubHelp logo

bilan / connectlife-api-connector Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 12.0 192 KB

Connectlife API proxy / MQTT Home Assistant integration

Dockerfile 0.59% PHP 75.11% JavaScript 0.02% Blade 22.44% Shell 1.84%

connectlife-api-connector's People

Contributors

bilan avatar zacharee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

connectlife-api-connector's Issues

Connection error: Unauthorized

I have 3 HiSense AC conected through ConnectLife and I installed the addon following the instructions.
I have Home Assistant OS and MQTT working correctly.

When I start the component I have this error in the logs:

E0309 00:19:43.401 discovery.py:43] Failed to login to Hisense server:
Status 401: 'Unauthorized'

This is my configuration:
`log_level: INFO
mqtt_host: 192.168.1.9
mqtt_port: 1883
mqtt_user: mymqttuser
mqtt_pass: mymqttpass
port: 8888
app:

  • username: myeamil
    password: mypassword
    code: hisense-eu`

The ConncetLife username and passwords are correct, I doublechecked it.
I also tried port 8000 instead of 8888
I tried all the codes from this document but no one worked. I'm living in Europe.

Any idea? I'm dreaming to have my AC in HA :)

Not working anymore

Hello.

After the last update my climate entity-s not working anymore. I tried to remove the extension, remove MQTT entities, reinstall the extension and set again, but now the climates isn't appear in the HA, and the addon is make a lot of logs. I attach it.

`2024-03-22 09:34:49,005 DEBG 'mqtt' stdout output:
In ConnectlifeApiService.php line 83:

[Error]
Call to a member function body() on array

Exception trace:
at /home/app/app/Services/ConnectlifeApiService.php:83
App\Services\ConnectlifeApiService->App\Services{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
Illuminate\Cache\Repository->remember() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429
Illuminate\Cache\CacheManager->__call() at /home/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
Illuminate\Support\Facades\Facade::__callStatic() at /home/app/app/Services/ConnectlifeApiService.php:62
App\Services\ConnectlifeApiService->getAccessToken() at /home/app/app/Services/ConnectlifeApiService.php:154
App\Services\ConnectlifeApiService->devices() at /home/app/app/Services/ConnectlifeApiService.php:133
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
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

2024-03-22 09:34:49,006 DEBG 'mqtt' stdout output:
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

2024-03-22 09:34:49,006 DEBG 'mqtt' stdout output:
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

2024-03-22 09:34:49,006 DEBG 'mqtt' stdout output:
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

2024-03-22 09:34:49,006 DEBG 'mqtt' stdout output:
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

2024-03-22 09:34:49,011 DEBG 'mqtt' stdout output:
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-22 09:34:49,011 DEBG 'mqtt' stdout output:
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-22 09:34:50,012 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-22 09:34:50,012 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)`

ConnectLife API Error on startup

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Connectlife API proxy / MQTT Add-on
 Integrates Connectlife AC devices with Home Assistant via MQTT and provides an HTTP API
-----------------------------------------------------------
 Add-on version: 1.1.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.2.2
 Home Assistant Supervisor: 2024.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to DEBUG
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Config OK
MQTT creds: **************** / ***/ 1883 / no-ssl
2024-02-19 14:15:26,135 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-02-19 14:15:26,146 INFO supervisord started with pid 202
2024-02-19 14:15:27,157 INFO spawned: 'mqtt' with pid 203
2024-02-19 14:15:27,167 INFO spawned: 'www' with pid 204

   INFO  Server running on [http://0.0.0.0:8000].  

2024-02-19 14:15:28,156 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
  Press Ctrl+C to stop the server

2024-02-19 14:15:29,158 INFO success: www entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

In RequestException.php line 113:
                                                                               
  Client error: `GET https://api.connectlife.io/api/v1/appliance` resulted in  
   a `404 Not Found` response                                                  
                                                                               

2024-02-19 14:15:30,076 WARN exited: mqtt (exit status 1; not expected)
2024-02-19 14:15:31,088 INFO spawned: 'mqtt' with pid 210

Did as instructed in README using Home Assistant integration method

Delay start of add on?

I've noticed when HASS is rebooted the devices go unavailable on mqtt. I believe this is because the addon is starting before mqtt.

A quick reboot of the plugin brings the devices online. Is there a way we can add logic to delay the start of the plugin or keep polling mqtt until it becomes available?

Option to disable MQTT in HA addon

Is it possible to run HA addon without MQTT enabled? If I don't set MQTT values (host, user, password) a lot of errors appear in the log.

image

Add-on does not automatically restart on startup

I'm testing this add-on and it's really compliments, it was what I was looking for, but I had to restart my vm in proxmox for other reasons and the add-on didn't restart automatically

In MqttClient.php line 1088:

[PhpMqtt\Client\Exceptions\DataTransferException (65)]
[65] Transferring data over socket failed: Sending data over the socket fai
led. Has it been closed?

Exception trace:
at /home/app/vendor/php-mqtt/client/src/MqttClient.php:1088
PhpMqtt\Client\MqttClient->writeToSocket() at /home/app/vendor/php-mqtt/client/src/MqttClient.php:1045
PhpMqtt\Client\MqttClient->writeToSocketWithAutoReconnect() at /home/app/vendor/php-mqtt/client/src/MqttClient.php:1018
PhpMqtt\Client\MqttClient->ping() at /home/app/vendor/php-mqtt/client/src/MqttClient.php:653
PhpMqtt\Client\MqttClient->loopOnce() at /home/app/app/Console/Commands/MqttLoop.php:44
App\Console\Commands\MqttLoop->handle() 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

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Error in Log - mqtt PHP issue?

Hi, I'm getting an error in the log. Any ideas what's wrong?

Core
2024.4.4
Supervisor
2024.04.0
Operating System
12.2
Frontend
20240404.2

Pi 4 8 GB with a 250GB SSD

MQTT works fine with Z2M and Ring MQTT add on.

2024-04-29 14:20:14,934 DEBG 'mqtt' stdout output:
In ConnectlifeApiService.php line 83:
                                             
  [Error]                                    

2024-04-29 14:20:14,934 DEBG 'mqtt' stdout output:
In ConnectlifeApiService.php line 83:
                                             
  [Error]                                    

2024-04-29 14:20:14,936 DEBG 'mqtt' stdout output:
  Call to a member function body() on array  
                                             

Exception trace:
  at /home/app/app/Services/ConnectlifeApiService.php:83
 App\Services\ConnectlifeApiService->App\Services\{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
 Illuminate\Cache\Repository->remember() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429
 Illuminate\Cache\CacheManager->__call() at /home/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
 Illuminate\Support\Facades\Facade::__callStatic() at /home/app/app/Services/ConnectlifeApiService.php:62
 App\Services\ConnectlifeApiService->getAccessToken() at /home/app/app/Services/ConnectlifeApiService.php:154
 App\Services\ConnectlifeApiService->devices() at /home/app/app/Services/ConnectlifeApiService.php:133
 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
 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

2024-04-29 14:20:14,936 DEBG 'mqtt' stdout output:
  Call to a member function body() on array  

V.2.0 Mqtt entities ok but not operable

Thanks again for your work, I installed component 2.0 and configured conq from the documentation, it sees the entities but they don't activate anything, from the logs I see that they communicate well but then nothing

For me Values for my personal split air conditioner (deviceFeatureCode 104, deviceTypeCode 009)

My air conditioner is not visible

I created an account using google. I started the container with ha-connectlife-addon, but I can't see my device Hisense AS-09UW4RYDDB05G. I deleted it from the application and added it again, but the problem remained.

root@HA:~/connectlife-api-connector# curl -v http://0.0.0.0:8000/api/devices
*   Trying 0.0.0.0:8000...
* Connected to 0.0.0.0 (127.0.0.1) port 8000 (#0)
> GET /api/devices HTTP/1.1
> Host: 0.0.0.0:8000
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Host: 0.0.0.0:8000
< Connection: close
< X-Powered-By: PHP/8.2.19
< Cache-Control: no-cache, private
< Date: Tue, 28 May 2024 09:47:27 GMT
< Content-Type: application/json
< 
* Closing connection 0

plugin ac/power/set on/off

Hello,

in all version is ac/power/set on or off is ignored. Message is not in log mqtt.

Only possible workround to turn on and turn off AC is:

ac/mode/set heat(cool etc..) and ac/mode/set off

[2024-02-25 12:41:59] production.INFO: Updating HA device state ["pu000098650051000200030003000000f2758379e0d"]
[2024-02-25 12:42:25] production.INFO: Mqtt: received a on [pu000098650051000200030003000000f2758379e09/ac/mode/set] heat
[2024-02-25 12:42:25] production.INFO: ConnectLife: updating device. {"puid":"pu000098650051000200030003000000f2758379e09","properties":{"t_power":1,"t_temp_type":"0","t_temp":23,"t_beep":0,"t_swing_direction":0,"t_swing_angle":0,"t_fan_speed":0,"t_work_mode":1}}
[2024-02-25 12:42:25] production.INFO: Response ["{"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}"]
[2024-02-25 12:42:25] production.INFO: ConnectLife: updating device result. {"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}
[2024-02-25 12:42:55] production.INFO: Mqtt: received a on [pu000098650051000200030003000000f2758379e09/ac/mode/set] off
[2024-02-25 12:42:55] production.INFO: ConnectLife: updating device. {"puid":"pu000098650051000200030003000000f2758379e09","properties":{"t_power":0,"t_temp_type":"0","t_temp":23,"t_beep":0,"t_swing_direction":0,"t_swing_angle":0,"t_fan_speed":0}}
[2024-02-25 12:42:55] production.INFO: Response ["{"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}"]
[2024-02-25 12:42:55] production.INFO: ConnectLife: updating device result. {"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}

I have "deviceFeatureCode":"104","deviceFeatureName":"104\u51b7\u6696\u8282\u80fd\u65e0\u529f\u7387","deviceTypeCode":"009\

How to turn AC off and on without mode setting?

Thanks

can`t rename default mqtt topic

By default , addon connect and out info from|to topic named "core-mosquito"
can you add into config possibilities to change the name of topic?

image

503: Service unavailable

Did the api got shut down?

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Connectlife API proxy / MQTT Add-on
 Integrates Connectlife AC devices with Home Assistant via MQTT and provides an HTTP API
-----------------------------------------------------------
 Add-on version: 1.1.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.2.2
 Home Assistant Supervisor: 2024.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to DEBUG
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Config OK
MQTT creds: core-mosquitto / mqtt-user / 1883 / no-ssl
HTTP API disabled, running MQTT client only.

In RequestException.php line 113:
                                                                               
  [GuzzleHttp\Exception\ServerException (503)]                                 
  Server error: `GET https://api.connectlife.io/api/v1/appliance` resulted in  
   a `503 Service Unavailable` response:                                       
  The service is unavailable.                                                  
                                                                               

Exception trace:
  at /home/app/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
 GuzzleHttp\Exception\RequestException::create() at /home/app/vendor/guzzlehttp/guzzle/src/Middleware.php:72
 GuzzleHttp\Middleware::GuzzleHttp\{closure}() at /home/app/vendor/guzzlehttp/promises/src/Promise.php:209
 GuzzleHttp\Promise\Promise::callHandler() at /home/app/vendor/guzzlehttp/promises/src/Promise.php:158
 GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() at /home/app/vendor/guzzlehttp/promises/src/TaskQueue.php:52
 GuzzleHttp\Promise\TaskQueue->run() at /home/app/vendor/guzzlehttp/promises/src/Promise.php:251
 GuzzleHttp\Promise\Promise->invokeWaitFn() at /home/app/vendor/guzzlehttp/promises/src/Promise.php:227
 GuzzleHttp\Promise\Promise->waitIfPending() at /home/app/vendor/guzzlehttp/promises/src/Promise.php:272
 GuzzleHttp\Promise\Promise->invokeWaitList() at /home/app/vendor/guzzlehttp/promises/src/Promise.php:229
 GuzzleHttp\Promise\Promise->waitIfPending() at /home/app/vendor/guzzlehttp/promises/src/Promise.php:69
 GuzzleHttp\Promise\Promise->wait() at /home/app/vendor/guzzlehttp/guzzle/src/Client.php:189
 GuzzleHttp\Client->request() at /home/app/vendor/guzzlehttp/guzzle/src/ClientTrait.php:44
 GuzzleHttp\Client->get() at /home/app/app/Services/ConnectlifeApiService.php:167
 App\Services\ConnectlifeApiService->App\Services\{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
 Illuminate\Cache\Repository->remember() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429
 Illuminate\Cache\CacheManager->__call() at /home/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
 Illuminate\Support\Facades\Facade::__callStatic() at /home/app/app/Services/ConnectlifeApiService.php:163
 App\Services\ConnectlifeApiService->devices() at /home/app/app/Services/ConnectlifeApiService.php:143
 App\Services\ConnectlifeApiService->status() at /home/app/app/Services/ConnectlifeApiService.php:127
 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
 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

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Is this supposed to automatically add devices through MQTT?

I have this config:

connectlife_login: <email>
connectlife_password: <pw>
disable_http_api: false
mqtt_host: 192.168.1.10
mqtt_user: <user>
mqtt_password: <pw>
mqtt_port: 1883
mqtt_ssl: false
-----------------------------------------------------------
 Add-on: Connectlife API proxy / MQTT Add-on
 Integrates Connectlife AC devices with Home Assistant via MQTT and provides an HTTP API
-----------------------------------------------------------
 Add-on version: 1.0.11
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.5  (amd64 / qemux86-64)
 Home Assistant Core: 2024.2.1
 Home Assistant Supervisor: 2024.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------

But It doesn't seem to do anything.


The MQTT log shows this:

2024-02-10 17:23:06: New connection from 172.30.32.1:55404 on port 1883.
2024-02-10 17:23:06: New client connected from 172.30.32.1:55404 as connectlife-api (p1, c0, k10, u'<user>').

Also seeing this in the add-on logs

2024-02-10 17:22:31,819 INFO supervisord started with pid 198
2024-02-10 17:22:32,821 INFO spawned: 'mqtt' with pid 199
2024-02-10 17:22:32,823 INFO spawned: 'www' with pid 200

   INFO  Server running on [http://0.0.0.0:8000].  

  Press Ctrl+C to stop the server

2024-02-10 17:22:34,442 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-02-10 17:22:34,442 INFO success: www entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

In PendingRequest.php line 926:
                                                                               
  cURL error 28: Operation timed out after 30002 milliseconds with 0 bytes re  
  ceived (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https:/  
  /api.connectlife.io/api/v1/appliance                                         
                                                                               

In CurlFactory.php line 210:
                                                                               
  cURL error 28: Operation timed out after 30002 milliseconds with 0 bytes re  
  ceived (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https:/  
  /api.connectlife.io/api/v1/appliance                                         
                                                                               

2024-02-10 17:23:05,092 WARN exited: mqtt (exit status 1; not expected)
2024-02-10 17:23:06,095 INFO spawned: 'mqtt' with pid 206
2024-02-10 17:23:07,097 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Home Assistant discovery created.
Home Assistant subscribes created.

[Feature] Adding support for Heat pump

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}]

Typed property App\Services\MqttService::$acDevices must not be accessed before initialization

Failing to start mqtt service, both on hass and on an external docker container

[2024-03-15 19:32:44] production.ERROR: Typed property App\Services\MqttService::$acDevices must not be accessed before initialization {"exception":"[object] (Error(code: 0): Typed property App\\Services\\MqttService::$acDevices must not be accessed before initialization at /home/app/app/Services/MqttService.php:25)
[stacktrace]
#0 /home/app/app/Console/Commands/MqttLoop.php(25): App\\Services\\MqttService->setupHaDiscovery()
#1 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\MqttLoop->handle()
#2 /home/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#3 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#4 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#5 /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#6 /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
#7 /home/app/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
#8 /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#9 /home/app/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run()
#10 /home/app/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand()
#11 /home/app/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
#12 /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#13 /home/app/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#14 {main}
"} 

In MqttService.php line 25:
                                                                                                  
  Typed property App\Services\MqttService::$acDevices must not be accessed before initialization

Connectlife 009-104 swing mode not available

Hi, when I was in 2.0.0 swing mode was working, now in 2.1.0 it does no more work.

here is device config:
{"009":{"t_work_mode":["fan only","heat","cool","dry","auto"],"t_fan_speed":{"0":"auto","5":"low","6":"middle low","7":"medium","8":"middle high","9":"high"},"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"}}}

Already deleted, it add-on compile the same.
Already deleted prevois MQTT devices

MQTT discovery give me this:

name: Split corridoio
unique_id: pu000098650051000200030003000000f7f617d8c0f
modes:

  • fan_only
  • heat
  • cool
  • dry
  • auto
  • 'off'
    fan_modes:
  • auto
  • super_low
  • low
  • medium
  • high
  • super_high
    swing_modes: []
    payload_on: '1'
    payload_off: '0'
    power_command_topic: pu000098650051000200030003000000f7f617d8c0f/ac/power/set
    mode_command_topic: pu000098650051000200030003000000f7f617d8c0f/ac/mode/set
    mode_state_topic: pu000098650051000200030003000000f7f617d8c0f/ac/mode/get
    temperature_command_topic: pu000098650051000200030003000000f7f617d8c0f/ac/temperature/set
    temperature_state_topic: pu000098650051000200030003000000f7f617d8c0f/ac/temperature/get
    current_temperature_topic: pu000098650051000200030003000000f7f617d8c0f/ac/current-temperature/get
    json_attributes_topic: pu000098650051000200030003000000f7f617d8c0f/ac/attributes/get
    precision: 0.5
    max_temp: 32
    min_temp: 16
    temp_step: 1
    device:
    identifiers:
    • pu000098650051000200030003000000f7f617d8c0f
      manufacturer: Connectlife
      model: 009-104
      fan_mode_command_topic: pu000098650051000200030003000000f7f617d8c0f/ac/fan/set
      fan_mode_state_topic: pu000098650051000200030003000000f7f617d8c0f/ac/fan/get
      platform: mqtt

And here is my control card:

image

How may I get back swing mode?
Thanks!

Eco mode switch via gui

Can't figure out how to switch ac to quiet mode via ha gui.
Need help, or requesting feature

Expose daily_energy_kwh

Would it be possible to expose the daily power consumption?
Here's my devices attributes:

{
  "t_sleep": "0",
  "t_power": "0",
  "t_work_mode": "3",
  "t_fan_speed": "0",
  "t_fan_speed_s": "0",
  "t_fan_mute": "0",
  "t_super": "0",
  "t_eco": "0",
  "t_temp": "14",
  "t_temp_type": "0",
  "t_up_down": "0",
  "t_swing_follow": "0",
  "t_swing_direction": "0",
  "t_swing_angle": "0",
  "t_fanspeedcv": "0",
  "t_tms": "0",
  "t_temp_compensate": "0",
  "f_humidity": "128",
  "f_temp_in": "16",
  "f_electricity": "2400",
  "f_votage": "228",
  "f_e_intemp": "0",
  "f_e_incoiltemp": "0",
  "f_e_inhumidity": "0",
  "f_e_infanmotor": "0",
  "f_e_arkgrille": "0",
  "f_e_invzero": "0",
  "f_e_incom": "0",
  "f_e_indisplay": "0",
  "f_e_inkeys": "0",
  "f_e_inwifi": "0",
  "f_e_inele": "0",
  "f_e_ineeprom": "0",
  "f_e_outeeprom": "0",
  "f_e_outcoiltemp": "0",
  "f_e_outgastemp": "0",
  "f_e_outtemp": "0",
  "f_e_waterfull": "0",
  "f_e_upmachine": "0",
  "f_e_dwmachine": "0",
  "f_e_over_cold": "0",
  "f_e_over_hot": "0",
  "f_e_push": "0",
  "t_demand_response": "0",
  "t_dal": "0",
  "t_talr": "0",
  "f-filter": "0",
  "f_ecm": "1",
  "daily_energy_kwh": 0.49
}

Thanks!

Argument #1 ($host) must be of type string, null given

Attempting to run this via docker, I receive the following error: https://pastebin.com/raw/syqdx5fw.

I'm using Compose to run the docker container and the MQTT host in this case is another docker container on the same docker network, so I'm referencing it via its container name: http://mosquitto. I also tried the IP of the machine, as well as "127.0.0.1", and hit the same error.

get a code erro

Hi i get a code error

In Response.php line 391:

[ErrorException]
Undefined array key "code"

Exception trace:
at /home/app/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:391
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/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:391
Illuminate\Http\Client\Response->offsetGet() at /home/app/app/Services/ConnectlifeApiService.php:69
App\Services\ConnectlifeApiService->App\Services{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
Illuminate\Cache\Repository->remember() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429
Illuminate\Cache\CacheManager->__call() at /home/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
Illuminate\Support\Facades\Facade::__callStatic() at /home/app/app/Services/ConnectlifeApiService.php:32
App\Services\ConnectlifeApiService->getAccessToken() at /home/app/app/Services/ConnectlifeApiService.php:103
App\Services\ConnectlifeApiService->App\Services{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
Illuminate\Cache\Repository->remember() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429
Illuminate\Cache\CacheManager->__call() at /home/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
Illuminate\Support\Facades\Facade::__callStatic() at /home/app/app/Services/ConnectlifeApiService.php:99
App\Services\ConnectlifeApiService->devices() at /home/app/app/Services/MqttService.php:21
App\Services\MqttService->setupHaDiscovery() at /home/app/app/Console/Commands/MqttLoop.php:24
App\Console\Commands\MqttLoop->handle() 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

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

[Feature request] AC unit sleep (night) regime

Hi, first thank you for this project.

I have AC unit in my bedroom and I would like to use it to cool air during night with light turn off (that small light indicating temperature on the front panel). I´m not able to set it up via Home Assistant, but ConnectLife app can do it, when I activate "Sleep regime". I noticed, when I activate this regime, an attribute "t_sleep:" changes from 0 to 1. Is it there a way to implement this regime to addon?

Thank you.

Getting "Call to a member function body() on array " on start

Trying to setup the plugin and when I try to start it I get the following error. Am I doing something wrong, added connectlife credentials and left MQTT blank to pull the information from supervisor.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting


Add-on: Connectlife API proxy / MQTT Add-on
Integrates Connectlife AC devices with Home Assistant via MQTT and provides an HTTP API

Add-on version: 1.1.0
You are running the latest version of this add-on.
System: Home Assistant OS 11.5 (amd64 / qemux86-64)
Home Assistant Core: 2024.2.2
Home Assistant Supervisor: 2024.01.1

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to INFO
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Config OK
MQTT creds: core-mosquitto / addons / 1883 / no-ssl
HTTP API disabled, running MQTT client only.

In ConnectlifeApiService.php line 80:

[Error]
Call to a member function body() on array

Exception trace:
at /home/app/app/Services/ConnectlifeApiService.php:80
App\Services\ConnectlifeApiService->App\Services{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
Illuminate\Cache\Repository->remember() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429
Illuminate\Cache\CacheManager->__call() at /home/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
Illuminate\Support\Facades\Facade::__callStatic() at /home/app/app/Services/ConnectlifeApiService.php:59
App\Services\ConnectlifeApiService->getAccessToken() at /home/app/app/Services/ConnectlifeApiService.php:54
App\Services\ConnectlifeApiService->getTokenHeaders() at /home/app/app/Services/ConnectlifeApiService.php:167
App\Services\ConnectlifeApiService->App\Services{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
Illuminate\Cache\Repository->remember() at /home/app/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:429
Illuminate\Cache\CacheManager->__call() at /home/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
Illuminate\Support\Facades\Facade::__callStatic() at /home/app/app/Services/ConnectlifeApiService.php:163
App\Services\ConnectlifeApiService->devices() at /home/app/app/Services/ConnectlifeApiService.php:143
App\Services\ConnectlifeApiService->status() at /home/app/app/Services/ConnectlifeApiService.php:127
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
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

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Reconnect or stop the container

I get in the logs the following error which leads to the AC being unavailable in HA. The container doesn't exit at this point so it is not restarted automatically - and it doesn't seem try to reconnect to connectlife. Restarting the container fixes the issue. So if the container would stop on the error it could be automatically restarted by docker or supervised watchdog

Server error: GET https://connectlife.bapi.ovh/appliances resulted in a 500 Internal Server Error response:
{
"message": "Server Error"
}

It doesn't work for some reason

2024-04-02 14:10:01,671 DEBG 'mqtt' stdout output:
PhpMqtt\Client\MqttClient->connectInternal() at /home/app/vendor/php-mqtt/client/src/MqttClient.php:123

2024-04-02 14:10:01,672 DEBG 'mqtt' stdout output:
PhpMqtt\Client\MqttClient->connect() at /home/app/app/Providers/AppServiceProvider.php:29

2024-04-02 14:10:01,672 DEBG 'mqtt' stdout output:
PhpMqtt\Client\MqttClient->connect() at /home/app/app/Providers/AppServiceProvider.php:29

2024-04-02 14:10:01,672 DEBG 'mqtt' stdout output:
App\Providers\AppServiceProvider->App\Providers{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:908

2024-04-02 14:10:01,672 DEBG 'mqtt' stdout output:
App\Providers\AppServiceProvider->App\Providers{closure}() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:908

2024-04-02 14:10:01,673 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->build() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:795

2024-04-02 14:10:01,673 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->build() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:795

2024-04-02 14:10:01,674 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:957

2024-04-02 14:10:01,674 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:957

2024-04-02 14:10:01,675 DEBG 'mqtt' stdout output:
Illuminate\Foundation\Application->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:731

2024-04-02 14:10:01,675 DEBG 'mqtt' stdout output:
Illuminate\Foundation\Application->resolve() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:731

2024-04-02 14:10:01,675 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->make() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:942

2024-04-02 14:10:01,675 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->make() at /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:942

2024-04-02 14:10:01,676 DEBG 'mqtt' stdout output:
Illuminate\Foundation\Application->make() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:1066

2024-04-02 14:10:01,676 DEBG 'mqtt' stdout output:
Illuminate\Foundation\Application->make() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:1066

2024-04-02 14:10:01,677 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->resolveClass() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:982

2024-04-02 14:10:01,677 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->resolveClass() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:982

2024-04-02 14:10:01,678 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->resolveDependencies() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:943
Illuminate\Container\Container->build() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:795
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-04-02 14:10:01,678 DEBG 'mqtt' stdout output:
Illuminate\Container\Container->resolveDependencies() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:943
Illuminate\Container\Container->build() at /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:795
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-04-02 14:10:02,680 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-02 14:10:02,680 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Docker for docker compose?

Any plans for that. I strongly hope this will be an active development and it would be so much easier for those not running HA Supervised version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.