-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Slow response from accessory results in failed scene #191
Comments
What hardware are you running on? Any chance to try this plugin on a different platform? I am running Homebridge on a Synology NAS with a Intel Atom processor and it performs OK. |
I second this 'issue'. In the Homebridge-WOL plugin there is a similar issue raised: AlexGustafsson/homebridge-wol#85 A solution was implemented in the plugin to return an early success (as eluded to by OP). Is this something that could be implemented? My performance seems to be mixed, the AC will ALWAYS turn on, but the scene/Siri will occasionally say it failed/took to long to respond, which gets annoying. |
This plugin already uses early response. |
Same here - I've never had this fail to set the aircon state, but often see weird issues around response time. e.g. using the Shortcuts app, triggering an aircon setting will almost always result in "operation timed out". Using a siri command will work sometimes, and sometimes will come back with "accessory took too long to respond". I'm not sure how to provide more information, if I trigger an instance of this would there be logs that you could use? btw, great work on this plugin! |
@cbrandlehner Sorry for the delay in response - notifications from this repo enter up getting lost. Homebridge 1.4.0 with homebridge-daikin-local v2022.3.1 running in Docker on a Synology DS1821+ (AMD cpu) - Daikin units connected through a Unifi setup. So no slowdowns anywhere on the hardware side (other than the BRP072C42 being slow). When you say it performs ok, are you saying that when the AC is part a HomeKit scene you don't encounter timeouts such as what I had demonstrated in the initial comment? But yes aside from the timeout issue, everything else has been solid. |
Did we find a solution to this issue? i'm having the exact same issue. I had a look in the log and i am getting the below errors 08/05/2022, 1:18:04 pmDaikin Local BridgeERROR[Daikin Local Bridge 59EC@Target Heater-Cooler State] The write handler for the characteristic 'Target Heater-Cooler State' on the accessory 'Office Air Conditioning' was slow to respond! |
@Shep084 Currently there are no known issues with the code of this plugin. The advise is to use |
@cbrandlehner Trying your suggestion with child bridges - while it doesn't solve the issue of scenes having a 'Failed' status, it does make the AC units far more responsive, both when it comes to sending commands to them, and receiving the current status. When using child bridges, as soon as I open the Home app, the AC status is instantly available, vs previously when I had to wait for 3-5 seconds while it was 'Updating' |
@cbrandlehner feels like we're not aligned on the problem here. The problem, as I understand it: Some daikin modules/systems are very slow to respond, and can take up to 2-3 seconds to respond to a single HTTP request, which adds up when multiple requests (get info, set info) are required in order to have an effective interaction. This is not a fault of this plugin, but viewing it that way is missing the point. This is an issue that can be resolved in this plugin, and it's unrealistic to suggest that the solution is to replace one's entire air conditioning system when we could solve it "for free" in software. I've resolved this issue for myself by inserting an overcomplicated handwritten proxy service that does the following:
This fairly short bit of caching/background threading magic is the only way to give homekit the fast responses it needs to provide a responsive UI. There's no way around this: some daikin modules are slow to respond to raw requests, and the only options available are to abstract it away from the user at a higher software layer (this plugin, homebridge, homekit) or to change one's air conditioning. If desired I can put my little flask-based proxy service up somewhere; I think it would be a worthy addition to this plugin and make more sense to live here. It could be an opt-in configuration, "Return optimistic responses" or something similar. I don't think it's on you to implement this, someone better than me could help turn this into a PR - but let's at least make sure we all agree on what needs to be solved. |
The current release of this plugin does have a caching mechanism to reduce the number of API calls to the local device to a minimum. I assume the reported problem should be fixed in the meanwhile so I am closing this report. |
When using the BRP072C42 adapter inside of CTKS25TVMG units, it takes 6-10 seconds for the unit to respond to HomeKit.
As HomeKit expects a much faster response time from the accessories, the result is as follows;
The unit still turns on/off as expected, just not fast enough for HomeKit. Since we can't do anything about the hardware/firmware of these adapters to speed them up (using Daikin's own apps it's even slower), perhaps a solution would be for the plugin to instantly respond to HomeKit with a dummy 'success' status which would satisfy HomeKit's response time expectations, but then check/update the actual status when it becomes available 6-10 seconds later? Maybe not by default, but have a toggle for such dummy statuses in the config?
RPReplay_Final1637464660.mov
The text was updated successfully, but these errors were encountered: