iharosi / homebridge-plex-webhooks

Plex Webhooks Server plugin for Homebridge
GNU Affero General Public License v3.0
48 stars 5 forks source link

Delay between actions #11

Closed lionB777 closed 1 year ago

lionB777 commented 3 years ago

hi, Is there any chance to have -a delay fonction ? to avoid lights to turn on between clips and movies ( and between clips ). -a delay fonctions : to allow lights to turn on after a given delay. -an option to inhibit actions if events appends within a short delay ?

thanks for considering.

iharosi commented 3 years ago

Hi @lionB777,

I think a simple delay function could be doable as a config option for a sensor. However, I'm not sure if I understand you well, when you say „inhibit actions if events appends within a short delay”. You mean if one of a sensor has a 10 sec delay and triggered meanwhile a second sensor triggered without delay the latter should terminate the former action which should have ran after? Could you please give me a living example? Or what is the exact problem what you were facing with?

I have a clip sensor for Plex Pre-Rolls to dim the lights then I'm using a movie sensor to turn off the lights completely. In my case, the clip sensor does not have a „Stops Detecting Occupancy” automation in Home app because the second sensor will turn off the lights completely, so there won't be any overlap.

lionB777 commented 3 years ago

Hi @iharosi Thanks for your quick return. What I meant by inhibit action: -in my Plex configuration, when I play a movie, I've got 2 clips in front of a movie, -in my Homekit automations I made an event when a clip stops playing, when a movie stop playing too. my plan was to dim down lights when a clips plays and to Switch off light when a movie play, on any pause event to have a light switching on in the living room corner. On any stop event Light goes back to full But this what happening actually : button play pressed

iharosi commented 1 year ago

This is connected to #13. At least could be solved with improving the event handling. A discussion already started there so, I'm closing this.