PLUGIN: Wink Connect (formerly Wink Hub Controller)

I removed one egg. Watched the app update correctly. Waited 3 minutes added the egg back. Watch the app update correctly. Waited several minutes then pulled the logs.

It looks like this is being caused by changes in the data send in a state change notification.

I have posted an update (v0.18b81) to remedy the situation… (NOTE: You only need to upload the L_Wink_Hub.lua file to your Vera)

The full download contains the file L_Wink_Hub1.lua with a 1 at the end not L_Wink_Hub.lua as you mentioned. Can I assume I just upload the x1 version and all will be fine?

I am stilling having the same issue. I uploaded the single file you mentioned to no avail.

I removed an egg waited a few minutes, ensured the app updated, added the egg back waited a few minutes, ensured the app updated, then I gathered the log file. Log file attached.

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]

Now they are showing as dimmable, but still aren’t controllable.

Attached lua log. let me know if any other logs will help. The lights are Devices 59, and 60

I did read somewhere that apron was removed or changed or something in 1.1.0, but I can’t find where I saw that, and don’t remember precisely what was said. Is anyone else using a rooted wink hub on 1.1.0 with local API?

That was a typo… the correct filename IS L_Wink_Hub1.lua…

[quote=“wezley69, post:484, topic:185289”]I am stilling having the same issue. I uploaded the single file you mentioned to no avail.

I removed an egg waited a few minutes, ensured the app updated, added the egg back waited a few minutes, ensured the app updated, then I gathered the log file. Log file attached.[/quote]

Unfortunately, I don’t have an eggminder or a refuel… so I’m doing the fixes based solely on the debug log data… None of the devices that I have are using the new notifications that are being sent, so I have no way to trigger the updated code… Getting it working may take a few revisions…

BTW… you should turn OFF verbose logging on your Vera… It is not needed for debugging this plugin (debug mode enabled in the plugin is sufficient), and unless you need it for some other reason it will just place unneeded stress on your Vera (and slow it down).

[quote=“jsondag, post:485, topic:185289”]Now they are showing as dimmable, but still aren’t controllable.

Attached lua log. let me know if any other logs will help. The lights are Devices 59, and 60[/quote]

Your logs do not actually show you testing the switches… it’s complicated…
Your logs do show you triggering actions on device 59 and 60… and show them initially failing with “device not ready”…
Your logs then show you triggering actions on device 59 and 60… and show them failing …
But this does not show that they are actually failing…

The reason for this is due to the startup process… the plugin starts up in two phases… The first phase loads the plugin configuration and starts the plugin… the end of the phase is indicated with a status of “Startup completed”…

You first few tests where during this phase… until startup is completed, the device (and all child devices) are “not ready”…

the second phase loads the wink devices and initializes the vera devices. The end of this phase is indicated with a status of “Ready”… Once the second phase completes, devices should be controllable, and status is updated.

Your next few tests occurred during this phase… So the actions were being executed before (the internal structures for) the device were initialized, and that caused the plugin to crash - since the plugin crashed, the initialization never completed (the extended initialization time was due to the change from “REMOTE” to “LOCAL” API mode… This change causes the LuaUPnP engine to restart several times as devices are added/removed from Vera.

I had code that was supposed to prevent this from happening, but it did not work… It was an obscure bug that has been laying in wait for a long time!!

So… the tests you did were not worthless… But the ultimately did not test the local_api interface…

No… Firmware 01.01 still has aprontest… and it still works with the same options as previous versions… They have updated it for some of the new features (as they have with earlier firmware), but the basic functionality is unchanged.

I have posted a new version (v0.18b82) in the first post, which has changes to resolve both of the above issues.

@cybrmage - Thanks for the efforts. It is appreciated.

Your welcome 8-}

So… Does the new version work, or have you not had a chance to test it yet?

@cybrmage - Unfortunately the same result. I attached the log again.

I did check my log settings. Verbose is not checked. Maybe I should check then uncheck to reset.

I updated, then switched to local API, same behavior. I waited well after it said ready, they always show as off and the slider does nothing. Should I delete and reinstall the hub, perhaps?

Opps… The changes had a typo… (that seems to be the theme of the week…)

Attached is the fixed Lua file… (full package to be uploaded after the issue is fixed)

[ATTACHMENT SUPERSEDED]

@cybrmage - The same result after trying the new LUA file. I attached the log again.

Well… not EXACTLY the same result… there is progress…

another fix…

[ATTACHMENT SUPERSEDED]

And another log file. I walked through my same process.

Another try

[ATTACHMENT SUPERSEDED]

@cybrmage - You rock! It’s working. Within seconds it’s updating!

8-}

Did you try the Refuel?? does it work too?

Refuel too. Just tested it!

Thanks so much!

Sorry… I missed your post while dealing with the subscription issue…

I was able to duplicate the issue on my development unit (I had to remove and re-add my existing cree bulb)… The new 01.01 firmware assigns device IDs in a new format for zigbee devices…

I have posted a fix in the first post (v0.18b86) - you only need to upload the L_Wink_Hub1.lua file to your Vera.

Awesome, that worked. Thank you!