[BETA] Lutron Caseta Integration using Raspberry Pi (Pro or Standard Bridge) [DEPRECATED--See new Release thread instead]

Hey sorry I guess I wasn’t clear enough…I need the output in the pi/server console not the ST IDE. Unfortunately ST truncates large outputs so it’s not reliable for what I need. So when you run the script and then run the smartapp on your phone you’ll see a whole bunch of output in the console. That’s what I need. Let me know if that makes sense.

1 Like

That makes a lot more sense :slight_smile:

Here’s the correct output:

{
“Body”: {
“Devices”: [
{
“Name”: “Smart Bridge”,
“Parent”: { “href”: “/project” },
“href”: “/device/1”,
“SerialNumber”: “xxxxxxxx”,
“RepeaterProperties”: { “IsRepeater”: true },
“ModelNumber”: “L-BDG2-WH”,
“DeviceType”: “SmartBridge”
},
{
“Name”: “Office Light”,
“Parent”: { “href”: “/project” },
“href”: “/device/2”,
“SerialNumber”: “xxxxxxxx”,
“ModelNumber”: “PD-6WCL-XX”,
“DeviceType”: “WallDimmer”,
“LocalZones”: [ { “href”: “/zone/1” } ]
},
{
“Name”: “Bedroom Light”,
“Parent”: { “href”: “/project” },
“href”: “/device/3”,
“SerialNumber”: “xxxxxxxx”,
“ModelNumber”: “PD-8ANS-XX”,
“DeviceType”: “WallSwitch”,
“LocalZones”: [ { “href”: “/zone/2” } ]
},
{
“Name”: “Office Pico”,
“Parent”: { “href”: “/project” },
“href”: “/device/4”,
“SerialNumber”: “xxxxxxxx”,
“ButtonGroups”: [ { “href”: “/buttongroup/2” } ],
“ModelNumber”: “PJ2-3BRL-GXX-X01”,
“DeviceType”: “Pico3ButtonRaiseLower”
},
{
“Name”: “Pico Bedroom”,
“Parent”: { “href”: “/project” },
“href”: “/device/5”,
“SerialNumber”: xxxxxxxx,
“ButtonGroups”: [ { “href”: “/buttongroup/3” } ],
“ModelNumber”: “PJ2-3BRL-GXX-X01”,
“DeviceType”: “Pico3ButtonRaiseLower”
}
]
},
“Header”: {
“Url”: “/device”,
“MessageBodyType”: “MultipleDeviceDefinition”,
“StatusCode”: “200 OK”
},
“CommuniqueType”: “ReadResponse”
}

Perfect thank you. So I added very basic support for your switch and you should be able to go into the smartapp an it should find/add it now. There is on caveat however…it is going to, for now at least, use the dimmer device type. I will work on creating a new device type and getting the code to chose the appropriate one, but in the meantime this should work. Please let me know if it doesn’t or you get weird results. I don’t have this switch to test so I am kind of guessing as to how it is implemented by Lutron. Let me know!

Ohh…To try it out simply update the Service Manager smartapp in the IDE from the git repo that should be it!

Yep that worked… but I see what you mean about the dimmer functionality on a non-dimmer switch.

Let me know if you want to try things out as you don’t have that device… I will gladly test it out for you.

Thanks!

Awesome glad it is working. Just out of curiosity. what happens if you use the level slider. Does it turn it on if you set it to any number or only all the way to 100?

Getting a new device handler is relatively trivial, I have already started the process, but it will require a bit of refactoring of the service manager which I am will need to think about first. I will let you know when it is ready.

Anything higher than 0% opens the light and resets the % to be 100.

1 Like

First post here…

Just wanted to thank njschwartz for this. This is a lot of work and I am seriously grateful!!

I’ve had SM for about a week now so I am still getting over the learning curve! I would say it look me almost 4 hours to get this working. I am running the python script on my Windows7 server and using a smartbridge pro.

I got was held up on a few things. Since this is all so new to me, I didn’t know if something was messed up or I was doing it wrong (or both haha)
Cygwin: I was getting download errors while downloading the modules. I was persistent and found a mirror that worked. After that, I didn’t know how to get the LutronPi.py file from github… I ended up copying the raw data, paste it to sublime, and save-as. Same with rsa_key. Once I had these files, I didn’t know what directory to put them under.

Then, what the hell is Twisted and paramiko??? lol On a hunch, I re-ran the cygwin setup and search for them… success. loaded.

Then onto editing the IPs. They are at the bottom for anyone looking.

When I tried to run the lutronPi.py, it was hanging up on line 25 (something like ipaddress). On a whim, I deleted line 25 and it is now running and I was seeing updates when I changed the lights.

There are FIVE Device Type Handlers. I was picking two (I have 14 dimmers and 18 picos) and the smartapp was failing at the last “Done”. I loaded all five and SUCCESS!

I am exhausted but the effort is worth the reward! Now, onto my new adventure!.. Lights!
:grinning:

Thank you very much for your feedback and appreciation. It is always great to hear about how the experience is and how well it is/is not working for different people. Everyone’s setup is different which is a challenge for sure. This is a somewhat complex project because there are so many parts as you mentioned. Getting the python stuff setup is by far the trickiest part and you probably took the toughest one getting it working on windows with Cygwin. I am constantly looking at and trying to find an option that will make setup easier or ideally get rid of the server requirement entirely, but as of yet I don’t have that.

Part of your pain, it sounds like, is that things have changed a fair amount from the beta version I discussed in this thread and the V1 release I put out about a week ago. You have all the latest code but the directions in this thread didn’t exactly match I am sure. Take a look at the other thread linked below where the latest conversation and advice can be found. Also, please let me know if you find any errors or issues of any kind as well as if there are features missing that might be useful to you. Thanks again!

1 Like

I am still waiting for a replacement Smart Bridge (they cannot explain why my old Smart Bridge Pro just stopped communicating with the local network). Just got the email from Lutron announcing their SmartThings support has begun. Would love to see some feedback on how responsive that cloud to cloud system is vs. this direct solution.

Mega bummer regarding the bridge. Really strange. I didn’t get that email. What did it say? I don’t see a Lutron smartapp anywhere so not sure if it’s available yet. I’ll try it out when it is.

I just tried it out and it is indeed fast. I think from first impressions anyway equivalent to my solution. We’ll have to see others thoughts on it are.

The upside is there’s nothing stopping you from using the official integration for the basic functionality and then only adding Pico’s and scenes using my stuff. That way even if your server goes most things will still work… Time will tell

1 Like

Wow…I’m really surprised at how responsive this integration is. Love having options.

2 Likes

Nate, everything is now working great with my new (working) Smart Bridge. Thanks for all your effort on this! It probably would have taken me a lot longer to figure out that my Smart Bridge was defective.

Hi everyone, sorry if this was mentioned but this is a really long post to read through. Do Pico remotes work as their own devices or not? I have HomeSeer right now with the Lutron Pro bridge. It uses telnet to connect to HomeSeer, so I have Pico remotes everywhere in the house. I use them to turn z-wave lights on, control Hue, etc. Thanks!

Pico works with the pro bridge so you should be good. I don’t have a pro so can’t verify it, but others have had success.

It works but with a small delay. If you decide to install this, follow the instructions on the “release” thread. This thread was for the beta and will eventually be locked.

This fixed it for me: sudo pip install twisted==13.1.0

It’s been working so well for so long, I forgot about this thread. Too be honest, after reading my notes, I don’t remember what I did. If it breaks down, you know who I will be calling @njschwartz

Am I blind in that I cannot find the Release thread?