Lutron OH2 binding

Hmmm. I’m thinking about going down the Lutron RadioRa2 route vs z-wave for reliability. Does this tie in decently already?

I have an RA2 system with a bit more than 100 devices; including about 5 Pico remotes. Are there any plans to support these delicious wireless remotes?

Really like this binding, auto discovery, -how nice (came from VeraPlus…)

Hi,

The binding doesn’t seem to work with Homeworks QS, or at least not my Homeworks QS system.

It autodiscovers the bridge but then hangs at “initialising”, and does the same thing if I manually create a Things file:

lutron:ipbridge:radiora2 [ ipAddress="192.168.1.139", user="lutron", password="integration" ]

The error is:

 Exception occured while calling thing handler factory 'org.openhab.binding.lutron.internal.LutronHandlerFactory@139c1fae' 

Would be great if anyone who has had success getting the binding to work with Homeworks QS could please shout. At the moment I just have hacky exp scripts telnetting to Lutron, which isn’t very neat at all…

Hi Tim,

I’m looking to integrate a Grafik Eye QS + QSE-CI-NWK-E. I was wondering if you’ve published your modifications to GitHub?

Thanks, Paul

Paul,

I’m assuming you are looking to modify the binding to also work with NWK (which has a similar but different protocol than the PRG)? If so - my changes were just merged and you can find them openhab2-addons.

That was my first binding and it’s a little rough but feel free to ask me any questions if you need…

Tim

Is there more to the error in the logs?

Thanks. Hopefully there’s a reasonable amount in common with both GRX and QS. I’m new to both OH and programming a Lutron system (and my house is only half wired) so it might take a little while…

I think I can see why the binding doesn’t work for Homesworks QS systems.

Looking at the code for the binding, it seems to expect that the telnet session prompt is “GNET>”. In fact the Homeworks QS prompt is “QNET>” - so presumably the binding should be watching for either variant?

If my knowledge of Github and creating bindings was greater than zero then I’d try to change this myself - perhaps someone else is knowledgeable/kind enough to do so?

Dan

Hi Allan, I added a new handler to the binding to allow for the use of phantom (or Virtual) buttons on the repeater. This allows you to set your scenes using RadiaRa2 Config studio and activate them using OH2. Currently, I only have it for the phantom buttons 1-10.

My main reason to add this handler was to turn on/off lights all at the same time instead of using a rules where OH2 has to process each light individually. I found this led to a “stagged” action when turning on a series of lights in the same area. (This was really noticable on Raspberry pi).

I’ll work on a PR later this week. (I’ll be honest…I have never done use Git before, so that is new to me!)

Thanks for making this binding, I use it daily!

Does this binding work with the Smart bridge? I only have the smart bridge not the pro.

No, it does not work with the non-pro version. Only the Smart Bridge Pro allows for telnet integration which is what the binding uses to communicate with and control the Lutron lights.

I started using OpenHab this evening, mostly to mess around with MQTT.

HOWEVER

When looking through the available bindings, I stumbled across this one.

I am a professional Lutron dealer/installer/programmer based in the UK. I mainly focus on Homeworks QS.

I have only recently started looking at java, and I would love to write something for openhab to control HWQS.

I have developed something similar for Crestron systems (using SIMPL+, Crestron’s programming language loosely based around C++, except it’s called a module rather than a binding). This module primarily makes it easy for programmers to add sliders and buttons to their user interfaces, and have the status of those items displayed back from HWQS in real time.

So I am familiar with Crestron, C++, VERY familiar with the Lutron integration protocol but lacking in the OH department (Java mostly)

I would love to get into this, and learn more java, so if anyone can give me any tips or pointers on developing for OH that would be great, and I want to help as much as I can on this, particularly getting it to work on HWQS so ask me anything.

Also can confirm, will not work for HWQS.

I am also surprised there is not a user-configurable telnet client already built into openhab?

