Coder Social home page Coder Social logo

Comments (20)

thoukydides avatar thoukydides commented on May 28, 2024 1

First here is a video that's shows that Siri on HomePod is switching on and off the coffee maker, but nearly instant is announcing "One of your devices is not responding", "Eines Deiner Geräte antwortet nicht".

Unfortunately the video doesn't tell me anything useful.

The time for the "error" is only a few seconds after turning on/off and far under 10 seconds limit which is strange.

This suggests that it is not actually a timeout. It is more likely that the plugin is returning an actual error to HomeKit.

With the log. I wouldn't want to post it public, because of other plugins there are a lot of other things in it. Any Idea? Sorry not so familiar with the logs.

If you are comfortable sharing the log with me then you can send it via email (the envelope icon on https://www.thouky.co.uk/contact.html).

Otherwise you will need to read the log yourself to identify the problem. I do not see this issue with either my physical appliances or the simulators, so without the log there isn't much I can do to resolve it.

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024 1

I will fix this in the next release (once I have figured out the best way to do so). However, this may be a week or two since I am in the middle of some other changes that will take a while to complete...

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024 1

I have just tested Siri control if appliance power with v0.17.2 and it is working fine for me using a HomePod.

Regardless, it cannot be the same as the problem you originally reported in this issue because that was due to the plugin adding an Active characteristic to a Switch service. It no longer does that, and in fact there have not been any changes to what services and characteristics are used in recent versions of the plugin. That problem also did not affect the program switches, which you say have also stopped working.

If this is reproducible then please create a new issue for it and provide a debug log.

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

The timeout is implemented by HomeKit, not by this plugin. I think its limit is 10 seconds for each request. If the appliance is taking longer than the HomeKit timeout then the only way to avoid it would be to indicate success without waiting for the Home Connect response, but that would hide real failures.

Which Home Connect API requests are taking a long time, and how long are they taking?

A log with debug enabled (homebridge -D) would be helpful...

from homebridge-homeconnect.

DJay-X avatar DJay-X commented on May 28, 2024

Thanks for your fast reply @thoukydides
First here is a video that's shows that Siri on HomePod is switching on and off the coffee maker, but nearly instant is announcing "One of your devices is not responding", "Eines Deiner Geräte antwortet nicht".
The time for the "error" is only a few seconds after turning on/off and far under 10 seconds limit which is strange.

https://youtu.be/Ysj5zPEMQJ0

With the log. I wouldn't want to post it public, because of other plugins there are a lot of other things in it. Any Idea? Sorry not so familiar with the logs.

from homebridge-homeconnect.

DJay-X avatar DJay-X commented on May 28, 2024

Thanks @thoukydides Mail is out and happy to hear from you. I appreciate the time and friendly help you give.

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

Thank you for the log. Unfortunately, it looks like it had HAP debug enabled (using DEBUG=*) rather than plugin debug (the -D switch). Hence, it does not include any of the information about API requests issued by this plugin.

However, an initial inspection suggests that the plugin is responding to the HomeKit requests within a reasonable time period and with successful result. The first ON took 1 second (although the appliance then took a further 48 seconds before it was finally ready). The OFF took 6 seconds, and the second ON took 5 seconds.

I will see what else I can conclude from a more careful examination of the log...

from homebridge-homeconnect.

DJay-X avatar DJay-X commented on May 28, 2024

I'm running an Instance so I edited the /etc/default file

If there is another way to give you more info I'm happy to follow your instruction.

At the moment I tried several times turn on and off the machine with Siri HomePod, also on Siri voice command on iPhone 11 Pro and every time the coffee machine is turning on/of but Siri is always announcing that the device is not giving any response.

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

It looks like the Home Connect servers stopped working around 17:02 GMT today. In my own logs I started getting Internal Server Error responses around that time, and those have subsequently morphed into Proxy Error, Gateway Time-out, and Service Temporarily Unavailable.

I am now unable to establish any connection to the Home Connect servers, so it looks like that's the end of development for today...

from homebridge-homeconnect.

DJay-X avatar DJay-X commented on May 28, 2024

Enjoy your evening. We will talk later. ;) Thanks. And again, if you use https://www.buymeacoffee.com or accept PayPal happy to help with a beverage.

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

