I wanted to open up a discussion around this topic, specifically to get ideas of what others are doing with this...
For example, I am crafting a program using an Alexa routine with the "water running" sound detection trigger to set an ISY variable. This is specifically in our bathroom's Echo device; the idea is to turn on the bathroom fan when the shower starts. The sound detection is configured for running longer than 1 min (to avoid toilet flushes and washing hands) and is suppressed for 1 min. The action to take is turning "ON" a state variable (1=on, 0=off) that I have exposed as an "outlet" in Alexa (via the ISY portal). I tried exposing it as a scene, but for some reason, it didn't discover as an actionable object in the routine...
Within ISY, I am writing a program that monitors the state variable, and when it is "ON" (1=on, 0=off), I turn on the bathroom fan (in the "then" branch) and wait 55 secs before toggling the state variable back to 0. In the 'else' branch, I'm waiting 20 mins, then turning the fan off. The idea here is that the shower running will constantly (well, about every 2 mins) re-trigger the 'then' branch and keep the fan on. When the shower is no longer detected, then after 20 mins, the fan will shut off (to give the bathroom time to air out).
This more advanced logic was the exact reason why I decided to shift the logic control for the fan into the ISY instead of having it just in the Alexa routine. Plus, I can enhance the ISY program to look at other variables such as time of day, who's taking a shower, etc...for example, I'm now working on another program that times the length of the shower (still trying to figure that out) and once 15-20mins has elapsed, use the Alexa in the bathroom to gently remind you how long you've been in there and eventually to "GET OUT". (<-- guess who that's for!). I'm using the framework others have demonstrated here (and the FAQ) to have my Alexa speak or make announcements.
What other ideas have you guys implemented like this (for sound detection or others)?
Is anyone else using their Alexa device as a sensory input to the ISY? (besides voice control obv)