mjmccans / hassio-addon-airthings

Home Assistant Add-on for Airthings devices that uses mqtt to integrate with Home Assistant via mqtt discovery.
MIT License
20 stars 3 forks source link

Starting the container and than will hang getting info from airthings #7

Closed therealmysteryman closed 2 years ago

therealmysteryman commented 2 years ago

I running your add-on on HA OS, on Airthings Wave Gen 1. I'm having a strange issue that the process get stuck at getting info from Airthings.

It will be pull the information for 1 or 2 pass after starting the container and than hang saying getting info from airthings. I have put the log into debug but there no more information to be seen. Restarting the container would get it going again for one or 2 pass.

therealmysteryman commented 2 years ago

Output log :

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. [13:58:06] INFO: Getting mqtt configuration... [13:58:06] INFO: Starting python script... [2022-03-31 13:58:07] INFO: Setting up Airthings sensors... [2022-03-31 13:58:07] DEBUG: Getting info about device(s)...

Configuration :

devices:

therealmysteryman commented 2 years ago

I changed my Bluetooth dongle and now I have no issue... Seem problem was related to hardware :)

uowis commented 2 years ago

hi ! Could you tell us the dongle model who work ?

uowis commented 2 years ago

I have the same problem, the integration hangs from time to time at the same step ( not always after the same duration), and i need to restart the addon regulary : `[2022-05-31 11:53:44] DEBUG: Getting sensor data...

[2022-05-31 11:53:44] INFO: Collecting sensor value messages...

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/humidity = 51

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/radon_1day_avg = 127

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/radon_longterm_avg = 79

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/temperature = 18.8

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/rel_atm_pressure = 996

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/co2 = 630

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/voc = 148

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/illuminance = 88

[2022-05-31 11:53:44] INFO: airthings/d8:71:4d:96:c3:50/battery = 80

[2022-05-31 11:53:44] INFO: Sending messages to mqtt broker...

[2022-05-31 11:53:46] INFO: Done sending messages to mqtt broker.

[2022-05-31 11:53:46] INFO: Waiting 150 seconds.

[2022-05-31 11:56:16] DEBUG: Getting sensor data...

[2022-05-31 11:56:21] INFO: Collecting sensor value messages...

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/humidity = 51

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/radon_1day_avg = 127

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/radon_longterm_avg = 79

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/temperature = 18.8

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/rel_atm_pressure = 996

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/co2 = 632

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/voc = 155

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/illuminance = 90

[2022-05-31 11:56:21] INFO: airthings/d8:71:4d:96:c3:50/battery = 80

[2022-05-31 11:56:21] INFO: Sending messages to mqtt broker...

[2022-05-31 11:56:21] INFO: Done sending messages to mqtt broker.

[2022-05-31 11:56:21] INFO: Waiting 150 seconds.

[2022-05-31 11:58:51] DEBUG: Getting sensor data...`

uowis commented 2 years ago

I solve it simply with automation that restart add-on when enity don"t change

mjmccans commented 2 years ago

I am happy that you found a solution but I would still like to figure out what is causing the problem. It looks like something is happening in a lower level library (my guess is bluetooth) and it is not timing out properly on error. I will try to add some additional debugging code in the next version because this would be an irritating issue to deal with, but I have not been able to duplicate the issue myself.

uowis commented 2 years ago

okay nice ! i wait next version to give you more information.