Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hydrawise binary sensors and switches not available after 2022.12 update #83540

Closed
robertboccia opened this issue Dec 8, 2022 · 17 comments · Fixed by #85398
Closed

hydrawise binary sensors and switches not available after 2022.12 update #83540

robertboccia opened this issue Dec 8, 2022 · 17 comments · Fixed by #85398

Comments

@robertboccia
Copy link

The problem

hydrawise binary sensors and switches not available after 2022.12 update

What version of Home Assistant Core has the issue?

2022.12

What was the last working version of Home Assistant Core?

2022.11.5

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

Logger: homeassistant.components.binary_sensor
Source: components/hydrawise/init.py:96
Integration: Binary sensor (documentation, issues)
First occurred: 1:12:20 PM (1 occurrences)
Last logged: 1:12:20 PM

Error while setting up hydrawise platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, 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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.binary_sensor
Source: components/hydrawise/__init__.py:96
Integration: Binary sensor (documentation, issues)
First occurred: 1:12:20 PM (1 occurrences)
Last logged: 1:12:20 PM

Error while setting up hydrawise platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, 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

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Dec 8, 2022

Hey there @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 Change the title of 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)

@philipp-frank
Copy link

Same problem here.

@robertboccia
Copy link
Author

Any update? I see I'm not alone in having this issue

@acronce
Copy link

acronce commented Dec 11, 2022

I just updated HA and am seeing the same problem. First the Watchman told me about problems with all of my irrigation switches, then I found the same log entry error.

@N3rdix
Copy link
Contributor

N3rdix commented Dec 12, 2022

Issue has also been reported in the hydrawiser library directly: ptcryan/hydrawiser#12

@txwindsurfer
Copy link

txwindsurfer commented Dec 12, 2022

I believe this error as reported in #77087 and #83567 is because the integration is not initializing. The failure to initialize is the reason the binary_sensor is returning a str (blank). The integration isn't catching the failure to initialize with that Hydrawise api. I have tested an HA instance running 2022.8.7 and it also reports this error, so my guess is that it is only a coincidence that the integration isn't initializing after a 2022.12 update caused a reboot. I can change the api key and occasionally the integration will initialize. I can change the scan_interval number and occasionally the integration will initialize. I feel pretty sure it is a problem with the Hydrawise API that started about a week ago. Personally, I have ordered Open Sprinkler and will integrate it into my HA. The code owner for the Hydrawiser integration has been AWOL for quite some time and I hate relying on cloud integrations anyway. This is an excuse to switch to Open Sprinkler.

@assafms
Copy link

assafms commented Dec 12, 2022

I am not sure this is connected , but Hydrawise has added a limit to the amount of calls to the endpoints. if you call some of them more than 5 times in 5 minutes you get this :
"Exceeded maximum number of requests. You cannot make more than 5 requests in any 5 minute period to this endpoint."

when I remove the integration , wait for 5 min and then add it again (with the same API key) everything works again until the next time I restart .

@slurpyb
Copy link

slurpyb commented Dec 15, 2022

I only just started using this integration and after being disappointed with its output I created the sensors from scratch with the rest platform and was surprised to find all the data you would expect to get from Hydrawise. Something must of changed but it's definitely fixable! Rate limiting was 30 seconds on statusschedule.php and "5 times per 5 minutes" for customerdetails.php (but i think its actually longer). If anyone wants to get the sensors running now my config is here: https://gist.github.com/slurpyb/e61ed4d3f910fb2bb090a7f253093a36

@ptcryan
Copy link
Contributor

ptcryan commented Dec 15, 2022 via email

@txwindsurfer
Copy link

@ptcryan Good to hear from you. I have also left Hydrawise for the reasons previously mentioned and am very happily using an Open Sprinkler setup. That said, I am left with a test Hydrawise unit that is up and running but not connected to any valves. I would be more than happy to provide the key to the test unit in order to support the hyrawiser code. Let me know if this is of interest.

@robertboccia
Copy link
Author

Hi there has there been any further update to this issue?

@wewerk
Copy link

wewerk commented Jan 4, 2023

Hydrawise API now allows max. 5 calls within 5 minutes.
Set :

scan_interval: 60

and it will work.

@robertboccia
Copy link
Author

Hydrawise API now allows max. 5 calls within 5 minutes. Set :

scan_interval: 60

and it will work.

do i put this in the config.yaml file under the binary sensor
binary_sensor:
- platform: hydrawise
-scan_interval:60

?

@robertboccia
Copy link
Author

seems to be ok now after applying, will monitor

thanks

@wewerk
Copy link

wewerk commented Jan 5, 2023

You are happy man that you can use watering system at your place in January. Mine is in idle as the temperatures here are below freezing point.
Greetings to South Africa :-)

@mobilutz
Copy link
Contributor

mobilutz commented Jan 7, 2023

Thanks @wewerk for the idea to increase the scan_interval.
Lets increase the default as well: #85398

@greggo74
Copy link

greggo74 commented Jan 8, 2023

As identified here, I've increased the scan interval to 60 sec and I'm now getting a connection and sensor data, however I'm not getting ALL of my zones, only 2 out of the 4. I'm only getting zones 1 & 3, but not 4. (I removed zone 2 previously).
I actually don't think I've been getting the missing zone for a little while - I haven't been using HA for watering yet - so I'm not sure it's related.

MartinHjelmare pushed a commit that referenced this issue Jan 8, 2023
Increasing default scan interval

Fixes #83540
balloob pushed a commit that referenced this issue Jan 9, 2023
Increasing default scan interval

Fixes #83540
tronikos pushed a commit to tronikos/home-assistant-core that referenced this issue Jan 9, 2023
rlippmann pushed a commit to rlippmann/core that referenced this issue Jan 18, 2023
SplinterHead pushed a commit to SplinterHead/core that referenced this issue Jan 18, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.