Author Topic: Devices seem to be "losing sync" in Vera  (Read 9351 times)

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #15 on: December 05, 2015, 09:17:53 pm »
as soon as I do anything with a group of lights it seems like the plugin crashes because nothing updates any longer.

Yep... still issues... Getting closer though...

Here is another incremental fix...

And... I think I found why your Wink Relay device has disappeared... I'm trying to figure out a solution...

Also... before you post the next set of logs ( if needed 8-} )... unless you ABSOLUTELY, POSITIVELY need to have your Vera doing verbose logging, could you turn it off (uncheck Settings/Logs/Verbose logging)... The plugin debug mode is all that is needed, and the extensive system logging make it much more difficult to sort through the logs.
« Last Edit: December 13, 2017, 01:46:04 am by cybrmage »

Offline dubbedout

  • Full Member
  • ***
  • Posts: 179
  • Karma: +3/-5
Re: Devices seem to be "losing sync" in Vera
« Reply #16 on: December 15, 2015, 03:01:02 pm »
Ok, my last reply must've not gone through so here it is again.

After monitoring the Wink connect plugin over the past few weeks, everything seems to be working correctly!  One weird thing though, my Relay re-appeared the other morning!  I received a push notification stating that my Wink Relay sensed motion and I was very surprised, but there it was.  Not sure if Wink changed something on their end, or you somehow fixed it from your end...but it works!

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #17 on: December 15, 2015, 04:37:03 pm »
One weird thing though, my Relay re-appeared the other morning!

The issue you had with the Wink Relay was that the API servers was that the API servers were not returning data for it's sensor pod... No sensor pod equals no relay device...

I assume that it was a glitch in the API servers that they have since fixed, as the API servers were returning sensor pod data for you Ring Video Doorbell.

Offline dubbedout

  • Full Member
  • ***
  • Posts: 179
  • Karma: +3/-5
Re: Devices seem to be "losing sync" in Vera
« Reply #18 on: December 15, 2015, 04:39:42 pm »
One weird thing though, my Relay re-appeared the other morning!

The issue you had with the Wink Relay was that the API servers was that the API servers were not returning data for it's sensor pod... No sensor pod equals no relay device...

I assume that it was a glitch in the API servers that they have since fixed, as the API servers were returning sensor pod data for you Ring Video Doorbell.
Ooh, does that mean we could possibly use the motion sensor in the Ring Doorbell in Vera?  That'd be awesome!

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #19 on: December 15, 2015, 06:41:42 pm »
Ooh, does that mean we could possibly use the motion sensor in the Ring Doorbell in Vera?  That'd be awesome!

Actually... when I saw that the doorbell was included in the Wink API data, I added a device entry into the plugin... I have not yet added the code to create a device or process the status...

So... Yes... It is possible...

As I do not have a Ring Doorbell, a brief description of what it adds to the the Wink app would be of help.

From the Api data, It looks like it will report motion (so we would add a motion sensor device) and button presses (so we would add a scene controller)...

The device status also appears in the sensor pod data... So I'm not sure if the status data would be retrieved from the device or from the sensor_pod or can be retrieved from both...

If your willing to do the testing (and provide logs)... I'm willing to make the additions.

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #20 on: December 16, 2015, 01:38:02 am »
Here is an experimental update adding support for the Ring Video Doorbell.

Please test... (only changes are in L_Wink_Hub1.lua)

« Last Edit: December 13, 2017, 01:46:24 am by cybrmage »

Offline dubbedout

  • Full Member
  • ***
  • Posts: 179
  • Karma: +3/-5
Re: Devices seem to be "losing sync" in Vera
« Reply #21 on: December 16, 2015, 12:22:28 pm »
Here is an experimental update adding support for the Ring Video Doorbell.

Please test... (only changes are in L_Wink_Hub1.lua)
So I figured out why my Relay came back!  When I went into the Wink app I noticed I didn't see the Ring doorbell anywhere, so I added it again...Relay disappeared.  So the first Ring I received had issues and they sent me a new one, once I removed it from the app it was also removed from Wink which is why my Relay came back.

I installed the update, the motion sensor seems to work but doesn't update automatically in Vera.  When I get a motion alert (from Ring app) nothing changes on Vera, but if I do a resync it shows tripped, and then after a few minutes if I resync again it shows untripped.

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #22 on: December 16, 2015, 01:08:13 pm »
So I figured out why my Relay came back!  When I went into the Wink app I noticed I didn't see the Ring doorbell anywhere, so I added it again...Relay disappeared.  So the first Ring I received had issues and they sent me a new one, once I removed it from the app it was also removed from Wink which is why my Relay came back.

I figured that was what was happening... When you add the Ring, It is added as both a device and a sensor pod... BUT the API (incorrectly) removes (or at least no longer reports) the Wink Relay sensor pod.

I'm working on a work-around...


