home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.11k stars 30.18k forks source link

Hydrawise broken since 105.5 #32049

Closed franmiele closed 4 years ago

franmiele commented 4 years ago

The problem

After upgrading to 105.5 all my HYDRAwise entities cannot be found.

Environment

Home Assistant 0.105.5 Frontend version: 20200130.3 - latest

sensor:
   - platform: hydrawise
     monitored_conditions:
         - watering_time
         - next_cycle

switch:
   - platform: hydrawise
     monitored_conditions:
       - auto_watering
       - manual_watering

binary_sensor:     
- platform: hydrawise
      monitored_conditions:
        - is_watering
        - status

hydrawise:
    access_token: xxxxxxxxxxxxxxxxxxx

Traceback/Error logs

Unable to prepare setup for platform hydrawise.switch: Unable to set up component.
10:18 AM setup.py (ERROR)
Unable to prepare setup for platform hydrawise.sensor: Unable to set up component.
10:18 AM setup.py (ERROR)
Unable to prepare setup for platform hydrawise.binary_sensor: Unable to set up component.
10:18 AM setup.py (ERROR)
Error during setup of component hydrawise
10:18 AM components/hydrawise/__init__.py (ERROR)

Additional information

configuration checker doesn't find any errors but I get a notification telling me there is an invalid config:

The following integrations and platforms could not be set up: hydrawise hydrawise.sensor hydrawise.binary_sensor hydrawise.switch wink

xeospeed commented 4 years ago

I'm having the same issue.

springstan commented 4 years ago

Could this be related to #31957?

springstan commented 4 years ago

Do you have any other logs/traceback in home-assistant.log that is related to this integration?

franmiele commented 4 years ago

I turned on the log to debug and restarted. Here is what is in the log:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/hydrawise/__init__.py", line 77, in setup
    hydrawise = Hydrawiser(user_token=access_token)
  File "/usr/local/lib/python3.7/site-packages/hydrawiser/core.py", line 42, in __init__
    self.update_controller_info()
  File "/usr/local/lib/python3.7/site-packages/hydrawiser/core.py", line 65, in update_controller_info
    self.user_id = self.controller_status['user_id']
KeyError: 'user_id'
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.ehct_06108_rain, old_state=None, new_state=<state binary_sensor.ehct_06108_rain=off; friendly_name=Rain, device_class=moisture @ 2020-02-21T10:12:05.392795-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [async_upnp_client.traffic] Received packet from ('192.168.5.120', 47277):
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=1800\r\nDATE: Fri, 21 Feb 2020 10:12:04 GMT\r\nEXT:\r\nX-User-Agent: redsonic\r\nLOCATION: http://192.168.5.120:1080/upnp_device_desc.xml\r\nSERVER: Linux, UPnP/1.0, Private Upnp SDK\r\nST: upnp:rootdevice\r\nUSN: uuid:www.dahuatech.com.device_3_0-3J060C4PAG00030::upnp:rootdevice\r\n\r\n'
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)

Please check your config., notification_id=invalid_config>
2020-02-21 10:12:05 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform hydrawise.binary_sensor: Unable to set up component.
2020-02-21 10:12:05 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform hydrawise.sensor: Unable to set up component.
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.un60d7000_un60d7000, old_state=None, new_state=<state media_player.un60d7000_un60d7000=unknown; source_list=['TV', 'HDMI'], is_volume_muted=False, friendly_name=Family Room Samsung TV, supported_features=20281, device_class=tv @ 2020-02-21T10:12:05.408518-05:00>>
2020-02-21 10:12:05 INFO (MainThread) [homeassistant.components.camera] Setting up camera.bloomsky
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.components.person.storage_collection] added 8bbff82d3a714f2b8baf61a3f0531d47: {'device_trackers': ['device_tracker.lum_2586392f_6979_4b69_a8be_b22992d7990d_2'], 'id': '8bbff82d3a714f2b8baf61a3f0531d47', 'name': 'Lucille Miele', 'user_id': '15bffd888f7c4f3ab80302004f4f1228'}
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.components.input_boolean.yaml_collection] added wife_present: {'id': 'wife_present', 'name': 'Wife', 'icon': 'mdi:account'}
2020-02-21 10:12:05 DEBUG (MainThread) [async_upnp_client.traffic] Received packet from ('192.168.5.120', 47277):
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=1800\r\nDATE: Fri, 21 Feb 2020 10:12:04 GMT\r\nEXT:\r\nX-User-Agent: redsonic\r\nLOCATION: http://192.168.5.120:1080/upnp_device_desc.xml\r\nSERVER: Linux, UPnP/1.0, Private Upnp SDK\r\nST: uuid:www.dahuatech.com.device_3_0-3J060C4PAG00030\r\nUSN: uuid:www.dahuatech.com.device_3_0-3J060C4PAG00030\r\n\r\n'
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)

