I wanted to come on here and let people know that a friend of mine was able to minimally modify this plugin and have it work for controlling the Lutron SmartBridge Pro 2. It should also work with the regular SmartBridge 1 and 2 as well, but I haven't been able to test that. Obviously it doesn't control as many different devices as the RA2 does, but the dimmers that I have it paired with operate extremely quickly! The Pico remotes are extremely responsive too.
The first step was to enable Telnet communication on the SmartBridge. This was done through the advanced settings in the Lutron iOS app. After that, I set my IP address on the SmartBridge to be static. Once I had done that, I exported a list of Integration IDs, and headed to Indigo with this plugin.
The only setup required was to use a socket connection to the SmartBridge, connecting on port 23. After I knew the IP address and port that I was attempting to contact, the only thing left was to get it to accept authentication. A few lines of code was all it took to get that working.
- Code: Select all
self.conn = self.openSerial(u"Lutron SmartBridge", serialUrl, 9600, stopbits=1, timeout=2, writeTimeout=1)
if self.conn is None:
indigo.server.log(u"Failed to open serial port")
return
self.debugLog(u"Server says: " + self.conn.read(len('login: ')))
self.conn.write("lutron\r\n")
self.debugLog(u"Server says: " + self.conn.read(len('password: ')))
self.conn.write("integration\r\n")
self.debugLog(u"Server says: " + self.conn.read(len('GNET> ')))
self.portEnabled = True
These are the default user credentials for the SmartBridge, and as far as I'm aware, are unable to be modified by the end user.
After we had authenticated, the only other quirk we had was to get it to accept commands. It seems that the SmartBridge, as posted to RA2, expects an \n after sending a command. An easy fix as such was all that was required.
- Code: Select all
def _sendSerialCommand(self, cmd):
self.debugLog(u"Sending serial command: " + cmd)
self.conn.write(cmd + "\n")
This setup works GREAT. I really don't have any complaints with how well it works - especially with a system that it was not originally intended to be used with this plugin!
That being said, I was curious about one thing, and had a hopeful feature request. When I had originally used telnet to connect to my device, I discovered through your blog the ability to send fade durations to the lights, in addition to their brightness level. Is that something that could be easily added do you think? I'd much rather have the controller be handling the fade than Indigo incrementally decreasing a fade value over time. The main reason being that if a user interrupts it at the switch, Indigo would just keep going, and the switch command would be ignored, whereas sending the fade instructions to the controller first, the fade would be smoother when it did happen, and if interrupted, would stay interrupted.
Thanks again for all of your amazing work. I can't tell you how big of a happy dance I did when I got this plugin working with my system. Incredible stuff!