Lutron RadioRA 2 (and Caseta) plugin

Posted on
Sun Feb 15, 2015 10:18 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

Plugin working well.

Now that I'm settling in with it, I'm curious about how other users are implementing certain integrations outside of RadioRA 2.

1. I have a few devices integrated with other plugins (Pentair Pool) for example, that currently work off of an Insteon Keypad button. i.e. - there's just a trigger, if say, Keypad button 5 comes on(off), then the action is to turn on(off) the pool lights. I also have an inverse set of triggers to ensure the keypad button state matches the device being controlled, so if, say I turn on the pool lights using the pool's interface, the keypad button lights to correctly reflect the state.

So, how would I integrate this with a RadioRA 2 keypad? Only a 'button press' (no 'on' or 'off') is transmitted, correct? Can the plugin detect a button press as a trigger event or whatever? It would probably make sense to just up the exact same set of triggers, just using the button's LED (LED goes on, activate pool lights, etc...) I actually don't have a RadioRA 2 keypad installed with any idle buttons. Does an idle button just toggle it's own LED on and off. Does the plugin have the ability to light the LEDs?

2. Next thing is garage doors. I want a RadioRA button to activate the door (easy), but with the LED reflecting the state. There are inputs on the VCRX... is there a way to link these to a button LED AND have the same button activate an output? Or is this just more easily done through Indigo (assuming the plugin can control a button LED). And if that's the case, is there even a point in retaining my current wired door sensors (I could just replace them with the wireless Insteon door sensors).

3. And more of a question about peoples' preferences... Is anyone using the Lutron time clock, or just defining the same kind of stuff into a phantom button, and then activating said button with Indigo? (This seems a bit easier to me, as changing things in the Lutron time clock is a bit more cumbersome than doing it in Indigo - and without the benefit of conditional logic). Is there a benefit to using Lutron's time clock that I don't know?

http://nerdhome.jimdo.com

Posted on
Mon Feb 16, 2015 10:21 am
RatRanch offline
Posts: 68
Joined: Sep 25, 2013

Re: Lutron RadioRA 2 plugin

The plugin can detect button presses as well as controlling the LED state. So it is possible to use a button press to activate an Indigo trigger. Indigo sees a button press as an "on" event and button release as "off". If you define a VCRX output as momentary--the correct setting for a garage door opener--it will send "on" messages only.

Unlinked buttons send press messages but I don't know if they modify their LED state.

To integrate a keypad button with a VCRX, you would need to link the button to a VCRX output and the button LED to a VCRX input. I don't think RadioRA 2 allows that but there are two ways it could be implemented in Indigo. The first way would be to link a button to the VCRX and then use an Indigo trigger to override the LED state based on the VCRX input LED state. The second way would be to leave the button unlinked and implement all the logic in Indigo. I think I would prefer the first way because the button would still open the garage door even if Indigo wasn't running.

My personal preference is to use the Lutron time clock only for static schedules ("home" and "vacation" modes) and use phantom buttons for dynamic events (like house occupied/unoccupied).

-Jim

Posted on
Fri Feb 27, 2015 8:41 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

As I add devices, I'm discovering more and more stuff. I just added a 10 button tabletop keypad. It has buttons numbered above 7, like 10, 15, 16, etc... I got worried about the label when configuring a device that says add button (1-7), but it totally works for higher numbered buttons (not that you'd really filter it down to prevent it anyway), but just so everyone knows, this works great.

