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

Fix "Device not responding" from Siri #51

Closed
wants to merge 1 commit into from

Conversation

moonchen
Copy link

Sometimes, Siri says "device is not responding" when setting a scene including the TV, or turning off the TV.

I tracked one cause: when the TV is off, commands to turn it off or mute fail with error. Instead of causing an error, we should simply succeed if the state is already off.

Also, as far as I can tell from reading HAP-NodeJS code, "set" event callbacks don't take arguments?

@merdok
Copy link
Owner

merdok commented Jul 18, 2018

That is interesting, could you explain more detailed how leaving out the arguments for the callback does fix the issue?

@moonchen
Copy link
Author

The intent of the change is to callback with success when HomeKit wants to turn off a TV that is already off, or to mute a TV that is off. The existing code calls the callback with an error in those cases.

I'm new at writing plugins for Homebridge, so I'm not sure how to "callback with success". My best guess after reading the HAP-NodeJS code is that the callback doesn't take any arguments, so that's what I went with.

I think this fix will still work if we callback with the old arguments intact.

@merdok
Copy link
Owner

merdok commented Jul 18, 2018

You are right there might be an issue with this, i need to further investigate this and come up with a good solution. Would this be ok if we close this pull request and i will try to clean up all the code, since i think the code from this pull request will not be enough? You can open an issue if you want...

Could you also tell me how exactly did you reproduce the issue with "Device not responding"?

@DanielWeeber
Copy link

@moonchen : Please have a look into #52 - works for me.

@merdok
Copy link
Owner

merdok commented Jul 18, 2018

Let's discus this in the relevant issue, till a proper solution is found and tested. #50

@moonchen
Copy link
Author

Sure, I'll close this and we can discuss.

For reproducing the issue, I turn off the TV, and ask Siri to turn off the TV. Siri will respond with "the device is not responding". This is relevant when the TV is included as a part of a scene. For example, my "Good Night" scene also turns off the TV. Activating the scene causes HomeKit to send a command to turn off the TV regardless of whether it's currently on or off, and triggers the "not responding" error.

@moonchen moonchen closed this Jul 18, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants