gurumitts / pylutron-caseta

Apache License 2.0
157 stars 98 forks source link

Firmware Update 23.4 Breaks Some Occupancy Sensors and Phantom Keypad #144

Open swamplynx opened 1 year ago

swamplynx commented 1 year ago

I recently upgraded my RA3 processor to the firmware that ships with Designer v23.4 and noticed some of my occupancy sensors and my phantom keypad in HA broke. Looking at the logs, it appears there is a new device type for wall mounted occupancy sensors that is not currently in the init.py.

'DeviceType': 'RPSWallMountedOccupancySensor'

Can this be added?

Similarly, my phantom keypad also broke, but the logs just show the device type as 'Unknown,' so I'm not sure what the solution is there. See below snippet for my phantom keypad named "API."

{'href': '/controlstation/27614', 'Name': 'API', 'AssociatedArea': {'href': '/area/83'}, 'SortOrder': 11, 'AssociatedGangedDevices': [{'Device': {'DeviceType': 'Unknown', 'href': '/device/27616', 'AddressedState': 'Unaddressed'}, 'GangPosition': 0}]}

mdonoughe commented 1 year ago

You can try adding the occupancy sensor type here: https://github.com/gurumitts/pylutron-caseta/blob/5a39236682c3ae47e17b2a7ba35dd7571fe2fa32/pylutron_caseta/__init__.py#L84-L87

Is the phantom keypad supposed to be "Unknown" or is it a bug? Maybe the new firmware allows users to specify the device type? I'm pretty sure this library doesn't handle devices the same way as Lutron so maybe the device type is more arbitrary.

JonGilmore commented 1 year ago

Support was added for phantom keypads here I think. I'm having this issue as well with the latest lutron upgrade.

swamplynx commented 1 year ago

I'll fork this repo and add the 'RPSWallMountedOccupancySensor' device type when I get a chance, test it, and do a pull request if it works. I think that should work to fix the wall mounted sensors, but it is a pain to get the HA lutron_caseta component to use a version pylutron-caseta not published on PyPI.

The Phantom Keypad is a whole other issue. I'm not familiar enough with the architecture of these components to know if that snippet from my HA logs is the raw LEAP response, and if the phantom keypad is now being presented by the RA3 controller as an 'Unknown' device type, or something else and the component simply displays it as 'Unknown.'

swamplynx commented 1 year ago

I just created a pull request for the Wall Mounted Occupancy sensor, but some one with greater architecture knowledge may need to help with getting the Phantom Keypad functionality restored.

swamplynx commented 1 year ago

@danaues and @cbw - Would appreciate your expertise on this one. I recently updated my RA3 processor to the firmware that ships with Designer 23.4. This broke my Phantom Keypad and Wall Mounted Occupancy Sensor integrations with HA. In digging through the HA debug logs I found that the device type attribute for the Wall Mounted Occupancy Sensor changed to 'DeviceType': 'RPSWallMountedOccupancySensor'. Easy fix and I submitted a PR to add that device type to the init.py file.

What I haven't been able to crack is the Phantom Keypad. In the HA debug logs (see above) it appears to now have a Device Type of Unknown. I'm not sure if that is the raw LEAP, or if there is a better way to debug what the device type may now be, or to confirm if it is a bug, and where to go from there. Many thanks!

cbw commented 1 year ago

My understanding is that phantom keypads aren't officially supported in LEAP (only in the legacy LIP protocol for RA2/HomeWorks QS). It's possible that Lutron made a breaking change.

I have a test QSX processor I'll fire up when I have time and see how it's presenting phantom keypads, however under LEAP the "Lutron-sanctioned" approach is using Homeowner Keypads (which have essentially the same functionality, and appear in the Lutron app). Do those fit your use case?

swamplynx commented 1 year ago

Thanks @cbw for the speedy reply. The Phantom Keypads were working, so this may just be a breaking change by Lutron. I can always switch over to the Homeowner Keypads if there is no solution, the Phantom Keypad just has the benefit of 1) not being in the Lutron app, since these are all scenes / actions I'm calling programmatically from HA and don't want people inadvertently pressing and 2) you aren't limited to eight buttons, eliminating the need for multiple devices.

gbt518 commented 1 year ago

The description for the Phantom Keypads in the Designer software says "Virtual keypad accessible to 3rd party integration via the LEAP API"

This suggests that it should work with LEAP. Also, the phantom keypads were added to the Designer software for RA3 a few versions after the initial release of RA3, so I don't think they're the same as the RA2 version.