I installed the update, the motion sensor seems to work but doesn't update automatically in Vera.  When I get a motion alert (from Ring app) nothing changes on Vera, but if I do a resync it shows tripped, and then after a few minutes if I resync again it shows untripped.

So far, so good... I expected that the button/motion devices would not get state update, as I have no data from an update to work with...

What I need to proceed is... Capture a LuaUPnP log... Starting logging and trigger a resync... wait 10 seconds... then trigger the motion sensor on the Ring... wait 5 seconds, press the doorbell button... wait 5 seconds... stop logging and post the results... That should capture the current state of the devices and the notifications that are sent when the Ring is activated...

Offline dubbedout

  • Full Member
  • ***
  • Posts: 179
  • Karma: +3/-5
Re: Devices seem to be "losing sync" in Vera
« Reply #23 on: December 16, 2015, 01:21:33 pm »
So I figured out why my Relay came back!  When I went into the Wink app I noticed I didn't see the Ring doorbell anywhere, so I added it again...Relay disappeared.  So the first Ring I received had issues and they sent me a new one, once I removed it from the app it was also removed from Wink which is why my Relay came back.

I figured that was what was happening... When you add the Ring, It is added as both a device and a sensor pod... BUT the API (incorrectly) removes (or at least no longer reports) the Wink Relay sensor pod.

I'm working on a work-around...


I installed the update, the motion sensor seems to work but doesn't update automatically in Vera.  When I get a motion alert (from Ring app) nothing changes on Vera, but if I do a resync it shows tripped, and then after a few minutes if I resync again it shows untripped.

So far, so good... I expected that the button/motion devices would not get state update, as I have no data from an update to work with...

What I need to proceed is... Capture a LuaUPnP log... Starting logging and trigger a resync... wait 10 seconds... then trigger the motion sensor on the Ring... wait 5 seconds, press the doorbell button... wait 5 seconds... stop logging and post the results... That should capture the current state of the devices and the notifications that are sent when the Ring is activated...
Here you go!

https://www.dropbox.com/s/886ll43s1xj66xg/Wink-RingLog01.txt?dl=0

EDIT:  Looks like once the Ring detects motion it causes the Wink connect plugin to crash.  I just tested it while watching the logs, everything was working until I set off the motion.
« Last Edit: December 16, 2015, 07:25:00 pm by dubbedout »

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #24 on: December 16, 2015, 09:44:50 pm »
Here is another test fix...

It should fix the doorbell and support your iHome device... It should also make your Wink Relay reappear... (but it may not update properly...)

(only changes are in L_Wink_Hub1.lua)
« Last Edit: December 13, 2017, 01:46:44 am by cybrmage »

Offline dubbedout

  • Full Member
  • ***
  • Posts: 179
  • Karma: +3/-5
Re: Devices seem to be "losing sync" in Vera
« Reply #25 on: December 16, 2015, 11:42:43 pm »
Here is another test fix...

It should fix the doorbell and support your iHome device... It should also make your Wink Relay reappear... (but it may not update properly...)

(only changes are in L_Wink_Hub1.lua)

After uploading the new lua file posted above I can't login to the WebUI of Vera any longer.  Looking at the logs, the only mention of "Wink" is this line:

Code: [Select]
LuaInterface::LoadCode: [string "-- Wink_Connect 0.20.35..."]:2867: unexpected symbol near 'if' <0x776af320>

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #26 on: December 17, 2015, 12:38:56 am »
Sorry... Accidentally left some test code in the file...

Fixed...
« Last Edit: December 13, 2017, 01:47:01 am by cybrmage »

Offline dubbedout

  • Full Member
  • ***
  • Posts: 179
  • Karma: +3/-5
Re: Devices seem to be "losing sync" in Vera
« Reply #27 on: December 17, 2015, 01:00:03 pm »
Sorry... Accidentally left some test code in the file...

Fixed...

No dice!  Wink Connect is getting stuck at "Configuring Devices"  Here's a log capture right after a LUUP reload, hopefully it helps.

https://www.dropbox.com/s/ybtlxbe32w44z1m/WinkRingLog02.txt?dl=0

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #28 on: December 17, 2015, 01:55:21 pm »
No dice! 

NO!!! We have dice!!! They're just coming up snake-eyes!!

The new processing code for the Wink Relay caused the plugin to crash

Here is a fix... may not make the Relay Device appear... but it should let you test the iHome and Ring devices while I continue to bash away at the Wink Relay... (I'm *REALLY* trying to resist the urge to bash away at the one on my wall!!)

{UPDATE}: nope - won't work either... fix coming soon...
« Last Edit: December 17, 2015, 02:06:55 pm by cybrmage »

Offline cybrmage

  • Moderator
  • Hero Member
  • *****
  • Posts: 1104
  • Karma: +113/-43
Re: Devices seem to be "losing sync" in Vera
« Reply #29 on: December 17, 2015, 03:33:31 pm »
This should fix the plugin crashing with your Wink Relay...
« Last Edit: December 13, 2017, 01:47:39 am by cybrmage »