PLUGIN: Wink Connect (formerly Wink Hub Controller)

@cybrmage - Still working great. I did find these entries in my log while tracking down a different issue. I thought this might be causing someone else an issue.

Thanks again for all of the efforts!

1 07/25/15 11:30:19.146 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘HTTP/1.1 200 OK’. <0x7279b520>
01 07/25/15 11:30:19.152 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘Date: Sat, 25 Jul 2015 16:30:19 GMT’. <0x7279b520>
01 07/25/15 11:30:19.158 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘Content-Type: text/javascript; charset=“UTF-8”’. <0x7279b520>
01 07/25/15 11:30:19.162 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘Content-Length: 27’. <0x7279b520>
01 07/25/15 11:30:19.165 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘Connection: keep-alive’. <0x7279b520>
01 07/25/15 11:30:19.169 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘Cache-Control: no-cache’. <0x7279b520>
01 07/25/15 11:30:19.174 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘Access-Control-Allow-Origin: *’. <0x7279b520>
01 07/25/15 11:30:19.179 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘Access-Control-Allow-Methods: GET’. <0x7279b520>
01 07/25/15 11:30:19.180 luup_log:119: Wink_Connect::HUB_PUBNUB::processIncoming: discarding invalid subscription data ‘’. <0x7279b520>
02 07/25/15 11:30:20.100 luup_log:119: Wink_Connect::HUB_PUBNUB::processSubscription: Received subscription data ‘[[],“14378394465628323”,“”]’. <0x74be0520>
01 07/25/15 11:30:20.101 lu_io_connected 0x15e5330 args 0 0xf42c00 <0x74be0520>
02 07/25/15 11:30:20.102 luup_log:119: Wink_Connect::HUB_PUBNUB::SUBSCRIBE: self.is_connected [TRUE] luup.io.is_connected [FALSE]. <0x74be0520>
02 07/25/15 11:30:20.102 luup_log:119: Wink_Connect::HUB_PUBNUB::SUBSCRIBE: called - timeToken [14378394465628323] waitForData [FALSE]. <0x74be0520>
02 07/25/15 11:30:20.103 luup_log:119: (Wink_Connect::HUB_PUBNUB:asynchSend) Sending request. <0x74be0520>
50 07/25/15 11:30:20.103 luup_log:119: (Wink_Connect::HUB_PUBNUB::http_wrapper_request_luup) simple request type [GET] sendOnly [true] url [http://pubsub.pubnub.com/subscribe/sub-c-f7bf7f7e-0542-11e3-a5e8-02ee2ddab7fe/94e22afad9f370201c594bd7c03510c0a4cf1233|hub-200040|user-293239,6361e18c558fdcf5c07ca66d240fc87f620b6fb7|eggtray-150440|user-293239,a77657f719435115889a7a09f7d904763f6d9738|propane_tank-10849|user-293239/0/14378394465628323]. <0x74be0520>
02 07/25/15 11:30:20.104 luup_log:119: (Wink_Connect::HUB_PUBNUB::LuupSendReceive) Sending request (sendOnly = true). <0x74be0520>
02 07/25/15 11:30:20.104 luup_log:119: (Wink_Connect::HUB_PUBNUB::LuupSendReceive) Sending sendData [
GET http://pubsub.pubnub.com/subscribe/sub-c-f7bf7f7e-0542-11e3-a5e8-02ee2ddab7fe/94e22afad9f370201c594bd7c03510c0a4cf1233|hub-200040|user-293239,6361e18c558fdcf5c07ca66d240fc87f620b6fb7|eggtray-150440|user-293239,a77657f719435115889a7a09f7d904763f6d9738|propane_tank-10849|user-293239/0/14378394465628323 HTTP/1.1

Those are generated with debug mode turned on, and are a normal part of the pubnub subscription mechanism…

If you turn off debug mode, they will not be displayed.

Oops. thanks again!

Ok, now for something reeeaaaly weird…
Target had the Power Strip Genius on sale for $22 so I bought a couple.
The Wink Connect interface looks just like the Wink App. Looks like you really put some work into it. Looks nice.
So far, so good.
When I click the on/off on the wink app on my phone, the switch turns on or off and the animation in the Vera app changes in about a second. Perfect!
When I click the on or off button on the Vera Wink Connect, the animation on Vera AND the Wink App both change in about a second but the switch state doesn’t change!!!
Now, that’s weird!!!
In other words, the Wink App on my phone works fine and communicates the state change to the Vera Wink Connect just fine but when trying to control the switch from Vera, all that works is the animation (so my phone shows that the switch is on, but it isn’t}.
It’s like you’re having to send a separate command to change the animation and another command to control the light and the latter isn’t working.
It’s also kind of a bummer that I can’t change the names of the switches. I’m stuck with ‘Outlet #1’ and ‘Outlet #2’. But that’s Wink’s fault, not yours.
One more thing. Can you please show me the lup command to turn Outlet 1/2 on/off?
Thanks for the great work and for keeping up with this forum.

Any more info on this?

I don’t have a Pivot Power Genius to test with… so you will need to provide logs…

Turn on debug mode in the plugin… and reload the LuaUPnP engine… then turn the switch on/off with the Wink App… wait a few seconds then (try to) turn the switch on/off with the Vera… then capture and post the logs…

As the device is a compound device, I had to extend the UPnP spec a bit to get it to work… To change the state of an outlet you wound send a UPnP action with the correct service ids…

serviceId - Outlet 0: urn:upnp-org:serviceId:SwitchPower1_0
serviceId - Outlet 1: urn:upnp-org:serviceId:SwitchPower1_1
Action: SetTarget
Parameter: newTargetValue

Any more info on this?[/quote]

Oops, my bad. It was Walmart. And now they’re $20!

http://www.walmart.com/ip/37425684

Good hunting!

I’ll get the logs out shortly.

Jim

I just finished reading all 34 pages and didn’t see much about the myq and the wink connect plugin. I have installed the plugin and configured it for use with my wink account that has my garage door on it only.

The status says ready but it never adds my garage door. I’ve tried resyncing and rebooting the device and can’t get it to work. I think I read early in the thread that users had better luck with UI5 but I don’t see where anyone has successfully controlled their myq account through wink connect on UI7.

I have a new Chamberlain HD950WF which is apparently new and a little different from the other chamberlains. Mine has the wifi internet gateway builtin and the device id may be just different enough to break the way the plugin was designed possibly?

Any advice would be appreciated.

Thanks!

Did you remove the MYQ plugin (and device)?? The plugin automatically excludes MYQ garage doors if the MYQ plugin is installed.

The plugin also supports generic garage doors…

I use the MYQ garage doors (using an 888LMs with an 929LM gateway) with my UI7 system every day… no issues…

So… unless your newfangled garage door shows up in the Wink API as something completely different… it should work.

If it doesn’t, you will need to turn on debug mode, reload the LuaUPnP engine, and post the logs (but, since you read all 34 pages, I don’t need to tell you that 8-} )

Did you remove the MYQ plugin (and device)?? The plugin automatically excludes MYQ garage doors if the MYQ plugin is installed.

The plugin also supports generic garage doors…

I use the MYQ garage doors (using an 888LMs with an 929LM gateway) with my UI7 system every day… no issues…

So… unless your newfangled garage door shows up in the Wink API as something completely different… it should work.

If it doesn’t, you will need to turn on debug mode, reload the LuaUPnP engine, and post the logs (but, since you read all 34 pages, I don’t need to tell you that 8-} )[/quote]

