Cant get Echo to announce when my wife gets home


#1

1) Give a description of the problem
Alexa is not speaking piston command

2) What is the expected behaviour?
When my wife gets home and closes the front door, after 90 seconds I want the kitchen echo to greet her

3) What is happening/not happening?
Its not working

**4) Post a Green Snapshot of the piston![image|45x37]


5) Attach logs after turning logging level to Full
1/20/2019, 1:17:04 PM +230ms
+0ms ╔Received event [Front Door Sensor].contact = closed with a delay of 1072ms
+10084ms ║Piston waited at a semaphore for 10018ms
+10086ms ║Runtime (43094 bytes) successfully initialized in 10050ms (v0.3.110.20191009) (10085ms)
+10087ms ║╔Execution stage started
+10105ms ║╚Execution stage complete. (18ms)
+10106ms ╚Event processed successfully (10106ms)
11/20/2019, 1:17:04 PM +179ms
+1ms ╔Received event [Front Door Sensor].contact = closed with a delay of 1111ms
+85ms ║Runtime (43019 bytes) successfully initialized in 46ms (v0.3.110.20191009) (83ms)
+86ms ║╔Execution stage started
+103ms ║╚Execution stage complete. (18ms)
+104ms ╚Event processed successfully (104ms)
11/20/2019, 1:16:57 PM +194ms
+1ms ╔Received event [Front Door Sensor].contact = open with a delay of 118ms
+78ms ║Runtime (43016 bytes) successfully initialized in 40ms (v0.3.110.20191009) (75ms)
+79ms ║╔Execution stage started
+97ms ║╚Execution stage complete. (19ms)
+98ms ╚Event processed successfully (98ms)
11/20/2019, 1:16:56 PM +302ms
+2ms ╔Received event [Front Door Sensor].contact = closed with a delay of 185ms
+76ms ║Runtime (43018 bytes) successfully initialized in 41ms (v0.3.110.20191009) (74ms)
+77ms ║╔Execution stage started
+94ms ║╚Execution stage complete. (17ms)
+95ms ╚Event processed successfully (95ms)
11/20/2019, 1:16:52 PM +173ms
+2ms ╔Received event [Front Door Sensor].contact = open with a delay of 117ms
+74ms ║Runtime (43015 bytes) successfully initialized in 39ms (v0.3.110.20191009) (71ms)
+74ms ║╔Execution stage started
+92ms ║╚Execution stage complete. (18ms)
+93ms ╚Event processed successfully (93ms)
11/20/2019, 1:13:20 PM +977ms
+2ms ╔Received event [Nufar].presence = present with a delay of 69ms
+88ms ║Runtime (43006 bytes) successfully initialized in 45ms (v0.3.110.20191009) (85ms)
+89ms ║╔Execution stage started
+109ms ║╚Execution stage complete. (20ms)
+110ms ╚Event processed successfully (110ms)
11/20/2019, 12:31:02 PM +257ms
+1ms ╔Received event [Nufar].presence = not present with a delay of 46ms
+58ms ║Runtime (43011 bytes) successfully initialized in 31ms (v0.3.110.20191009) (56ms)
+59ms ║╔Execution stage started
+76ms ║║Executed virtual command setVariable (3ms)
+78ms ║╚Execution stage complete. (20ms)
+79ms ╚Event processed successfully (79ms)
11/20/2019, 12:29:18 PM +247ms
+2ms ╔Received event [Front Door Sensor].contact = closed with a delay of 130ms
+77ms ║Runtime (43018 bytes) successfully initialized in 38ms (v0.3.110.20191009) (74ms)
+79ms ║╔Execution stage started
+96ms ║╚Execution stage complete. (18ms)
+97ms ╚Event processed successfully (97ms)
11/20/2019, 12:29:15 PM +612ms
+2ms ╔Received event [Front Door Sensor].contact = open with a delay of 656ms
+114ms ║Runtime (43016 bytes) successfully initialized in 65ms (v0.3.110.20191009) (111ms)
+115ms ║╔Execution stage started
+145ms ║╚Execution stage complete. (31ms)
+147ms ╚Event processed successfully (146ms)
11/20/2019, 12:29:15 PM +233ms
+2ms ╔Received event [Front Door Sensor].contact = open with a delay of 183ms
+82ms ║Runtime (43016 bytes) successfully initialized in 45ms (v0.3.110.20191009) (79ms)
+83ms ║╔Execution stage started
+101ms ║╚Execution stage complete. (19ms)
+102ms ╚Event processed successfully (102ms)


#2

It is a 99.99% chance that two triggers will not be true at the same instant…
(your lightning bolts in the margin)

pic

I use a single trigger to start the piston, and then unlimited conditions beneath that to direct the logic flow…