Right now I have got it controlling HWQS but I am going from OH2 to Crestron (via http post) then to Lutron

(which will help nobody and I dont like it, too cumbersome. I am trying to find a replacement for the Crestron)

Would be great if someone smarter than me could confirm if making the binding work for HWQS really is as easy as changing the expected Telnet prompt…

You know, I imagine it would be.(but need to double check that). when I get
home I will send a link to the prospective integration protocols.

I have also written a couple of python scripts doing the same thing, will
send over when I get a chance, might be tomorrow evening though

Were you able to make progress on this, @dwbro1? I also am new to Caseta and OpenHAB. I successfully have two dimmers and two pico remotes configured with the Lutron OH2 binding.

Have you been able to add your Pico remotes to your OpenHAB system, @Dansker? I have the Caseta system with the SmartBridge Pro 2 using this Lutron binding. My Pico remotes show up as a “seeTouch Keypad” in the PaperUI. They work perfectly fine with the following channels:

(note: replace nameofpico with the name of your pico Thing)
lutron:keypad:nameofpico:button2 = top button (100%/ON button)
lutron:keypad:nameofpico:button3 = middle button (favorite button)
lutron:keypad:nameofpico:button4 = bottom button (0%/OFF button)
lutron:keypad:nameofpico:button5 = raise button (increase/UP button)
lutron:keypad:nameofpico:button6 = lower button (decrease/DOWN button)

The remaining channels are unused (as far as I can tell). This includes button1.

Something to note when making rules for these Pico remotes, the Lutron hub recognizes both the button press and the button release. So each time a button is used, there are two communications:

~DEVICE,2,3,3
~DEVICE,2,3,4
(Output from my Lutron SmartBridge Pro 2 when I press (and of course release) the middle button on my Pico which is ID 2 in the hub.)

David

easily found on google:

Homeworks QS definitely spits out QNET

my .py script went a little like this:

import xml.etree.ElementTree as ET
import telnetlib

Hostname = "192.168.1.2"
Username = "user1"
Password = "user1"
commandString = "#DEVICE,7,70,3"

def starter():
Feedback = True
tn = telnetlib.Telnet(Hostname)

tn.read_until('login: ')
tn.write(Username + '\r\n')
tn.read_until('password: ')
tn.write(Password + '\r\n')

tn.read_until("QNET> ")
tn.write(commandString + '\r\n')

if Feedback:
    response =  tn.read_until("\n", 1)
    tn.write('\x1d' + '\r\n')
    tn.close()
    if response == 'QNET> ':
        return False
    else:
        return response
else:
    tn.read_until("QNET> ")
    tn.write('\x1d' + '\r\n')
    tn.close()

starter()

But I had to have one of these per command (replicating a keypad button)

Was using this for tasker integration on android phone.

Do we know if anyone who can develop these bindings is working on this?

It is making me want to pick up binding development, but I need to learn how first!

Just an update in case anyone cares.
I have rewritten the python code so that it takes the command in the form of 4 arguments passed from the exec binding.

This is working for me to control homeworks QS for now…

#!/usr/bin/python


import xml.etree.ElementTree as ET
import telnetlib
import sys


Hostname = "192.168.1.11"
Username = "user2"
Password = "user2"
commandString = "#" + sys.argv[1] + "," + sys.argv[2] + "," + sys.argv[3] + "," + sys.argv[4]
 
def starter():
Feedback = True
tn = telnetlib.Telnet(Hostname)

tn.read_until('login: ')
tn.write(Username + '\r\n')
tn.read_until('password: ')
tn.write(Password + '\r\n')

tn.read_until("QNET> ")
tn.write(commandString + '\r\n')

if Feedback:
    response =  tn.read_until("\n", 1)
    tn.write('\x1d' + '\r\n')
    tn.close()
    if response == 'QNET> ':
        return False
    else:
        return response
else:
    tn.read_until("QNET> ")
    tn.write('\x1d' + '\r\n')
    tn.close()

starter()