Thanks for your help!!!
I did uninstall the MyQ plugin before trying the Wink Connect plugin.

Do the logs include any sensitive data that I should strip out before I post it? I didn’t see anyone elses logs include user Ids and such.

I don’t have a Pivot Power Genius to test with… so you will need to provide logs…

Turn on debug mode in the plugin… and reload the LuaUPnP engine… then turn the switch on/off with the Wink App… wait a few seconds then (try to) turn the switch on/off with the Vera… then capture and post the logs…

As the device is a compound device, I had to extend the UPnP spec a bit to get it to work… To change the state of an outlet you wound send a UPnP action with the correct service ids…

serviceId - Outlet 0: urn:upnp-org:serviceId:SwitchPower1_0
serviceId - Outlet 1: urn:upnp-org:serviceId:SwitchPower1_1
Action: SetTarget
Parameter: newTargetValue[/quote]

Hopefully, this will let you download the log and the log will have what you need. This is my first posted log so I’m not sure about the capture/post process.

Thanks again,
Jim

Log obtained… log processed…

The log shows everything running smoothly…
state is received and processed… no crashes…
commands are sent… responses are received… no crashes…

Nothing obvious appears to be wrong…

When the Power Pivot Genius support was first added, we found a bug in the Wink API… the PPG would not respond to the standard command used to power on/off a device… A workaround was found…

