Lutron LEAP protocol plugin - first test release

Posted on
Sun Jan 01, 2023 12:31 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Lutron LEAP protocol plugin - first test release

https://github.com/FlyingDiver/Indigo-L ... g/2022.0.2

Supports Bridges:

Lutron Caséta Smart Hub (L-BDG2-WH)
Lutron Caséta Smart Bridge PRO (L-BDGPRO2-WH)
RadioRA 2 Select Main Repeater (RR-SEL-REP2-BL)
RadioRA 3 All-in-One Processor (RR-PROC3)
Homeworks QSX Processor (HQP7)


Supported Device Types:

Wall and plug-in dimmers
Wall Switches
Shades
Fans
Occupancy/Vacancy Sensors
Pico Remotes

I have only tested with the Lutron Caséta Smart Hub (L-BDG2-WH) and a couple of Pico remotes and plug-in dimmers. And an occupancy sensor. Other listed devices are supported in the code, but untested.

Note that Pico Remotes and the Occupancy sensors do not exist as Indigo devices. They can only be used as triggers for action groups. These devices have no "state", so I didn't create devices for them.

When the plugin starts up, it uses zero-conf (aka Bonjour) to get a list of Lutron bridge-type devices on your LAN. Not all discovered devices work with the plugin (the RRa2 Connect Bridge does not, for example). Create a "Lutron Bridge" plugin device, and select your bridge from the popup. If nothing shows up, make sure the device is online (you can see it in the Lutron mobile app). You can enable detailed debugging to see if the discovery process is doing anything. I

When you create the Bridge device, you'll be prompted to pair the plugin with the bridge. You need to press the pairing button on the device. On the Caseta hub I'm testing with, it's a button next to the power connector. You should see something like this in the Indigo log:

Code: Select all
   Lutron Leap                     Starting pairing process for Bridge Lutron-05124472.local., please press the pairing button on the Bridge.
   Lutron Leap                     Pairing complete: Bridge version is 1.115.

Once that's complete, use the menu command to "Create Devices from Bridge". You cannot manually create the devices, only the auto-create method is supported.

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

Posted on
Sun Jan 01, 2023 12:37 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

If things don't work the way you expect, here's what I'll need to figure it out. First, try the menu command to "Write Bridge Data to Log". Then include that info in your post.

Also, due to the asynchronous code in the plugin, not all errors will get reported to the Indigo log. Please restart the plugin with the "Reload in Interactive Shell" command, then post error messages from that Terminal window along with the other info.

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

Posted on
Mon Jan 02, 2023 7:30 am
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Lutron LEAP protocol plugin - first test release

Joe,

I can't get the version to upgrade to 2022.0.2. Are the Leap plugin files located in the GitHub link you provided just still named 2022.0.1?

Jody

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Mon Jan 02, 2023 7:50 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

Fixed. Download again.

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

Posted on
Mon Jan 02, 2023 8:19 am
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Lutron LEAP protocol plugin - first test release

That resolved the version 2022.0.2.

The plugin created the Fan device in Indigo but when I select High, Medium, Low, Off in the UI, I get an Error in the Log,

Indigo Log

Code: Select all
Jan 2, 2023 at 9:03:21 AM
   Reloading plugin "Lutron Leap 2022.0.2" using API v3.1
   Stopping plugin "Lutron Leap 2022.0.2" (pid 53992)
   Lutron Leap Debug               stop_concurrent_thread called
   Lutron Leap Debug               Lutron Bridge: Stopping Device
   Stopped plugin "Lutron Leap 2022.0.2"
   Starting plugin "Lutron Leap 2022.0.2" (pid 54018)
   Trigger                         Store Outside Temperature
   Started plugin "Lutron Leap 2022.0.2"
   Lutron Leap Debug               startup
   Lutron Leap Debug               run_async_thread starting
   Lutron Leap Debug               async_main starting
   Lutron Leap Debug               startup complete
   Lutron Leap Debug               Lutron Bridge: Starting Device
   Lutron Leap Debug               Lutron Bridge: Creating bridge at Lutron-032e03d0.local.
   Lutron Leap Debug               Lutron Bridge: Connecting Bridge
   Lutron Leap Debug               Lutron Bridge: Bridge Connected
   Lutron Leap Debug               Found device: Smart Bridge 2
   Lutron Leap Debug               Found device: Living Room_Ceiling Fan
   Lutron Leap Debug               Lutron Bridge: Found Area: {'id': '1', 'name': 'root', 'parent_id': None}
   Lutron Leap Debug               Lutron Bridge: Found Area: {'id': '2', 'name': 'Living Room', 'parent_id': '1'}

Jan 2, 2023 at 9:03:46 AM
   Lutron Leap                     Creating Devices, Grouping = Type
   Lutron Leap                     Device 'Smart Bridge 2' (1), Area = None
   Lutron Leap                     Device 'Living Room_Ceiling Fan' (2), Area = 2
   Lutron Leap                     Creating leapFan device: 'Living Room_Ceiling Fan (2)' (1713852130:2) in 'Lutron Fans'
   Lutron Leap                     Creating Devices done.
   Lutron Leap Debug               Living Room_Ceiling Fan (2): Starting Device
   SQL Logger                      creating table device_history_1145215022 for "Living Room_Ceiling Fan (2)"

