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

Well that does explain things. I guess I should have written 2.7.x. Sorry for the confusion. The 2.7.13 version comes with pip where as 2.7 alone does not which is why you were having that issue.

Was just going to write I did that and it solve the problem

Yeah I guess I was concentrating on 2,7

Thanks for all your help guys… working awesome


I looked at the ST logs, and the only error I see is:

error java.lang.NullPointerException: Cannot get property ‘Body’ on null object @ line 172

Any ideas? Everything seems to work fine, but the switches just never get added to My Home.

Are you using the latest stuff I posted last night? I would suggest updating everything to the new 1.0 release and trying it. I am running it and several other are as well and I have not heard of any major issues. Give that a shot and let us know how it goes.

I updated LutronPi.py and the handlers that were updated. I have a Pro bridge and I turned on Telnet in the Lutron app, but it is still giving me this error. Sorry I am being such a bother, but getting this to work would be amazing for me.
I am now getting this error when opening LutronPi.Py:

C:\Python27>python lutronpi.py
Unable to connect via Telnet. Either you have a Standard bridge or you forgot to turn on Telnet in the Lutron app!
Unhandled Error
Traceback (most recent call last):
File “C:\Python27\lib\site-packages\twisted\internet\base.py”, line 428, in fireEvent
File “C:\Python27\lib\site-packages\twisted\internet\defer.py”, line 321, in addCallback
File “C:\Python27\lib\site-packages\twisted\internet\defer.py”, line 310, in addCallbacks
File “C:\Python27\lib\site-packages\twisted\internet\defer.py”, line 653, in _runCallbacks
current.result = callback(current.result, *args, **kw)
— —
File “C:\Python27\lib\site-packages\twisted\internet\base.py”, line 441, in _continueFiring
callable(*args, **kwargs)
File “lutronpi.py”, line 405, in main
ssh = smartBridgeSSH()
File “lutronpi.py”, line 281, in init
self.client.connect(SMARTBRIDGE_IP, port, uname, None, key)
File “C:\Python27\lib\site-packages\paramiko\client.py”, line 305, in connect
retry_on_signal(lambda: sock.connect(addr))
File “C:\Python27\lib\site-packages\paramiko\util.py”, line 269, in retry_on_signal
return function()
File “C:\Python27\lib\site-packages\paramiko\client.py”, line 305, in
retry_on_signal(lambda: sock.connect(addr))
File “C:\Python27\lib\socket.py”, line 222, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Well you are very close. My guess is your IP address is wrong in the script. Did you update lines 32 and 33 with your IP addresses? Specifically line 33 because it is saying it cannot connect to your Lutron Bridge.

Do I need to edit any router settings? The only thing I changed was to assign the IP addresses for the Lutron and Smartthings hubs.

I was so hopeful that work would because I initially did not update lines 32 and 33. But it’s still giving me the same error! I edited lines 32, 33, 323, 397, and 398 with the appropriate IP addresses.

I just got mine installed this evening. I got that same exact error cause I edited the wrong Lutronpi.py file and not the one that I was supposed to run. You might want to double check. And the only place I changed the IP was in the first instance.

@jays is right. Only change those two lines at the top 32/33. Other than that, make sure you have the right IP address. Make sure your are saving and running the correct script.

You can do a little test and use something like putty to ensure that you are actually able to connect to your hub. Not sure what what I can tell you. I think you have a small error somewhere that we’re missing.

Aaaah! I got a fresh copy of the new LutronPi.py from your github and only edited lines 32 and 33. The IP addresses I am using are listed in the Lutron app and on the ST api. Still getting the same error.

The log is showing it can’t find the ST hub. Are you sure you didn’t mistakenly swap the 2 addresses.

When I start my Python script, I have 2 issues.

  1. I get a JSON error. Is this normal?
  2. One of my switch is not recognized. That switch is a normal switch (not a dimmer). Does this make a difference?


(venv27) pi@raspberrypi:~/RaspberryPi $ python LutronPi.py
Unable to connect via Telnet. Either you have a Standard bridge or you forgot to turn on Telnet in the Lutron app!
Your SmartThings Hub IP Address is: x.x.x.x.x
Your SmartThings Hub IP Address is: x.x.x.x.x
Not valid JSON~This error may be normal the first time so don’t stress!
Standard Bridge Found
Standard Bridge Found
Standard Bridge Found
Your SmartThings Hub IP Address is: x.x.x.x.x
Standard Bridge Found
Standard Bridge Found
Standard Bridge Found

Yes that error the first time is normal. Just ignore it. As for your switch, I can fix that pretty easily. I just need a little information. I don’t have any non dimmer switches so I need to know the device type. It’s possible to get from the script but you need to add a line to print it all out so you can read it. I’m not at home right now but as soon as I am I can tell you what you need to do.

I also don’t have a device type for a non dimmer currently. I could possibly create one. In the meantime the dimmer one should work. I’ll look at that as well.

hopefully someone can help point out where I’m going wrong :cry:

I’m installing on a fresh RasPi (via Noobs 2.1.0) - I’m getting the following error when trying to run the LutronPi.py script. I only edited that file to enter in the two IP addresses.

pi@raspberrypi:/lutron $ python LutronPi.py
Traceback (most recent call last):
File “LutronPi.py”, line 18, in
import paramiko
File “/usr/local/lib/python2.7/dist-packages/paramiko/init.py”, line 30, in
from paramiko.transport import SecurityOptions, Transport
File “/usr/local/lib/python2.7/dist-packages/paramiko/transport.py”, line 33, in
from cryptography.hazmat.backends import default_backend
ImportError: No module named cryptography.hazmat.backends

I didnt see any errors when installing the packages, even re ran the paramiko install, got the following prompt

pi@raspberrypi:/lutron $ sudo pip install paramiko
Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/local/lib/python2.7/dist-packages
Cleaning up…

now stuck, is there any additional step i can take to validate that all versions are correct/installed?


It looks like you’re missing a dependancy for Paramiko called Paramiko. Try pip install cryptography. It may fail because it needs something called libffi so you may have to pip install libffi as well. Let us know.

thanks - still no joy - will look with fresh eyes in the morning.

I think you need to call in "HAZMAT"
LOL couldn’t resist