Echo Speaks Repeat/Loop


#1

1) Give a description of the problem
I have a water leak sensor piston that I modified from someone’s backup code. I implemented Echo speaks to notify me of the devices status.

2) What is the expected behaviour?
I’d like for it to repeat the spoken test/device status every 15 seconds, until the leak sensor is dry.

**4) Post a Green Snapshot of the piston!


#2

Inside the first IF block, after your initial with, you could setup a repeat loop.

Repeat
-  Wait 15 seconds
-  Speak blah blah
Until
- Leak water sensor is dry

Note: your initial IF block, “water sensor is wet” is a condition, not a trigger so I don’t think the block will fire unless you are executing the piston externally. If not, then I would update to “changes to wet”.

Also, I don’t know much about Echo speaks but it seems as though you have two different methods of voice initiation. Posting a message and utilizing the music player capability setVolumeSpeakandResotre. Do both methods work with Echo speaks?


#3

Right the piston is executed when the sensor changes to wet. So I’ll modify it “changes to”. The Make Post is for Pushover message. How’s this look? Not home to test it yet. Do I need to modify the task cancellation policy for the repeat or the actions underneath?


#4

You’ll want move that repeat block to below the with…otherwise it will prevent the light changes and pushover message

I usually use a condition under the until…until senosr is dry…rather than a trigger: until sensor changes to dry…not sure if it will make a difference here

In regards to TCP, I usually set it to never for these loops. In this case it shouldn’t matter. If your piston is looping then the sensor is already wet, the only other trigger that could cancel out the loop is the sensor changing to dry which is when we want the loop to stop anyway. TL;DR; set it to never to create a good habit but I don’t think it’s necessary


#5

You will likely also want to increase that 15 seconds to something less harrowing…
(even nagging every 5 minutes would drive me crazy)


#6

If you had a leak in the house, you’d wait 5 minutes for it to re-announce? I’d be down for better recommendations to keep it sane but alert me properly. The old school leak sensors would beep until they’re dry. I may just get a zwave siren and loop that. lol. I got water issues in my house.


#7

In my household, my first alert should come in immediately, but I am OK with waiting at least ten minutes before the second voice alert. (although I also add extra visual indicators… IE: IF basement floods, turn CentralLight to RED, and send SMS in case nobody was home at the time)


A beep every 15 seconds is one thing, but your spoken phrase may use half of that time… so your loop is essentially ~7 seconds of nagging, and ~8 seconds of silence…

But my apologies… I am not trying to tell you what is right for you.