core: Rachio Component Errors

0.90.0

0.89.2

HA 0.90.0 HassOS 2.10 Hass.io supervisor 150

Component/platform:

https://www.home-assistant.io/components/rachio/

Description of problem: New errors appearing in home-assistant.log since upddate to 0.90.0.

2019-03-21 09:47:32 ERROR (SyncWorker_7) [homeassistant.components.rachio.binary_sensor] Exception in _handle_any_update when dispatching 'rachio_update_controller': ({'routingId': '70687fef-bbf2-4858-a478-7bc41fdda785', 'mqttTimestamp': 1553183251847, 'wakeReason': 'mqtt_read', 'icon': 'DEVICE', 'externalId': 'homeassistant.rachio:36106f5086d01d3924dd1f52baec74c67dbb03b9bc92fe5bf29e0597168c9428', 'type': 'DEVICE_STATUS', 'deviceId': '70687fef-bbf2-4858-a478-7bc41fdda785', 'network': {'gw': '192.168.3.1', 'rssi': -63, 'dns2': '8.8.8.8', 'dns1': '192.168.3.1', 'ip': '192.168.3.123', 'band': '2.4', 'ssid': 'kelley', 'nm': '255.255.255.0'}, 'sequence': 370, 'pin': 'cbec49e4', 'subType': 'ONLINE', 'id': 'b30068cb-49e9-3d23-a858-40b65a3709e1', 'connectId': 3, 'category': 'DEVICE', 'status': 'reconnect', 'timestamp': '2019-03-21T15:47:29Z'},)
2019-03-21 09:47:32 ERROR (SyncWorker_4) [homeassistant.components.rachio.switch] Exception in _handle_any_update when dispatching 'rachio_update_controller': ({'routingId': '70687fef-bbf2-4858-a478-7bc41fdda785', 'mqttTimestamp': 1553183251847, 'wakeReason': 'mqtt_read', 'icon': 'DEVICE', 'externalId': 'homeassistant.rachio:36106f5086d01d3924dd1f52baec74c67dbb03b9bc92fe5bf29e0597168c9428', 'type': 'DEVICE_STATUS', 'deviceId': '70687fef-bbf2-4858-a478-7bc41fdda785', 'network': {'gw': '192.168.3.1', 'rssi': -63, 'dns2': '8.8.8.8', 'dns1': '192.168.3.1', 'ip': '192.168.3.123', 'band': '2.4', 'ssid': 'kelley', 'nm': '255.255.255.0'}, 'sequence': 370, 'pin': 'cbec49e4', 'subType': 'ONLINE', 'id': 'b30068cb-49e9-3d23-a858-40b65a3709e1', 'connectId': 3, 'category': 'DEVICE', 'status': 'reconnect', 'timestamp': '2019-03-21T15:47:29Z'},)

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

rachio:
  api_key: !secret rachio_api_key
  manual_run_mins: 20

Traceback (if applicable):

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/rachio/binary_sensor.py", line 69, in _handle_any_update
    self._handle_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/rachio/binary_sensor.py", line 126, in _handle_update
    if args[0][KEY_SUBTYPE] == SUBTYPE_ONLINE:
IndexError: tuple index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/rachio/switch.py", line 97, in _handle_any_update
    self._handle_update(args, kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/rachio/switch.py", line 140, in _handle_update
    if args[0][KEY_SUBTYPE] == SUBTYPE_SLEEP_MODE_ON:
TypeError: tuple indices must be integers or slices, not str

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 37 (14 by maintainers)

Most upvoted comments

You need to setup your external web address and port number, after setting up port forwarding on your router. If not, Rachio cannot find your Home Assistant installation and use webhooks to update status, start zones, etc.

If you check the API with curl as stated in here (you have to find your device ID first)…:

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer 8e600a4c-0027-4a9a-9bda-dc8d5c90350d" https://api.rach.io/1/public/notification/2a5e7d3c-c140-4e2e-91a1-a212a518adc5/webhook

Rachio API will return the Home Assistant address that is trying to reach:

 "id": "7c5e7d3c-c140-4e2e-91a1-a212a518aed1",
 "url": "https://www.mydomain.com/another_webhook",

And it defaults to http://hassio.local, which is obviously not reachable from outside your LAN. You have to make sure you HA instance is reachable from outside of your LAN because Rachio API will update status, turn on zones etc through web hooks at http://your.dns.address:XXXX/api/rachio

So to anybody using this component, you have to add

hass_url_override: "http://your.dns.address:XXXX"

to your config, as (vaguely) suggested as optional in Rachio component page. XXXX is the outside port redirected to 8123 (it can also be 8123 - but not recommended). After that, Rachio component works like a charm.