bilan/connectlife-api-connector

Add-on does not automatically restart on startup

Closed this issue · 12 comments

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

Is add-on watchdog turned on?

now yes but I don't understand why it stops honestly

Does it help?

Check MQTT server logs for errors. Maybe some network issues.

So with watchdog it works fine and never stops, while if I turn off watchdog I get the problem, checked my broker but I have no errors, in your post on the forum I read about the api token? But in Redme you don't mention it, in case it is needed, where should the token recovered from the swaggen UI be put?

The app shoud care about access token. You need only connectlife login and password.

Your mqtt server starts after connectlife add-on, thats the reason I think.

i hava the same issue. I turned on watchdog, but when i restart my haos, i see the same error in log file and i need to start manually,

@alexcroce try updating to newest version

@bilan , i already updated. i will try to restart haos. Thank you for your work!

ok, now the add-on start, but i can't see my hisense splits . It says mqtt doesn't recognize them. I restarted both mosquito and connectlife app and now haos recognizes again my splits

yes, splits are online, after restart of mosquito and connectlife app they are online again

i ve a similar issue.
ive docker on an openmediavault system, configured docker for connectilfe, if I reboot omv the only docker that will fail is connectlife, if I do a down/up it works.

Should be fixed in v2.1.1