This project is for those of us who love the reliability and flexibility of the Lutron Caseta devices but also want to control them via SmartThings. Each of your Caseta Devices will show up in ST as a device and can be controlled from ST just like any other device. Manual changes to lights will also update to ST as expected. I have been running this setup for several weeks now without issue. I have the non Pro version of the SmartBridge and am currently uncertain if it will work for those of you with the pro version. This setup is fast and reliable but does take a bit of technical know how to get setup. I hope to make this simpler in the future.
UPDATE: I can now confirm that this does indeed work on both the Pro and non Pro versions of the SmartBridge. I can also confirm it will run on a Raspberry Pi, Windows, Mac, and Linux machine as long as you correctly setup the python enviroment.
UPDATE 2: I have added the rsa_key to the script itself so you no longer need the separate file and can ignore that step below.
The setup consists of the following steps:
- Setup your raspberry pi
- Run the python script
- Install the device type handlers in the ST IDE
- Install the smartapp in the ST IDE
- Configure the smartapp on your phone or tablet
1. Setup your raspberry pi
This is likely to be the most challenging step of the install. On your raspberry pi you will need python installed (it typically comes preinstalled) as well as the additional packages Twisted and paramiko. Assuming you have the python package manager installed you can simply type pip install Twisted and pip install paramiko (paramiko has several dependencies which also need to be installed. Pay attention to any errors you might get when trying to install it).
Once these are all installed, create a folder on your pi and place the files LutronPi.py and rsa_key into it. These files are located at my github. Open the LutronPi file in a text editor and find the lines:
Edit these lines with the appropriate IP addresses for your ST hub and your Lutron SmartBridge. I HIGHLY recommend you give your device static IP addresses as IP changes will break everything.
2. Run the python script
If everything is setup correctly typing ‘python LutronPi.py’ should run the script and you will see some output on the screen. Give it a few seconds to make the connections and then adjust a light and you should see additional output. From there just leave it running. If you SSH into your raspberry pi like I do you can run the script using ‘nohup python LutronPi.py &’ This will run it without showing all the output and will also not kill the script when you terminate the ssh connection to your pi. Make sure you test it first the other way though.
3. Install the device type handlers in the ST IDE
Install and publish the two device types from the github into the ST IDE.
4. Install the smartapp in the ST IDE
Install and publish the smartapp from the github into the ST IDE.
5. Configure the smartapp on your phone or tablet
Finally open the ST App > Marketplace > My Apps and find the Lutron Caseta Service Manager. Select it and then wait until it finds your raspberry pi.
Select it and choose next and wait until it finds all of your switches.
Select your switches, hit Done and then Done again. That’s it! At this point all your Caseta device should be available in ST and available to control directly or via other smartapps, CoRE, etc.
I know the install is a bit cumbersome currently, and I hope to improve that as I have time. I just wanted to make this available to those who might be savy enough and interested in trying it. Please provide feedback and let me know if anything isn’t working and I will try to help. Thanks a lot!