core
core copied to clipboard
Hydrawise not working
The problem
Since certain time, I am unable to use my hydrawise integration. I have tried to regenerate my API key as well as increasing scan interval, and I was able to get it to work temporarily, but then it just stops. My config is following:
#Hunter Hydrawise
hydrawise:
access_token: XYZ
scan_interval: 90
binary_sensor:
- platform: hydrawise
switch:
- platform: hydrawise
watering_minutes: 60
Following error can be observed in logs:
Logger: homeassistant.components.binary_sensor
Source: components/hydrawise/__init__.py:96
Integration: Binárny snímač (documentation, issues)
First occurred: 01:18:34 (1 occurrences)
Last logged: 01:18:34
Error while setting up hydrawise platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/hydrawise/binary_sensor.py", line 64, in setup_platform
HydrawiseBinarySensor(hydrawise.current_controller, BINARY_SENSOR_STATUS)
File "/usr/src/homeassistant/homeassistant/components/hydrawise/__init__.py", line 96, in __init__
self._attr_name = f"{self.data['name']} {description.name}"
TypeError: list indices must be integers or slices, not str
What version of Home Assistant Core has the issue?
core-2023.5.3
What was the last working version of Home Assistant Core?
N/A
What type of installation are you running?
Home Assistant OS
Integration causing the issue
hydrawise
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hydrawise/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @dknowles2, @ptcryan, mind taking a look at this issue as it has been labeled with an integration (hydrawise
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of hydrawise
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 hydrawise
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
hydrawise documentation hydrawise source (message by IssueLinks)
I ran into this recently. Double check your api key. It's either copy/pasted incorrectly or you're being throttled by the backend.
I'm (slowly) working on migrating the integration to the new API which is much more reliable. Hoping to land all the changes by the 2023.8.0 release at the latest.
I would like to report the same issue with the same error message, although I am able to access the API with simple http GET messages.
I think https://github.com/home-assistant/core/pull/93526 will improve the situation but the review has been stalled for a bit.
I'm having this same issue, so I'm looking forward to the update. Thanks for the good work in advance.
Since 2023.6 it is completely not working anymore
Same here. Connection has been sporadic but now dead
looks like they adjusted the time of request:
for customerdetails.php:
Exceeded maximum number of requests. You cannot make more than 5 requests in any 5 minute period to this endpoint.
for statusschedule.php:
Exceeded maximum number of requests. You cannot make more than 20 requests in any 5 minute period to this endpoint.
Hm. It should poll customerdetails.php
and then statusschedule.php
every 2 mins. That should be well within those limits.
Are you seeing any errors in the HA logs? Mine fails to refresh occasionally, but it's been loading at HA startup time.
Since the config flow PR hasn't landed yet you should be able to tweak the refresh interval in YAML. Make sure it's >= the default of 120 so you're within the rate limits Hydrawise has put in place for the old API.
so the new API does not have this limit?
Becaus actually if I turn on a relay I am not able to turn it off again because HA does not recognize the actual status (if the update interval is 120)
so the new API does not have this limit?
Correct. The new api is also what both the app and the website uses.
Becaus actually if I turn on a relay I am not able to turn it off again because HA does not recognize the actual status (if the update interval is 120)
Seems plausible. I don't know off-hand what endpoints the relay switches use but I assume they're also rate limited. And I think the integration probably does call the throttled endpoint after a switch toggle to refresh the state, which would put you over the limit.
Oh, the other way this can break at the moment is if your HA instance refreshes data right before you do a system reload (e.g. after a system update). This would cause the initialization to put you over the api limit and cause the integration to fail to load. I'm guessing that's what most people are seeing at the moment when the integration is failing. In this case you can wait a bit and the restart HA again. If the integration fails to load on startup it currently won't retry again until a reboot.
So lets hope they will merge the CF asap that you can proceed with the new API.
Great news you are working on an updated version. Keep up the good work! Thanks 👍
Sinzce the update to HA Core 2023.06.2 from 2023.05.4 I'm getting this error from the hydrawise integration. I tried to reload some time after the restart but didn't help.
(MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 229, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 374, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/components/hydrawise/sensor.py", line 80, in _handle_coordinator_update relay_data = self.coordinator.api.relays[self.data["relay"] - 1]
IndexError: list index out of range
Sinzce the update to HA Core 2023.06.2 from 2023.05.4 I'm getting this error from the hydrawise integration. I tried to reload some time after the restart but didn't help.
(MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 229, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 374, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/components/hydrawise/sensor.py", line 80, in _handle_coordinator_update relay_data = self.coordinator.api.relays[self.data["relay"] - 1]
IndexError: list index out of range
What is your update interval?
120 seconds
hmm.... working fine here.
Looks like you don't get the correnct response from the hydrawise server.
maybe its the problem which dknowles2 discribed above. That the actual integration doesn't reconnect if there is an issue. Do you have more than one controller? As I remember correctly the integration is only working with one active controller.
As soon they review and merge the config flow pull request, dknowles2 will start the work to switch to the new api which should fix the most issues.
Same index issue with both 2023.6.2 & 2023.6.3
Logger: homeassistant Source: components/hydrawise/binary_sensor.py:95 First occurred: 8:41:17 AM (3 occurrences) Last logged: 8:45:17 AM
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 229, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 374, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/components/hydrawise/binary_sensor.py", line 95, in _handle_coordinator_update relay_data = self.coordinator.api.relays[self.data["relay"] - 1] ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: list index out of range
Logger: homeassistant.components.hydrawise Source: helpers/update_coordinator.py:229 Integration: Hunter Hydrawise (documentation, issues) First occurred: 11:26:07 (1 occurrences) Last logged: 11:26:07
Error fetching hydrawise data: Failed to refresh Hydrawise data
hydrawise: access_token: abc scan_interval: 120 binary_sensor:
Hydrawise Binary Sensor - Status (Cloud)
- platform: hydrawise
switch:
#Irrigation
- platform: hydrawise
watering_minutes: 60
monitored_conditions: manual_watering
An example that enables only the manual control switches.
switch:
- platform: hydrawise monitored_conditions: manual_watering
Example configuration.yaml entry
sensor:
- platform: hydrawise Not run :(
Same index issue with both 2023.6.2 & 2023.6.3
Logger: homeassistant Source: components/hydrawise/binary_sensor.py:95 First occurred: 8:41:17 AM (3 occurrences) Last logged: 8:45:17 AM
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 229, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 374, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/components/hydrawise/binary_sensor.py", line 95, in _handle_coordinator_update relay_data = self.coordinator.api.relays[self.data["relay"] - 1] ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: list index out of range
As it turns out my issue was not related to the recent updates. I had assumed they were related to this thread but since I just added the integration my issue does not seem to be related.
My index out of range issue was because I have a 12 zone Hyrawise and I had defined zones 1-3, zones 4-7 are connected but for future use and I did not add the zones to the cloud but I did have zone 8 that was defined. I believe skipping those zones caused the integration to fail once I defined those zones and restarted HA I no longer get the index out of range error.
I ran into this recently. Double check your api key. It's either copy/pasted incorrectly or you're being throttled by the backend.
I'm (slowly) working on migrating the integration to the new API which is much more reliable. Hoping to land all the changes by the 2023.8.0 release at the latest.
Hey does this mean the August release? Thanks for the work with this, really looking forward to the update.
Unfortunately not.
The Prelimenary PR is still open:
https://github.com/home-assistant/core/pull/95589
As soon this is merged dknowles2 could start the work to move to the new api, but the aproval process took time.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.