New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working RA3 Support for Pairing, Switches/Dimmers, Sunnata Keypads and PICOs #101
Conversation
update compatablity for homeassistant lutron_caseta component
Also, support for the Sunnata Keypads depends on changes to the lutron_caseta HA integration. I've made the changes and issued a PR to get them implemented. |
tests/test_smartbridge.py
Outdated
communique_type="ReadRequest", | ||
url=f"/area/{area_id}/associatedcontrolstation", | ||
) | ||
station_result = response_from_json_file(f"ra3-area{area_id}cs.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to use folders? ra3/area/{area_id}/station.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've revised the responses into a directory structure like you've suggested
tests/test_smartbridge.py
Outdated
@@ -154,7 +157,7 @@ async def fake_connect(): | |||
|
|||
self.target = smartbridge.Smartbridge(fake_connect) | |||
|
|||
async def initialize(self): | |||
async def initialize(self, processor="Caseta"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use constants or something instead of the string literal "Caseta"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I"ll need a bit of help here. I didn't edit or use this test_smartbridge.py file. How do I use/invoke it to evaluate any changes I make? These edits were made by @johninaustin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've defined a constant DEFAULT_PROCESSOR and assigned it the string "Caseta"
tests/test_smartbridge.py
Outdated
@pytest.fixture(name="ra3_bridge") | ||
async def fixture_bridge_ra3() -> AsyncGenerator[Bridge, None]: | ||
"""Create a RA3 bridge attached to a fake reader and writer.""" | ||
harness = Bridge() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code should probably use bridge_uninit
like the Caseta version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i've updated to match the bridge_uninit like the Caseta version
…nd remove response mangling
…ton devices, remove DeviceType overrides for SunnataKeypads
I made some minor changes at https://github.com/danaues/pylutron-caseta/compare/ra3...mdonoughe:pylutron-caseta:ra3?expand=1 . I don't have access to update this branch. The tests don't work. During the initialization of the fake bridge, SmartBridge tries to read The quickest way to run the tests is to type |
ok thanks @mdonoughe . I'll check it out. I've invited you as a collaborator to my branch if you want to be able to make changes there too. |
Ok I figured out how to merge your changes into my branch. I'll do some testing and find a way to fix the failing test. Thanks! |
I've revised the test and now pytest is no longer failing |
@mdonoughe Would you mind checking out my commit when you have time? I think I've managed to satisfy all the outstanding issues with the tests. |
@mdonoughe Thanks for all your help on this. I really appreciate it. |
Is there more that needs to be done? I deployed this to my Home Assistant and it seems okay so far, but I have Caseta so it should be working exactly the same as before in my case. |
I have 2 PRs for the lutron_caseta HA integration that need to be merged to make it all work. This PR is required to manage the "None" serial we're passing to HA for RA3 light zones. This PR is required to map the "SunnataKeypad" DeviceType for event handling. I've also got preliminary occupation sensing in my pylutron-caseta ra3-occupancy branch, but I want to do some more work on it before submitting a PR. |
I have Home Assistant and a full RA3 system. Haven't installed anything outside HA before, but with a little instruction, I volunteer to test anything needed. |
@danaues Thank you for getting this done! You're awesome! I finally closed on my house and am starting to actually install RA3 hardware. Prior to that I'd just been playing with the processor and 1 physical Pico - the rest were just virtual devices created in Designer. I'm anxious to get started working on all this again. |
@peterxrock , come join us here, I'd appreciate some testing help |
Any control over the keypad LED? I'm holding back from upgrading my ra2 over to ra3. So far, everything I have in my house is supported. If SeeTouch Keypad LED control is implemented, I'll bring a Ra3 repeater home tomorrow. |
@achecchia , yes keypad LEDs are fully implemented. |
how about press and hold on picos? i have a test HA on a VM in my office with a small Ra3 system, and all i get are the actual button presses. Any way to have double tap or hold? I only ask because currently i have my ra2 system at my house attached to hubitat, and i exposed the Lutron devices from hubitat to home assistant which gives me those features. thanks for everything! you are a legend. |
This PR adds support for Pairing the RA3 Processor, as well as supporting Switches, Dimmers Sunnata Keypads and PICOs.
Tested pairing and operating on a Caseta Pro bridge, and an RA3 Processor through HA.
Tested devices on RA3:
Sunnata LED+ Dimmer
Sunnata Keypad - 3 Button Raise Lower
Sunnata Keypad - 4 Button
Masetro Pro LED+ Dimmer
Pico 3 Button Raise Lower
Tested devices on Caseta Pro:
Caseta ELV+ Dimmers
Caseta Switch
The vast majority of this work was completed by @johninaustin , and I've just carried the torch the last few miles to get it working.
I've attempted to fix the issues identified in the original RA3 Initial support PR, based on the comments within that thread.
This does not yet support scenes, occupancy sensors, or LEDs.