OK, I have managed to reproduce this issue. It only occurs when using Siri to control the appliance power, resulting in the response that The <appliance> failed to respond.

This problem does not happen when starting a program, not even with the response delayed to take 8 seconds. (Increasing the delay beyond 9 seconds starts to give a Sorry, I didn't hear back from your devices error.) Hence, it is not a timeout issue.

Neither does it occur when using a HomeKit app (whether Apple Home or a third-party app) to control the appliance power. I normally test the plugin using the Home+ app, not using Siri, which is why I hadn't noticed the problem myself, and why I failed to reproduce it yesterday...

Using exactly the same code to handle the On characteristic of the power and program Switch services does not change the behaviour - the power Switch service still gives the failed to respond error, but the program Switch service continues to work. This suggests that it is a difference between the two Switch services that is the cause.

My current suspicion is that the cause is the addition of non-standard characteristics into the power Switch service in the most recent (0.13.0) release. (Previously they were contained in a custom service, with the power Switch service used as-is, but I changed that to improve how the characteristics are displayed in the Home+ app.)

More investigation required...

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

By a process of elimination, the problem is caused by the Active characteristic.

It appears that when Siri is instructed to turn the appliance on or off it writes to both the (standard) On and (non-standard, for a Switch service) Active characteristics of the power Switch service.

This plugin uses the Active characteristic to indicate whether a program is running, with writes used to pause/resume the program. For appliances that do not support pause/resume the Active service is made read-only to just indicate the status. Siri then gets upset by not being able to write it.

Clearly adding an Active characteristic to a Switch is a bad idea. As read-only status it prevents Siri from controlling the Switch. As a writable characteristic it cannot be used for anything different to the On characteristic since Siri writes the same value to both.

from homebridge-homeconnect.

DJay-X avatar DJay-X commented on May 28, 2024

You are awesome. What a great investigation and thanks for the background info.
I'll try to be patient waiting for the next release. Thank you so much. 👍

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

My current thinking is that it would be best to add a new "current program" Switch service to replace the Active characteristic. Its On characteristic will indicate whether any program is running (as Active does currently). Writing to the switch could start/stop or pause/resume the program (or some combination thereof; more thought required...). This would apply to all cooking appliance types except Hood, and all cleaning appliance types.

Remaining Duration, Status Active, and Status Fault characteristics would all move to the new Switch since they mostly provide information about the running program, and are not relevant to appliances without programs.

Hood appliances would lose these characteristics since the plugin handles their programs differently... although it may make sense to add Remaining Duration to the Fan service in that case.

Current Door State would remain on the power Switch since it applies to cooling appliances (which do not support programs), and it doesn't have anything to do with the running program. Similarly for Program Mode which indicates local/remote control.

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

This should be fixed in v0.14.0 which I have just released.

from homebridge-homeconnect.

Kohle81 avatar Kohle81 commented on May 28, 2024

@thoukydides

Thanks for this update, I use the homebridge-alexa plugin with your plugin, but the power switch was not working.

Now, with this update, it works great!

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

Thanks for this update, I use the homebridge-alexa plugin with your plugin, but the power switch was not working.

Now, with this update, it works great!

Thanks @Kohle81 for letting me know that this change also helps with homebridge-alexa. I don’t use that plug-in or Alexa myself, so please raise an issue if I break it again.

I will close this issue once @DJay-X has confirmed that it also fixes power control from Siri.

from homebridge-homeconnect.

DJay-X avatar DJay-X commented on May 28, 2024

@thoukydides Thanks a lot. After a few tries I can also confirm that turning on/off the coffee maker with Siri on HomePod works instant and without any issue now. Fantastic work with the entire plugin in such short time.♡ Awesome. Thanks for sharing with us.

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 28, 2024

Thanks @DJay-X.

It looks like this issue is now resolved, so I will close it.
Please open new issues if you discover any problems.

from homebridge-homeconnect.

DJay-X avatar DJay-X commented on May 28, 2024

@thoukydides I have the same issue again "I noticed that when switch on the coffee maker Siri is giving feedback that the device is not responding." Or when I ask to something like "Espresso".
Siri HomePod is giving feedback that the device is not responding.
However, when I open the Apple Home App or preferably Eve App and select Espresso, everything is working and the coffee maker is doing it's thing.
Thanks.

from homebridge-homeconnect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.