[Deprecated] Lutron Caseta Connect V1.5

Can anyone share any setup instructions they have for the nodejs version of this app? I’d like to test it out and I haven’t been able to get it working on my own. I grabbed the runserver.js from the github, but it errors out on "cannot find module ‘lutronpro’

Thanks

As a new guy, I had no idea what I was doing whatsoever and was starting from scratch. I really wanted to run this program to control Hue lights via Picos so this was a must-do project for me. I was very apprehensive because all of this is over my head. Nate sent me some instructions I would be happy to share. I followed these instructions and it has been working flawless (particularly that beginners guide). See if this helps I will answer questions if I can. Also take note, if the Hue is disconnected, i.e., loses power, the automation script will stop because the connection gets broken.
For me, that means logging into the Raspberry Pi and typing “node runServer.js” again to re-start it. The solution is to make sure the Hue hub (and RPI) are both on battery backups. Once I did that, this thing works 100% flawless. Nate ( @njschwartz ) is my hero.

Install NodeJs
On windows just DL and install https://nodejs.org/en/download/
On a raspberry pi:
If you have an older Pi (B/B+ etc.) this guide should work: http://weworkweplay.com/play/raspberry-pi-nodejs/
If you have a newer Pi(2./3 etc.) try this one (the nodejs instructions are down towards the bottom): http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/12

Assuming you have node installed correctly simply type npm install lutronpro. This will install the server as well as all it’s dependencies very quickly. So much better than python. :slight_smile:

Go to my git repository: https://github.com/njschwartz/lutronpro3 and grab the runServer.js file. You can either DL it or just copy the couple of lines of code into a file and name it runServer.js (or any name you want as long as it ends with .js). Make sure you change the two IP address to the correct ones for your network. Place the file wherever you want and then at the command line (in the same directory you saved it) type node runServer.js

You should see some output saying listening and login etc. and hopefully Connected!. The server is up and running.

in the ST IDE add the new repository njschwartz lutronpro master From there install/publish the new service manager SmartApp. Then just run the smartapp from your phone and see what happens. (@stephack noted that the name is pretty similar so make sure you pick the right one).

It should find your server and then your picos. The scenes aren’t setup yet so just hit done when/if you get to that screen. That is really it.

Thank you @AdamHLG ! I spent a few hours messing around with the python stuff, only for button pushes on my picos to not register anywhere. Glad I abandoned it in hopes of someone sharing their nodejs experience!

Once I ran the npm install lutronpro command everything started working in nodejs. It works flawlessly. Thank you!

1 Like

sure thing!

@njschwartz - been trying to get node.js based service manager to work. I am receiving the following error:

Listening on port 5000…
Received: login:
Received: password:
Received: GNET>
Connected!
Request for LIP List
Get LEAP Data
About to exit with code: 1
events.js:182
throw er; // Unhandled ‘error’ event
^

Error: All configured authentication methods failed
at tryNextAuth (/config/node_modules/ssh2/lib/client.js:380:17)
at SSH2Stream.onUSERAUTH_FAILURE (/config/node_modules/ssh2/lib/client.js:591:5)
at emitTwo (events.js:125:13)
at SSH2Stream.emit (events.js:213:7)
at parsePacket (/config/node_modules/ssh2-streams/lib/ssh.js:3929:10)
at SSH2Stream._transform (/config/node_modules/ssh2-streams/lib/ssh.js:669:13)
at SSH2Stream.Transform._read (_stream_transform.js:186:10)
at SSH2Stream._read (/config/node_modules/ssh2-streams/lib/ssh.js:251:15)
at SSH2Stream.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at SSH2Stream.Writable.write (_stream_writable.js:290:11)
at Socket.ondata (_stream_readable.js:642:20)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:266:12)

I have a Pro hub and as you can see, it logs on successfully. The error occurs when scanning for Pico devices. I did read on another forum that Lutron has changed they rsa key recently, but didn’t think this components uses a key?

Does the nodejs version require the pro lutron Hub? I have the standard one and I’m getting a timeout issue.

Also that lutronpro3 link you have 404’ed

Hey all! Sorry for not being around lately. Real life has taken pretty much all my time of late. I am glad some are still finding a use for this and I apologize that I haven’t worked much to improve it, hopefully that will change.

