gazoodle / gecko-home-assistant

Home Assistant integration for spas equipped with Gecko Alliance in.touch2 modules
MIT License
69 stars 24 forks source link

Suddenly, high CPU use + possible memory leak #87

Closed M0LTE closed 4 months ago

M0LTE commented 1 year ago

Version of the custom_component

0.1.9

Configuration

Installed via HACS, configured via UI, HASS in Docker.

Describe the bug

Possibly since upgrading HA to 2023.6.3, I see constant high CPU usage from python3 in top and HA becomes unreliable. Not confirmed, but this also corresponded to a memory leak over multiple hours. On disabling this integration, python3 CPU usage immediately drops to ~2%. The debug logs do not show anything continually repeating. Has been working well for well over a year until now.

Debug log


2023-07-03 17:26:40.209 DEBUG (MainThread) [custom_components.gecko] Setup entry for UUID 51b6d14a-1f01-4bc1-9569-f059c910a4dd, ID SPA68:27:19:85:df:3e, address 10.45.0.122 (Hot Tub)
2023-07-03 17:26:40.209 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_STATUS_SENSOR, state GeckoSpaState.IDLE
2023-07-03 17:26:40.210 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.SPA_MAN_ENTER, state GeckoSpaState.IDLE
2023-07-03 17:26:40.225 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_STARTED, state GeckoSpaState.LOCATING_SPAS
2023-07-03 17:26:40.256 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_DISCOVERED_SPA, state GeckoSpaState.LOCATING_SPAS
2023-07-03 17:26:40.258 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_FINISHED, state GeckoSpaState.LOCATED_SPAS
2023-07-03 17:26:40.258 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_STARTED, state GeckoSpaState.LOCATING_SPAS
2023-07-03 17:26:40.269 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_DISCOVERED_SPA, state GeckoSpaState.LOCATING_SPAS
2023-07-03 17:26:40.271 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_FINISHED, state GeckoSpaState.LOCATED_SPAS
2023-07-03 17:26:40.271 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_RECONNECT_BUTTON, state GeckoSpaState.CONNECTING
2023-07-03 17:26:40.271 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_STARTED, state GeckoSpaState.CONNECTING
2023-07-03 17:26:40.295 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTING
2023-07-03 17:26:40.323 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_FIRMWARE_VERSION, state GeckoSpaState.CONNECTING
2023-07-03 17:26:40.344 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_PING_SENSOR, state GeckoSpaState.CONNECTING
2023-07-03 17:26:40.345 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_CHANNEL, state GeckoSpaState.CONNECTING
2023-07-03 17:26:40.541 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_CONFIG_FILES, state GeckoSpaState.CONNECTING
2023-07-03 17:26:40.542 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_INITIAL_DATA_BLOCK_REQUEST, state GeckoSpaState.CONNECTING
2023-07-03 17:26:44.305 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_SPA_COMPLETE, state GeckoSpaState.SPA_READY
2023-07-03 17:26:44.308 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_FACADE_IS_READY, state GeckoSpaState.CONNECTED
2023-07-03 17:26:44.308 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_FINISHED, state GeckoSpaState.CONNECTED
2023-07-03 17:26:44.684 DEBUG (MainThread) [custom_components.gecko.spa_manager] Load platforms ['binary_sensor', 'button', 'fan', 'sensor', 'switch', 'climate', 'light']
2023-07-03 17:26:44.689 INFO (MainThread) [custom_components.gecko.entity] Setup entity Circulating Pump/SPA68271985df3e-CIRCULATING PUMP
2023-07-03 17:26:44.691 INFO (MainThread) [custom_components.gecko.entity] Setup entity Ozone/SPA68271985df3e-OZONE
2023-07-03 17:26:44.691 INFO (MainThread) [custom_components.gecko.entity] Setup entity Smart Winter Mode:Active/SPA68271985df3e-SMART WINTER MODE:ACTIVE
2023-07-03 17:26:44.691 INFO (MainThread) [custom_components.gecko.entity] Setup entity Filter Status:Clean/SPA68271985df3e-FILTER STATUS:CLEAN
2023-07-03 17:26:44.692 INFO (MainThread) [custom_components.gecko.entity] Setup entity Filter Status:Purge/SPA68271985df3e-FILTER STATUS:PURGE
2023-07-03 17:26:44.692 INFO (MainThread) [custom_components.gecko.entity] Setup entity Reconnect/SPA68271985df3e-RECONNECT
2023-07-03 17:26:44.693 INFO (MainThread) [custom_components.gecko.entity] Setup entity Pump 1/SPA68271985df3e-P1
2023-07-03 17:26:44.695 INFO (MainThread) [custom_components.gecko.entity] Setup entity Waterfall/SPA68271985df3e-Waterfall
2023-07-03 17:26:44.695 INFO (MainThread) [custom_components.gecko.entity] Setup entity Status/SPA68271985df3e-STATUS
2023-07-03 17:26:44.697 INFO (MainThread) [custom_components.gecko.entity] Setup entity RF Signal/SPA68271985df3e-RADIO
2023-07-03 17:26:44.697 INFO (MainThread) [custom_components.gecko.entity] Setup entity RF Channel/SPA68271985df3e-CHANNEL
2023-07-03 17:26:44.697 INFO (MainThread) [custom_components.gecko.entity] Setup entity Smart Winter Mode:Risk/SPA68271985df3e-SMART WINTER MODE:RISK
2023-07-03 17:26:44.697 INFO (MainThread) [custom_components.gecko.entity] Setup entity Rinse filter due/SPA68271985df3e-RinseFilter
2023-07-03 17:26:44.699 INFO (MainThread) [custom_components.gecko.entity] Setup entity Clean filter due/SPA68271985df3e-CleanFilter
2023-07-03 17:26:44.699 INFO (MainThread) [custom_components.gecko.entity] Setup entity Change water due/SPA68271985df3e-ChangeWater
2023-07-03 17:26:44.699 INFO (MainThread) [custom_components.gecko.entity] Setup entity Check Spa due/SPA68271985df3e-CheckSpa
2023-07-03 17:26:44.699 INFO (MainThread) [custom_components.gecko.entity] Setup entity Error(s)/SPA68271985df3e-ERR
2023-07-03 17:26:44.701 INFO (MainThread) [custom_components.gecko.entity] Setup entity Blower/SPA68271985df3e-BL
2023-07-03 17:26:44.702 INFO (MainThread) [custom_components.gecko.entity] Setup entity Economy Mode/SPA68271985df3e-EconActive
2023-07-03 17:26:44.702 INFO (MainThread) [custom_components.gecko.entity] Setup entity Heater/SPA68271985df3e-HEAT
2023-07-03 17:26:44.704 INFO (MainThread) [custom_components.gecko.entity] Setup entity Lights/SPA68271985df3e-LI
2023-07-03 17:26:46.543 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2023-07-03 17:26:46.564 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_SPA_PACK_REFRESHED, state GeckoSpaState.CONNECTED
M0LTE commented 1 year ago

Integration remains disabled. Any help greatly appreciated.

ec0li82 commented 10 months ago

Hello, I can confirm this behavior. CPU of my homeassistant is much higher than before since I'm using this integration (spa installed and added to HA on the 23rd) image

mvjt commented 10 months ago

I have the same issue. I´ve had to turn off this integration since this started...

robgridley commented 9 months ago

+1

Lumiaja commented 6 months ago

Here also. Had to turn off this integration because of the high CPU and memory usage.

gazoodle commented 4 months ago

The asyncio timeout interval was changed in v0.1.11 which might have affected this behaviour, please reopen if not resolved