home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.07k stars 31.09k forks source link

AirVisual Pro integration sometimes stops working after Airvisual device reboot #131569

Open aleyush opened 5 days ago

aleyush commented 5 days ago

The problem

AirVisual pro integration is used to get data from AirVisual Node unit. Default polling is turned off and automation used to update data every 10 seconds as described here.

My AirVisual Node battery is old, the unit immediately switches off when external power is switched off.

What do I do: switch Node power off and back on. What do I get: not each time, but once in several off-on cycles all the device sensors become unavailable in Home Assistant, and no data appears before I restart Home Assistant.

With default polling (once a minute) it is also possible to come across this behavior, but need more off-on cycles to reproduce.

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

AirVisual Pro

Link to integration documentation on our website

https://www.home-assistant.io/integrations/airvisual_pro/

Diagnostics information

{ "home_assistant": { "installation_type": "Home Assistant Container", "version": "2024.10.2", "dev": false, "hassio": false, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "x86_64", "timezone": "Europe/Moscow", "os_name": "Linux", "os_version": "4.4.302+", "run_as_root": true }, "custom_components": { "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "2.0.1", "requirements": [ "aiogithubapi>=22.10.1" ] } }, "integration_manifest": { "domain": "airvisual_pro", "name": "AirVisual Pro", "codeowners": [ "bachya" ], "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/airvisual_pro", "integration_type": "device", "iot_class": "local_polling", "loggers": [ "pyairvisual", "pysmb" ], "requirements": [ "pyairvisual==2023.08.1" ], "is_built_in": true }, "setup_times": { "null": { "setup": 4.2511033825576305e-05 }, "01JAMJ7J1W45PSQRBQJCKTNSP9": { "wait_import_platforms": -0.22439610003493726, "config_entry_setup": 0.4611209010472521 } }, "data": { "entry": { "created_at": "2024-10-20T08:55:47.516661+00:00", "data": { "ip_address": "192.168.1.220", "password": "REDACTED" }, "discovery_keys": {}, "disabled_by": null, "domain": "airvisual_pro", "entry_id": "01JAMJ7J1W45PSQRBQJCKTNSP9", "minor_version": 1, "modified_at": "2024-11-11T19:10:54.414895+00:00", "options": {}, "pref_disable_new_entities": false, "pref_disable_polling": true, "source": "user", "title": "192.168.1.220", "unique_id": "RMVLHLP", "version": 1 }, "data": { "date_and_time": { "date": "2024/11/25", "time": "22:53:24", "timestamp": "1732575204" }, "measurements": { "co2": "418", "humidity": "27", "pm0_1": "0", "pm1_0": "1", "aqi_cn": "1", "aqi_us": "6", "pm2_5": "1", "temperature_C": "25.2", "temperature_F": "77.4", "voc": "-1" }, "serial_number": "REDACTED", "settings": { "control_panel_locked": false, "follow_mode": "station", "followed_station": "8120", "is_aqi_usa": true, "is_concentration_showed": false, "is_indoor": true, "is_lcd_on": true, "is_network_time": true, "is_temperature_celsius": true, "language": "en-GB", "lcd_brightness": 80, "node_name": "Bedroom", "power_saving": { "2slots": [ { "hour_off": 9, "hour_on": 7 }, { "hour_off": 22, "hour_on": 18 } ], "mode": "yes", "running_time": 99, "yes": [ { "hour": 8, "minute": 0 }, { "hour": 21, "minute": 0 } ] }, "sensor_mode": { "custom_mode_interval": 3, "mode": 2 }, "speed_unit": "mph", "timezone": "Europe/Moscow", "tvoc_unit": "ppb" }, "status": { "app_version": "1.1888", "battery": 70, "datetime": 1732575204, "device_name": "AIRVISUAL-RMVLHLP", "ip_address": "192.168.1.220", "mac_address": "REDACTED", "model": 10, "sensor_life": { "pm2_5": 5883211014 }, "sensor_pm25_fw": "0.10.3.28", "sensor_pm25_serial": "00000110040210050638", "sync_time": 60000, "system_version": "KBG57F70", "used_memory": 4, "wifi_strength": 4 }, "last_measurement_timestamp": 1732575204, "history": {} } } }

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-11-25 22:53:30.516 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.016 seconds (success: True)
2024-11-25 22:54:09.160 ERROR (MainThread) [homeassistant.components.airvisual_pro] Error fetching Node/Pro data data: Error while retrieving data: [Errno 104] Connection reset by peer
2024-11-25 22:54:09.161 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 28.641 seconds (success: False)
2024-11-25 22:54:19.168 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.004 seconds (success: False)
2024-11-25 22:54:29.171 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:54:39.174 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:54:49.178 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:54:59.180 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:55:09.182 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:55:19.185 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:55:29.188 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:55:39.189 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:55:49.192 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:55:59.195 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:56:09.197 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:56:19.199 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:56:29.202 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:56:39.205 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)
2024-11-25 22:56:49.207 DEBUG (MainThread) [homeassistant.components.airvisual_pro] Finished fetching Node/Pro data data in 0.001 seconds (success: False)

Additional information

No response

home-assistant[bot] commented 5 days ago

Hey there @bachya, mind taking a look at this issue as it has been labeled with an integration (airvisual_pro) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `airvisual_pro` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign airvisual_pro` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


airvisual_pro documentation airvisual_pro source (message by IssueLinks)