Easy solution?

Since it took her 3.5 minutes to arrive/open/close the door, you can simplify this way:

IF Sensor's presence changes to present
and Time is between X & Y
Then with Music Player (TCP set to Never)
    WAIT 5 minutes     (3.5 min + 1.5 min)
    Speak text
END IF

#3

I put a condition that once the front door is closed to wait 90 seconds (not 5 minutes) that way she would have just been in the kitchen a few seconds before she gets the greeting. Without the door closed condition than she could be bringing things into the house and going back and forth between the car and the house. The only trigger I can think of that keeps the time constant for her to get to the kitchen is the front door closing. That means she’s headed for the kitchen.


#4

Not sure if this would work?


#5

Depending on a presence sensor as a trigger will cause troubles every now and then.

The reason current one didn’t work is what @Wcmore stated.

  • Some users might disagree with me but presence sensors jump in and out of zone sometimes. Your piston will be very confused and thinking your wife keeps leaving and coming back home.
  • And present or not present status registration times are almost never reliable (at least in my experience)
    I tried something similar to yours. Sometimes the announcement was right on time, but sometimes it would execute 2-3 minutes after I arrived.

Maybe some other solutions to fake this situation would be better…
Another sensor in the kitchen door perhaps and the logic would be if main door open and within 2 minutes if kitchen door is open etc…


#6

Thank you for all the assistance, it is tremendously appreciated.
I have also found the presence sensor not to be the best indicator and I realize I wont get perfection, just trying for as close as possible :wink:
Since I don’t have a door in my kitchen and I have kids coming in and out all the time I cant think of anything else to rely on my wife’s location except for her phone’s presence sensor. If I broaden the parameters so that it gives room for error could it possibly work a bit better. Here is an example:


#7

Personally I have never had consistent or accurate results with GPS based presence setups. Currently fine tuning and implementing this WiFi connectivity based one since its an all android house --> https://community.smartthings.com/t/release-improved-mobile-presence-android-only/102492

It reacts with presence being updated based on what known WiFi networks the phone connects to. So far in testing it has been very accurate in both time and triggers.

Edit. To make it relevant to the topic, I have my Ecobee 4 talk to me through Echo Speaks based off this :slight_smile:


#8

Using a trigger with wifi connectivity is brilliant, unfortunately we are both on iOS.


#9

Unless your phone goes into hibernation mode, WiFi connections can be very reliable… I use webCoRE to periodically ping my modem/router, and when my phone is discovered, it runs WelcomeHome piston. When my phone is not connected to the WiFi, it waits 4 minutes and tries again. If my phone is not connected twice in a row, then Goodbye piston runs.

This means my arrival is discovered in less than 4 minutes, and my exit takes 4-8 minutes before it knows for sure that I have left.

I have other redundancies in place for quicker responses, but this is my rock solid “safety net” in case one of the others is acting up…


#10

You might have problem with 1 second WAIT because the piston isnot going to wait until the sentence is complete at line 37… It will keep going to the next line…
have you tested IF the first sentences is already said before the second… it looks like it would cut off the first one???


#12

I tested it and it worked. One silly question but again Im just starting off so thank you for the help. How can I have it dynamically change the day its speaking? I.E. On Thursdays it says “I hope you’re having a good Thursday”


#13

In an expression box, outside of quotes, you can use $dayOfWeekName

pic


Other common System variables:

$day > 21
$month > 11
$monthName > November
$time > 9:16 A.M.

You can find the rest at the bottom right of any piston…


#14

Wcmore thank you so much. I was able to replicate it when using a single expression but can I do it with a random expression?
For instance
random(“Attention Family. This is an announcement. Your dad is arriving home shortly. Have a good $dayofWeekName evening.” , “Hey Kids, good news. Your dad is about to get home. Happy $dayofWeekName”)


#15

First, the “O” has to be capitalized.
$dayOfWeekName


Second: Random requires the string inside quotes, yet system variables are usually outside quotes… Because of this, if I need a System variable, I often insert it AFTER the random portion, like this:

pic

As seen here:

pic


#16

You can also store the system variable into a string, and then do your random entirely with strings like this:

pic


Notice the System variables are outside quotes…


#17

This is my Arrival/Depature piston. We in a small section of streets connected to a main street, so my Life360 circle picks them up as they come into our neighborhood and primes the reception part. When they come in and close the door (within 10 minutes), the reception picks from a list of random responses. The @PistonTrigger sends the message to another piston that speaks the messages. You could just replace it with a command line like WITH ECHO1 SPEAK @MESSAGE.

If I am the one returning home, the piston plays the Star Wars intro (from Empire Strikes Back…much better version than ANH. :smiley: )