Jan 2, 2023 at 9:04:01 AM
   Lutron Leap Error               plugin does not define method actionControlSpeedControl
   Lutron Leap Error               plugin does not define method actionControlSpeedControl
   Lutron Leap Error               plugin does not define method actionControlSpeedControl
   Lutron Leap Error               plugin does not define method actionControlSpeedControl


Bridge Data:

Code: Select all
Jan 2, 2023 at 9:09:54 AM
   Lutron Leap                     Bridge Data:
{
    "1713852130": {
        "areas": {
            "1": {
                "id": "1",
                "name": "root",
                "parent_id": null
            },
            "2": {
                "id": "2",
                "name": "Living Room",
                "parent_id": "1"
            }
        },
        "buttons": {},
        "devices": {
            "1": {
                "area": null,
                "button_groups": null,
                "current_state": -1,
                "device_id": "1",
                "device_name": "Smart Bridge 2",
                "fan_speed": null,
                "model": "L-BDGPRO2-WH",
                "name": "Smart Bridge 2",
                "occupancy_sensors": null,
                "serial": 53347280,
                "tilt": null,
                "type": "SmartBridge",
                "zone": null
            },
            "2": {
                "area": "2",
                "button_groups": null,
                "current_state": -1,
                "device_id": "2",
                "device_name": "Ceiling Fan",
                "fan_speed": "Off",
                "model": "PD-FSQN-XX",
                "name": "Living Room_Ceiling Fan",
                "occupancy_sensors": null,
                "serial": 38000162,
                "tilt": null,
                "type": "CasetaFanSpeedController",
                "zone": "1"
            }
        },
        "occupancy_groups": {},
        "scenes": {}
    }
}


Also, due to the asynchronous code in the plugin, not all errors will get reported to the Indigo log. Please restart the plugin with the "Reload in Interactive Shell" command, then post error messages from that Terminal window along with the other info.


I don't know how to "Reload in Interactive Shell"
Thanks

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Mon Jan 02, 2023 8:28 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

I don't know how to "Reload in Interactive Shell"
Attachments
Screenshot 2023-01-02 at 9.27.48 AM.png
Screenshot 2023-01-02 at 9.27.48 AM.png (146.13 KiB) Viewed 2561 times

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

Posted on
Mon Jan 02, 2023 8:30 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

cuhouse wrote:
That resolved the version 2022.0.2.

The plugin created the Fan device in Indigo but when I select High, Medium, Low, Off in the UI, I get an Error in the Log,


That's odd. Let me look...

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

Posted on
Mon Jan 02, 2023 8:38 am
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Lutron LEAP protocol plugin - first test release

I don't have that menu item?
Attachments
Screen Shot 2023-01-02 at 9.36.44 AM.png
Screen Shot 2023-01-02 at 9.36.44 AM.png (48.22 KiB) Viewed 2560 times

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Mon Jan 02, 2023 8:41 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

My bad, you need to enable it on the plugins tab of the preferences:
Attachments
Screenshot 2023-01-02 at 9.38.58 AM.png
Screenshot 2023-01-02 at 9.38.58 AM.png (521.93 KiB) Viewed 2551 times

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

Posted on
Mon Jan 02, 2023 8:56 am
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Lutron LEAP protocol plugin - first test release

Joe,

OK reloaded Leap in Interactive Shell but not seeing anything other than what I sent earlier in the Indigo log.

I selected High, Medium, Low and Off again and this was what was in the terminal.

Jody
Attachments
Screen Shot 2023-01-02 at 9.51.51 AM.png
Screen Shot 2023-01-02 at 9.51.51 AM.png (33.16 KiB) Viewed 2531 times

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Mon Jan 02, 2023 8:58 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

Yeah, turns out I forgot to implement the Fan controls for this release. I started to, then didn't finish. :(

I'll let you know when there's a version you can actually test. Sorry about that.

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

Posted on
Mon Jan 02, 2023 9:09 am
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Lutron LEAP protocol plugin - first test release

Joe,

Certainly no problem at all. I am just glad to help you with testing.

I hope to use Lutron Serena Shades in the future so it is to my advantage to help :D

Thanks again,

Jody

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Mon Jan 02, 2023 10:59 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

Try: https://github.com/FlyingDiver/Indigo-L ... g/2022.0.3

Do the usual UI controls, then try at least one action group with a set speed for "Medium High", since you can't do that via the Indigo UI.

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

Posted on
Mon Jan 02, 2023 11:18 am
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Lutron LEAP protocol plugin - first test release

Joe,

Progress :D !! Low Medium High Off work but the Action Group for Medium High does not. See captures.

FYI I wont't be able to test again until later this evening.

Thanks again,
Jody



Indigo UI Low Medium High Off
Code: Select all
Jan 2, 2023 at 12:09:08 PM
   Lutron Leap Debug               Living Room_Ceiling Fan (2): actionControlSpeedControl: action = actionValue : 1
configured : True
delayAmount : 900
description : set device speed to level2
deviceId : 1145215022
replaceExisting : True
speedControlAction : SetSpeedIndex
textToSpeak :
   Lutron Leap Debug               Living Room_Ceiling Fan (2): SetSpeedIndex to 1
   Lutron Leap Debug               Living Room_Ceiling Fan (2): set_fan peed_index = 1
   Lutron Leap Debug               device_event: bridge_id = 1713852130, device_id = 2
   Lutron Leap Debug               device_event: data = {'device_id': '2', 'current_state': -1, 'fan_speed': 'Low', 'tilt': None, 'zone': '1', 'name': 'Living Room_Ceiling Fan', 'button_groups': None, 'occupancy_sensors': None, 'type': 'CasetaFanSpeedController', 'model': 'PD-FSQN-XX', 'serial': 38000162, 'device_name': 'Ceiling Fan', 'area': '2'}
   Lutron Leap Debug               Living Room_Ceiling Fan (2): Fan speed is now Low
   Lutron Leap Debug               Living Room_Ceiling Fan (2): actionControlSpeedControl: action = actionValue : 2
configured : True
delayAmount : 900
description : set device speed to level3
deviceId : 1145215022
replaceExisting : True
speedControlAction : SetSpeedIndex
textToSpeak :
   Lutron Leap Debug               Living Room_Ceiling Fan (2): SetSpeedIndex to 2
   Lutron Leap Debug               Living Room_Ceiling Fan (2): set_fan peed_index = 2
   Lutron Leap Debug               device_event: bridge_id = 1713852130, device_id = 2
   Lutron Leap Debug               device_event: data = {'device_id': '2', 'current_state': -1, 'fan_speed': 'Medium', 'tilt': None, 'zone': '1', 'name': 'Living Room_Ceiling Fan', 'button_groups': None, 'occupancy_sensors': None, 'type': 'CasetaFanSpeedController', 'model': 'PD-FSQN-XX', 'serial': 38000162, 'device_name': 'Ceiling Fan', 'area': '2'}
   Lutron Leap Debug               Living Room_Ceiling Fan (2): Fan speed is now Medium
   Lutron Leap Debug               Living Room_Ceiling Fan (2): actionControlSpeedControl: action = actionValue : 3
configured : True
delayAmount : 900
description : set device speed to level4
deviceId : 1145215022
replaceExisting : True
speedControlAction : SetSpeedIndex
textToSpeak :
   Lutron Leap Debug               Living Room_Ceiling Fan (2): SetSpeedIndex to 3
   Lutron Leap Debug               Living Room_Ceiling Fan (2): set_fan peed_index = 3
   Lutron Leap Debug               device_event: bridge_id = 1713852130, device_id = 2
   Lutron Leap Debug               device_event: data = {'device_id': '2', 'current_state': -1, 'fan_speed': 'High', 'tilt': None, 'zone': '1', 'name': 'Living Room_Ceiling Fan', 'button_groups': None, 'occupancy_sensors': None, 'type': 'CasetaFanSpeedController', 'model': 'PD-FSQN-XX', 'serial': 38000162, 'device_name': 'Ceiling Fan', 'area': '2'}
   Lutron Leap Debug               Living Room_Ceiling Fan (2): Fan speed is now High
   Lutron Leap Debug               Living Room_Ceiling Fan (2): actionControlSpeedControl: action = actionValue : 0
configured : True
delayAmount : 900
description : set device speed to off
deviceId : 1145215022
replaceExisting : True
speedControlAction : SetSpeedIndex
textToSpeak :
   Lutron Leap Debug               Living Room_Ceiling Fan (2): SetSpeedIndex to 0
   Lutron Leap Debug               Living Room_Ceiling Fan (2): set_fan peed_index = 0
   Lutron Leap Debug               device_event: bridge_id = 1713852130, device_id = 2
   Lutron Leap Debug               device_event: data = {'device_id': '2', 'current_state': -1, 'fan_speed': 'Off', 'tilt': None, 'zone': '1', 'name': 'Living Room_Ceiling Fan', 'button_groups': None, 'occupancy_sensors': None, 'type': 'CasetaFanSpeedController', 'model': 'PD-FSQN-XX', 'serial': 38000162, 'device_name': 'Ceiling Fan', 'area': '2'}
   Lutron Leap Debug               Living Room_Ceiling Fan (2): Fan speed is now Off


Indigo Action Group for Medium High Setting
Code: Select all
Jan 2, 2023 at 12:13:50 PM
   Action Group                    Lutron Medium High Fan Setting
   Lutron Leap Error               Error in plugin execution ExecuteAction:

  File "plugin.py", line 632, in set_fan_speed_action
type: key fan_speed not found in dict

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Mon Jan 02, 2023 11:22 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron LEAP protocol plugin - first test release

https://github.com/FlyingDiver/Indigo-L ... g/2022.0.4

Please verify that the Indigo UI is correctly reflecting the commanded changes.

Also check that changes made from the Lutron mobile app show up properly. I assume that's how you've been controlling the device.

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

Who is online

Users browsing this forum: No registered users and 6 guests