Echo Speaks not speaking when contact is open


#1

1) Give a description of the problem
I am trying to create a notification when any of my entry doors are left open for 5 minutes on my echo devices. I know Echo Speaks is working because I can trigger announcements from the ST app so I think it is something with my WebCore code.

2) What is the expected behaviour?
If any of the entry door contacts are open for more than 5 minutes it should announce on my echo that the door is open. I am only use one door and one echo as proof of concept, but I am having trouble getting it to work.

3) What is happening/not happening?
I see the contact open, but nothing is coming out of my echo.

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

3/16/2020, 11:20:46 AM +479ms
+1ms ╔Received event [Front Door].contact = closed with a delay of 97ms
+94ms ║RunTime Analysis CS > 24ms > PS > 59ms > PE > 11ms > CE
+97ms ║Runtime (37613 bytes) successfully initialized in 59ms (v0.3.110.20191009) (95ms)
+98ms ║╔Execution stage started
+105ms ║║Comparison (enum) closed changes_to (string) open = false (1ms)
+106ms ║║Cancelling condition #2's schedules...
+107ms ║║Condition #2 evaluated false (5ms)
+108ms ║║Cancelling condition #1's schedules...
+109ms ║║Condition group #1 evaluated false (state changed) (7ms)
+111ms ║╚Execution stage complete. (13ms)
+112ms ╚Event processed successfully (112ms)
3/16/2020, 11:20:40 AM +276ms
+2ms ╔Received event [Front Door].contact = open with a delay of 106ms
+102ms ║RunTime Analysis CS > 22ms > PS > 63ms > PE > 16ms > CE
+105ms ║Runtime (37620 bytes) successfully initialized in 63ms (v0.3.110.20191009) (102ms)
+106ms ║╔Execution stage started
+114ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+116ms ║║Cancelling condition #2's schedules...
+117ms ║║Condition #2 evaluated true (5ms)
+118ms ║║Cancelling condition #1's schedules...
+118ms ║║Condition group #1 evaluated true (state changed) (7ms)
+121ms ║║Cancelling statement #3's schedules...
+204ms ║║Executed physical command [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak([80, Front door is open]) (76ms)
+205ms ║║Executed [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak (78ms)
+231ms ║║Executed physical command [Echo - Allen's 2nd Echo Show].playText([The front door is open]) (22ms)
+232ms ║║Executed [Echo - Allen's 2nd Echo Show].playText (24ms)
+235ms ║╚Execution stage complete. (129ms)
+236ms ╚Event processed successfully (236ms)

#2

Can you post an image of the piston?


#3

Apologies, I was trying to fix my post. Screenshot uploaded now


#4

Instead of using the trigger:
IF Door's contact changes to open
I would try:
IF Door's contact stays open for 5 minutes


#5

I changed it, but no luck on my echo saying a notification.
image

3/16/2020, 11:44:16 AM +113ms
+1ms ╔Received event [Front Door].contact = closed with a delay of 145ms
+93ms ║RunTime Analysis CS > 20ms > PS > 59ms > PE > 14ms > CE
+95ms ║Runtime (37701 bytes) successfully initialized in 59ms (v0.3.110.20191009) (93ms)
+96ms ║╔Execution stage started
+106ms ║║Comparison (enum) closed stays (string) open = false (1ms)
+108ms ║║Cancelling any timed trigger schedules for condition 6
+108ms ║║Cancelling statement #6's schedules...
+109ms ║║Cancelling condition #6's schedules...
+110ms ║║Condition #6 evaluated false (10ms)
+111ms ║║Cancelling condition #1's schedules...
+112ms ║║Condition group #1 evaluated false (state changed) (12ms)
+114ms ║╚Execution stage complete. (18ms)
+115ms ╚Event processed successfully (115ms)
3/16/2020, 11:44:07 AM +995ms
+2ms ╔Received event [Front Door].contact = open with a delay of 115ms
+133ms ║RunTime Analysis CS > 19ms > PS > 91ms > PE > 23ms > CE
+135ms ║Runtime (37707 bytes) successfully initialized in 91ms (v0.3.110.20191009) (133ms)
+136ms ║╔Execution stage started
+146ms ║║Comparison (enum) open stays (string) open = true (2ms)
+148ms ║║Adding a timed trigger schedule for condition 6
+150ms ║║Condition #6 evaluated false (10ms)
+151ms ║║Condition group #1 evaluated false (state did not change) (11ms)
+153ms ║║Fast executing schedules, waiting for 1996ms to sync up
+2154ms ║║Cancelling condition #6's schedules...
+2155ms ║║Condition #6 evaluated true (2ms)
+2156ms ║║Cancelling condition #1's schedules...
+2157ms ║║Condition group #1 evaluated true (state changed) (4ms)
+2159ms ║║Cancelling statement #3's schedules...
+2251ms ║║Executed physical command [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak([80, Front door is open]) (84ms)
+2252ms ║║Executed [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak (86ms)
+2275ms ║║Executed physical command [Echo - Allen's 2nd Echo Show].playText([The front door is open]) (20ms)
+2276ms ║║Executed [Echo - Allen's 2nd Echo Show].playText (22ms)
+2278ms ║╚Execution stage complete. (2142ms)
+2279ms ╚Event processed successfully (2279ms)
3/16/2020, 11:43:42 AM +739ms
+1ms ╔Starting piston... (v0.3.110.20191009)
+239ms ║╔Subscribing to devices...
+255ms ║║Subscribing to Front Door.contact...
+361ms ║║Subscribing to Echo - Allen's 2nd Echo Show...
+363ms ║╚Finished subscribing (135ms)
+394ms ║Comparison (enum) closed stays (string) open = false (2ms)
+403ms ╚Piston successfully started (403ms)

#6

I realize that you are in testing phase, but I would keep that number at least 11 seconds or more…
(we do not want the piston to act any different that the final code)


Although, according to your log, webCoRE successfully sent the command to your Echo.

11:44:07 AM
[Front Door].contact = open
Executed physical command [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak([80, Front door is open])
Executed [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak
Executed physical command [Echo - Allen's 2nd Echo Show].playText([The front door is open])
Executed [Echo - Allen's 2nd Echo Show].playText

Is this your first time trying to get webCoRE to use Echo Speaks?


#7

FYI, I have had the most consistent success with Echo Speaks using the simple ‘speak’ command. I have tried speaktextandrestore and at least one other with inconsistent results but ‘speak’ almost always works. Sometimes I need to insert a short wait to get it to respond.


#8

Updated to 15 seconds and tested again, but no luck. Yes this is the first time with WebCore and Echo Speaks.

3/16/2020, 12:04:31 PM +519ms
+2ms ╔Received event [Front Door].contact = closed with a delay of 108ms
+102ms ║RunTime Analysis CS > 20ms > PS > 65ms > PE > 16ms > CE
+105ms ║Runtime (37707 bytes) successfully initialized in 65ms (v0.3.110.20191009) (101ms)
+106ms ║╔Execution stage started
+118ms ║║Comparison (enum) closed stays (string) open = false (1ms)
+120ms ║║Cancelling any timed trigger schedules for condition 6
+121ms ║║Cancelling statement #6's schedules...
+122ms ║║Cancelling condition #6's schedules...
+123ms ║║Condition #6 evaluated false (12ms)
+125ms ║║Cancelling condition #1's schedules...
+126ms ║║Condition group #1 evaluated false (state changed) (15ms)
+128ms ║╚Execution stage complete. (23ms)
+129ms ╚Event processed successfully (129ms)
3/16/2020, 12:04:23 PM +159ms
+0ms ╔Received event [Home].time = 1584378258884 with a delay of 4275ms
+590ms ║RunTime Analysis CS > 255ms > PS > 319ms > PE > 15ms > CE
+592ms ║Runtime (37714 bytes) successfully initialized in 319ms (v0.3.110.20191009) (591ms)
+593ms ║╔Execution stage started
+598ms ║║Cancelling condition #6's schedules...
+599ms ║║Condition #6 evaluated true (1ms)
+600ms ║║Cancelling condition #1's schedules...
+601ms ║║Condition group #1 evaluated true (state changed) (4ms)
+603ms ║║Cancelling statement #3's schedules...
+637ms ║║Executed physical command [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak([80, Front door is open]) (26ms)
+638ms ║║Executed [Echo - Allen's 2nd Echo Show].setVolumeAndSpeak (28ms)
+662ms ║║Executed physical command [Echo - Allen's 2nd Echo Show].playText([The front door is open]) (20ms)
+663ms ║║Executed [Echo - Allen's 2nd Echo Show].playText (22ms)
+666ms ║╚Execution stage complete. (73ms)
+667ms ╚Event processed successfully (667ms)
3/16/2020, 12:04:03 PM +772ms
+1ms ╔Received event [Front Door].contact = open with a delay of 101ms
+97ms ║RunTime Analysis CS > 19ms > PS > 59ms > PE > 20ms > CE
+99ms ║Runtime (37711 bytes) successfully initialized in 59ms (v0.3.110.20191009) (97ms)
+100ms ║╔Execution stage started
+110ms ║║Comparison (enum) open stays (string) open = true (2ms)
+112ms ║║Adding a timed trigger schedule for condition 6
+114ms ║║Condition #6 evaluated false (10ms)
+115ms ║║Condition group #1 evaluated false (state did not change) (11ms)
+117ms ║╚Execution stage complete. (17ms)
+119ms ║Setting up scheduled job for Mon, Mar 16 2020 @ 12:04:18 PM CDT (in 14.994s)
+129ms ╚Event processed successfully (129ms)
3/16/2020, 12:00:45 PM +165ms
+0ms ╔Starting piston... (v0.3.110.20191009)
+274ms ║╔Subscribing to devices...
+310ms ║║Subscribing to Front Door.contact...
+426ms ║║Subscribing to Echo - Allen's 2nd Echo Show...
+428ms ║╚Finished subscribing (165ms)
+455ms ║Comparison (enum) closed stays (string) open = false (2ms)
+466ms ╚Piston successfully started (466ms)

#9

Your last piston has a good solid structure…

I would follow @guxdude’s advice for the specific command…
(since I do not use Echo Speaks)


Edit:

I am also adding “Echo Speaks” to the title of this page, to help others find this thread.


#10

@guxdude like this? I wasn’t able to get it to work

image


#11

@WCmore Thank you


#12

Doesn’t the echo speaks smartapp have logging that you might look at for any error messages?


#13

My pistons use
Speak Text
and
setVolumeAndSpeak

Those have always worked for me.


#14

Yes, that’s what I use. Have you tried just a piston that speaks with no logic. Good to try a simple test to make sure you can make Echo Speaks work and then build up the logic.


#15

I agree 100%… This is good advice for all new devices that we add to our SmartHome.

(once we understand what commands work best for that device, then we can build triggers & logic around that)


#16

Good point, I ended up removing EchoSpeak completely from ST and reinstalled fresh now I can create a generic piston that will speak!

Now if I define multiple entry ways, is there a way in the text to add a variable to pull which door just opened?


#17

@CAL37, Yes, define another device variable and then select your trigger and use the option to store matching devices into your new variable. That will be the door that opened.


#18

I think you could probably use one of the system variables like $currentEventDevice


#19

@guxdude like this?


#20

That should work.