Please check your config. @ 2020-02-21T10:12:05.419144-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event persistent_notifications_updated[L]>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)
 - hydrawise.binary_sensor

Please check your config., notification_id=invalid_config>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)
 - hydrawise.binary_sensor
 - hydrawise.sensor

Please check your config., notification_id=invalid_config>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=group.computer_room, old_state=None, new_state=<state group.computer_room=unknown; entity_id=('switch.computer_room', 'switch.dummy', 'switch.quirky_outlet_1', 'switch.quirky_outlet_2', 'switch.siren', 'switch.spare'), order=4, friendly_name=Computer Room @ 2020-02-21T10:12:05.430484-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.yr_symbol, old_state=None, new_state=<state sensor.yr_symbol=unknown; attribution=Weather forecast from met.no, delivered by the Norwegian Meteorological Institute., friendly_name=yr Symbol, entity_picture=https://api.met.no/weatherapi/weathericon/1.1/?symbol=None;content_type=image/png @ 2020-02-21T10:12:05.433501-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.date, old_state=None, new_state=<state sensor.date=2020-02-21; friendly_name=Date, icon=mdi:calendar @ 2020-02-21T10:12:05.435660-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.date_time, old_state=None, new_state=<state sensor.date_time=2020-02-21, 10:12; friendly_name=Date & Time, icon=mdi:calendar-clock @ 2020-02-21T10:12:05.437562-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.date_time_iso, old_state=None, new_state=<state sensor.date_time_iso=2020-02-21T10:12:00; friendly_name=Date & Time (ISO), icon=mdi:calendar-clock @ 2020-02-21T10:12:05.439721-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.time_date, old_state=None, new_state=<state sensor.time_date=10:12, 2020-02-21; friendly_name=Time & Date, icon=mdi:calendar-clock @ 2020-02-21T10:12:05.443276-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.time_utc, old_state=None, new_state=<state sensor.time_utc=15:12; friendly_name=Time (UTC), icon=mdi:clock @ 2020-02-21T10:12:05.445199-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.internet_time, old_state=None, new_state=<state sensor.internet_time=@675; friendly_name=Internet Time, icon=mdi:clock @ 2020-02-21T10:12:05.447646-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.time, old_state=None, new_state=<state sensor.time=10:12; friendly_name=Time, icon=mdi:clock @ 2020-02-21T10:12:05.449490-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.simple_time_date, old_state=None, new_state=<state sensor.simple_time_date=unknown; friendly_name=Todays Date @ 2020-02-21T10:12:05.451132-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.simple_time, old_state=None, new_state=<state sensor.simple_time=unknown; friendly_name=Current Time @ 2020-02-21T10:12:05.452809-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [async_upnp_client.traffic] Received packet from ('192.168.5.120', 47277):
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=1800\r\nDATE: Fri, 21 Feb 2020 10:12:04 GMT\r\nEXT:\r\nX-User-Agent: redsonic\r\nLOCATION: http://192.168.5.120:1080/upnp_device_desc.xml\r\nSERVER: Linux, UPnP/1.0, Private Upnp SDK\r\nST: urn:schemas-upnp-org:device:3.0-3J060C4PAG00030\r\nUSN: uuid:www.dahuatech.com.device_3_0-3J060C4PAG00030::urn:schemas-upnp-org:device:3.0-3J060C4PAG00030\r\n\r\n'
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)

Please check your config. @ 2020-02-21T10:12:05.419144-05:00>, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)
 - hydrawise.binary_sensor

Please check your config. @ 2020-02-21T10:12:05.419144-05:00>>
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event persistent_notifications_updated[L]>
2020-02-21 10:12:05 DEBUG (SyncWorker_10) [homeassistant.util.json] JSON file not found: /config/.storage/input_select
2020-02-21 10:12:05 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)
 - hydrawise.binary_sensor

Please check your config. @ 2020-02-21T10:12:05.419144-05:00>, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following integrations and platforms could not be set up:

 - [hydrawise](https://www.home-assistant.io/integrations/hydrawise)
 - hydrawise.binary_sensor
 - hydrawise.sensor

Please check your config. @ 2020-02-21T10:12:05.419144-05:00>>
springstan commented 4 years ago

@franmiele have you checked that your configuration is valid? Because there are a lot of logs mentioning an invalid configuration.

franmiele commented 4 years ago

Yes, it comes back VALID

Nick-Adams-AU commented 4 years ago

This is a dupe of https://github.com/home-assistant/home-assistant/issues/31957

Hydrawise have confirmed they changed their API without notification. An upstream bug with the library has been raised to resolve the issue.

springstan commented 4 years ago

Duplicate of #31957