Author Topic: PLUGIN: Caseta Connect  (Read 31798 times)

Offline jschwalb

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #210 on: February 05, 2017, 10:23:29 pm »
Hello! Great work on the plugins. I'm new to the forums and to Vera in general, but I think perhaps I found a bug in the Caseta plugin.

I have a non-pro Smart Bridge. When switch the lights on/off from the wall panel or the PICO, I would expect the Vera dashboard/panel to update showing the change. I've waited a number of minutes and it doesn't refresh. However, if I restart the Vera Lite, then it grabs the correct percentage and on/off status.

Looking at the logs I notice the following in red (in bold):
01   02/05/17 21:35:09.476   IOPort::Connect connect -1 lutron.broker.xively.com:1883 <0x2d789680>
50   02/05/17 21:35:46.106   luup_log:11: MQTT.client:handler(): PINGREQ <0x2c389680>
01   02/05/17 21:36:16.059   LuaInterface::CallFunction_Timer device 11 MQTT_KeepAlive took 30 seconds <0x2c389680>

When I check port 1883 on lutron.broker.xively.com, it fails, but port 8883 connects. (I found port 8883 while sniffing traffic from my iPhone Lutron app.)

Code: [Select]
$ telnet lutron.broker.xively.com 8883
Trying 52.23.255.236...
Connected to lutron.broker.xively.com.

I'm not sure what the "connect -1" part of the above log means, but does it mean that it cannot connect? Might the port have changed to 8883? Is there a way to change that port number and try it?

Many thanks!

Offline xluthor

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #211 on: February 24, 2017, 05:24:50 pm »
Hello,

I picked up a Pro2 bridge and it's working well.  I'm having a couple of issues with 2 of my three remotes not sending certain commands Scene back to Vera.

I've tried replacing the remote batteries.  Is there an easy way to debug this to see what's happening?

I would like to see if the plugin is seeing the button presses as expected.

Please let me know next steps.

UPDATE - Remote seems to be working fine.  It just won't trigger 2 of 6 scenes...?

What could be causing the system to trigger some but not all scenes?

In my example, I have an IR blaster connected to VERA over IP that controls my TV.
Vol+ / Vol - / Mute Work but TV On / TV Off don't work.

All of these scene's work perfectly when I trigger them via the Vera app or vera web gui.

Is there a naming / character limitation in the Scene names? I have a one other Pico remote that works perfectly for another room and when I sawp them I get the same result.

Note sure where to go to start troubleshooting.  I have logging enabled on Vera - Would the log explain what's happening?

Any help would be greatly appreciated.

Thanks
« Last Edit: February 25, 2017, 06:59:29 pm by xluthor »

Offline casselc

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #212 on: March 01, 2017, 08:24:39 pm »
Would it be possible to update the subcategory of the device that gets created for the Caseta On/Off switch (PD-5WS-DV-WH)? Right now they are getting created with subcategory 0 which causes them to not be included in the lights for the Turn All On/Turn All Off shortcut. Manually changing them to subcategory 1 (Interior) works.


Offline dktm

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #213 on: April 02, 2017, 08:12:39 pm »
Could someone please provide me with the proper Luup code to activate a Caseta Scene via the Caseta Connect plugin?? I would like to use luup to check the status of a light sensor, run one Caseta scene if the sensor is above 15 lux, and run a different Caseta scene if the sensor is below 15 lux.  For the life of me I can't figure out the correct syntax (I am new at this).

I've tried:

(because Caseta scenes show as SwitchPower1 in the device log)
Code: [Select]
local dark_scene = 73
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{newTargetValue="1"},dark_scene)

(because I'm trying to run a scene)
Code: [Select]
local dark_scene = 73
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum=dark_scene },0)

