gazoodle / gecko-home-assistant

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

No entities created #67

Open Alundran opened 2 years ago

Alundran commented 2 years ago

Version of the custom_component

0.1.8

Configuration

I don't have any specific config for Gecko

Describe the bug

I've had the integration running for a long time (around 8 months). Some network configurations changed on my side so the IP address of the SPA and other things changed. The Gecko integration stopped working. I thought that it just need to be setup again and re-configured so I deleted the integration and then attempted to re-add it. When re-adding it, it finds the SPA but no entities are created.

I've done the following:

Any thoughts would be appreciated! I wish I had never removed the integration as that seems to be the point it's all went wrong!

Debug log


2022-08-30 21:53:43.726 INFO (MainThread) [custom_components.gecko.config_flow]
-------------------------------------------------------------------
Gecko
Version: 0.1.8
Gecko Lib: 0.4.7
This is a custom integration!
If you have any issues with this you need to open an issue here:
https://github.com/gazoodle/gecko-home-assistant/issues
-------------------------------------------------------------------
2022-08-30 21:53:43.727 DEBUG (MainThread) [custom_components.gecko.config_flow] async_step_user user_input = None
2022-08-30 21:53:43.728 INFO (MainThread) [custom_components.gecko.config_flow] Choose scan or address
2022-08-30 21:53:43.728 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.SPA_MAN_ENTER, state GeckoSpaState.IDLE
2022-08-30 21:53:43.729 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_STARTED, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:53:44.748 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_DISCOVERED_SPA, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:53:45.447 DEBUG (MainThread) [custom_components.gecko.config_flow] async_step_user user_input = {}
2022-08-30 21:53:45.447 INFO (MainThread) [custom_components.gecko.config_flow] No address provided, so wait for scan to complete...
2022-08-30 21:53:47.735 INFO (MainThread) [geckolib.async_locator] Found 1 spas ... [Spa(SPA68:27:19:85:84:93)]
2022-08-30 21:53:47.736 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_FINISHED, state GeckoSpaState.LOCATED_SPAS
2022-08-30 21:53:47.736 INFO (MainThread) [custom_components.gecko.config_flow] Scan is complete
2022-08-30 21:53:47.736 INFO (MainThread) [custom_components.gecko.config_flow] Found [Spa(SPA68:27:19:85:84:93)] on the network
2022-08-30 21:53:49.268 INFO (MainThread) [custom_components.gecko.config_flow] Async step user has picked {{'spaname': 'Spa'}}
2022-08-30 21:53:49.268 INFO (MainThread) [custom_components.gecko.config_flow] Previously, the user selected spa Spa to configure, locate it in [Spa(SPA68:27:19:85:84:93)]
2022-08-30 21:53:49.269 INFO (MainThread) [homeassistant.setup] Setting up gecko
2022-08-30 21:53:49.270 INFO (MainThread) [homeassistant.setup] Setup of domain gecko took 0.0 seconds
2022-08-30 21:53:49.270 INFO (MainThread) [custom_components.gecko]
-------------------------------------------------------------------
Gecko
Version: 0.1.8
Gecko Lib: 0.4.7
This is a custom integration!
If you have any issues with this you need to open an issue here:
https://github.com/gazoodle/gecko-home-assistant/issues
-------------------------------------------------------------------
2022-08-30 21:53:49.270 DEBUG (MainThread) [custom_components.gecko] Setup entry for UUID c047ed40-86ce-40ae-8c82-4df0cd84d2f4, ID SPA68:27:19:85:84:93, address None (Spa)
2022-08-30 21:53:49.271 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_STATUS_SENSOR, state GeckoSpaState.IDLE
2022-08-30 21:53:49.271 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.SPA_MAN_ENTER, state GeckoSpaState.IDLE
2022-08-30 21:53:49.271 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_STARTED, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:53:49.285 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_DISCOVERED_SPA, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:53:53.273 INFO (MainThread) [geckolib.async_locator] Found 1 spas ... [Spa(SPA68:27:19:85:84:93)]
2022-08-30 21:53:53.274 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_FINISHED, state GeckoSpaState.LOCATED_SPAS
2022-08-30 21:53:53.274 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_STARTED, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:53:53.287 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_DISCOVERED_SPA, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:53:53.289 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_FINISHED, state GeckoSpaState.LOCATED_SPAS
2022-08-30 21:53:53.289 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_RECONNECT_BUTTON, state GeckoSpaState.CONNECTING
2022-08-30 21:53:53.289 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_STARTED, state GeckoSpaState.CONNECTING
2022-08-30 21:53:53.313 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTING
2022-08-30 21:53:53.344 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_FIRMWARE_VERSION, state GeckoSpaState.CONNECTING
2022-08-30 21:53:53.367 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_PING_SENSOR, state GeckoSpaState.CONNECTING
2022-08-30 21:53:53.368 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_CHANNEL, state GeckoSpaState.CONNECTING
2022-08-30 21:53:53.565 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_CONFIG_FILES, state GeckoSpaState.CONNECTING
2022-08-30 21:53:53.572 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_INITIAL_DATA_BLOCK_REQUEST, state GeckoSpaState.CONNECTING
2022-08-30 21:53:57.327 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_SPA_COMPLETE, state GeckoSpaState.SPA_READY
2022-08-30 21:53:57.328 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_FACADE_IS_READY, state GeckoSpaState.CONNECTED
2022-08-30 21:53:57.329 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_FINISHED, state GeckoSpaState.CONNECTED
2022-08-30 21:54:53.336 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:55:07.434 DEBUG (MainThread) [custom_components.gecko] Setup entry for UUID c047ed40-86ce-40ae-8c82-4df0cd84d2f4, ID SPA68:27:19:85:84:93, address None (Spa)
2022-08-30 21:55:07.434 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_STATUS_SENSOR, state GeckoSpaState.IDLE
2022-08-30 21:55:07.434 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.SPA_MAN_ENTER, state GeckoSpaState.IDLE
2022-08-30 21:55:07.435 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_STARTED, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:55:07.451 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_DISCOVERED_SPA, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:55:11.441 INFO (MainThread) [geckolib.async_locator] Found 1 spas ... [Spa(SPA68:27:19:85:84:93)]
2022-08-30 21:55:11.441 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_FINISHED, state GeckoSpaState.LOCATED_SPAS
2022-08-30 21:55:11.442 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_STARTED, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:55:11.457 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_DISCOVERED_SPA, state GeckoSpaState.LOCATING_SPAS
2022-08-30 21:55:11.459 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.LOCATING_FINISHED, state GeckoSpaState.LOCATED_SPAS
2022-08-30 21:55:11.459 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_RECONNECT_BUTTON, state GeckoSpaState.CONNECTING
2022-08-30 21:55:11.459 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_STARTED, state GeckoSpaState.CONNECTING
2022-08-30 21:55:11.486 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTING
2022-08-30 21:55:11.519 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_FIRMWARE_VERSION, state GeckoSpaState.CONNECTING
2022-08-30 21:55:11.541 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_HAS_PING_SENSOR, state GeckoSpaState.CONNECTING
2022-08-30 21:55:11.542 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_CHANNEL, state GeckoSpaState.CONNECTING
2022-08-30 21:55:11.738 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_GOT_CONFIG_FILES, state GeckoSpaState.CONNECTING
2022-08-30 21:55:11.739 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_INITIAL_DATA_BLOCK_REQUEST, state GeckoSpaState.CONNECTING
2022-08-30 21:55:15.494 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_SPA_COMPLETE, state GeckoSpaState.SPA_READY
2022-08-30 21:55:15.495 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CLIENT_FACADE_IS_READY, state GeckoSpaState.CONNECTED
2022-08-30 21:55:15.495 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.CONNECTION_FINISHED, state GeckoSpaState.CONNECTED
2022-08-30 21:55:55.148 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:56:11.506 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:56:49.275 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/async_facade.py", line 90, in _facade_update
self._water_care.change_watercare_mode(
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/watercare.py", line 83, in change_watercare_mode
self._on_change(self, old_mode, self.active_mode)
File "/usr/local/lib/python3.10/site-packages/geckolib/driver/observable.py", line 39, in _on_change
f"{self.__class__.__name__} {sender} changed "
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/watercare.py", line 92, in __str__
return f"{self.name}: {GeckoConstants.WATERCARE_MODE_STRING[self.active_mode]}"
IndexError: list index out of range
2022-08-30 21:56:55.172 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:57:13.317 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:57:56.982 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:58:07.438 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/async_facade.py", line 90, in _facade_update
self._water_care.change_watercare_mode(
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/watercare.py", line 83, in change_watercare_mode
self._on_change(self, old_mode, self.active_mode)
File "/usr/local/lib/python3.10/site-packages/geckolib/driver/observable.py", line 39, in _on_change
f"{self.__class__.__name__} {sender} changed "
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/watercare.py", line 92, in __str__
return f"{self.name}: {GeckoConstants.WATERCARE_MODE_STRING[self.active_mode]}"
IndexError: list index out of range
2022-08-30 21:58:13.340 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:58:57.006 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
2022-08-30 21:59:15.148 DEBUG (MainThread) [custom_components.gecko.spa_manager] Event: GeckoSpaEvent.RUNNING_PING_RECEIVED, state GeckoSpaState.CONNECTED
gazoodle commented 2 years ago

There looks to be an error with the watercare mode which might be affecting the sensor creation (although I don’t think it ought to, it’s still an error we should fix).

It seems to be an out-of-range setting which again, shouldn’t happen, but … if you can try to ensure that your tub is using the water care mode “Standard” and the Econ mode is disabled then try removing the integration, restart HA, then re-add the integration.

Alundran commented 2 years ago

There looks to be an error with the watercare mode which might be affecting the sensor creation (although I don’t think it ought to, it’s still an error we should fix).

It seems to be an out-of-range setting which again, shouldn’t happen, but … if you can try to ensure that your tub is using the water care mode “Standard” and the Econ mode is disabled then try removing the integration, restart HA, then re-add the integration.

That worked! In the app, no water care option was selected. Set it to Standard and now the entities show.

Thanks again!

gazoodle commented 2 years ago

Good. I’m going to leave this open as a reminder to put some try/catch logic in startup to prevent this from occurring in future. Just a bit busy with other things at present, hopefully get back to the gecko stuff later in the autumn.

Strixx76 commented 2 years ago

Just had the same problem. All the sudden the integration stopped working and when I tried to reload it I was told that I needed to restart HA to get it up and running again. Following error was found in the logs:

2022-11-06 10:31:35.527 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/async_facade.py", line 90, in _facade_update
self._water_care.change_watercare_mode(
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/watercare.py", line 83, in change_watercare_mode
self._on_change(self, old_mode, self.active_mode)
File "/usr/local/lib/python3.10/site-packages/geckolib/driver/observable.py", line 39, in _on_change
f"{self.__class__.__name__} {sender} changed "
File "/usr/local/lib/python3.10/site-packages/geckolib/automation/watercare.py", line 92, in __str__
return f"{self.name}: {GeckoConstants.WATERCARE_MODE_STRING[self.active_mode]}"
IndexError: list index out of range

When I looked in the in.touch app on the phone there was no schedule selected.

So this bug causes the hole integration to stop working, and the device becomes unavailable. But by selecting a schedule in the app, and then restart HA it all started working again.

As a side note I can tell you that I have not been using the in.touch app in a long time. The reason the water care schedule was disabled must have been when my son played with the light button on the spa, trying to get it shine in only one color. When he long pushed the light button it entered some kind of setting mode on the local controlpanel.

flyoffacliff commented 1 year ago

This bug is still present. Not sure how it was even possible for no water care mode to be selected (other than I factory reset the tub recently). I did all the same troubleshooting steps (and more) you listed in your post, and it wouldn't work until I opened the official app and selected “Standard”. Good thing I found this report buried down in the list.

quinnjn commented 1 year ago

I powered off the hot tub for cleaning, and it wasn't reconnecting afterwards. Confirming that setting "Water Care" to "Standard" in the app did the trick and I was able to re-add the tub to HA.