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

Siri does what she's told and then claims she can't find the device #14

Closed
pdlove opened this issue Jan 9, 2016 · 14 comments
Closed

Siri does what she's told and then claims she can't find the device #14

pdlove opened this issue Jan 9, 2016 · 14 comments
Labels

Comments

@pdlove
Copy link
Contributor

pdlove commented Jan 9, 2016

This was reported in #3 but isn't related to the original request other than being found during user testing.
When requesting Siri to work with a home kit device, she does it and then reports that she can't find the device.
This appears to be due to the callback not sending the original request's value back to Siri and wasn't found during original testing because I did my testing with Apple's Homebridge Developer test app.
A resolution will be submitted soon on this.

@KraigM
Copy link
Owner

KraigM commented Jan 9, 2016

Well its not the original request's value that we are sending, but the value after the change has been made. Really Siri wants you to make the change and then respond with the updated value. We are just leaving too early because Wink takes longer then Siri is willing to wait.

@pdlove
Copy link
Contributor Author

pdlove commented Jan 9, 2016

That's a good point. What is really odd is that the locks work fine. And with the locks, it takes a VERY long time to reply compared to the light switch.

@pdlove
Copy link
Contributor Author

pdlove commented Jan 9, 2016

I need a bit of help... Any idea how to trigger the event? I'm thinking like this:

    this
        .addService(Service.Lightbulb)
        .getCharacteristic(Characteristic.On)
        .on('get', function (callback) {
            callback(null, that.device.last_reading.powered);
        })
        .on('set', function (value, callback) {
            that.updatePropertyWithoutFeedback(function() { this.trigger("get",callback); }, "powered", value, value);
        });

Essentially it will change it this to make it so all of the calls will be Updates With Feedback.
Does anyone know how to trigger the get event with the callback?

@KraigM
Copy link
Owner

KraigM commented Jan 9, 2016

Not sure what you are talking about. Can you jump on slack?

KraigM added a commit that referenced this issue Jan 10, 2016
KraigM added a commit that referenced this issue Jan 10, 2016
KraigM added a commit that referenced this issue Jan 10, 2016
…the chance that it detects the update before Siri gives up.
@KraigM
Copy link
Owner

KraigM commented Jan 10, 2016

@pdlove Your proposed fix is better then any I could think of to solve the real issue 😄. I committed what I was working on to a feature branch (to be finished in the future) and merged your changes into a new hotfix branch.

There was one minor issue that made it crash, so I fixed that. I also played with the refresh interval numbers and now Siri always gives me a proper response (it doesn't delay her enough to give up).

Side note: Make sure to add the issue number to your commits (as seen above) as it makes it so much easier down the line (i.e. Who wrote this code? Crap it was me. Why did I write it... lets see "Fixed stuff"... ugh. but if the comment has an issue number then you get a link back to an entire desc, convo, etc of why that changeset(s) exists).

Another side note: Make sure to pull latest from the main repo before you add new commits. You changesets were behind and git wouldn't auto merge it (BeyondCompare ftw).

@KraigM KraigM added the bug label Jan 10, 2016
@msroest
Copy link
Contributor

msroest commented Jan 10, 2016

Getting this with 1.0.1 as well.

Thanks so much for all the work @pdlove @KraigM

KraigM pushed a commit that referenced this issue Jan 10, 2016
We don’t have to call the Characteristic’s get event because the call
back doesn’t actually have a second parameter unlike what we thought.
Also, changing colored lights to using HSB needs to not check so a
successful change because of how Wink responds.
KraigM added a commit that referenced this issue Jan 10, 2016
@pdlove
Copy link
Contributor Author

pdlove commented Jan 14, 2016

Is anyone still having this problem after updating to 1.0.2?

@msroest
Copy link
Contributor

msroest commented Jan 14, 2016

umm not this exactly but I do have Siri just sit there and not respond that somethings been done. Even though the wink has performed the action.

@3space123
Copy link

Yes. As of 19-Jan-16, Siri says that she cannot complete the command, yet the light still responds. Is this because Siri's command is getting through, but the acknowledgement is not getting back to her?

@KraigM
Copy link
Owner

KraigM commented Jan 20, 2016

We will prob have to change it to not wait for wink to update. Bad part is we run into the possibility that it might not really work even though Siri will say it did.

@3space123
Copy link

@KraigM: I realize the implications of that potential solution. It's just that Siri executes the command, it works. Then, she talks for 4s saying it didn't work, even though the lights have already responded correctly.

@pdlove
Copy link
Contributor Author

pdlove commented Jan 22, 2016

I was just looking to see if my garage door opener supported Siri directly and it seems they've delayed that support. I wonder if they're done it for this very reason. Once it comes online with HomeKit support, I'll take a look at what it does to tell Siri "I'm working on it." as that may be the only way we'll know. I was thinking for my next lock purchase to be homekit enabled, but I think locks respond quick enough. It's impossible for a Garage Door to respond fast enough.

@KraigM
Copy link
Owner

KraigM commented Jan 23, 2016

Should be fixed under 1.1.0

@KraigM
Copy link
Owner

KraigM commented Jan 23, 2016

Released in version 1.1.0

@KraigM KraigM closed this as completed Jan 23, 2016
KraigM pushed a commit that referenced this issue Oct 2, 2017
Added support for OAuth 2 tokens obtained from developer.wink.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants