Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Failed to refresh devices #9

Closed
JimBobSD opened this issue May 18, 2017 · 15 comments
Closed

Failed to refresh devices #9

JimBobSD opened this issue May 18, 2017 · 15 comments
Labels

Comments

@JimBobSD
Copy link

JimBobSD commented May 18, 2017

Wink3 fails to show any devices - I can add the Wink Hub but no devices appear:

[5/17/2017, 7:38:28 PM] [Wink] Failed to refresh devices. TypeError: Cannot read property 'powered' of undefined
at Object.get (/usr/lib/node_modules/homebridge-wink3/src/devices/light_bulb.js:11:27)
at s.characteristics.filter.forEach.c (/usr/lib/node_modules/homebridge-wink3/src/AccessoryHelper.js:139:28)
at Array.forEach (native)
at accessory.definition.services.forEach.s (/usr/lib/node_modules/homebridge-wink3/src/AccessoryHelper.js:138:44)
at Array.forEach (native)
at AccessoryHelper.updateAccessoryState (/usr/lib/node_modules/homebridge-wink3/src/AccessoryHelper.js:135:35)
at AccessoryHelper.configureAccessory (/usr/lib/node_modules/homebridge-wink3/src/AccessoryHelper.js:44:10)
at WinkPlatform.addDevice (/usr/lib/node_modules/homebridge-wink3/src/WinkPlatform.js:104:26)
at Array.forEach (native)
at /usr/lib/node_modules/homebridge-wink3/src/WinkPlatform.js:136:13
at Generator.next ()
at step (/usr/lib/node_modules/homebridge-wink3/dist/WinkPlatform.js:32:191)
at /usr/lib/node_modules/homebridge-wink3/dist/WinkPlatform.js:32:361
at process._tickCallback (internal/process/next_tick.js:109:7)
[5/17/2017, 7:38:30 PM] [Wink] Authenticated with local Wink hub (172.16.0.215)

@JimBobSD
Copy link
Author

And on another Wink Hub:

[5/17/2017, 7:46:24 PM] [Wink] Failed to refresh devices. TypeError: Cannot read property 'pubnub' of undefined
at Subscriptions.subscribe (/usr/lib/node_modules/homebridge-wink3/src/Subscriptions.js:24:27)
at /usr/lib/node_modules/homebridge-wink3/src/WinkPlatform.js:132:26
at Generator.next ()
at step (/usr/lib/node_modules/homebridge-wink3/dist/WinkPlatform.js:32:191)
at /usr/lib/node_modules/homebridge-wink3/dist/WinkPlatform.js:32:361
at process._tickCallback (internal/process/next_tick.js:109:7)
[5/17/2017, 7:46:26 PM] [Wink] Authenticated with local Wink hub (172.16.0.203)

@sibartlett
Copy link
Owner

I've published 1.1.5 which will fix the first error.

The second error is weird. Not sure why the subscription data wouldn't be there. Could you retest with the new version? If the issue persists, I code add some code to handle that problem - but I am concerned that you'll possibly not have push notifications for that hub.

@charlestephen
Copy link

Similar for me but with the property 'services' as below:

[5/18/2017, 12:06:55 AM] Homebridge is running on port 51826.
[5/18/2017, 12:06:56 AM] [Wink Hub 2] Authenticated with wink.com
[5/18/2017, 12:06:56 AM] [Wink Hub 2] Refreshing devices...
[5/18/2017, 12:06:56 AM] [Wink Hub 2] error Failed to refresh devices. TypeError: Cannot read property 'services' of undefined

at AccessoryHelper.getDefinition (/homebridge/node_modules/homebridge-wink3/src/AccessoryHelper.js:25:17)
at WinkPlatform.patchAccessory (/homebridge/node_modules/homebridge-wink3/src/WinkPlatform.js:71:49)
at WinkPlatform.addDevice (/homebridge/node_modules/homebridge-wink3/src/WinkPlatform.js:98:10)
at Array.forEach (native)
at /homebridge/node_modules/homebridge-wink3/src/WinkPlatform.js:135:13
at next (native)
at step (/homebridge/node_modules/homebridge-wink3/dist/WinkPlatform.js:32:191)
at /homebridge/node_modules/homebridge-wink3/dist/WinkPlatform.js:32:361
at process._tickCallback (internal/process/next_tick.js:109:7)
[5/18/2017, 12:06:56 AM] [Wink Hub 2] Authenticated with local Wink hub (10.0.0.46)

@sibartlett
Copy link
Owner

Sorry, I messed up while publishing 1.1.5 - I have republished as 1.1.6

@JimBobSD
Copy link
Author

Thanks for the quick update. It fixed the errors. For the second errors, I removed my Wink-provided client ID/secret and the error did not reappear. Thanks for all the work on this!

@sibartlett
Copy link
Owner

Ah right, seems there might be something up with push notifications and custom client ID/secret - I will look into that issue when I have a chance.

@sibartlett
Copy link
Owner

@charlestephen looks like you're using version 1.1.2 - the latest version might work better.

@sibartlett
Copy link
Owner

@charlestephen I just read through the code, and I can confirm the bug you're experiencing should be fixed in the latest version.

@JimBobSD
Copy link
Author

Now that its working, I had a different issue. I have a light called "Master Ceiling" and I successfully turn it off via the Home App. The light is out. But the Home App reports that its "On" at "100%" -- here's the log:

[5/17/2017, 9:52:57 PM] Homebridge is running on port 45960.
[5/17/2017, 9:52:58 PM] [Wink-Upstairs] Authenticated with wink.com
[5/17/2017, 9:52:58 PM] [Wink-Upstairs] Refreshing devices...
[5/17/2017, 9:52:59 PM] [Wink-Upstairs] Added: Up Outside Master (light_bulb/2645260)
[5/17/2017, 9:52:59 PM] [Wink-Upstairs] Added: Up Boys Hallway (light_bulb/2645261)
[5/17/2017, 9:52:59 PM] [Wink-Upstairs] Added: Master Ceiling (light_bulb/2645262)
[5/17/2017, 9:52:59 PM] [Wink-Upstairs] Added: Master Chair Lamp (light_bulb/2645265)
[5/17/2017, 9:52:59 PM] [Wink-Upstairs] Devices refreshed
[5/17/2017, 9:53:00 PM] [Wink-Upstairs] Authenticated with local Wink hub (172.16.0.215)
[5/17/2017, 10:01:37 PM] [Wink-Upstairs] Sending update: Master Ceiling (light_bulb/2645262) { powered: false }
[5/17/2017, 10:01:38 PM] [Wink-Upstairs] Update sent successfully: Master Ceiling (light_bulb/2645262)

@sibartlett
Copy link
Owner

There's no log messages after "Update sent successfully"? If so, looks like the plugin is not receiving push notifications for some reason.

@JimBobSD
Copy link
Author

Nope. No messages after that. I'm using a Wink Hub 1 with the latest firmware (3.8.1)

@charlestephen
Copy link

@sibartlett Fixed. Thanks

@sibartlett
Copy link
Owner

@JimBobSD Did you mention that you're using 2 Wink Hubs? Do you have the same problem with the other? And I don't suppose restarting homebridge fixes it either?

I might have to come back to this tomorrow, I got to get some sleep.

@JimBobSD
Copy link
Author

I just restarted the Wink Hub that was giving me the trouble -- and now its working. Thanks for your patience!

@sibartlett
Copy link
Owner

Good to hear that you both got the plugin working!

I'm closing this ticket. If there are any other problems, please open a new issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants