PLUGIN: Wink Connect (formerly Wink Hub Controller)

Nice work. The engine loads and a new switch is created (Lutron dimmable). However, the new switch generates an error and does not toggle the light.
01 01/15/15 13:10:11.607 LuaInterface::CallFunction_Startup-1 device 22 function Wink_Hub_Startup failed [string “-- Wink_Hub…”]:2001: attempt to concatenate local ‘hubId’ (a nil value) LEAK this:528384 start:1880064 to 0x109d000 <0x2c15c680>
01 01/15/15 13:10:11.607 LuImplementation::StartLua running startup code for 22 I_Wink_Hub1.xml failed <0x2c15c680>

Does the app recognize the Spotter as one of the child devices and controlled by Vera.

Mine does not. But I have found out that the spotters are kinda weird. The spotters are wifi and do not connect to the hub it seems. I found this out when I had to delete my hub and tried to reset everything wink to square one. I “reset” the hub in the app, and completely unplugged it. There was no hub listed in my wink app. The spotters still work fine. I left the hub unplugged for over 24 hours and still got all my spotter notifications via the wink app. I can program the spotters without a hub also. Once the spotters are on your network, they communicate directly over wifi.

I also can’t see the wink lights in apps like homewave, but that could be operator error as I am just figuring out homewave.

Strange… The Lutron dimmers were devices I actually tested the plugin with…

The section of code involved enumerates the Vera child devices and matches them against the devices reported by the hub… So either the device list returned by the Wink Hub is missing some data, has changed format or something else completely…

Can you go to the setup page for the Lutron Dimmer device, go to the Advanced tab and check the ID parameter… it should be similar to “Wink_123456_123456”…

Also, can you go to the settings page for the hub devices, click on “Debug” to turn on debugging output then do a reload and post the section of the log before the error that start with “(Wink_Hub::findChildDevices): testing device” and before that “(Wink_Hub::HUB_DEVICES::getDeviceList): processing device” for the device. I need to see what the Wink API is sending as the device definition and the results of processing that definition into a vera device. Thanks

Mine does not. But I have found out that the spotters are kinda weird.[/quote]

I do not have any spotters, so I have not been able to add support for them.

Although the spotters are not attached to a hub, they are attached to your Wink API account… The plugin uses the Wink API to get device information, so if someone can provide the data format that the Wink API provides for the spotter, i should be able to add support for it…

If someone wants to provide the required data, enable debug mode and then do a reload. then post the section from the log that starts “”(Wink_Hub::HUB_DEVICES::getDeviceList): processing device" for the spotter device.

If anyone has additional devices that are not supported - provide the appropriate data and i’ll try to add support.

The lights should show up in any mobile app, as they use the same device type in vera as any other binary light light or dimmable light. You may need to refresh the configuration in the mobile app before they will show up… If that is not the case, let me know and I will try to track down the problem (eventually… when I have my toys set up in the new house…)

[quote=“cybrmage, post:24, topic:185289”]Can you go to the setup page for the Lutron Dimmer device, go to the Advanced tab and check the ID parameter… it should be similar to “Wink_123456_123456”…

Also, can you go to the settings page for the hub devices, click on “Debug” to turn on debugging output then do a reload and post the section of the log before the error that start with “(Wink_Hub::findChildDevices): testing device” and before that “(Wink_Hub::HUB_DEVICES::getDeviceList): processing device” for the device. I need to see what the Wink API is sending as the device definition and the results of processing that definition into a vera device. Thanks[/quote]
I do have an ID parameter → WINK_dimmer_30278_80198

The Debug toggle on the Wink device fails [ERROR: device not ready]. Below is the log (btw-I am on UI7)
08 01/16/15 9:01:34.191 JobHandler_LuaUPnP::HandleActionRequest device: 22 service: urn:micasaverde-com:serviceId:Wink_Hub1 action: ToggleDebugMode <0x2e310680>
08 01/16/15 9:01:34.191 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=22 <0x2e310680>
08 01/16/15 9:01:34.191 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Wink_Hub1 <0x2e310680>
08 01/16/15 9:01:34.191 JobHandler_LuaUPnP::HandleActionRequest argument action=ToggleDebugMode <0x2e310680>
02 01/16/15 9:01:34.192 Device_LuaUPnP::HandleActionRequest 22 not ready 0xc8b218 <0x2e310680>
02 01/16/15 9:01:34.192 JobHandler_LuaUPnP::RunAction device 22 action urn:micasaverde-com:serviceId:Wink_Hub1/ToggleDebugMode failed with -911/Device not ready <0x2e310680>

