Supereg / homebridge-http-switch

Powerful http switch for Homebridge: https://github.com/homebridge/homebridge
ISC License
222 stars 37 forks source link

Please implement a “Fire and return quickly” option #99

Open mrfatboy opened 3 years ago

mrfatboy commented 3 years ago

First of all, fantastic plug-in 👍 see below for feature request.

Is your feature request related to a problem? Please describe.

I have a 10 url in series sequence. There is a 3 second delay between each url call in the list. The whole sequence takes 30 seconds to complete.

Everything works perfectly. However the problem comes from Siri because the sequence takes longer than she expects and complains “your device is taking longer to respond” even though it’s operating as it should.

Describe the solution you'd like Is it possible to implement a simple fire and forget option? This would basically not wait for the entire sequence to complete before getting back to the home app or Siri.

In other words, If set, the plug in would start the desired url sequence and assume it will just work. Sort of like launch a child process. No response codes need. That way the plug-in would return immediately back to the home app thus keeping Siri quiet about warnings.

Additional context Add any other context about the feature request here.

mrfatboy commented 2 years ago

I was able to create a work around by using the Dummy switch plug-in and this plug-in. I activate the Dummy switch which in turn activates the http-switch plug-in switch.

This way the dummy switch returns to Siri immediately and makes her happy while the http-switch can take whatever time it needs.

fred16-prog commented 2 years ago

I was able to create a work around by using the Dummy switch plug-in and this plug-in. I activate the Dummy switch which in turn activates the http-switch plug-in switch.

This way the dummy switch returns to Siri immediately and makes her happy while the http-switch can take whatever time it needs.

Hi mrfatboy, i have the same issure, everythinks works fine, but SIRI answers "no response". Please, can you discribe how to use your workaround? Thanks!

mrfatboy commented 2 years ago

You need a automation "when device controlled", the dummy switch in this case that activates the http switch.

Supereg commented 1 year ago

I have a 10 url in series sequence. There is a 3 second delay between each url call in the list. The whole sequence takes 30 seconds to complete.

I understand the rationale behind this feature request. I am also planning to support something like this. But I feel like this is getting tricky in a situation like this. How should the plugin handle a situation where, e.g., it is turned off while the "turning on" sequence is still running (because e.g., it takes over 30 seconds to complete). There has to be some sort of synchronisation. However, this would be heavily dependent on the use case of the user.

mrfatboy commented 1 year ago

You are correct that it depends on the users needs. In my case, I don't need anything in sync if the sequence was stopped.

But it would be nice to have the ability to cancel the sequence instead of having to wait for the entire sequence to play through.