Echo Speaks Examples

(Richard Bryant) #22

See my repost below…

(the rooms manager guy) #23

so in webcore echo speaks devices show up as a music player?



This is very smart. Two questions

  1. What is the purpose of lines 128? It is for presense but doesn/t the entire rest of the piston assume that either through motion or physical interaction a sensor till trigger the appropriate speaker? Otherwise, why not say restriction for the entire piston only when presense 1, 2, or 3 are present?

  2. Wouldn’t some of your zones not work. What I mean is you need to have motion active or contact open or switch on. what happens with the motion becomes inactive, contact closes or you turn of the switch? That would mean the speaker wouldnt work and you might still be in the room.

(Richard Bryant) #25

Forgot to respond , that was it, I had the echo’s defined in both sections

(Richard Bryant) #26

@BBoy486 , I will respond a lil later, out shopping for Thanksgiving Dinner

(Jason "The Enabler" as deemed so by @Smart) #27


The section at line 128 is for my 2 sons room. They are both 18 and one spends 90% of his time at his girlfriends and the other lives full time at college. So, that room is only occupied when either of them is present.

Yes, I agree there might be times that the message may not come thru to an occupied room. What I’ve tried to do it set up for every possible way the rooms are occupied. I look at each persons habits when they are in their rooms and I look at how each of the common rooms is when it is occupied.

So far, it has been pretty spot on. There may have been times that things get missed, but they are very rare as far as I can tell.

I’m also updating the piston in the above post. I found a flaw in the overall system. Thanks for making me go back and take a hard look at it.


I am going to use it that’s why I questioned a few of the items!

(Jason "The Enabler" as deemed so by @Smart) #29

I have found that each of my family members had their own poker signs. So I use those to determine several of my automations. It has pretty good so far!

(Glen King) #30

Reading this thread reminds me: one of the things I’ve wanted to do since I got my first Dot is to schedule volume control on these things. So that when I go to bed and tell the Dot next to my bed “set an alarm for 5am”, it replies at volume 2 rather than volume 8 or wherever it was.

(Richard Bryant) #31


Seems that anonymizing a Piston changes some of the values so I’m reposting with a literal copy.

As one of the “FNG’s”, I have a couple of first pistons I"m proud off. I’ve borrowed some code from @bamarayne “Speaker Control”, use @bangali “Rooms Manager” and borrow some other code from whom I can’t remember I got it from but thank you all.

First I use a common code Piston for all Echo notifications. Any Piston needing to speak calls my Notification Piston and passes parameters. It takes advantages of Global Variables for standard Echo volume and mode settings timed via simple routines. I use room occupancy (could be motion detected) to speak announcements only in rooms where there are actually people present which is likely less than four :slight_smile: No need to blast the whole house when motion on a camera if we’re in the loft watching TV. Shout out to @bthrock

  • There are “async if’s” for each room so each branch runs independently and concurrently.
  • This notification Pistion is called (no triggers) from other Pistons like the Announcement Piston below
  • Line 128 is the fourth asynchronous branch for the Living Room after Second Bedroom
  • I use the Occupancy attribute of a “Rooms Manager” room. Occupancy is triggered by a motion sensor in the room and stays “Occupied” for 5 minutes (configurable). Continued motion triggers (Engaged) for 30 minutes (also configurable). So if the room is occupied or engaged then enable that echo.
  • Volume is controlled by, time of day, guests present or critical message.
  • Again this piston is called from other pistons with a message and parameters and depending on room “occupancy”, not motion, determines which echo’s are active.

I use the Notification Piston as a universal message handler. Below is one of my Pistons that call the Notification Piston. “Announcements”

  • It too uses async if statements but adds change triggers to watch doors, locks and cameras
  • If something changes, craft message and pass to Notifications.


I dont think this will work (your piston code) since it is unique to you. Import failed on my end. Also, my questions were for @bamarayne’s piston Echo Speaks Examples

But thanks for answering!


So how are you calling @ReceivedMsg and @PistonChange? Are they dynamic global variables?

I can’t seem to get ReceivedMsg to show any text when one of the conditions are active.

(Jason "The Enabler" as deemed so by @Smart) #34

You have to create the global variables.

Piston one (events piston)

if door contact opens,
then set variable @receivedMsg to “The door is now open”
then set variable @PistonTrigger to “$now”

Piston two (message control)
if variable @PistonTrigger changes
then speak @receivedMsg


thanks but i meant are they
dynamic @ReceivedMsg Value - Nothing Selected and dynamic @RPistonChange Value - Nothing Selected

(Richard Bryant) #36

If you or anyone wants a copy of mine, let me know and I’ll post an importable version.

(Jason "The Enabler" as deemed so by @Smart) #37

That is correct. Both are dynamic global variables


Thanks. I am getting a null value so I did something wrong but ill figure it out.


Anyway to get weather alerts (not just a standard one, but a major storm, etc.)?

(Bill S.) #40

Actually, yes. What I did was modified the Hourly weather piston example on the webCoRE Wiki and added an hourly report along with a report if $weather.alerts.alerts.type is not empty. I still need to tweak it a bit more to listen for weather events and then alert if one comes through.


That will be great. I probably don’t need it all the time, but just when it serious weather…or upcoming rain, etc…