That’s a good sign…

And that’s not so good but ok… It means that the plugin is not running (which we pretty much already knew), so we know that the device is configured and the Hub API data is ok…

Try the attached update…

Still not it. It looks like the same start up error as before.

LuaInterface::CallFunction_Startup-1 device 22 function Wink_Hub_Startup failed [string “-- Wink_Hub…”]:583: attempt to concatenate local ‘devId’ (a nil value) LEAK this:409600 start:1761280 to 0x116e000 <0x2be2c680>
01 01/17/15 13:03:29.148 LuImplementation::StartLua running startup code for 22 I_Wink_Hub1.xml failed <0x2be2c680>

Same error… different location…

This version MAY be it…

If it isn’t… please provide logs going back to the plugin startup…

This version is IT! It is working ;D ;D

The Lutron caseta with pico remote are great for table lamps. A new realm of possibilities. Thanks for your effort and persistence.

Is Support for Scenes based on wink devices planned?

I have created a scene with one of my Wink devices as a trigger. However the scene never gets triggered.

EXCELLENT!! Glad its working for you now…

I think there may be an issue with differences in the Lua processor between UI5 and UI7… If you would be so kind, now that it is working, could you check the logs for anything output by the plugin that contains “[NIL]” and let me know if you find anything. Thanks.

If you don’t find anything, I’ll publish a new version in the marketplace.

One item in the log associated with the Hub. The switch is ok.
0 01/17/15 17:09:21.100 luup_log:22: (Wink_Hub::startPollProcess) Starting Wink Hub device update. <0x2dce0680>
08 01/17/15 17:09:21.101 JobHandler_LuaUPnP::HandleActionRequest device: 22 service: urn:micasaverde-com:serviceId:Wink_Hub1 action: PollWinkDevices <0x2dce0680>
50 01/17/15 17:09:21.102 luup_log:22: (Wink_Hub::startPollProcess) Completed Wink Hub device update. <0x2dce0680>
01 01/17/15 17:09:22.002 luup_attr_get interface 0xfabee0 args 2 <0x2b5ac000>
01 01/17/15 17:09:22.003 LuaInterface::CallFunction_Job device 22 function SWinkHub1_Wink_Hub1_PollWinkDevices_job failed [string “-- Wink_Hub…”]:1490: attempt to concatenate local ‘current_name’ (a nil value) <0x2b5ac000>
01 01/17/15 17:09:22.003 Lua_Job::Run job#289 : dev:22 (0x1039c58) P:50 S:0 failed <0x2b5ac000>
04 01/17/15 17:09:22.006 <0x2b5ac000>
02 01/17/15 17:09:22.017 JobHandler::PurgeCompletedJobs purge job#289 : dev:22 (0x1039c58) P:50 S:2 status 2 <0x2b5ac000>
04 01/17/15 17:09:26.257 <0x2bce0680>
04 01/17/15 17:09:56.237 <0x2bce0680>
50 01/17/15 17:10:21.100 luup_log:22: (Wink_Hub::startPollProcess) Starting Wink Hub device update. <0x2dce0680>
08 01/17/15 17:10:21.101 JobHandler_LuaUPnP::HandleActionRequest device: 22 service: urn:micasaverde-com:serviceId:Wink_Hub1 action: PollWinkDevices <0x2dce0680>
50 01/17/15 17:10:21.102 luup_log:22: (Wink_Hub::startPollProcess) Completed Wink Hub device update. <0x2dce0680>

It might just be me but this plugin seems to have slowed down the firing of scenes. I have two scenes one using a Wemo motion sensor turning on a jasco Zwave light and the other using a Wemo motion sensor turning on a ge link via wink hub. When I restart vera the scenes fire correctly. But after some time the response time gets slower and slower and then does fire, or it might but I haven’t seen the scenes run. I also can see that my notifications are slower by several seconds. Not saying it’s this plugin but I suspect it might be.

Sent from my iPad using Tapatalk

Plugins have very little control of the events/triggers/notifications in LuaUPnP. Basically, you define the Events that the UPnP plugin will generate within the device’s json and service files. Beyond that, the system generates the events, fires scenes, send notifications automatically.

The responsiveness of all of this behind the scenes action would depend on the state of the vera device… the more it is doing at any given moment, the slower the response is going to be.