@abarnas So it looks like it is connecting to the telnet server, but is failing connecting via SSH to request the LEAP data. I suppose it is possible that this is due to the rsa key changing, but I cannot say for sure. What I would do to troubleshoot this is to try to use putty to ssh directly into the Lutron hub and see if that is successful. Based on that we can try to figure out where it is going wrong and go from there.

@dennybono The node version does indeed require a Pro hub. I had built it this way because after the official integration came out there seemed to be little point in supporting the standard hub. May I ask what you are trying to do or why you are opting not to use the official integration? That being said, I have plans to add support for any hub back into the node version, I just haven’t gotten that far yet due to being super busy with work. The main reason I am looking at adding that is because I have heard from several people that they are approaching the 50 device limit and want to be able to operate multiple hubs. Of course with the new Lutron hub maybe that won’t be an issue either I don’t know…

1 Like

@njschwartz it looks like an rsa key issue. They seem to have changed it with a recent auto update. Any tips on how to get the new key?

Hmm… Interesting. I haven’t played around with mine lately. I’ll have to see if I can log in or not. That’s super annoying if it turns out to be the case though. I wonder if it’s a response to these 3rd party non sanctioned integrations. I know Vera and home assistant are both using it too. This would break all of that.

As far as the key goes, I originally got it from the Vera integration someone else had built. I have no idea where he got it from, but I’m guessing it came from the Lutron phone app. I guess I’ll have to look and see what I can dig up…

1 Like

So yea, just read another post about it and they did indeed change the key AND unfortunately also removed the LEAP server from the app thus the key is no longer embedded in the app. :confused: That means getting the key will be difficult to impossible. They have apparently implemented a new LEAP server that connects via HTTPS that may hold some promise for the future but hard to say at this point.

What this means is that for non pro users my integration is completely broke. For those with a pro hub, it should still be working if you already had it setup. For those with a pro hub trying to setup fresh, it currently won’t work, but I can fix that with an update to my nodejs code.

This is super frustrating. I don’t really understand why companies insist on closed ecosystems like this. I wish they would just let people do what they want with the products they purchase. I will keep an eye on things and update as I can to keep things working.

1 Like

@dennybono Looks like the link to the file does 404. @njschwartz will need to fix that I guess or provide a better link as it is his file. Sorry I cannot help there.

The link is: https://github.com/njschwartz/lutronpro It looks like you somehow added a 3 to the end of it which is why it is 404. Should be working…however due to the new Lutron updates this whole integration is broke.

On 10/5 Lutron made some changes, including a new public key….
http://forum.micasaverde.com/index.php/topic,35577.msg331343.html#msg331343

yep I read that…not awesome. Really regretting going with Lutron now. I hate how companies can just change things and screw their users. I get that non of this was official or ever meant to be, but why not embrace the fact that some people like to tinker and only bought their product because of that ability…super disappointing but I will keep working to see what we can do. In an ideal world we can get the new key, but that may never happen.

I checked the node.js code. If I understand correct, It is not easy to remove SSH part. Because it relies on the SSH part to get the list of devices.

It won’t be that hard I don’t think. Yes it is currently how I’m getting devices but you can get them from the LIP server as well. The one flaw as I mentioned before is that the LIP server was sometimes messed up. Maybe they fixed that glitch with all these updates. Regardless it’s all we got.

Did you see in that link I sent that they switched to HTTP/TLS? The phone app now uses a dynamic key pair apparently, and I’m wondering if something can be done with TLS.

If I understand right, the LIP part is also from SSH connection. I checked telnet API document, there is no API to list all devices. Even the guideline says the device list should be retrieved from app’s integration report.

No that’s not correct. The LEAP server was the the ssh server and had a way of getting a list of all devices. The LIP server is the Telnet version and there is indeed a way to get that integration report, the same one you get with the app. Like I said, for some people the integration report had errors in device IDs (not clear how that happens and if it is still an issue) which is why I chose to use the data from the LEAP server. So I just need to rework things a bit to remove all the ssh stuff. The primary implication of that is that non pro hubs after completely out of luck. For pro users not much of anything should change.

I did see that and I think that is probably the approach that we’ll need to take. I’m not much of an expert on SSL so I’m not sure how much I can contribute to that. I plan to fiddle with it, and of course if someone does find a solution I’ll attempt to implement it.