(because I'm trying to run a Caseta scene)
Code: [Select]
local dark_scene = 73
luup.call_action("urn:caseta-com:serviceId:CasetaScene1","RunScene",{SceneNum=dark_scene},0)

No luck... help please!

Offline knaack

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #214 on: April 14, 2017, 03:03:55 pm »
Relaying back some information since I last posted about scenes being renumbered and all sorts of vera problems.  Well, I still was having some issues (although better than before), so I fully reset the Vera and the Lutron smartbridge, and readded every device. 

Things seem maybe slightly better, but I was still having issues with the smartbridge not communicating with the plugin after about 3-4 days, but it seemed that the telnet part of the Lutron smartbridge stopped communicating.  Putting the Lutron hub on a timer to reboot itself daily appeared to fix most of the issues with the exception of one.

I still occasionally have problems with the lutron scenes renumbering themselves in the Vera, which messes with my vera scenes.  I haven't added or removed anything from the smartbridge or vera, yet this appears to occur on a weekly basis roughly.  I don't know if this is because I have 48 Lutron devices, since as you mentioned, the hub appears to go a bit wonky as you near the 50 device limit.

As a work around, I stopped using Lutron scenes in any of the vera scenes, but could there be an option placed to disable the plugin from loading vera scenes, just so they're not recreated randomly?  Thanks!

Offline ronluna

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-3
Re: PLUGIN: Caseta Connect
« Reply #215 on: June 25, 2017, 02:44:50 pm »
Any clue as of why altui complains about mdns_devices function in openluup?

Code: [Select]
stack:TypeError: mdns_devices.split is not a function
    at selectBridgeDevice (:86:36)
    at eval (eval at _deviceDrawControlPanelJSTab (http://xxx.xxx.xxx.xxx:3480/J_ALTUI_uimgr.js:2893:17), :1:1)
    at _deviceDrawControlPanelJSTab (http://xxx.xxx.xxx.xxx:3480/J_ALTUI_uimgr.js:2893:17)
    at _deviceDrawControlPanelOneTabContent (http://xxx.xxx.xxx.xxx:3480/J_ALTUI_uimgr.js:3413:8)
    at _displayActiveDeviceTab (http://xxx.xxx.xxx.xxx:3480/J_ALTUI_uimgr.js:3440:4)
    at HTMLAnchorElement. (http://xxx.xxx.xxx.xxx:3480/J_ALTUI_uimgr.js:6348:4)
    at HTMLDivElement.dispatch (http://xxx.xxx.xxx.xxx:3480/icons/localCDN/jquery.min.js:3:7537)
    at HTMLDivElement.r.handle (http://xxx.xxx.xxx.xxx:3480/icons/localCDN/jquery.min.js:3:5620)
    at Object.trigger (http://xxx.xxx.xxx.xxx:3480/icons/localCDN/jquery.min.js:4:4818)
    at HTMLAnchorElement. (http://xxx.xxx.xxx.xxx:3480/icons/localCDN/jquery.min.js:4:5328)


It also complains here:
Code: [Select]
2017-06-25 14:49:14.396   openLuup.context_switch::  ERROR: [string "[231] I_CasetaConnect.xml"]:1392: attempt to perform arithmetic on global 'init_year' (a nil value)stack traceback:
./openLuup/scheduler.lua:128: in function <./openLuup/scheduler.lua:125>
(tail call): ?
./openLuup/scheduler.lua:238: in function 'dispatch'
./openLuup/scheduler.lua:705: in function 'task_callbacks'
./openLuup/scheduler.lua:1084: in function 'start'
openLuup/init.lua:322: in main chunk
[C]: ?
« Last Edit: June 25, 2017, 02:54:10 pm by ronluna »

Offline ronluna

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-3
Re: PLUGIN: Caseta Connect
« Reply #216 on: June 25, 2017, 03:22:13 pm »
Found a little bug...
The app is trying to read the openluup version as "revisionDate" but it is defined as "VERSION" . after modifying "L_CasetaConnect.lua"   line 1390 from:
Code: [Select]
                        INITversion = self:shellExecute('head -n 3 /etc/cmh-ludl/openLuup/init.lua |grep -e "revisionDate ="')


to this:

Code: [Select]
                        INITversion = self:shellExecute('head -n 3 /etc/cmh-ludl/openLuup/init.lua |grep -e "VERSION "')


and this:

Code: [Select]
                        IOversion = self:shellExecute('head -n 3 /etc/cmh-ludl/openLuup/io.lua |grep -e "revisionDate ="')


to this:

Code: [Select]
                        IOversion = self:shellExecute('head -n 3 /etc/cmh-ludl/openLuup/io.lua |grep -e "VERSION "')


everything started working...


Offline nhurtado

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #217 on: August 10, 2017, 10:04:46 pm »
Hello,

I have a Vera Plus UI7 with the Caseta Connect 1.63 plugin with no other devices configured.
I am unable to have the plugin discover my Caseta Pro hub.
Please see the log entry below.

Thank you!

-----
02   08/10/17 21:51:56.128   luup_log:6: (Caseta_Connect::Caseta_Startup): Caseta Connect Automation Gateway v1.63 - ************** STARTING ************** <0x773e8520>
06   08/10/17 21:51:56.128   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Retrieving Bridge Config... now: Loading Options... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
02   08/10/17 21:51:56.129   luup_log:6: (Caseta_Connect::getMiosVersion): MIOS_VERSION [UI7]. <0x773e8520>
50   08/10/17 21:51:56.129   luup_log:6: (Caseta_Connect::Caseta_Startup): Caseta Smart Bridge Connect Gateway - Plugin version [1.63] - isDisabled
  • MIOS_VERSION [UI7] <0x773e8520>

06   08/10/17 21:51:56.129   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Loading Options... now: Validating... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
06   08/10/17 21:51:56.265   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: MISMATCHED_FILES was: NONE now: NONE #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x773e8520>
06   08/10/17 21:51:56.266   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Validating... now: Loading Options... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
06   08/10/17 21:51:56.266   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: UI7Check was: true now: true #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x773e8520>
06   08/10/17 21:51:56.267   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Loading Options... now: Creating Icons... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
02   08/10/17 21:51:56.268   luup_log:6: (Caseta_Connect::findBridge): Attempting to find Caseta Smart Bridge... <0x773e8520>
06   08/10/17 21:51:56.268   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Creating Icons... now: Finding Bridge... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
02   08/10/17 21:51:56.269   luup_log:6: (Caseta_Connect::findBridge): Using previously configured Caseta Smart Bridge... <0x773e8520>
50   08/10/17 21:51:56.269   luup_log:6: Caseta_Connect::CASETA::configureBridgeConnection: Preparing Caseta Integration support elements. <0x773e8520>
50   08/10/17 21:51:56.270   luup_log:6: Caseta_Connect::CASETA::configureBridgeConnection: Using existing keyfile. <0x773e8520>
50   08/10/17 21:51:56.270   luup_log:6: Caseta_Connect::CASETA::configureBridgeConnection: Using existing socat executable. <0x773e8520>
06   08/10/17 21:51:56.270   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Finding Bridge... now: Retrieving Bridge Config... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
^C
root@MiOS_50011868:/tmp/log/cmh# tail -f LuaUPnP.log
06   08/10/17 21:51:56.266   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Validating... now: Loading Options... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
06   08/10/17 21:51:56.266   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: UI7Check was: true now: true #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x773e8520>
06   08/10/17 21:51:56.267   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Loading Options... now: Creating Icons... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
02   08/10/17 21:51:56.268   luup_log:6: (Caseta_Connect::findBridge): Attempting to find Caseta Smart Bridge... <0x773e8520>
06   08/10/17 21:51:56.268   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Creating Icons... now: Finding Bridge... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
02   08/10/17 21:51:56.269   luup_log:6: (Caseta_Connect::findBridge): Using previously configured Caseta Smart Bridge... <0x773e8520>
50   08/10/17 21:51:56.269   luup_log:6: Caseta_Connect::CASETA::configureBridgeConnection: Preparing Caseta Integration support elements. <0x773e8520>
50   08/10/17 21:51:56.270   luup_log:6: Caseta_Connect::CASETA::configureBridgeConnection: Using existing keyfile. <0x773e8520>
50   08/10/17 21:51:56.270   luup_log:6: Caseta_Connect::CASETA::configureBridgeConnection: Using existing socat executable. <0x773e8520>
06   08/10/17 21:51:56.270   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:CasetaConnect1 variable: BRIDGE_STATUS was: Finding Bridge... now: Retrieving Bridge Config... #hooks: 0 upnp: 0 skip: 0 v:0xeb3fd0/NONE duplicate:0 <0x773e8520>
02   08/10/17 21:52:26.207   luup_log:6: (Caseta_Connect::Startup): getBridgeConfig returned 6 entries. <0x773e8520>
50   08/10/17 21:52:26.261   luup_log:6: (Caseta_Connect::CASETA::processBridgeConfig): Processing Smart Bridge configuration. <0x773e8520>
50   08/10/17 21:52:26.262   luup_log:6: (Caseta_Connect::CASETA::processBridgeConfig): Found SERVER - type [LEAP] EnableState [Enabled] JSON [{"EnableState": "Enabled","Type": "LEAP","href": "/server/1","NetworkInterfaces": {{"href": "/networkinterface/1"}}}] <0x773e8520>
50   08/10/17 21:52:26.263   luup_log:6: (Caseta_Connect::CASETA::processBridgeConfig): Found SERVER - type [LIP] EnableState [Enabled] JSON [{"Type": "LIP","LIPProperties": {"Ids": {"href": "/server/2/id"}},"NetworkInterfaces": {{"href": "/networkinterface/1"}},"href": "/server/2","EnableState": "Enabled"}] <0x773e8520>
01   08/10/17 21:52:26.264   LuaInterface::CallFunction_Startup device 6 function Caseta_Startup took 30 seconds <0x773e8520>
01   08/10/17 21:52:26.264   LuaInterface::CallFunction_Startup-1 device 6 function Caseta_Startup failed [string "--Caseta_Connect v1.63..."]:1971: attempt to index field 'Buttons' (a nil value) <0x773e8520>
01   08/10/17 21:52:26.264   LuImplementation::StartLua running startup code for 6 I_CasetaConnect.xml failed <0x773e8520>
--------------------

Offline jquincy

  • Full Member
  • ***
  • Posts: 135
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #218 on: September 08, 2017, 05:46:44 pm »
I am running UI17 with 1.73015.  Everything was great running the Caseta app on version 1.63. Now that 1.65 has automatically updated I get the error "Failed to load bridge config" Running the Pro Bridge
Any suggestions?

Offline cybrmage

  • Hero Member
  • *****
  • Posts: 1002
  • Karma: +96/-5
Re: PLUGIN: Caseta Connect
« Reply #219 on: September 12, 2017, 07:23:44 pm »
new version

v1.75     (Version ID: 34472) September 12, 2017
-- added - LEAP service monitor to provide real-time status updates to smartbridge (non-pro) in place of MQTT
-- changed - removed obsolete embedded MQTT client (Lutron move the MQTT data to a secure server - The Vera IO model is not compatible with the requirements for TLS encapsulation)
** NOTE ** - The Lutron account credentials that were required to use MQTT are no longer required. There credentials are now only used for bridge discovery.
EVL3Vista - Wink Connect - Caseta Connect - Venstar Colortouch - WiFi UDP Switch Controller - MyQGateway

Offline jquincy

  • Full Member
  • ***
  • Posts: 135
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #220 on: September 13, 2017, 10:19:16 am »
Back up and running. Thank you !

Offline Manfell

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #221 on: September 18, 2017, 10:11:20 pm »
1.75 keeps dropping connection between vera and pro bridge. I have turned off auto update and restored to 1.65 to keep working. Any idea why 1.75 caused this? i'm using vera pro UI17 with 1.73015.
« Last Edit: September 18, 2017, 10:16:04 pm by Manfell »

Offline dktm

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #222 on: September 18, 2017, 11:47:43 pm »
Hi all,  looking for some help with the Caseta Connect app.  System has been working reliably for months. Worked this morning, failed to work this evening.  No changes made. 

Non-lutron devices are still function through Vera, Lutron devices are functioning through the Lutron app, but Lutron devices are not responding to commands via Vera.  Log attached, from reboot through attempting to switch off a Caseta plugin dimmer (device #23).  Suggestions? If I uninstall and reinstall the Caseta Connect app, will the Lutron device numbers change?  Don't want to mess up my programming...

Thanks for the help!


Offline cybrmage

  • Hero Member
  • *****
  • Posts: 1002
  • Karma: +96/-5
Re: PLUGIN: Caseta Connect
« Reply #223 on: September 19, 2017, 03:25:14 am »
v1.75 was approved sometime yesterday.... If you have auto update for the plugin enabled and you use a pro model bridge, after the update was downloaded the plugin became inoperable. This error was caused by me uploading the wrong version of the plugin file.

I have removed the v1.75 release from the app marketplace and prepared a fixed version (v1.76) which is now pending approval.

You can fix the error in one of two ways, without loosing your current configuration:

1) Force a manual plugin update to v1.76

2) Go to Apps/My App/Caseta Connect and click on the "Update App" button. This will force an "Update" to the last approved version


Oops... Sorry...
« Last Edit: September 19, 2017, 07:52:07 am by cybrmage »
EVL3Vista - Wink Connect - Caseta Connect - Venstar Colortouch - WiFi UDP Switch Controller - MyQGateway

Offline dktm

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PLUGIN: Caseta Connect
« Reply #224 on: September 19, 2017, 07:50:26 am »
Updated the app, everything working again.  Thanks for all your work!