Regarding the plugin specifically… Once the initial startup is completed (on every LuaUPnP reload), the plugin schedules the update task and returns control to the OS… Once the “poll interval” expires, the OS calls the plugin, which sends a command to the Wink API servers, and then processes the response (this is the task that updates the state of each device). This operational model is followed by all the devices on the system - including native Z-Wave devices…

The more devices you have attached to your Vera, the more load you will have on the device and the slower the responsiveness…

And the OS will only run one task per plugin at any given moment… If you send a command to a wink attached device while the plugin is retrieving the device status, the command will not run until the status command completes.

So, really, I don’t know how the plugin can be “fixed” to correct this situation… or if it is indeed “broken” to cause this.

Thanks for doing this plugin.

I’ve been recommending Wink for simple systems. It’s really a good solution for fire/CO/leak detection plus a few lights. Now I can add one to Vera at my house.

So, really, I don’t know how the plugin can be “fixed” to correct this situation… or if it is indeed “broken” to cause this.[/quote]

Totally understand and I get it. This plugin is great and I have been looking at the logs. I think I just need to do a proper backup and restore. I was searching for he proper way to do this as I think I have to backup both the Zwave and actual Vera.

Will this plugin work with the new Cree bulbs?

Sent from my iPhone using Tapatalk

Yes, you need to backup both. I believe the build-in “backup to server” functionality provides a backup for both.

I don’t know, as the Cree bulbs are not yet available in Canada… nut, if they connect to the Wink Hub, it should report them as a “light_bulb”, and both binary and dimmable lights are supported.

I found another issue (UI7). The IOS app will not turn the switch off. It will turn it on. The browser turns the switch on and off without a problem.

From the logs:
01 01/18/15 15:12:43.893 luup_attr_get interface 0xfabee0 args 2 <0x2b5ac000>
01 01/18/15 15:12:43.894 LuaInterface::CallFunction_Job device 22 function SWinkHub1_Wink_Hub1_PollWinkDevices_job took 22 seconds <0x2b5ac000>
01 01/18/15 15:12:43.896 LuaInterface::CallFunction_Job device 22 function SWinkHub1_Wink_Hub1_PollWinkDevices_job failed [string “-- Wink_Hub…”]:1490: attempt to concatenate local ‘current_name’ (a nil value) <0x2b5ac000>
01 01/18/15 15:12:43.898 Lua_Job::Run job#3464 : dev:22 (0x1348bc0) P:50 S:0 failed <0x2b5ac000>
04 01/18/15 15:12:43.905 <0x2b5ac000>
02 01/18/15 15:12:43.906 JobHandler::PurgeCompletedJobs purge job#3464 : dev:22 (0x1348bc0) P:50 S:2 status 2 <0x2b5ac000>

50 01/18/15 15:13:21.100 luup_log:22: (Wink_Hub::startPollProcess) Starting Wink Hub device update. <0x2dce0680>
08 01/18/15 15:13:21.101 JobHandler_LuaUPnP::HandleActionRequest device: 22 service: urn:micasaverde-com:serviceId:Wink_Hub1 action: PollWinkDevices <0x2dce0680>
50 01/18/15 15:13:21.102 luup_log:22: (Wink_Hub::startPollProcess) Completed Wink Hub device update. <0x2dce0680>
01 01/18/15 15:13:21.766 luup_attr_get interface 0xfabee0 args 2 <0x2b5ac000>
01 01/18/15 15:13:21.767 LuaInterface::CallFunction_Job device 22 function SWinkHub1_Wink_Hub1_PollWinkDevices_job failed [string “-- Wink_Hub…”]:1490: attempt to concatenate local ‘current_name’ (a nil value) <0x2b5ac000>
01 01/18/15 15:13:21.767 Lua_Job::Run job#3467 : dev:22 (0x13236e0) P:50 S:0 failed <0x2b5ac000>
04 01/18/15 15:13:21.785 <0x2b5ac000>

First off… Do you have un-named devices on your Wink Hub???

second: The IOS app??? what IOS app??? What switch??

third… both logs show the same error, just at different times… There is nothing in the log showing any action being commanded or performed, so I can’t even start to look into that issue…

I did make changes for fix the error in the logs…

Hi - 2 questions. Does this actually need a Wink Hub installed or just an account on Wink? 2nd - on UI7, I see you disable the MYQ from coming in since there is a great Vera App. Are you doing the same thing with NEST? I am interested in seeing how Nest devices might come in since the current Vera doesn’t have great compatibility with UI7.