Skip to content
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

Support for RA3 #75

Open
daytonturner opened this issue Jan 28, 2022 · 23 comments
Open

Support for RA3 #75

daytonturner opened this issue Jan 28, 2022 · 23 comments

Comments

@daytonturner
Copy link

Hi all,

Absolutely love the work done in pylutron which gets used in HomeAssistant and others. Now that RadioRA3 is released, is anyone working on adding support?

I will have my hands on a RA3 processor shortly, is there anything I can do to help facilitate? I'm told its the same command set as HomeWorks QSX, but presumably has its own unique certificates to worry about.

How can I help?

@cdheiser
Copy link
Collaborator

cdheiser commented Jan 29, 2022 via email

@JonGilmore
Copy link
Collaborator

I certainly could be wrong (I haven't been able to do the training yet either), but as I recall, the integration protocol spec isn't "published", but it's only been given to the big integrators (crestron, savant, etc) so far.

@cdheiser
Copy link
Collaborator

cdheiser commented Jan 29, 2022 via email

@daytonturner
Copy link
Author

daytonturner commented Jan 29, 2022 via email

@cdheiser
Copy link
Collaborator

cdheiser commented Jan 29, 2022 via email

@thecynic
Copy link
Owner

thecynic commented Jan 29, 2022 via email

@daytonturner
Copy link
Author

@cdheiser i will happily send you a RA3 processor if you’re interested in working on this!

@terafin
Copy link

terafin commented Jan 30, 2022

I have a RA3 processor, and am trying things out here. All the caseta leap commands seem to fail with 400/405. Does anyone know which commands should work, so I can start poking?

@terafin
Copy link

terafin commented Jan 30, 2022

Nevermind, it was bad auth. Got it working now:

2022-01-30T20:55:57.567Z leap:protocol got data from socket: {"CommuniqueType":"ReadResponse","Header":{"MessageBodyType":"MultipleAreaDefinition","StatusCode":"200 OK","Url":"/area","ClientTag":"2e0d9c4e-c9f7-4d62-b36e-b3235f7883c5"},"Body":{"Areas":[{"href":"/area/3","Name":"Home","SortOrder":0,"IsLeaf":false},{"href":"/area/24","Name":"Loft","Parent":{"href":"/area/3"},"SortOrder":0,"IsLeaf":false},{"href":"/area/83","Name":"Equipment Room","Parent":{"href":"/area/3"},"SortOrder":1,"IsLeaf":true},{"href":"/area/729","Name":"Loft","Parent":{"href":"/area/24"},"SortOrder":1,"IsLeaf":true}]}}

Working on playing around with the commands now.

@terafin
Copy link

terafin commented Jan 30, 2022

Yup, looks like so far it looks like you do a query on:
/area/ (to see areas)
/area/AREA_NUMBER found above, to discover control stations and sub areas
/controlstation/CONTROL_STATION_NUMBER from the area (to get device number)
/device/DEVICE_NUMBER

to get:

[2022-01-30T13:04:51.764] [INFO] logger - command: /device/615     result: {"Header":{"MessageBodyType":"OneDeviceDefinition","StatusCode":{"message":"OK","code":200},"Url":"/device/615","ClientTag":"c5039527-3225-4961-bfa1-334f6d5f4f7d"},"CommuniqueType":"ReadResponse","Body":{"Device":{"href":"/device/615","Name":"Device 1","Parent":{"href":"/project"},"SerialNumber":XXXXXXX,"ModelNumber":"RRST-8ANS-XX","DeviceType":"SunnataSwitch","AssociatedArea":{"href":"/area/729"},"LinkNodes":[{"href":"/device/615/linknode/617"}],"FirmwareImage":{"href":"/firmwareimage/615"},"DeviceClass":{"HexadecimalEncoding":"45f0101"},"AddressedState":"Addressed"}}}

@terafin
Copy link

terafin commented Jan 30, 2022

I can confirm that level control works:

        var response = await leap.request('CreateRequest', '/zone/622/commandprocessor', {"Command": {   "CommandType": "GoToLevel", 
                                                                                    "Parameter": [{"Type":"Level", "Value":0}]

Gives me back:

[2022-01-30T13:27:02.855] [INFO] logger - command response: {"Header":{"MessageBodyType":"OneZoneStatus","StatusCode":{"message":"Created","code":201},"Url":"/zone/622/commandprocessor","ClientTag":"6c4f9009-1231-4d9c-8672-257de32ba6ef"},"CommuniqueType":"CreateResponse","Body":{"ZoneStatus":{"href":"/zone/622/status","Level":0,"SwitchedLevel":"Off","Zone":{"href":"/zone/622"},"StatusAccuracy":"Good","Availability":"Available"}}}

Please note, I'm prototyping using: https://github.com/thenewwazoo/lutron-leap-js/
Tagging: @thenewwazoo

@daytonturner
Copy link
Author

Nice! This is looking promising

@thenewwazoo
Copy link

Neato! I only have Caséta hardware at home, but both the Crestron integration and Lutron Android application use the same structures for their LEAP communications, so I have a strong suspicion that libraries are cross-device capable. I suspect (but have no way to verify) that the differentiator is in the kinds of parameters the respective devices support and report (e.g. the occupancy sensor's ambient lighting sensor).

@thenewwazoo
Copy link

Oh, and I would be extremely surprised if Lutron provided the LEAP guide document to anyone who doesn't hold an NDA.

@daytonturner
Copy link
Author

Yeah - I fully expect the only way to get this working is through reverse engineering things.

@thenewwazoo
Copy link

The pylutron-caseta cats and I have gotten pretty good and decompiling things and watching network communications. The big stumbling block is usually just getting our hands on the hardware so we can observe it. @daytonturner if that offer is still good, I'd love to actually have a non-Caséta device to do validation with.

@terafin
Copy link

terafin commented Jan 31, 2022

Neato! I only have Caséta hardware at home, but both the Crestron integration and Lutron Android application use the same structures for their LEAP communications, so I have a strong suspicion that libraries are cross-device capable. I suspect (but have no way to verify) that the differentiator is in the kinds of parameters the respective devices support and report (e.g. the occupancy sensor's ambient lighting sensor).

@thenewwazoo Does the iOS app use LEAP as well, or just Android? (Have you tried?) - I just saw non LEAP stuff going from the iOS to lutron servers via charles... (I might have to pull out my pixel)

@thenewwazoo
Copy link

I don't know, as I haven't inspected the iOS app, but traffic to Lutron servers is separate from the bridge comms, which are only over the LAN.

@terafin
Copy link

terafin commented Jan 31, 2022

I'm trying to document the commands I find that are not yet supported in your lutron-js, please let me know if this is helpful or not:
https://github.com/thenewwazoo/lutron-leap-js/issues

@terafin
Copy link

terafin commented Jan 31, 2022

(making headway, I'm opening up issues there to document the control types, and subscribe)

@rwagoner
Copy link

If it helps the OpenHAB Addons Lutron binding has experimental LEAP support.

There are a number of request formats defined in internal/protocol/leap/Requests.java

@terafin
Copy link

terafin commented Jan 31, 2022

@rwagoner Thanks! Note, these are new (?) RA3 commands, or appear to be. The caseta ones don't seem to work on RA3 either, I added a bunch here:
thenewwazoo/lutron-leap-js#15

More I'm sure to come.

@swamplynx
Copy link

@terafin @thecynic , looks like @johninaustin is making a lot of progress over in gurumitts/pylutron-caseta#80 if you want to combine efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants