PLUGIN: Caseta Connect

New version (v1.0.16) available in the first post of the thread.

v1.0.16 (Version ID: 30182) January 24, 2016 (Not available in App Marketplace)
– fixed - setTarget action fails under certain circumstances
– added - initial support for openluup
** NOTE: When running under openluup, due to limitations of the io implementation, LIP and MQTT support are not functional.

I downloaded the new files to upgrade to v 1.0.16. I am still using the Radio RA2 plugin also. When I switch of/on a light the RadioRA2 pluging reports the status in 1 second. The Caseta plugin took 15 seconds today to update the status

Has anyone tried this with the Lutron L-BDG2-WH Caseta Wireless Smart Bridge, HomeKit-enabled version? I am new to lutron device hubs, and wasn’t sure if this is just a slightly different version of the models listed in the OP, or the same model. Thanks

The “-WH” is a ordering suffix for the device… The actual model is L_BDG2 = SmartBridge 2

So yes, the plugin has been tested with this device, and it does work.

The “-WH” is a ordering suffix for the device… The actual model is L_BDG2 = SmartBridge 2

So yes, the plugin has been tested with this device, and it does work.[/quote]

Thank you. I got nervous when I saw HomeKit. I was afraid there were two versions.

Sent from my iPad using Tapatalk

There are two versions… The original models (L_BDG and L_BDGPRO) and the version 2 (L_BDG2 and L_BDGPRO2).

The only difference between the two version in Homekit support, which was added to the version 2 models (L-BDG2 and L-BDGPRO2).

All (currently 4) devices in the Caseta SmartBridge family are supported by the Caseta Connect plugin. Homekit support is NOT handled by the plugin. You need to use the Lutron Caseta app or other homekit enabled app to configure and use the Homekit functionality.

Hi - I am trying to setup this on Vera2. I keep getting “Caseta Connect[6] : Startup Lua Failed”.
I have tried installing the plugin from App Store as well as manually (even with restart Luup option) and not working so far.
Any ideas?

The Vera2 is a long discontinued model, and I do not have one available to me for development.

It is possible that the underlying OpenWRT does not have the required support programs needed by the plugin.

Without your LuaUPnP logs, it is impossible to tell what the issue is.

Sure, I understand.
Here is the logs file I thought seemed relevant:

02 02/01/16 2:05:10.541 luup_log:6: (Caseta_Connect::Caseta_Startup): Caseta Connect Automation Gateway v1.0.17 - ************** STARTING ************** <0x402>
01 02/01/16 2:05:10.542 luup_attr_get interface 0x8cfed8 args 2 <0x402>
02 02/01/16 2:05:10.543 luup_log:6: (Caseta_Connect::getMiosVersion): PLUGIN is running under openluup. <0x402>
01 02/01/16 2:05:10.754 LuaInterface::CallFunction_Startup-1 device 6 function Caseta_Startup failed [string “–Caseta_Connect v1.0.17…”]:1268: attempt to perform arithmetic on global ‘io_year’ (a nil value) <0x402>
01 02/01/16 2:05:10.755 LuImplementation::StartLua running startup code for 6 I_CasetaConnect.xml failed <0x402>
09 02/01/16 2:05:10.759 JobHandler_LuaUPnP::Run device 6 Caseta Connect room 1 type urn:schemas-micasaverde-com:device:CasetaConnect:1 id Caseta Connect parent 0/0x7a67c0 upnp: 0 <0x400>

Give this a try…

Looks like my openluup detection was a little over-aggressive…

Thanks for your help. But I am now getting “Could not retrieve Bridge configuration” error. Here are the log entries:

02 02/01/16 21:20:35.653 luup_log:11: (Caseta_Connect::Startup): getBridgeConfig returned 0 entries. LEAK this:339968 start:1167360 to 0xcfd000 <0x402>
06 02/01/16 21:20:35.654 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Retrieving Bridge Config… now: Failed to load bridge config #hooks: 0 upnp: 0 v:0x8a9a60/NONE duplicate:0 <0x402>
01 02/01/16 21:20:35.655 luup_log:11: (Caseta_Connect::Startup): Could not Retrieve SmartBridge Configuration <0x402>
01 02/01/16 21:20:35.656 LuaInterface::CallFunction_Startup-2 device 11 function Caseta_Startup failed Caseta_Connect with return false <0x402>
06 02/01/16 21:20:35.709 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailure was: 1 now: 1 #hooks: 0 upnp: 0 v:0x8457d0/NONE duplicate:1 <0x402>
01 02/01/16 21:20:35.747 LuImplementation::StartLua running startup code for 11 I_CasetaConnect.xml failed <0x402>

You need to provide logs going back to the startup message… The part you posted excludes everything the plugin does to get the config from the bridge…

Apologies - newbie here. How do I do that? I have several other devices so several entries are mixed in…
Does this help:

06 02/01/16 21:34:54.317 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: MISMATCHED_FILES was: NONE now: NONE #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 LEAK this:16384 start:1536000 to 0xcf6000 <0x402>
06 02/01/16 21:34:54.319 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Validating… now: Loading Options… #hooks: 0 upnp: 0 v:0x8a9b20/NONE duplicate:0 <0x402>
06 02/01/16 21:34:54.321 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: UI7Check was: false now: false #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x402>
06 02/01/16 21:34:54.323 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Loading Options… now: Creating Icons… #hooks: 0 upnp: 0 v:0x8a9b20/NONE duplicate:0 <0x402>
06 02/01/16 21:34:54.325 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Creating Icons… now: Finding Bridge… #hooks: 0 upnp: 0 v:0x8a9b20/NONE duplicate:0 <0x402>
50 02/01/16 21:34:54.327 luup_log:11: Caseta_Connect::CASETA::configureBridgeConnection: Preparing Caseta Integration support elements. <0x402>
50 02/01/16 21:34:54.329 luup_log:11: Caseta_Connect::CASETA::configureBridgeConnection: Using existing keyfile. <0x402>
50 02/01/16 21:34:54.330 luup_log:11: Caseta_Connect::CASETA::configureBridgeConnection: Using existing socat executable. <0x402>
06 02/01/16 21:34:54.331 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Finding Bridge… now: Retrieving Bridge Config… #hooks: 0 upnp: 0 v:0x8a9b20/NONE duplicate:0 <0x402>
06 02/01/16 21:34:54.913 Device_Variable::m_szValue_set device: 7 service: urn:upnp-org:serviceId:AVTransport variable: TransportPlaySpeed was: NOT_IMPLEMENTED now: 1 #hooks: 0 upnp: 0 v:0x8a1048/NONE duplicate:0 LEAK this:20480 start:1556480 to 0xcfb000 <0x1807>
06 02/01/16 21:34:55.397 Device_Variable::m_szValue_set device: 7 service: urn:upnp-org:serviceId:AVTransport variable: CurrentTrackMetaData was: x-sonos-spotify:spotify%3atrack%3a0Y6WjYBWld3reWsTMT8FTd?sid=12&flags=8224&sn=9<r:streamContent></r:streamContent><r:radioShowMd></r:radioShowMd>upnp:albumArtURI/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0Y6WjYBWld3reWsTMT8FTd%3fsid%3d12%26flags%3d8224%26sn%3d9</upnp:albumArtURI>dc:titleWhere We Used To Live</dc:title>upnp:classobject.item.audioItem.musicTrack</upnp:class>dc:creatorEsbj?rn Svensson Trio</dc:creator>upnp:albumE.S:T. Tuesday Wonderland (US Version)</upnp:album> now: x-sonos-spotify:spotify%3atrack%3a0Y6WjYBWld3reWsTMT8FTd?sid=12&flags=8224&sn=9<r:streamContent></r:streamContent>upnp:albumArtURI/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0Y6WjYBWld3reWsTMT8FTd%3fsid%3d12%26flags%3d8224%26sn%3d9</upnp:albumArtURI>dc:titleWhere We Used To Live</dc:title>upnp:classobject.item.audioItem.musicTrack</upnp:class>dc:creatorEsbj?rn Svensson Trio</dc:creator>upnp:albumE.S:T. Tuesday Wonderland (US Version)</upnp:album> #hooks: 0 upnp: 0 v:0x85c940/NONE duplicate:0 LEAK this:106496 start:1662976 to 0xd15000 <0x1807>
02 02/01/16 21:34:56.217 ZW_Send_Data node 4 NO ROUTE (nil) LEAK this:528384 start:2191360 to 0xd96000 <0xc04>
06 02/01/16 21:34:56.661 Device_Variable::m_szValue_set device: 4 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: 72 now: 72 #hooks: 2 upnp: 0 v:0x858bb8/NONE duplicate:1 <0x803>
02 02/01/16 21:34:56.786 luup_log:11: (Caseta_Connect::Startup): getBridgeConfig returned 0 entries. <0x402>
06 02/01/16 21:34:56.787 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Retrieving Bridge Config… now: Failed to load bridge config #hooks: 0 upnp: 0 v:0x8a9b20/NONE duplicate:0 <0x402>
01 02/01/16 21:34:56.788 luup_log:11: (Caseta_Connect::Startup): Could not Retrieve SmartBridge Configuration <0x402>
01 02/01/16 21:34:56.789 LuaInterface::CallFunction_Startup-2 device 11 function Caseta_Startup failed Caseta_Connect with return false <0x402>
06 02/01/16 21:34:56.790 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailure was: 1 now: 1 #hooks: 0 upnp: 0 v:0x845840/NONE duplicate:1 <0x402>
01 02/01/16 21:34:56.792 LuImplementation::StartLua running startup code for 11 I_CasetaConnect.xml failed <0x402>

Looking over the provided log and reviewing the codebase…

The only reason I can see for the plugin being unable to retrieve the bridge configuration is that the socat executable that is used by the plugin does not run on the version of OpenWRT that the Vera2 uses. Since I do not have a Vera2, and it has been long discontinued, I do not believe that support for Vera2 is possible.

Ok, makes sense. Anyway, thanks for trying!

I installed the “Lutron Caseta” plugin, but I am getting the error message: “Caseta_Connect: No Smart Bridge device found”. Also the version on the App page is: 1.0, whilst the version # on the device page says 1.0.5. I am including screen shots of my setup. I have Auto Update selected, and I even did the Update App.

what is the latest version? I am using Vera Edge with firmware: version 1.7.1707

The detection routine was changed…
You need to upgrade to the latest version (v1.0.17). Use the instructions in post #2 of the thread.
If using the upgrade URL doesn’t work, you will need to download the zip archive and manually upload the files to your Vera.

Once you have the latest version, it may still not detect the bridge… If it doesn’t, to go the variables tab and erase the value in the “Bridge_MAC_Filter” variable, then reload the LuaUPnP engine.

If it still doesn’t detect the bridge, you will need to turn on debug mode in the plugin, restart the LuaUPnP engine and post the LuaUPnP.log. Please also provide details of the bridge you have (model, first 6 digits of the MAC address, ip address).

This is normal… The version on the Apps page is only updated when you install or update the plugin using the Apps page… Updating with the update URL does not change the version.

The latest version is currently v1.0.17. The latest version is ALWAYS posted in the first post in this thread.

Still cannot detect the device. When I try to enable Debug mode, I get the following error: “Error: Device Not Ready”
The first 8 digits of Mac address: 68:9e:19:9c. Model #: L-BDGPRO2.

Looks like the bridges use a larger range of MAC addresses than expected…

I’ll have to rework the detection scheme…

In the meantime… You can set the bridge ip address in the advanced/variables section… set the “BRIDGE_IP” to the bridges IP address and “BRIDGE_MAC” to the MAC address (remove the colons and change the letters to lowercase). Then reload the LuaUPnP engine, and the plugin should configure your devices.