Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installed and recognized all devices, can't actually control them #71

Open
charlesthomas opened this issue Dec 6, 2016 · 10 comments
Open

Comments

@charlesthomas
Copy link

I got homebridge and the plugin working, and I see all of my Wink devices in homekit, and they're even reading the correct statuses (on vs off at the time of config) but I can't actually control any of them in the iOS Home app.

@charlesthomas
Copy link
Author

This is all I'm getting in the console:

[12/6/2016, 2:07:22 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 1
[12/6/2016, 2:07:54 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 1
[12/6/2016, 2:07:55 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 0
[12/6/2016, 2:07:56 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 1
[12/6/2016, 2:07:56 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 0
[12/6/2016, 2:07:57 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 1
[12/6/2016, 2:07:57 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 0
[12/6/2016, 2:08:01 PM] [Wink] Changing target property 'powered' of the light_bulbs called Office Overhead to 1
[12/6/2016, 2:08:10 PM] [Wink] Changing target property 'powered' of the undefined called Coffee Pot to 1
[12/6/2016, 2:08:12 PM] [Wink] Changing target property 'powered' of the undefined called Coffee Pot to 1

@dakkathx
Copy link

Exactly the same issue here

@microb0x
Copy link

Also having this same issue

@scoobyshi
Copy link

I'm having the same issue as well. The plug-in worked for me probably about 6+ months ago, but I haven't really tried using it again until recently, which is when I've observed this problem. Has anyone had any luck, or tried forking this and adding some additional debugging?

@scoobyshi
Copy link

So, with a few additional debug statements, I found that the device "desired_state" on the initial request was empty:

{"object_type":"light_bulb","object_id":"1338xxx","uuid":"cdb488fc-7d56-4c61-b7fe-xxxx","icon_id":"71","icon_code":"light_bulb-light_bulb","desired_state":{}" . .

and this line in lib/wink-accessory.js was then causing the app to error out and never actually submit the requested desired_state (on/off):

else if (this.device.desired_state[sProperty] == undefined)

I commented this section out and while I can now successfully control my devices there are few inconsistencies I'd like to understand. I'm not sure why the desired_state payload is empty first of all, given that when I call the API directly (for example through Postman) it returns data there.

@charlesthomas
Copy link
Author

I tried this too, and it worked as expected. After that, I was getting a lot of messages about retries, though. Lights were turning on or off as appropriate, but then would change back and I'd see retry messages in the console output. I commented out the retry line in the block where I found the logs. Not an ideal solution, but it's working now.

@ckdake
Copy link

ckdake commented Jan 20, 2017

Same issue here, commenting out the undefined detection worked for me as well. Same as Charles, lots of retries.

@scoobyshi
Copy link

So, I have a fork and pull request that resolves the ability to control, the retries, and the dimness controls: #75, just waiting on either some feedback or an accept. I've been using it for a few weeks and it's behaving quite well.

@ckdake
Copy link

ckdake commented Jan 20, 2017

@scoobyshi nice! This works perfectly for me.

@microb0x
Copy link

microb0x commented Feb 4, 2017

@scoobyshi Your changes seem to be working for me. I'm still having some retries but they are very infrequent.

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

No branches or pull requests

5 participants