lloydw / hass-spanet

HomeAssistant integration for SpaNET
MIT License
9 stars 1 forks source link

is this plugin still usable? #2

Closed rpalexander closed 1 year ago

rpalexander commented 1 year ago

have tried to set up and have encountered an error have the dependencies been deprecated or have I set this up incorrectly?

Logger: homeassistant.config_entries Source: custom_components/spanet/init.py:49 Integration: spanet (documentation) First occurred: 3:43:21 PM (3 occurrences) Last logged: 3:48:19 PM

Error setting up entry spanet for spanet Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spanet/init.py", line 49, in async_setup_entry hass.config_entries.async_setup_platforms(config_entry, PLATFORMS) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

lloydw commented 1 year ago

Hi There,

Thanks for reaching out. Yes, it's still usable, I just pushed up a fix to make it work with the latest home assistant.

Let me know how you go.

rpalexander commented 1 year ago

thanks for being so responsive, really appreciate the support - the update has made it work but have now encountered another error in the logs and the entities show as unavailable. I had also tried to access this through the spa net add on for home bridge which also didn't seem to populate any information. everything in the spa-link app seems to be functional.

the error from my logs:

Logger: homeassistant.config_entries Source: helpers/entity_component.py:179 First occurred: 5:01:38 PM (4 occurrences) Last logged: 6:45:48 PM

Error setting up entry spanet for sensor Error setting up entry spanet for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 131, in async_setup_entry return await component.async_setup_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 179, in async_setup_entry raise ValueError("Config entry has already been setup!") ValueError: Config entry has already been setup!

Logger: custom_components.spanet.coordinator Source: custom_components/spanet/spanet.py:176 Integration: spanet (documentation) First occurred: 4:59:16 PM (5 occurrences) Last logged: 6:45:48 PM

Unexpected error fetching Spa data: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spanet/coordinator.py", line 56, in _async_update_data self.spa = await self.spanet.get_spa(self.spa_config["id"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spanet/spanet.py", line 176, in get_spa raise SpaNetConnectFailed() custom_components.spanet.spanet.SpaNetConnectFailed

any thoughts?

lloydw commented 1 year ago

Thanks for the detailed logs, it looks like it's failing to connect to SpaNET for some reason. Just wanted to confirm you are entering your hashed password in the config?

You need to use the command line tool here: https://github.com/thehoff/spanet-password-creator, enter your password and it will print out a hash. You need to then copy and paste that hash into this components hashed password field.

rpalexander commented 1 year ago

Yes that’s right - I’m using the hashed password. It doesn’t authenticate if it is incorrect from what I’ve tried.On 20/06/2023, at 8:35 PM, Lloyd Weehuizen @.***> wrote: Thanks for the detailed logs, it looks like it's failing to connect to SpaNET for some reason. Just wanted to confirm you are entering your hashed password in the config? You need to use the command line tool here: https://github.com/thehoff/spanet-password-creator, enter your password and it will print out a hash. You need to then copy and paste that hash into this components hashed password field.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

lloydw commented 1 year ago

Thanks for the logs. I've added some additional error logging. Could you try the latest version and see what the error message is?

rpalexander commented 1 year ago

Logger: homeassistant.config_entries Source: helpers/entity_component.py:179 First occurred: 5:23:20 AM (4 occurrences) Last logged: 8:33:46 AM

Error setting up entry spanet for sensor Error setting up entry spanet for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 131, in async_setup_entry return await component.async_setup_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 179, in async_setup_entry raise ValueError("Config entry has already been setup!") ValueError: Config entry has already been setup!

Logger: custom_components.spanet.coordinator Source: custom_components/spanet/spanet.py:176 Integration: spanet (documentation) First occurred: 5:19:59 AM (6 occurrences) Last logged: 8:33:46 AM

Unexpected error fetching Spa data: Connect to spa 682719308837 failed, result: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spanet/coordinator.py", line 56, in _async_update_data self.spa = await self.spanet.get_spa(self.spa_config["id"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spanet/spanet.py", line 176, in get_spa raise SpaNetConnectFailed(f"Connect to spa {spa_id} failed, result: {data.decode('utf8')}") custom_components.spanet.spanet.SpaNetConnectFailed: Connect to spa 682719308837 failed, result:

hope that gives some info - only difference I can see is the spa ID listed?

rpalexander commented 1 year ago

I have a suspicion this may be something on my end. Checking the app the spa doesn’t actually seem to respond or update its status. I’ll check on my end and let you know.

rpalexander commented 1 year ago

appears the issue was on my end - I re-paired the spa to the spalink app, reinstalled the integration and its working swimmingly!