PLUGIN: Wink Connect (formerly Wink Hub Controller)

The Cree lights are strange… The Cree bulbs I have, when added to the Wink Hub, configure and appear as GE Link bulbs… So no changes to the plugin were needed…

There may be different variations to the Cree bulbs (only one type of bulb is available locally), so it is possible that the Wink API handles them differently…

Does the Cree bulb actually show as a Cree bulb in the Wink App? (Mine show as “GE Link”)

I would have to see the LuaUPnP log and output from running “aprontest -l” and “aprontest -l -m ” on the wink hub in order to debug this issue.

Unfortunately, the log does not provide a lot of useful information… but it did provide a clue…

The error is not generated by the plugin, but by the browser… The Wink_PicoRemote() function is in the javascript executed by the browser… and checking over the code, it is due to the list of devices usable by the remote being empty…

This list is generated by the plugin from the device list supplied by the Wink API… If the plugin has not been completely loaded, and the browser has not been refreshed, then the browser will not have access to the updated list…

So… make sure that your Vera has finished loading the plugin, then refresh your browser and see if it still throws the error… I will try to make changes to aleviate this possibility in a future update…

Huh, well I have device it controls which is the Caseta Dimmer, via the Wink hub. So there should be something in the list. The plugin seems to be working fine otherwise so I would assume is fully loaded. I have tried the page from my,title computers and different browsers and I still get the scrip error.

Interestingly I have the same problem with the Condord 4 plug in, one of the tabs to look at the zones always throws a similar script error about the zone name being null, even though it is not and the plug in is running fine.

[quote=“shallowearth, post:463, topic:185289”]Huh, well I have device it controls which is the Caseta Dimmer, via the Wink hub. So there should be something in the list. The plugin seems to be working fine otherwise so I would assume is fully loaded. I have tried the page from my,title computers and different browsers and I still get the scrip error.

Interestingly I have the same problem with the Condord 4 plug in, one of the tabs to look at the zones always throws a similar script error about the zone name being null, even though it is not and the plug in is running fine.[/quote]

I will need the LuaUPnP.log file for the plugin statup to see exactly whats going on… Please turn off verbose logging on your Vera (under settings/logs/verbose logging) and enable debug mode in the plugin, then reload the LuaUPnP engine…

I just posted a new update (v0.18b77) in the first post… It fixes an issue with dimmable light status not always updating correctly and add updating of the power status variable on dimmable lights.

keep getting “Lua Engine Failed to Load” when I try to manually update ?

Load the plugin from MIOS. Did a reload engine after several minutes. Uploaded to files from the zip Wink_Connect_v0.18b77_full. Reload 4 times the finally pulled the power to cycle it after 20 minutes of reloading the engine and refreshing the browser. Getting “Wink Hub[115} Lua Engine Failed to Load”.

Device created shows “RELOAD LuaUPnP ENGINE
AND REFRESH BROWSER”.

It won’t let me do the setup.

What should I do?

@strohlde - I uninstalled the program deleted all of the luup files with wink in the name then just loaded the plugin directly from MIOS with no modification.

it appears to work for eggminder and refuel.

I used this script running from the App → Develop Apps → Test Luup Code to delete the Wink files I uploaded from the zip.

os.execute(“ls -alh /etc/cmh-ludl/* | grep -i wink | awk {‘print $9’} | xargs rm”)

I hope this helps until we can get the new code to work.

Oops… A typo snuck into the file while I wasn’t looking 8-}

The fix has been posted in the first post…

New Full Load Worked!

I don’t think the GE Link bulbs are worth it. They have limited uses. I like to use them in lamps that I don’t really use and have them triggered by an open window sensor for security purposes. People really underestimate physical switches. Pulling out the phone to turn on a light takes too much time.
[/quote]

The use is like so: I walk into a room like the hallway to the garage hands are full with my kid in one side and bags in the other so the motion sensor triggers the light to go on.

Other use to have flood lights on a timer with sunrise and sunset so you have lights on outside of your home.

Switches are good too but sometimes the automation is one less thing to worry about (remember to turn off the flood lights in the morning and turn them on in the evening).

Sent from my iPhone using Tapatalk

I have an Eggminder and it doesn’t reflect what the app is showing. I can’t find in the plugin where to set refresh or polling.

Where is that set?

Edit: In fact I have a blank page where I believe you are supposed to set username and password.
when first installing I entered the information under the MIOS version of the plugin then updated with the full load.

The Cree lights are strange… The Cree bulbs I have, when added to the Wink Hub, configure and appear as GE Link bulbs… So no changes to the plugin were needed…

There may be different variations to the Cree bulbs (only one type of bulb is available locally), so it is possible that the Wink API handles them differently…

Does the Cree bulb actually show as a Cree bulb in the Wink App? (Mine show as “GE Link”)

I would have to see the LuaUPnP log and output from running “aprontest -l” and “aprontest -l -m ” on the wink hub in order to debug this issue.[/quote]

Below is the terminal output from running those commands on the wink hub. Lua log is attached. It should cover the timeframe for when I switched over from remote to local API to get this information, and below is a snippet when I try to control the devices. (The device ID is 41 in Vera) They show as Cree bulbs in the wink app, and the icons look like the design of the actual bulb. They show as cree and work just fine with remote API, and have the names assigned on the wink hub.

[hr]

08 07/19/15 3:49:32.097 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=41 <0x73f81520>
08 07/19/15 3:49:32.097 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:SwitchPower1 <0x73f81520>
08 07/19/15 3:49:32.098 JobHandler_LuaUPnP::HandleActionRequest argument action=SetTarget <0x73f81520>
08 07/19/15 3:49:32.098 JobHandler_LuaUPnP::HandleActionRequest argument newTargetValue=1 <0x73f81520>
08 07/19/15 3:49:32.099 JobHandler_LuaUPnP::HandleActionRequest argument rand=0.63897091941908 <0x73f81520>
04 07/19/15 3:49:32.101 <0x775e5320>
02 07/19/15 3:49:32.102 JobHandler::PurgeCompletedJobs purge job#218 : dev:41 (0xf421f0) P:50 S:2 status 2 <0x775e5320>

[hr]

[root@flex-dvt ~]# aprontest -l
Found 2 devices in database…
MASTERID | INTERCONNECT | USERNAME
1 | ZIGBEE | New HA On/Off Light
2 | ZIGBEE | New HA On/Off Light

Found 1 ZIGBEE groups in database…
GROUP ID | NAME |
1 | HwJ+EHQWTzUH+aP |

[hr]

[root@flex-dvt ~]# aprontest -l -m 1
Gang ID: 0xe00e1682
Manufacturer ID: 0x1014, Product Number: 0x08e2
Device has 12 attributes…
New HA On/Off Light
ATTRIBUTE | DESCRIPTION | TYPE | MODE | GET | SET
61440 | ZCLVersion | UINT8 | R | 1 |
61441 | ApplicationVersion | UINT8 | R | 1 |
61442 | StackVersion | UINT8 | R | 3 |
61443 | HWVersion | UINT8 | R | 1 |
61444 | ManufacturerName | STRING | R | CREE |
61445 | ModelIdentifier | STRING | R | |
61446 | DateCode | STRING | R | |
61447 | PowerSource | UINT8 | R | |
4 | NameSupport | UINT8 | R | 0 |
1 | On_Off | STRING | R/W | ON | ON
2 | Level | UINT8 | R/W | 254 | 255
1699842 | ZB_CurrentFileVersion | UINT32 | R | 420 |

Per Eggminder issue. I removed the full load plugin and downloaded the one from MIOS. I know have a polling interval and a pollenabeld field. The pollenabled field has 0. Is 0 enabled or disabled?

Is poll time minutes or seconds?

Unfortunately, not enough information in the log…

Fortunately, there is enough information in the aprontest output…

For some reason, the Wink App is flagging the Cree bulb as a switch… which is short-circuiting the local api’s detection of the device…

Attached is an updated local_api.php.txt (v0.36) file to fix the issue… it also fixes an issue where dimmer devices would not get their powered state set properly under certain conditions.

To install the updated local api file, you can:

  1. enable “Update local hubs” in the plugin, upload the file to your Vera and reload the LuaUPnP engine
    -or-
  2. copy the file to /var/www/ on your wink hub, and rename it to local_api.php

[quote=“wezley69, post:474, topic:185289”]Per Eggminder issue. I removed the full load plugin and downloaded the one from MIOS. I know have a polling interval and a pollenabeld field. The pollenabled field has 0. Is 0 enabled or disabled?

Is poll time minutes or seconds?[/quote]

You should not be messing with the variables under the “Advanced” tab!!

Polling is done by the plugin automatically, and only if required by the configuration… based on the API mode and Client mode settings on the “Setup” tab. The poll time is set with the “Hub Poll Time” field (in seconds)

A blank page in the plugin settings indicates that you did not refresh your browser after uploading the updated files to your Vera…

The default tab is now “Options”, you must click on “Setup” to get to the plugin configuration. (prevents accidental configuration changes that would require multiple LuaUPnP reloads)

Still not updating. I removed an egg from eggminder, filled my propane tank for refuel and the app would update but not vera.

I had reloaded many times during the several uninstall/re-installs.

Any ideas?

[quote=“wezley69, post:477, topic:185289”]Still not updating. I removed an egg from eggminder, filled my propane tank for refuel and the app would update but not vera.

I had reloaded many times during the several uninstall/re-installs.

Any ideas?[/quote]

As stated. in the thread many times, I have not yet been able to program psychic ability into the plugin…

Turn on debug mode in the plugin, reload the LuaUPnP engine and post logs.

Attached is the log file.

Thanks!

[quote=“wezley69, post:479, topic:185289”]Attached is the log file.

Thanks![/quote]

I looked over the logs, and everything looks ok…

The device list is retrieved from the Wink API servers…
The devices are configured…
The device variables are updated to the vera devices…
the device subscriptions are registered and confirmed…

That’s all the logs show…

Device updates should occur when a notification event is received…
for the eggminder, when you add or remove eggs, a notification event should be sent… Try removing or adding an egg, and capture the logs (with debug mode still enabled)… the subscription event for the eggminder may have changed…

Same goes for the refuel… try removing the tank from the sensor and capturing the logs.