Closed jonoberheide closed 8 months ago
After investigating some more, I believe this error is occurring because not all zones/devices are being retrieved from the my QSX system. I noticed that /areas was not returning some areas I expected to see in the results, associated with the missing devices. The /areas call was returning 99 entries, which was a suspiciously specific number given other Lutron system limits that cap out at 99.
Looking more at the response payload, it appears there is pagination support in the protocol, that I will have to dig into a bit to figure out:
{'CommuniqueType': 'ReadResponse', 'Header': {'MessageBodyType': 'MultipleAreaDefinition', 'StatusCode': '200 OK', 'Url': '/area', 'Paging': {'ContinuationToken': 'eyJPYmplY3RJRCI6MzIwNTcsIk9iamVjdFR5cGUiOjJ9'}},
If anyone in this area has experience with the ContinuationToken, let me know!
Reflecting that Paging object back into the request header returns the remaining areas. Which happen to correspond to the zones that I was missing and led to the original KeyError exception, I believe.
Thanks for @cbw and @dcode for the debugging help!
So this issue isn't exactly valid...I suppose it's more of a RFE for implementing paging support in the client!
Closing this as #161 is merged.
Hi there! Using lutron_caseta as part of Home Assistant. When integrating with a QSX bridge, I get the following error:
When looking at the debug output, I see more JSON associated with other zones/devices, but not so much with 5435. Any ideas? Does this seem more like a pylutron_caseta issue (aka maybe just ignore empty zones) or a Lutron issue (aka I need to go debug why there is an empty zone defined)?
Thanks for your help! Happy to debug these interactively or send full debug logs.