I’m thinking that maybe the bug was fixed, and it will now not respond to the workaround command…

I have made the changes in the code… I’ll post an update later today.

Did you remove the MYQ plugin (and device)?? The plugin automatically excludes MYQ garage doors if the MYQ plugin is installed.

The plugin also supports generic garage doors…

I use the MYQ garage doors (using an 888LMs with an 929LM gateway) with my UI7 system every day… no issues…

So… unless your newfangled garage door shows up in the Wink API as something completely different… it should work.

If it doesn’t, you will need to turn on debug mode, reload the LuaUPnP engine, and post the logs (but, since you read all 34 pages, I don’t need to tell you that 8-} )[/quote]

Thanks for your help!!!
I did uninstall the MyQ plugin before trying the Wink Connect plugin.

Here is the log:

[quote=“GoogleNinja, post:513, topic:185289”]Here is the log:
http://pastebin.com/te63BhRN[/quote]

Well… the device json looks pretty much the same as for other MYQ devices…

I need to see more of the log… 250 lines is NOT enough (with debug mode on, the plugin will spit out 250 lines of debug info while deciding if it will run the next line of code…)

I need to see the complete startup of the plugin, plus the (attempted) opening of the door… (this will show all the decisions made in initializing the device, the interaction with the API server and any responses that it provides)

PICO REMOTES

The Pico remote is a 5-button remote control designed to control the Lutron Caseta line of switches and dimmers.
The Pico can be used as a hand-held remote, or mounted on a desktop pedestal or onto a wall plate adapter of car visor adapter.

The operation of the Pico through the Wink Connect plugin, depends on the configuration of the Wink Connect plugin and the Wink App.

PICO OPERATION

In REMOTE API mode:

The pico remote device can be used to add or remove Lutron devices from the list of devices that the pico remote will control.

On the Pico Device settings page in the Vera UI, the devices that are controlled by the remote are listed, and devices on your Wink Hub that can be controlled are listed.

Click on the “Remove” button beside the device description to remove the device from the remote.
Click on the “Add” button to beside the device description to add the device to the remote.

Remote API mode does not allow the Pico remote to be used as a scene controller.

In LOCAL API mode:

Each Pico remote will be added to the vera as scene controller devices.

The Pico remote can operate in one of two modes
Under the advanced tab, there is a variable named “FiresOffEvents”.
If this variable is set to “0”, when the Pico button is pressed and released, the button is turned “ON”.
If this variable is set to “1”, when the Pico button is quickly pressed and released (less than 2 seconds), the button is turned “ON”. When the pico button is slowly pressed and released (more than 2 seconds), the button is turned “OFF”.

From the settings page on the device, under the “scene” (UI5) or “Select scenes for device buttons” (UI7), you can select the scene that you want to activate when a Pico button is turn “ON” or “OFF” (“OFF” is only available when “FiresOffEvents” is set to “1”).

NOTE: Pico remotes can be used as a 5-button scene controller when used with a rooted Wink Hub with local_api v0.38 or greater and the Wink Connect plugin version 0.18b86 or greater.

In COMBINED API mode:

devices for BOTH PicoRemote and Scene Controller devices are create for each of your pico remotes.

The PicoRemote device works as described in “REMOTE API” mode , and the Scene Controller device operates as described in the “LOCAL API” mode.

