rudders / homebridge-http

HTTP Plugin for Homebridge
Apache License 2.0
178 stars 110 forks source link

multiple "on" and "off" http requests #35

Closed chymerix closed 7 years ago

chymerix commented 8 years ago

Hi,

Is there a way to make multiple http requests for a single on/off command on a given accessory?

Thank you

chymerix commented 8 years ago

Related question: Is there a way to introduce a delay between commands? I am making calls to an IR emitter and need to insert delays between calls.

Right now I have each call setup as its own accessory (e.g. Office TV and Office Receiver), and I can toggle each one individually without a problem, but when I activate both accessories simultaneously via Siri, there isn't enough delay to allow them all to turn on (only one device turns on, even though both commands execute).

Ideally, I'd like a single "accessory" for certain activities such as "Watch Apple TV" which would turn on my TV, turn on my receiver, and set the receiver input to a specific mode, with delays between each of those IR commands.

I'm using the Global Cache iTach Flex REST API: http://docs.gcapi.apiary.io

cybertza commented 7 years ago

i think in the current structure we may per chance be able to implement an delay per unit by using an pause in tx variable and calling a delay type process if the variable is set, but i believe this will have negative effect in the long run, if there is an lot of need for it i will look into it for you and do a pull request,

my best direction i may point you into would be to create a scene for it in the homekit app on the phone and see how it that results, its not to much code to add the pause feature, but again, i think it will generate delays on the response to the app and you may get failures from that side again.