gurumitts / pylutron-caseta

Apache License 2.0
153 stars 97 forks source link

Got exception from unsolicited message handler #71

Closed thetic closed 3 years ago

thetic commented 3 years ago

I've started seeing these errors pretty frequently in Home Assistant (version 2021.1.5). The only resolution is to restart Home Assistant until it works again.

Logger: homeassistant.config_entries Source: components/lutroncaseta/__init_\.py:75 First occurred: 11:49:04 AM (1 occurrences) Last logged: 11:49:04 AM Error setting up entry Caséta bridge for lutron_caseta

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/lutron_caseta/__init__.py", line 75, in async_setup_entry
    await bridge.connect()
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 100, in connect
    await self._login_completed
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 511, in _login
    await self._load_devices()
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 552, in _load_devices
    device_json = await self._request("ReadRequest", "/device")
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 233, in _request
    response = await asyncio.wait_for(
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
    raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

Logger: pylutron_caseta.leap Source: /usr/local/lib/python3.8/site-packages/pylutron_caseta/leap.py:112 First occurred: 11:54:25 AM (1 occurrences) Last logged: 11:54:25 AM Got exception from unsolicited message handler

Traceback (most recent call last):

  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/leap.py", line 110, in run
    handler(obj)
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 506, in _handle_unsolicited
    self._handle_one_zone_status(response)
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 470, in _handle_one_zone_status
    device = self.get_device_by_zone_id(zone)
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 181, in get_device_by_zone_id
    raise KeyError(f"No device associated with zone {zone_id}")
KeyError: 'No device associated with zone 16'
thetic commented 3 years ago

An error in leap.py occurs before the setup error.

2021-01-24 13:38:13 ERROR (MainThread) [pylutron_caseta.leap] Was not expecting message with tag d0952f07-5332-481e-9b36-1f12efae6471: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'MultipleDeviceDefinition', 'StatusCode': '200 OK', 'Url': '/device'}, 'Body': {'Devices': [{'href': '/device/1', 'Name': 'Smart Bridge 2', 'FullyQualifiedName': ['Smart Bridge 2'], 'Parent': {'href': '/project'}, 'SerialNumber': 53353916, 'ModelNumber': 'L-BDG2-WH', 'DeviceType': 'SmartBridge', 'RepeaterProperties': {'IsRepeater': True}, 'OwnedLinks': [{'href': '/link/1', 'LinkType': 'RF'}], 'LinkNodes': [{'href': '/device/1/linknode/1'}], 'DeviceRules': [{'href': '/devicerule/40'}], 'FirmwareImage': {'Firmware': {'DisplayName': '08.04.04f000'}, 'Installed': {'Year': 2020, 'Month': 12, 'Day': 19, 'Hour': 12, 'Minute': 13, 'Second': 13, 'Utc': '-8:00:00'}}}, {'href': '/device/2', 'Name': 'Lights', 'FullyQualifiedName': ['Living Room', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51303254, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/1'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/2/linknode/2'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/3', 'Name': 'Sconces', 'FullyQualifiedName': ['Living Room', 'Sconces'], 'Parent': {'href': '/project'}, 'SerialNumber': 51303253, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/2'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/3/linknode/3'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/4', 'Name': 'Lights', 'FullyQualifiedName': ['Downstairs Hallway', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51303256, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/3'}], 'AssociatedArea': {'href': '/area/3'}, 'LinkNodes': [{'href': '/device/4/linknode/4'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/5', 'Name': 'Pico', 'FullyQualifiedName': ['Downstairs Hallway', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 47775294, 'ModelNumber': 'PJ2-3BRL-GXX-X01', 'DeviceType': 'Pico3ButtonRaiseLower', 'ButtonGroups': [{'href': '/buttongroup/2'}], 'AssociatedArea': {'href': '/area/3'}, 'LinkNodes': [{'href': '/device/5/linknode/5'}], 'DeviceRules': [{'href': '/devicerule/25'}]}, {'href': '/device/6', 'Name': 'Fan', 'FullyQualifiedName': ['Living Room', 'Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 37416217, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/4'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/6/linknode/6'}], 'DeviceRules': [{'href': '/devicerule/110'}]}, {'href': '/device/7', 'Name': 'Lights', 'FullyQualifiedName': ['Dining Room', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51982448, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/5'}], 'AssociatedArea': {'href': '/area/4'}, 'LinkNodes': [{'href': '/device/7/linknode/7'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/8', 'Name': 'Fan', 'FullyQualifiedName': ['Master Bedroom', 'Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 37174422, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/6'}], 'AssociatedArea': {'href': '/area/5'}, 'LinkNodes': [{'href': '/device/8/linknode/8'}], 'DeviceRules': [{'href': '/devicerule/110'}]}, {'href': '/device/9', 'Name': 'Lights', 'FullyQualifiedName': ['Master Bedroom', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51982424, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/7'}], 'AssociatedArea': {'href': '/area/5'}, 'LinkNodes': [{'href': '/device/9/linknode/9'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/10', 'Name': 'Doorway', 'FullyQualifiedName': ['Master Bedroom', 'Doorway'], 'Parent': {'href': '/project'}, 'SerialNumber': 51982353, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/8'}], 'AssociatedArea': {'href': '/area/5'}, 'LinkNodes': [{'href': '/device/10/linknode/10'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/11', 'Name': 'Back Porch Lights', 'FullyQualifiedName': ['Exterior', 'Back Porch Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51310903, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/9'}], 'AssociatedArea': {'href': '/area/6'}, 'LinkNodes': [{'href': '/device/11/linknode/11'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/12', 'Name': 'Overhead Light', 'FullyQualifiedName': ['Front Porch', 'Overhead Light'], 'Parent': {'href': '/project'}, 'SerialNumber': 51310923, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/10'}], 'AssociatedArea': {'href': '/area/7'}, 'LinkNodes': [{'href': '/device/12/linknode/12'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/13', 'Name': 'Pico', 'FullyQualifiedName': ['Front Porch', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 43596270, 'ModelNumber': 'PJ2-2B-GXX-X01', 'DeviceType': 'Pico2Button', 'ButtonGroups': [{'href': '/buttongroup/3'}], 'AssociatedArea': {'href': '/area/7'}, 'LinkNodes': [{'href': '/device/13/linknode/13'}], 'DeviceRules': [{'href': '/devicerule/22'}]}, {'href': '/device/14', 'Name': 'Main Lights', 'FullyQualifiedName': ['Upstairs Hallway', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57139614, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/11'}], 'AssociatedArea': {'href': '/area/8'}, 'LinkNodes': [{'href': '/device/14/linknode/14'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/15', 'Name': 'Main Lights', 'FullyQualifiedName': ['Stairs', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57139615, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/12'}], 'AssociatedArea': {'href': '/area/9'}, 'LinkNodes': [{'href': '/device/15/linknode/15'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/16', 'Name': 'Pico', 'FullyQualifiedName': ['Upstairs Hallway', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 48268579, 'ModelNumber': 'PJ2-3BRL-GXX-X01', 'DeviceType': 'Pico3ButtonRaiseLower', 'ButtonGroups': [{'href': '/buttongroup/4'}], 'AssociatedArea': {'href': '/area/8'}, 'LinkNodes': [{'href': '/device/16/linknode/16'}], 'DeviceRules': [{'href': '/devicerule/25'}]}, {'href': '/device/17', 'Name': 'Pico', 'FullyQualifiedName': ['Stairs', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 48268627, 'ModelNumber': 'PJ2-3BRL-GXX-X01', 'DeviceType': 'Pico3ButtonRaiseLower', 'ButtonGroups': [{'href': '/buttongroup/5'}], 'AssociatedArea': {'href': '/area/9'}, 'LinkNodes': [{'href': '/device/17/linknode/17'}], 'DeviceRules': [{'href': '/devicerule/25'}]}, {'href': '/device/18', 'Name': 'Main Lights', 'FullyQualifiedName': ['Laundry Room', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51310911, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/13'}], 'AssociatedArea': {'href': '/area/10'}, 'LinkNodes': [{'href': '/device/18/linknode/18'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/19', 'Name': 'Main Lights', 'FullyQualifiedName': ['Bedroom Closet', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51293636, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/14'}], 'AssociatedArea': {'href': '/area/11'}, 'LinkNodes': [{'href': '/device/19/linknode/19'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/20', 'Name': 'Chandelier', 'FullyQualifiedName': ['Powder Room', 'Chandelier'], 'Parent': {'href': '/project'}, 'SerialNumber': 51311303, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/15'}], 'AssociatedArea': {'href': '/area/12'}, 'LinkNodes': [{'href': '/device/20/linknode/20'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/21', 'Name': 'Vanity Lights', 'FullyQualifiedName': ['Master Bathroom', 'Vanity Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57297276, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/16'}], 'AssociatedArea': {'href': '/area/13'}, 'LinkNodes': [{'href': '/device/21/linknode/21'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/22', 'Name': 'Vanity Lights', 'FullyQualifiedName': ['Guest Bathroom', 'Vanity Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504434, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/17'}], 'AssociatedArea': {'href': '/area/14'}, 'LinkNodes': [{'href': '/device/22/linknode/22'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/23', 'Name': 'Main Lights', 'FullyQualifiedName': ['Kitchen', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504440, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/18'}], 'AssociatedArea': {'href': '/area/15'}, 'LinkNodes': [{'href': '/device/23/linknode/23'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/24', 'Name': 'Ceiling Fan Light', 'FullyQualifiedName': ['Guest Room', 'Ceiling Fan Light'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504806, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/19'}], 'AssociatedArea': {'href': '/area/16'}, 'LinkNodes': [{'href': '/device/24/linknode/24'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/25', 'Name': 'Ceiling Fan', 'FullyQualifiedName': ['Guest Room', 'Ceiling Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 38052216, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/20'}], 'AssociatedArea': {'href': '/area/16'}, 'LinkNodes': [{'href': '/device/25/linknode/25'}], 'DeviceRules': [{'href': '/devicerule/110'}]}, {'href': '/device/26', 'Name': 'Main Lights', 'FullyQualifiedName': ['Office', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504327, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/21'}], 'AssociatedArea': {'href': '/area/17'}, 'LinkNodes': [{'href': '/device/26/linknode/26'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/27', 'Name': 'Ceiling Fan', 'FullyQualifiedName': ['Office', 'Ceiling Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 38052205, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/22'}], 'AssociatedArea': {'href': '/area/17'}, 'LinkNodes': [{'href': '/device/27/linknode/27'}], 'DeviceRules': [{'href': '/devicerule/110'}]}]}}
2021-01-24 13:38:16 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Caséta bridge for lutron_caseta
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/lutron_caseta/__init__.py", line 75, in async_setup_entry
await bridge.connect()
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 100, in connect
await self._login_completed
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 511, in _login
await self._load_devices()
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 552, in _load_devices
device_json = await self._request("ReadRequest", "/device")
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 233, in _request
response = await asyncio.wait_for(
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
bdraco commented 3 years ago

potentially related: https://github.com/gurumitts/pylutron-caseta/issues/60

mdonoughe commented 3 years ago

Can you enable logging for pylutron_caseta.leap? What kind of hardware are you running Home Assistant on?

The theory on bridge communication is basically you send a question and a unique identifier that the bridge should send when answering that question. During startup, pylutron_caseta asks the bridge for a list of devices, and in your log the bridge does not answer, or rather it answers but it is answering a previous or different question? If you have the pylutron_caseta.leap logging enabled you should be seeing both sides of the conversation.

jkfranks9 commented 3 years ago

I've been seeing these errors also quite frequently. I'm running on a raspberry pi 3 B with Home Assistant version 2021.1.5. I've enabled debugging and see "Was not expecting message with tag" on the response from asking for scenes. The timeout error then follows.

2021-01-25 10:01:17 INFO (MainThread) [homeassistant.setup] Setting up lutron_caseta
2021-01-25 10:01:17 INFO (MainThread) [homeassistant.setup] Setup of domain lutron_caseta took 0.0 seconds
2021-01-25 10:01:20 DEBUG (MainThread) [pylutron_caseta.smartbridge] Connecting to Smart Bridge via SSL
2021-01-25 10:01:25 DEBUG (MainThread) [pylutron_caseta.smartbridge] Successfully connected to Smart Bridge.
2021-01-25 10:01:25 DEBUG (MainThread) [pylutron_caseta.leap] Received message with no tag: {'CommuniqueType': 'SubscribeResponse', 'Header': {'StatusCode': '204 NoContent', 'Url': '/device/status/deviceheard'}}
2021-01-25 10:01:25 DEBUG (MainThread) [pylutron_caseta.leap] Received message with no tag: {'CommuniqueType': 'SubscribeResponse', 'Header': {'StatusCode': '204 NoContent', 'Url': '/zone/status/deprecated/level'}}
2021-01-25 10:01:25 DEBUG (MainThread) [pylutron_caseta.smartbridge] Loading devices
2021-01-25 10:01:27 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "a33d3dfc-4757-4c79-aba7-96efb0aa217c", "Url": "/device"}}'
2021-01-25 10:01:27 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'MultipleDeviceDefinition', 'StatusCode': '200 OK', 'Url': '/device'}, 'Body': {'Devices': [{'href': '/device/1', 'Name': 'Smart Bridge 2', 'FullyQualifiedName': ['Smart Bridge 2'], 'Parent': {'href': '/project'}, 'SerialNumber': 32009350, 'ModelNumber': 'L-BDG2-WH', 'DeviceType': 'SmartBridge', 'RepeaterProperties': {'IsRepeater': True}, 'OwnedLinks': [{'href': '/link/1', 'LinkType': 'RF'}], 'LinkNodes': [{'href': '/device/1/linknode/1'}], 'DeviceRules': [{'href': '/devicerule/40'}], 'FirmwareImage': {'Firmware': {'DisplayName': '08.04.04f000'}, 'Installed': {'Year': 2020, 'Month': 12, 'Day': 16, 'Hour': 18, 'Minute': 37, 'Second': 22, 'Utc': '-5:00:00'}}}, {'href': '/device/2', 'Name': 'Ceiling', 'FullyQualifiedName': ['Theater', 'Ceiling'], 'Parent': {'href': '/project'}, 'SerialNumber': 34824135, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/1'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/2/linknode/2'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/3', 'Name': 'Sconces', 'FullyQualifiedName': ['Theater', 'Sconces'], 'Parent': {'href': '/project'}, 'SerialNumber': 34790353, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/2'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/3/linknode/3'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/4', 'Name': 'Lights', 'FullyQualifiedName': ['Upstairs Hallway', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 38440678, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/3'}], 'AssociatedArea': {'href': '/area/3'}, 'LinkNodes': [{'href': '/device/4/linknode/4'}], 'DeviceRules': [{'href': '/devicerule/44'}]}]}}
2021-01-25 10:01:39 DEBUG (MainThread) [pylutron_caseta.smartbridge] {'href': '/device/1', 'Name': 'Smart Bridge 2', 'FullyQualifiedName': ['Smart Bridge 2'], 'Parent': {'href': '/project'}, 'SerialNumber': 32009350, 'ModelNumber': 'L-BDG2-WH', 'DeviceType': 'SmartBridge', 'RepeaterProperties': {'IsRepeater': True}, 'OwnedLinks': [{'href': '/link/1', 'LinkType': 'RF'}], 'LinkNodes': [{'href': '/device/1/linknode/1'}], 'DeviceRules': [{'href': '/devicerule/40'}], 'FirmwareImage': {'Firmware': {'DisplayName': '08.04.04f000'}, 'Installed': {'Year': 2020, 'Month': 12, 'Day': 16, 'Hour': 18, 'Minute': 37, 'Second': 22, 'Utc': '-5:00:00'}}}
2021-01-25 10:01:39 DEBUG (MainThread) [pylutron_caseta.smartbridge] {'href': '/device/2', 'Name': 'Ceiling', 'FullyQualifiedName': ['Theater', 'Ceiling'], 'Parent': {'href': '/project'}, 'SerialNumber': 34824135, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/1'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/2/linknode/2'}], 'DeviceRules': [{'href': '/devicerule/27'}]}
2021-01-25 10:01:39 DEBUG (MainThread) [pylutron_caseta.smartbridge] {'href': '/device/3', 'Name': 'Sconces', 'FullyQualifiedName': ['Theater', 'Sconces'], 'Parent': {'href': '/project'}, 'SerialNumber': 34790353, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/2'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/3/linknode/3'}], 'DeviceRules': [{'href': '/devicerule/27'}]}
2021-01-25 10:01:39 DEBUG (MainThread) [pylutron_caseta.smartbridge] {'href': '/device/4', 'Name': 'Lights', 'FullyQualifiedName': ['Upstairs Hallway', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 38440678, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/3'}], 'AssociatedArea': {'href': '/area/3'}, 'LinkNodes': [{'href': '/device/4/linknode/4'}], 'DeviceRules': [{'href': '/devicerule/44'}]}
2021-01-25 10:01:39 DEBUG (MainThread) [pylutron_caseta.smartbridge] Loading scenes from the Smart Bridge
2021-01-25 10:01:56 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "1ffc97be-15cb-4d40-bf3e-af9442469d98", "Url": "/virtualbutton"}}'
2021-01-25 10:01:57 ERROR (MainThread) [pylutron_caseta.leap] Was not expecting message with tag 1ffc97be-15cb-4d40-bf3e-af9442469d98: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'MultipleVirtualButtonDefinition', 'StatusCode': '200 OK', 'Url': '/virtualbutton'}, 'Body': {'VirtualButtons': [{'href': '/virtualbutton/1', 'Name': 'Theater Dark', 'ButtonNumber': 0, 'ProgrammingModel': {'href': '/programmingmodel/2'}, 'Parent': {'href': '/project'}, 'IsProgrammed': True}, {'href': '/virtualbutton/2', 'Name': 'Theater Dim', 'ButtonNumber': 1, 'ProgrammingModel': {'href': '/programmingmodel/3'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/3', 'Name': 'Theater Bright', 'ButtonNumber': 2, 'ProgrammingModel': {'href': '/programmingmodel/4'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/4', 'Name': 'Leaving Home', 'ButtonNumber': 3, 'ProgrammingModel': {'href': '/programmingmodel/5'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/5', 'Name': 'Theater Idle', 'ButtonNumber': 4, 'ProgrammingModel': {'href': '/programmingmodel/6'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/6', 'Name': 'Arriving Home', 'ButtonNumber': 5, 'ProgrammingModel': {'href': '/programmingmodel/7'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/7', 'Name': 'Button 7', 'ButtonNumber': 6, 'ProgrammingModel': {'href': '/programmingmodel/8'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/8', 'Name': 'Button 8', 'ButtonNumber': 7, 'ProgrammingModel': {'href': '/programmingmodel/9'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/9', 'Name': 'Button 9', 'ButtonNumber': 8, 'ProgrammingModel': {'href': '/programmingmodel/10'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/10', 'Name': 'Button 10', 'ButtonNumber': 9, 'ProgrammingModel': {'href': '/programmingmodel/11'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/11', 'Name': 'Button 11', 'ButtonNumber': 10, 'ProgrammingModel': {'href': '/programmingmodel/12'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/12', 'Name': 'Button 12', 'ButtonNumber': 11, 'ProgrammingModel': {'href': '/programmingmodel/13'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/13', 'Name': 'Button 13', 'ButtonNumber': 12, 'ProgrammingModel': {'href': '/programmingmodel/14'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/14', 'Name': 'Button 14', 'ButtonNumber': 13, 'ProgrammingModel': {'href': '/programmingmodel/15'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/15', 'Name': 'Button 15', 'ButtonNumber': 14, 'ProgrammingModel': {'href': '/programmingmodel/16'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/16', 'Name': 'Button 16', 'ButtonNumber': 15, 'ProgrammingModel': {'href': '/programmingmodel/17'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/17', 'Name': 'Button 17', 'ButtonNumber': 16, 'ProgrammingModel': {'href': '/programmingmodel/18'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/18', 'Name': 'Button 18', 'ButtonNumber': 17, 'ProgrammingModel': {'href': '/programmingmodel/19'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/19', 'Name': 'Button 19', 'ButtonNumber': 18, 'ProgrammingModel': {'href': '/programmingmodel/20'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/20', 'Name': 'Button 20', 'ButtonNumber': 19, 'ProgrammingModel': {'href': '/programmingmodel/21'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/21', 'Name': 'Button 21', 'ButtonNumber': 20, 'ProgrammingModel': {'href': '/programmingmodel/22'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/22', 'Name': 'Button 22', 'ButtonNumber': 21, 'ProgrammingModel': {'href': '/programmingmodel/23'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/23', 'Name': 'Button 23', 'ButtonNumber': 22, 'ProgrammingModel': {'href': '/programmingmodel/24'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/24', 'Name': 'Button 24', 'ButtonNumber': 23, 'ProgrammingModel': {'href': '/programmingmodel/25'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/25', 'Name': 'Button 25', 'ButtonNumber': 24, 'ProgrammingModel': {'href': '/programmingmodel/26'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/26', 'Name': 'Button 26', 'ButtonNumber': 25, 'ProgrammingModel': {'href': '/programmingmodel/27'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/27', 'Name': 'Button 27', 'ButtonNumber': 26, 'ProgrammingModel': {'href': '/programmingmodel/28'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/28', 'Name': 'Button 28', 'ButtonNumber': 27, 'ProgrammingModel': {'href': '/programmingmodel/29'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/29', 'Name': 'Button 29', 'ButtonNumber': 28, 'ProgrammingModel': {'href': '/programmingmodel/30'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/30', 'Name': 'Button 30', 'ButtonNumber': 29, 'ProgrammingModel': {'href': '/programmingmodel/31'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/31', 'Name': 'Button 31', 'ButtonNumber': 30, 'ProgrammingModel': {'href': '/programmingmodel/32'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/32', 'Name': 'Button 32', 'ButtonNumber': 31, 'ProgrammingModel': {'href': '/programmingmodel/33'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/33', 'Name': 'Button 33', 'ButtonNumber': 32, 'ProgrammingModel': {'href': '/programmingmodel/34'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/34', 'Name': 'Button 34', 'ButtonNumber': 33, 'ProgrammingModel': {'href': '/programmingmodel/35'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/35', 'Name': 'Button 35', 'ButtonNumber': 34, 'ProgrammingModel': {'href': '/programmingmodel/36'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/36', 'Name': 'Button 36', 'ButtonNumber': 35, 'ProgrammingModel': {'href': '/programmingmodel/37'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/37', 'Name': 'Button 37', 'ButtonNumber': 36, 'ProgrammingModel': {'href': '/programmingmodel/38'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/38', 'Name': 'Button 38', 'ButtonNumber': 37, 'ProgrammingModel': {'href': '/programmingmodel/39'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/39', 'Name': 'Button 39', 'ButtonNumber': 38, 'ProgrammingModel': {'href': '/programmingmodel/40'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/40', 'Name': 'Button 40', 'ButtonNumber': 39, 'ProgrammingModel': {'href': '/programmingmodel/41'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/41', 'Name': 'Button 41', 'ButtonNumber': 40, 'ProgrammingModel': {'href': '/programmingmodel/42'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/42', 'Name': 'Button 42', 'ButtonNumber': 41, 'ProgrammingModel': {'href': '/programmingmodel/43'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/43', 'Name': 'Button 43', 'ButtonNumber': 42, 'ProgrammingModel': {'href': '/programmingmodel/44'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/44', 'Name': 'Button 44', 'ButtonNumber': 43, 'ProgrammingModel': {'href': '/programmingmodel/45'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/45', 'Name': 'Button 45', 'ButtonNumber': 44, 'ProgrammingModel': {'href': '/programmingmodel/46'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/46', 'Name': 'Button 46', 'ButtonNumber': 45, 'ProgrammingModel': {'href': '/programmingmodel/47'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/47', 'Name': 'Button 47', 'ButtonNumber': 46, 'ProgrammingModel': {'href': '/programmingmodel/48'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/48', 'Name': 'Button 48', 'ButtonNumber': 47, 'ProgrammingModel': {'href': '/programmingmodel/49'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/49', 'Name': 'Button 49', 'ButtonNumber': 48, 'ProgrammingModel': {'href': '/programmingmodel/50'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/50', 'Name': 'Button 50', 'ButtonNumber': 49, 'ProgrammingModel': {'href': '/programmingmodel/51'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/51', 'Name': 'Button 51', 'ButtonNumber': 50, 'ProgrammingModel': {'href': '/programmingmodel/52'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/52', 'Name': 'Button 52', 'ButtonNumber': 51, 'ProgrammingModel': {'href': '/programmingmodel/53'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/53', 'Name': 'Button 53', 'ButtonNumber': 52, 'ProgrammingModel': {'href': '/programmingmodel/54'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/54', 'Name': 'Button 54', 'ButtonNumber': 53, 'ProgrammingModel': {'href': '/programmingmodel/55'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/55', 'Name': 'Button 55', 'ButtonNumber': 54, 'ProgrammingModel': {'href': '/programmingmodel/56'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/56', 'Name': 'Button 56', 'ButtonNumber': 55, 'ProgrammingModel': {'href': '/programmingmodel/57'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/57', 'Name': 'Button 57', 'ButtonNumber': 56, 'ProgrammingModel': {'href': '/programmingmodel/58'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/58', 'Name': 'Button 58', 'ButtonNumber': 57, 'ProgrammingModel': {'href': '/programmingmodel/59'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/59', 'Name': 'Button 59', 'ButtonNumber': 58, 'ProgrammingModel': {'href': '/programmingmodel/60'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/60', 'Name': 'Button 60', 'ButtonNumber': 59, 'ProgrammingModel': {'href': '/programmingmodel/61'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/61', 'Name': 'Button 61', 'ButtonNumber': 60, 'ProgrammingModel': {'href': '/programmingmodel/62'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/62', 'Name': 'Button 62', 'ButtonNumber': 61, 'ProgrammingModel': {'href': '/programmingmodel/63'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/63', 'Name': 'Button 63', 'ButtonNumber': 62, 'ProgrammingModel': {'href': '/programmingmodel/64'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/64', 'Name': 'Button 64', 'ButtonNumber': 63, 'ProgrammingModel': {'href': '/programmingmodel/65'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/65', 'Name': 'Button 65', 'ButtonNumber': 64, 'ProgrammingModel': {'href': '/programmingmodel/66'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/66', 'Name': 'Button 66', 'ButtonNumber': 65, 'ProgrammingModel': {'href': '/programmingmodel/67'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/67', 'Name': 'Button 67', 'ButtonNumber': 66, 'ProgrammingModel': {'href': '/programmingmodel/68'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/68', 'Name': 'Button 68', 'ButtonNumber': 67, 'ProgrammingModel': {'href': '/programmingmodel/69'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/69', 'Name': 'Button 69', 'ButtonNumber': 68, 'ProgrammingModel': {'href': '/programmingmodel/70'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/70', 'Name': 'Button 70', 'ButtonNumber': 69, 'ProgrammingModel': {'href': '/programmingmodel/71'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/71', 'Name': 'Button 71', 'ButtonNumber': 70, 'ProgrammingModel': {'href': '/programmingmodel/72'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/72', 'Name': 'Button 72', 'ButtonNumber': 71, 'ProgrammingModel': {'href': '/programmingmodel/73'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/73', 'Name': 'Button 73', 'ButtonNumber': 72, 'ProgrammingModel': {'href': '/programmingmodel/74'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/74', 'Name': 'Button 74', 'ButtonNumber': 73, 'ProgrammingModel': {'href': '/programmingmodel/75'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/75', 'Name': 'Button 75', 'ButtonNumber': 74, 'ProgrammingModel': {'href': '/programmingmodel/76'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/76', 'Name': 'Button 76', 'ButtonNumber': 75, 'ProgrammingModel': {'href': '/programmingmodel/77'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/77', 'Name': 'Button 77', 'ButtonNumber': 76, 'ProgrammingModel': {'href': '/programmingmodel/78'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/78', 'Name': 'Button 78', 'ButtonNumber': 77, 'ProgrammingModel': {'href': '/programmingmodel/79'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/79', 'Name': 'Button 79', 'ButtonNumber': 78, 'ProgrammingModel': {'href': '/programmingmodel/80'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/80', 'Name': 'Button 80', 'ButtonNumber': 79, 'ProgrammingModel': {'href': '/programmingmodel/81'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/81', 'Name': 'Button 81', 'ButtonNumber': 80, 'ProgrammingModel': {'href': '/programmingmodel/82'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/82', 'Name': 'Button 82', 'ButtonNumber': 81, 'ProgrammingModel': {'href': '/programmingmodel/83'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/83', 'Name': 'Button 83', 'ButtonNumber': 82, 'ProgrammingModel': {'href': '/programmingmodel/84'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/84', 'Name': 'Button 84', 'ButtonNumber': 83, 'ProgrammingModel': {'href': '/programmingmodel/85'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/85', 'Name': 'Button 85', 'ButtonNumber': 84, 'ProgrammingModel': {'href': '/programmingmodel/86'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/86', 'Name': 'Button 86', 'ButtonNumber': 85, 'ProgrammingModel': {'href': '/programmingmodel/87'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/87', 'Name': 'Button 87', 'ButtonNumber': 86, 'ProgrammingModel': {'href': '/programmingmodel/88'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/88', 'Name': 'Button 88', 'ButtonNumber': 87, 'ProgrammingModel': {'href': '/programmingmodel/89'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/89', 'Name': 'Button 89', 'ButtonNumber': 88, 'ProgrammingModel': {'href': '/programmingmodel/90'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/90', 'Name': 'Button 90', 'ButtonNumber': 89, 'ProgrammingModel': {'href': '/programmingmodel/91'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/91', 'Name': 'Button 91', 'ButtonNumber': 90, 'ProgrammingModel': {'href': '/programmingmodel/92'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/92', 'Name': 'Button 92', 'ButtonNumber': 91, 'ProgrammingModel': {'href': '/programmingmodel/93'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/93', 'Name': 'Button 93', 'ButtonNumber': 92, 'ProgrammingModel': {'href': '/programmingmodel/94'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/94', 'Name': 'Button 94', 'ButtonNumber': 93, 'ProgrammingModel': {'href': '/programmingmodel/95'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/95', 'Name': 'Button 95', 'ButtonNumber': 94, 'ProgrammingModel': {'href': '/programmingmodel/96'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/96', 'Name': 'Button 96', 'ButtonNumber': 95, 'ProgrammingModel': {'href': '/programmingmodel/97'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/97', 'Name': 'Button 97', 'ButtonNumber': 96, 'ProgrammingModel': {'href': '/programmingmodel/98'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/98', 'Name': 'Button 98', 'ButtonNumber': 97, 'ProgrammingModel': {'href': '/programmingmodel/99'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/99', 'Name': 'Button 99', 'ButtonNumber': 98, 'ProgrammingModel': {'href': '/programmingmodel/100'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}, {'href': '/virtualbutton/100', 'Name': 'Button 100', 'ButtonNumber': 99, 'ProgrammingModel': {'href': '/programmingmodel/101'}, 'Parent': {'href': '/project'}, 'IsProgrammed': False}]}}
2021-01-25 10:01:58 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Caséta bridge for lutron_caseta
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/lutron_caseta/__init__.py", line 75, in async_setup_entry
    await bridge.connect()
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 100, in connect
    await self._login_completed
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 512, in _login
    await self._load_scenes()
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 578, in _load_scenes
    scene_json = await self._request("ReadRequest", "/virtualbutton")
  File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 233, in _request
    response = await asyncio.wait_for(
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
    raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
2021-01-25 10:02:26 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "e493b9b1-134d-4b2e-95bb-bf8abe9faae7", "Url": "/server/1/status/ping"}}'
2021-01-25 10:02:26 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OnePingResponse', 'StatusCode': '200 OK', 'Url': '/server/1/status/ping'}, 'Body': {'PingResponse': {'LEAPVersion': 1.113}}}
2021-01-25 10:03:26 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "c0cb1194-bfb8-450d-a7dd-6efb4b812721", "Url": "/server/1/status/ping"}}'
2021-01-25 10:03:26 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OnePingResponse', 'StatusCode': '200 OK', 'Url': '/server/1/status/ping'}, 'Body': {'PingResponse': {'LEAPVersion': 1.113}}}
2021-01-25 10:04:02 DEBUG (MainThread) [pylutron_caseta.leap] Received message with no tag: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OneZoneStatus', 'StatusCode': '200 OK', 'Url': '/zone/2/status/level'}, 'Body': {'ZoneStatus': {'href': '/zone/2/status', 'Level': 0, 'Zone': {'href': '/zone/2'}, 'StatusAccuracy': 'Good'}}}
2021-01-25 10:04:02 DEBUG (MainThread) [pylutron_caseta.smartbridge] zone=2 level=0
2021-01-25 10:04:26 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "14cf2fa2-75b0-430a-9788-e44fd6a97145", "Url": "/server/1/status/ping"}}'
2021-01-25 10:04:26 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OnePingResponse', 'StatusCode': '200 OK', 'Url': '/server/1/status/ping'}, 'Body': {'PingResponse': {'LEAPVersion': 1.113}}}
2021-01-25 10:05:26 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "ec305c2d-4345-4b1c-b24e-acbe07e2af76", "Url": "/server/1/status/ping"}}'
2021-01-25 10:05:26 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OnePingResponse', 'StatusCode': '200 OK', 'Url': '/server/1/status/ping'}, 'Body': {'PingResponse': {'LEAPVersion': 1.113}}}
2021-01-25 10:06:26 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "210ad142-4f77-4693-9f92-3e24d5bc54a2", "Url": "/server/1/status/ping"}}'
2021-01-25 10:06:26 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OnePingResponse', 'StatusCode': '200 OK', 'Url': '/server/1/status/ping'}, 'Body': {'PingResponse': {'LEAPVersion': 1.113}}}
thetic commented 3 years ago

Can you enable logging for pylutron_caseta.leap?

I'm using Home Assistant OS, so I don't know a straight forward way to do this.

What kind of hardware are you running Home Assistant on?

I'm on a Pi 3 B+.

See https://github.com/home-assistant/core/issues/45505 for more context.

The error occurs almost any time I reset Home Assistant. To recover, I have to:

  1. Unplug the bridge's ethernet.
  2. Restart Home Assistant
  3. Wait a bit
  4. Plug in the bridge's ethernet.
mdonoughe commented 3 years ago

That's a very interesting error. A request is sent to read /virtualbutton with tag "1ffc97be-15cb-4d40-bf3e-af9442469d98". The bridge responds using tag "1ffc97be-15cb-4d40-bf3e-af9442469d98" but pylutron_caseta does not recognize it. A timeout is generated because the /virtualbutton response was not received.

It looks like a race condition, but the code is careful to register the callback for the tag before it sends the request to the bridge.

Is this only with new versions of Home Assistant? I haven't seen it but I am still running 2020.12.0.

Is it possible the Raspberry Pi 3 B is just too slow? Is some other integration running blocking jobs on the async thread? The timeout that's occurring is supposed to be five seconds from making the request. The timestamps in the log show a problem:

I think either your CPU can't keep up with running Home Assistant or some other code is abusing the asyncio thread.

Also, the Home Assistant integration should probably have a way to try again if the connection fails. I'm not sure why it fails the connection setup and then just leaves it half open. Calling connect again after a delay until it doesn't throw should work.

bdraco commented 3 years ago

Can you enable logging for pylutron_caseta.leap?

I'm using Home Assistant OS, so I don't know a straight forward way to do this.

Set the level to debug using the logger.set_level service in the developer tools UI.

https://www.home-assistant.io/integrations/logger/#service-set_level

service: logger.set_level
data:
  pylutron_caseta: debug
thetic commented 3 years ago

That's a very interesting error. A request is sent to read /virtualbutton with tag "1ffc97be-15cb-4d40-bf3e-af9442469d98". The bridge responds using tag "1ffc97be-15cb-4d40-bf3e-af9442469d98" but pylutron_caseta does not recognize it. A timeout is generated because the /virtualbutton response was not received.

It looks like a race condition, but the code is careful to register the callback for the tag before it sends the request to the bridge.

Is this only with new versions of Home Assistant? I haven't seen it but I am still running 2020.12.0.

Is it possible the Raspberry Pi 3 B is just too slow? Is some other integration running blocking jobs on the async thread? The timeout that's occurring is supposed to be five seconds from making the request. The timestamps in the log show a problem:

* At 10:01:39 "Loading scenes from the Smart Bridge" is logged. This is immediately before requesting /virtualbutton. This should be when the timeout period begins.

* At 10:01:56 (17 seconds later!) the request sent to the bridge is logged. There should be practically zero time difference between this message and the previous message because this message is logged before the message is actually sent to the network. All that happens in this 17 seconds is setting up callbacks and logging.

* At 10:01:57 the response is received from the bridge. One second is slow here, but is within margin of error on the logger timestamp precision.

* At 10:01:58 the timeout error is logged. Probably the timeout error had already occurred before this and that's why the callback for the tag had already been cleared? In that case, this message is 1-2 seconds late. Immediately after sending the message the timeout should have occurred.

I think either your CPU can't keep up with running Home Assistant or some other code is abusing the asyncio thread.

Also, the Home Assistant integration should probably have a way to try again if the connection fails. I'm not sure why it fails the connection setup and then just leaves it half open. Calling connect again after a delay until it doesn't throw should work.

I think this is the primary problem, the system is indeed slow, especially during boot. I know other of my integrations initially fail, but do recover.

bdraco commented 3 years ago

During Home Assistant startup, all the integrations are competing for the event loop so it gets swamped. On slow systems it can take a few seconds for the loop to process incoming data. An RPi3 is going to be much worse during this time. It might make sense to raise the timeout for all the calls made during _login.

I just merged a commit to Home Assistant to retry if setup fails that will go into 2021.2

https://github.com/home-assistant/core/blame/25f411ef6ed0ad1afd778aa28e62e4bb7ced3011/homeassistant/components/lutron_caseta/__init__.py#L106

Instead of getting Error setting up entry Caséta bridge for lutron_caseta, you should 2021-01-27 01:56:01 WARNING (MainThread) [homeassistant.config_entries] Config entry 'lutron1' for lutron_caseta integration not ready yet. Retrying in 10 seconds

Then Home Assistant will try again to set it up later (it will keep trying in increasing intervals) when hopefully the cpu is a bit less swamped.

thetic commented 3 years ago

debug logs following a home assistant restart:

2021-01-26 18:25:50 DEBUG (MainThread) [pylutron_caseta.smartbridge] Successfully connected to Smart Bridge.
2021-01-26 18:25:50 DEBUG (MainThread) [pylutron_caseta.leap] Received message with no tag: {'CommuniqueType': 'SubscribeResponse', 'Header': {'StatusCode': '204 NoContent', 'Url': '/device/status/deviceheard'}}
2021-01-26 18:25:50 DEBUG (MainThread) [pylutron_caseta.leap] Received message with no tag: {'CommuniqueType': 'SubscribeResponse', 'Header': {'StatusCode': '204 NoContent', 'Url': '/zone/status/deprecated/level'}}
2021-01-26 18:25:50 DEBUG (MainThread) [pylutron_caseta.smartbridge] Loading devices
2021-01-26 18:25:56 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "fbaf102c-aa45-4d3d-bb70-f6d68622022e", "Url": "/device"}}'
2021-01-26 18:25:57 ERROR (MainThread) [pylutron_caseta.leap] Was not expecting message with tag fbaf102c-aa45-4d3d-bb70-f6d68622022e: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'MultipleDeviceDefinition', 'StatusCode': '200 OK', 'Url': '/device'}, 'Body': {'Devices': [{'href': '/device/1', 'Name': 'Smart Bridge 2', 'FullyQualifiedName': ['Smart Bridge 2'], 'Parent': {'href': '/project'}, 'SerialNumber': 53353916, 'ModelNumber': 'L-BDG2-WH', 'DeviceType': 'SmartBridge', 'RepeaterProperties': {'IsRepeater': True}, 'OwnedLinks': [{'href': '/link/1', 'LinkType': 'RF'}], 'LinkNodes': [{'href': '/device/1/linknode/1'}], 'DeviceRules': [{'href': '/devicerule/40'}], 'FirmwareImage': {'Firmware': {'DisplayName': '08.04.04f000'}, 'Installed': {'Year': 2020, 'Month': 12, 'Day': 19, 'Hour': 12, 'Minute': 13, 'Second': 13, 'Utc': '-8:00:00'}}}, {'href': '/device/2', 'Name': 'Lights', 'FullyQualifiedName': ['Living Room', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51303254, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/1'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/2/linknode/2'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/3', 'Name': 'Sconces', 'FullyQualifiedName': ['Living Room', 'Sconces'], 'Parent': {'href': '/project'}, 'SerialNumber': 51303253, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/2'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/3/linknode/3'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/4', 'Name': 'Lights', 'FullyQualifiedName': ['Downstairs Hallway', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51303256, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/3'}], 'AssociatedArea': {'href': '/area/3'}, 'LinkNodes': [{'href': '/device/4/linknode/4'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/5', 'Name': 'Pico', 'FullyQualifiedName': ['Downstairs Hallway', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 47775294, 'ModelNumber': 'PJ2-3BRL-GXX-X01', 'DeviceType': 'Pico3ButtonRaiseLower', 'ButtonGroups': [{'href': '/buttongroup/2'}], 'AssociatedArea': {'href': '/area/3'}, 'LinkNodes': [{'href': '/device/5/linknode/5'}], 'DeviceRules': [{'href': '/devicerule/25'}]}, {'href': '/device/6', 'Name': 'Fan', 'FullyQualifiedName': ['Living Room', 'Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 37416217, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/4'}], 'AssociatedArea': {'href': '/area/2'}, 'LinkNodes': [{'href': '/device/6/linknode/6'}], 'DeviceRules': [{'href': '/devicerule/110'}]}, {'href': '/device/7', 'Name': 'Lights', 'FullyQualifiedName': ['Dining Room', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51982448, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/5'}], 'AssociatedArea': {'href': '/area/4'}, 'LinkNodes': [{'href': '/device/7/linknode/7'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/8', 'Name': 'Fan', 'FullyQualifiedName': ['Master Bedroom', 'Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 37174422, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/6'}], 'AssociatedArea': {'href': '/area/5'}, 'LinkNodes': [{'href': '/device/8/linknode/8'}], 'DeviceRules': [{'href': '/devicerule/110'}]}, {'href': '/device/9', 'Name': 'Lights', 'FullyQualifiedName': ['Master Bedroom', 'Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51982424, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/7'}], 'AssociatedArea': {'href': '/area/5'}, 'LinkNodes': [{'href': '/device/9/linknode/9'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/10', 'Name': 'Doorway', 'FullyQualifiedName': ['Master Bedroom', 'Doorway'], 'Parent': {'href': '/project'}, 'SerialNumber': 51982353, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/8'}], 'AssociatedArea': {'href': '/area/5'}, 'LinkNodes': [{'href': '/device/10/linknode/10'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/11', 'Name': 'Back Porch Lights', 'FullyQualifiedName': ['Exterior', 'Back Porch Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51310903, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/9'}], 'AssociatedArea': {'href': '/area/6'}, 'LinkNodes': [{'href': '/device/11/linknode/11'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/12', 'Name': 'Overhead Light', 'FullyQualifiedName': ['Front Porch', 'Overhead Light'], 'Parent': {'href': '/project'}, 'SerialNumber': 51310923, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/10'}], 'AssociatedArea': {'href': '/area/7'}, 'LinkNodes': [{'href': '/device/12/linknode/12'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/13', 'Name': 'Pico', 'FullyQualifiedName': ['Front Porch', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 43596270, 'ModelNumber': 'PJ2-2B-GXX-X01', 'DeviceType': 'Pico2Button', 'ButtonGroups': [{'href': '/buttongroup/3'}], 'AssociatedArea': {'href': '/area/7'}, 'LinkNodes': [{'href': '/device/13/linknode/13'}], 'DeviceRules': [{'href': '/devicerule/22'}]}, {'href': '/device/14', 'Name': 'Main Lights', 'FullyQualifiedName': ['Upstairs Hallway', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57139614, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/11'}], 'AssociatedArea': {'href': '/area/8'}, 'LinkNodes': [{'href': '/device/14/linknode/14'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/15', 'Name': 'Main Lights', 'FullyQualifiedName': ['Stairs', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57139615, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/12'}], 'AssociatedArea': {'href': '/area/9'}, 'LinkNodes': [{'href': '/device/15/linknode/15'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/16', 'Name': 'Pico', 'FullyQualifiedName': ['Upstairs Hallway', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 48268579, 'ModelNumber': 'PJ2-3BRL-GXX-X01', 'DeviceType': 'Pico3ButtonRaiseLower', 'ButtonGroups': [{'href': '/buttongroup/4'}], 'AssociatedArea': {'href': '/area/8'}, 'LinkNodes': [{'href': '/device/16/linknode/16'}], 'DeviceRules': [{'href': '/devicerule/25'}]}, {'href': '/device/17', 'Name': 'Pico', 'FullyQualifiedName': ['Stairs', 'Pico'], 'Parent': {'href': '/project'}, 'SerialNumber': 48268627, 'ModelNumber': 'PJ2-3BRL-GXX-X01', 'DeviceType': 'Pico3ButtonRaiseLower', 'ButtonGroups': [{'href': '/buttongroup/5'}], 'AssociatedArea': {'href': '/area/9'}, 'LinkNodes': [{'href': '/device/17/linknode/17'}], 'DeviceRules': [{'href': '/devicerule/25'}]}, {'href': '/device/18', 'Name': 'Main Lights', 'FullyQualifiedName': ['Laundry Room', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51310911, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/13'}], 'AssociatedArea': {'href': '/area/10'}, 'LinkNodes': [{'href': '/device/18/linknode/18'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/19', 'Name': 'Main Lights', 'FullyQualifiedName': ['Bedroom Closet', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 51293636, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/14'}], 'AssociatedArea': {'href': '/area/11'}, 'LinkNodes': [{'href': '/device/19/linknode/19'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/20', 'Name': 'Chandelier', 'FullyQualifiedName': ['Powder Room', 'Chandelier'], 'Parent': {'href': '/project'}, 'SerialNumber': 51311303, 'ModelNumber': 'PD-8ANS-XX', 'DeviceType': 'WallSwitch', 'LocalZones': [{'href': '/zone/15'}], 'AssociatedArea': {'href': '/area/12'}, 'LinkNodes': [{'href': '/device/20/linknode/20'}], 'DeviceRules': [{'href': '/devicerule/44'}]}, {'href': '/device/21', 'Name': 'Vanity Lights', 'FullyQualifiedName': ['Master Bathroom', 'Vanity Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57297276, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/16'}], 'AssociatedArea': {'href': '/area/13'}, 'LinkNodes': [{'href': '/device/21/linknode/21'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/22', 'Name': 'Vanity Lights', 'FullyQualifiedName': ['Guest Bathroom', 'Vanity Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504434, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/17'}], 'AssociatedArea': {'href': '/area/14'}, 'LinkNodes': [{'href': '/device/22/linknode/22'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/23', 'Name': 'Main Lights', 'FullyQualifiedName': ['Kitchen', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504440, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/18'}], 'AssociatedArea': {'href': '/area/15'}, 'LinkNodes': [{'href': '/device/23/linknode/23'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/24', 'Name': 'Ceiling Fan Light', 'FullyQualifiedName': ['Guest Room', 'Ceiling Fan Light'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504806, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/19'}], 'AssociatedArea': {'href': '/area/16'}, 'LinkNodes': [{'href': '/device/24/linknode/24'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/25', 'Name': 'Ceiling Fan', 'FullyQualifiedName': ['Guest Room', 'Ceiling Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 38052216, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/20'}], 'AssociatedArea': {'href': '/area/16'}, 'LinkNodes': [{'href': '/device/25/linknode/25'}], 'DeviceRules': [{'href': '/devicerule/110'}]}, {'href': '/device/26', 'Name': 'Main Lights', 'FullyQualifiedName': ['Office', 'Main Lights'], 'Parent': {'href': '/project'}, 'SerialNumber': 57504327, 'ModelNumber': 'PD-6WCL-XX', 'DeviceType': 'WallDimmer', 'LocalZones': [{'href': '/zone/21'}], 'AssociatedArea': {'href': '/area/17'}, 'LinkNodes': [{'href': '/device/26/linknode/26'}], 'DeviceRules': [{'href': '/devicerule/27'}]}, {'href': '/device/27', 'Name': 'Ceiling Fan', 'FullyQualifiedName': ['Office', 'Ceiling Fan'], 'Parent': {'href': '/project'}, 'SerialNumber': 38052205, 'ModelNumber': 'PD-FSQN-XX', 'DeviceType': 'CasetaFanSpeedController', 'LocalZones': [{'href': '/zone/22'}], 'AssociatedArea': {'href': '/area/17'}, 'LinkNodes': [{'href': '/device/27/linknode/27'}], 'DeviceRules': [{'href': '/devicerule/110'}]}]}}
2021-01-26 18:26:00 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Caséta bridge for lutron_caseta
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/lutron_caseta/__init__.py", line 75, in async_setup_entry
await bridge.connect()
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 100, in connect
await self._login_completed
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 511, in _login
await self._load_devices()
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 552, in _load_devices
device_json = await self._request("ReadRequest", "/device")
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 233, in _request
response = await asyncio.wait_for(
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
2021-01-26 18:26:50 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "b15ff8e6-32b3-4169-bc08-9b7256ff7afa", "Url": "/server/1/status/ping"}}'
2021-01-26 18:26:50 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OnePingResponse', 'StatusCode': '200 OK', 'Url': '/server/1/status/ping'}, 'Body': {'PingResponse': {'LEAPVersion': 1.113}}}
2021-01-26 18:27:50 DEBUG (MainThread) [pylutron_caseta.leap] sending b'{"CommuniqueType": "ReadRequest", "Header": {"ClientTag": "23330a27-63be-4c7c-acbb-bee89d6a5d11", "Url": "/server/1/status/ping"}}'
2021-01-26 18:27:50 DEBUG (MainThread) [pylutron_caseta.leap] received: {'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'OnePingResponse', 'StatusCode': '200 OK', 'Url': '/server/1/status/ping'}, 'Body': {'PingResponse': {'LEAPVersion': 1.113}}}
thetic commented 3 years ago

Thanks so much for your help on this @bdraco and @mdonoughe

jkfranks9 commented 3 years ago

Thanks @bdraco, looking forward to version 2021.2.