Note that when you press a button on the Pico remote, the Wink Hub will operate the devices associated with the Pico remote AND the Wink Connect plugin will cause vera scenes to be executed.

PICO BUTTONS

Pico buttons are mapped as follows:
Button #1: Pico “ON” button (square button at top of remote)
Button #2: Pico “DIM UP” button (triangular button at center left of remote)
Button #3: Pico “FAVORITE” button (round button in center of remote)
Button #4: Pico “DIM DOWN” button (triangular button at center right of remote)
Button #5: Pico “OFF” button (square button at bottom of remote)

[hr]

NEW VERSION (v0.18b90) with NEW FEATURES!!! available in first post in this thread…

v0.18b90 - July 28, 2015 (manual update only)
– Updated - local_api to v0.38
– Changed - handling of possible api changes to Power Pivot
– ADDED - Ability to use a Pico remote as a scene controller when using LOCAL api mode

UPDATED FILES

If you are manually updating from v0.18b86, the following files need to be uploaded to your vera:
D_Wink_PicoLocal1.json
D_Wink_PicoLocal1.xml
S_Wink_PicoRemote1.xml
local_api.php.txt
local_api.picoInit.txt
local_api.picoNotify.txt
I_Wink_Hub1.xml
S_Wink_Hub1.xml
L_Wink_Hub1.lua

*** NOTE: post modified for use as manpage ***

[quote=“cybrmage, post:514, topic:185289”][quote=“GoogleNinja, post:513, topic:185289”]Here is the log:
http://pastebin.com/te63BhRN[/quote]

Well… the device json looks pretty much the same as for other MYQ devices…

I need to see more of the log… 250 lines is NOT enough (with debug mode on, the plugin will spit out 250 lines of debug info while deciding if it will run the next line of code…)

I need to see the complete startup of the plugin, plus the (attempted) opening of the door… (this will show all the decisions made in initializing the device, the interaction with the API server and any responses that it provides)[/quote]

Okay, here is the entire log. I did a reload right before I saved the log to make it easier to find I hope.

I can’t include an attempted opening of the door because the door never shows up in my devices after I install the Wink Connect ap.

Let me know if you have any troubles viewing the log or if you need anything else from me.
https://drive.google.com/file/d/0Bz_GJOL6QdSZUk1wYk0tQ0FHaU0/view?usp=sharing

In the new full load I do not see these files as listed:
S_Wink_PicoRemote1.json I do see a D_Wink_*.json
I_Wink_Hub1.lua I do see an *.xml
S_Wink_Hub1.lua I do see an *.xml

[quote=“wezley69, post:517, topic:185289”]In the new full load I do not see these files as listed:
S_Wink_PicoRemote1.json I do see a D_Wink_*.json
I_Wink_Hub1.lua I do see an *.xml
S_Wink_Hub1.lua I do see an *.xml[/quote]

Those were typos… fixed…
should be:
S_Wink_PicoRemote1.xml
I_Wink_Hub1.xml
S_Wink_Hub1.xml

sorry… long day…

[quote=“cybrmage, post:518, topic:185289”][quote=“wezley69, post:517, topic:185289”]In the new full load I do not see these files as listed:
S_Wink_PicoRemote1.json I do see a D_Wink_*.json
I_Wink_Hub1.lua I do see an *.xml
S_Wink_Hub1.lua I do see an *.xml[/quote]

Those were typos… fixed…
should be:
S_Wink_PicoRemote1.xml
I_Wink_Hub1.xml
S_Wink_Hub1.xml

sorry… long day…[/quote]

It works!!!
Thanks for the quick turnaround. ;D
Not meaning to be picky, but… ::slight_smile: When you edited the original post you did fix the last two but it still shows S_Wink_PicoRemote1.json instead of S_Wink_PicoRemote1.xml.
Thanks again, my new pivots are now useful (I ordered two more).

Ok… The plugin was originally designed to control a Wink Hub… and has expanded to include the standalone and linked services that do not require a Wink Hub… But… the plugin was still expecting a Wink Hub…

That has been fixed… A new version will be posted shortly…

Since you are running the App Marketplace version, you WILL need to upload all the files in the archive to your Vera…