One thing that doesn't exactly, and is not the fault of the plugin is the bottom two buttons on the 10 button keypad (buttons 16 and 17). While the buttons program fine, the LEDs don't. Well, actually those buttons don't HAVE LEDs, so of course they don't work. It's an issue as I use it to shut a bunch of lights off (and there's a few other things that get triggered along with the Lutron stuff, like lights from the pool plugin, etc...). Anyway, so Indigo watches for the button to go to 'on' and then while RadioRA is doing it's thing with the lights, Indigo runs the other items like shutting off pool lights and stuff. Worked perfectly the day I set it up, but never again after that. It took me a bit to figure out why. Since there's not LED to tie to the button state, the button device in Indigo never goes to 'off'. And since it's never off, hitting it again doesn't TURN the button device on (it's already on). So nothing activates the trigger. Easy workaround though, in the list of actions in the trigger, I also put in an action to turn the button device back off. So now the next time I hit it, it will turn on again. Works great... just wanted to share that for others that run into it.

http://nerdhome.jimdo.com

Posted on
Sun Jun 14, 2015 4:04 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

Anyone having issues after upgrading their main repeater firmware?

I actually seemed to brick my MR during the upload, so Lutron sent me a new one. I have it all set up, but my plugin now behaves really weird. Indigo is displaying '1' for the brightness level of anything I change, etc...

Wondering if there's some serial setting on the Main Repeater I forgot about or something.

Continuing to troubleshoot, but was just wondering if it was just me or more of something affecting everyone.

http://nerdhome.jimdo.com

Posted on
Sun Jun 14, 2015 4:11 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RadioRA 2 plugin

Did you remember to recreate whichever integration ID (login) that Indigo is using?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jun 14, 2015 4:46 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

This is what I get when I turn a load (ID 28) off:

Code: Select all
  Lutron RadioRA 2 Debug          Received an Output message:
~OUTPUT,28,1,0.00
  Lutron RadioRA 2 Debug          Received an Output message:
~OUTPUT,28,29,6
  Lutron RadioRA 2 Debug          Received an Output message:
~OUTPUT,28,30,1,0.00

http://nerdhome.jimdo.com

Posted on
Sun Jun 14, 2015 6:56 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

FlyingDiver wrote:
Did you remember to recreate whichever integration ID (login) that Indigo is using?


I'm connecting to the serial port, so that's not an issue (plus, I'm getting communication, just seems like there's something not 'quite' right going on).

Similarly though, I'm also having another issue (totally unrelated to this plugin). The new main repeater does have all of the old integration ids. Everything carried across properly. However, Using Lutron's iPhone app (and also Homesense, which is somewhat better), I can't seem to connect remotely. Everything works with a local IP address/port, but when trying to access externally with port forwarding it just doesn't work. (Notes: It used to, so something has changed. And other services do (Indigo, weather snoop, etc...) so it's not a router or IP address issue).

Anyway, back to the topic at hand, I'm wondering if the serial output posted above is what we're supposed to see or not.

http://nerdhome.jimdo.com

Posted on
Sun Jun 14, 2015 7:31 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RadioRA 2 plugin

I looked at the Lutron Integration protocol document (latest is from April, 2015), and there's something odd going on. The output you're seeing is acknowledgement messages for three OUTPUT commands, all for device 28, with action codes 1, 29, 30. The problem is, I can't find anything that documents action codes 29 and 30.

How are you turning that load off? With a keypad device, or a command from Indigo?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jun 14, 2015 7:34 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

Ha, I'm going through that right now too.

I get the same kind of output regardless of whether or not I use a Lutron input (wall device, or app), or instigate it with Indigo, or even typing the serial command myself.

I'll probably give Lutron a call tomorrow (customer service there is pretty legit so far).

http://nerdhome.jimdo.com

Posted on
Mon Jun 15, 2015 7:23 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

Ok, so I called customer service, the guy pretty much finished my sentence when I told him there were 3 lines of responses "action code 29, right?".

Basically, he said that those were for some more advanced or commercial applications and had 'bled down' into the latest update.

He didn't indicate there was any fix coming and said we'll just have to update "whatever driver you're using" to ignore it.

So, on one hand, I hate to come in requesting fixes on something that was free... (yet here I am anyway... :D ). Also, presuming everyone else is going to update their Main Repeaters at some point, I think you'll all have to deal with this eventually.

So, Jim (if you still follow this thread) any possibility of an update to ignore action code 29 and 30?

http://nerdhome.jimdo.com

Posted on
Mon Jun 15, 2015 7:58 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RadioRA 2 plugin

If you look at the plugin.py file inside the indigoPlugin folder, at line 233 you'll see:
Code: Select all
   
elif action == '29':  # Lutron firmware 7.5 added an undocumented 29 action code; ignore for now
    return

just change that to:
Code: Select all
   
    elif action == '29':  # Lutron firmware 7.5 added an undocumented 29 action code; ignore for now
        return
    elif action == '30':  # Lutron firmware ??? added an undocumented 30 action code; ignore for now
        return

That's after the debug statement, so that won't go away.

IMO, that section of code should be changed to only run for specific action codes. As it is now, it assumes that there's no other possible codes. I would change it to something like:

Code: Select all
   def _cmdOutputChange(self,cmd):
      self.debugLog(u"Received an Output message: " + cmd)
      cmdArray = cmd.split(',')
      id = cmdArray[1]
      action = cmdArray[2]
      if action == '1':  # set level
         level = cmdArray[3]
         # something else to consider for future enhancements
         # fade = cmdArray[4]
         # delay = cmdArray[5]
         if id in self.zones:
            zone = self.zones[id]
            if level == '0':
               zone.updateStateOnServer("onOffState", False)
            else:
               zone.updateStateOnServer("onOffState", True)
               zone.updateStateOnServer("brightnessLevel", int(float(level)))
         elif id in self.switches:
            switch = self.switches[id]
            if level == '0.00':
               switch.updateStateOnServer("onOffState", False)
            else:
               switch.updateStateOnServer("onOffState", True)
         elif id in self.fans:
            fan = self.fans[id]
            if level == '0.00':
               fan.updateStateOnServer("onOffState", False)
            else:
               fan.updateStateOnServer("onOffState", True)
               if level == '25.10':
                  fan.updateStateOnServer("speedIndex", 1)
               elif level == '50.20':
                  fan.updateStateOnServer("speedIndex", 2)
               elif level == '75.30':
                  fan.updateStateOnServer("speedIndex", 2)
               else:
                  fan.updateStateOnServer("speedIndex", 3)
         return
      elif action == '2':  # start raising
         return
      elif action == '3':  # start lowering
         return
      elif action == '4':  # stop raising/lowering
         return
      elif action == '5':  # start flash
         return
      elif action == '6':  # pulse
         return
      return


I left in checking for codes 2-6 as implementing something for those might make sense.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2015 8:09 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

So I suppose it's obvious now that I didn't even look at the plugin code (since action 29 was already handled).

Fixed now though, and everything working normal again. Thanks!

http://nerdhome.jimdo.com

Posted on
Tue Jun 16, 2015 11:23 am
RatRanch offline
Posts: 68
Joined: Sep 25, 2013

Re: Lutron RadioRA 2 plugin

FlyingDiver wrote:
If you look at the plugin.py file inside the indigoPlugin folder, at line 233 you'll see:
IMO, that section of code should be changed to only run for specific action codes. As it is now, it assumes that there's no other possible codes. I would change it to something like:

Code: Select all
   def _cmdOutputChange(self,cmd):
      self.debugLog(u"Received an Output message: " + cmd)
      cmdArray = cmd.split(',')
      id = cmdArray[1]
      action = cmdArray[2]
      if action == '1':  # set level
         level = cmdArray[3]
         # something else to consider for future enhancements
         # fade = cmdArray[4]
         # delay = cmdArray[5]
         if id in self.zones:
            zone = self.zones[id]
            if level == '0':
               zone.updateStateOnServer("onOffState", False)
            else:
               zone.updateStateOnServer("onOffState", True)
               zone.updateStateOnServer("brightnessLevel", int(float(level)))
         elif id in self.switches:
            switch = self.switches[id]
            if level == '0.00':
               switch.updateStateOnServer("onOffState", False)
            else:
               switch.updateStateOnServer("onOffState", True)
         elif id in self.fans:
            fan = self.fans[id]
            if level == '0.00':
               fan.updateStateOnServer("onOffState", False)
            else:
               fan.updateStateOnServer("onOffState", True)
               if level == '25.10':
                  fan.updateStateOnServer("speedIndex", 1)
               elif level == '50.20':
                  fan.updateStateOnServer("speedIndex", 2)
               elif level == '75.30':
                  fan.updateStateOnServer("speedIndex", 2)
               else:
                  fan.updateStateOnServer("speedIndex", 3)
         return
      elif action == '2':  # start raising
         return
      elif action == '3':  # start lowering
         return
      elif action == '4':  # stop raising/lowering
         return
      elif action == '5':  # start flash
         return
      elif action == '6':  # pulse
         return
      return


I left in checking for codes 2-6 as implementing something for those might make sense.


Agree 100%!!

I posted an updated plugin that ignores undefined action codes as you suggested, reducing the possibility of future firmware updates breaking it.

-Jim

Posted on
Tue Jul 14, 2015 9:27 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Lutron RadioRA 2 plugin

Does the plugin handle shades? I don't see a device type for them, but maybe they show up just like a dimmer?

http://nerdhome.jimdo.com

Posted on
Wed Jul 15, 2015 3:27 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RadioRA 2 plugin

In the Lutron programming world, a shade is handled like a dimmer. All the way on (100%) is all the way open.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 4 of 14 1, 2, 3, 4, 5, 6, 7 ... 14

Who is online

Users browsing this forum: No registered users and 12 guests