[RESOLVED] Echo Speaks duplicating announcement


#1

1) Give a description of the problem
The announcement is occurring 2 or 3 times right after each other.

2) What is the expected behaviour?
When someone arrives and one of the contact sensor changes to closed within 2 minutes, announce personal arrival message

3) What is happening/not happening?
It is announcing, but lately it announces a message 2 or 3 times.

**4) Post a Green Snapshot of the piston

5) Attach logs after turning logging level to Full

+1ms ╔Received event [Front Door].contact = closed with a delay of 188ms
+182ms ║RunTime Analysis CS > 21ms > PS > 100ms > PE > 62ms > CE
+185ms ║Runtime (61577 bytes) successfully initialized in 100ms (v0.3.110.20191009) (183ms)
+186ms ║╔Execution stage started
+199ms ║║Comparison (time) 30015764 is_between (time) 28800000 … (time) 75600000 = true (7ms)
+200ms ║║Time restriction check passed
+201ms ║║Condition #32 evaluated true (12ms)
+202ms ║║Condition group #null evaluated true (state did not change) (13ms)
+212ms ║║Comparison (enum) closed changes_to (string) closed = true (1ms)
+214ms ║║Cancelling condition #16’s schedules…
+216ms ║║Cancelling statement #24’s schedules…
+225ms ║║Calculating (string) Welcome Back + (string) Patrick >> (string) Welcome Back Patrick
+228ms ║║Calculating (string) Welcome Back Patrick + (string) , we’re excited that you’re here >> (string) Welcome Back Patrick, we’re excited that you’re here
+233ms ║║Executed virtual command setVariable (3ms)
+234ms ║║Condition #16 evaluated true (29ms)
+235ms ║║Cancelling statement #1’s schedules…
+238ms ║║Condition group #1 made progress up the ladder, currently at step 2 of 2
+239ms ║║Cancelling statement #1’s schedules…
+240ms ║║Cancelling condition #1’s schedules…
+240ms ║║Condition group #1 evaluated true (state changed) (36ms)
+243ms ║║Cancelling statement #30’s schedules…
+1156ms ║║Executed physical command [Echo - Front Room].speak([Welcome Back Patrick, we’re excited that you’re here]) (907ms)
+1157ms ║║Executed [Echo - Front Room].speak (909ms)
+1167ms ║║Condition #36 evaluated false (7ms)
+1168ms ║║Cancelling statement #35’s schedules…
+1169ms ║║Condition group #35 evaluated false (state did not change) (9ms)
+1177ms ║║Condition #45 evaluated false (5ms)
+1178ms ║║Cancelling statement #44’s schedules…
+1179ms ║║Condition group #44 evaluated false (state did not change) (8ms)
+1189ms ║║Comparison (enum) closed changes_to (string) closed = true (1ms)
+1191ms ║║Cancelling condition #66’s schedules…
+1193ms ║║Cancelling statement #67’s schedules…
+1203ms ║║Calculating (string) Welcome Back + (string) Patrick >> (string) Welcome Back Patrick
+1206ms ║║Calculating (string) Welcome Back Patrick + (string) , you have been missed while away >> (string) Welcome Back Patrick, you have been missed while away
+1211ms ║║Executed virtual command setVariable (3ms)
+1212ms ║║Condition #66 evaluated true (29ms)
+1213ms ║║Cancelling statement #62’s schedules…
+1215ms ║║Condition group #62 made progress up the ladder, currently at step 2 of 2
+1216ms ║║Cancelling statement #62’s schedules…
+1217ms ║║Cancelling condition #62’s schedules…
+1218ms ║║Condition group #62 evaluated true (state changed) (35ms)
+1220ms ║║Cancelling statement #69’s schedules…
+1282ms ║║Executed physical command [Echo - Front Room].speak([Welcome Back Patrick, you have been missed while away]) (59ms)
+1283ms ║║Executed [Echo - Front Room].speak (61ms)
+1293ms ║║Condition #54 evaluated false (7ms)
+1294ms ║║Cancelling statement #53’s schedules…
+1295ms ║║Condition group #53 evaluated false (state did not change) (9ms)
+1303ms ║║Condition #72 evaluated false (5ms)
+1304ms ║║Cancelling statement #71’s schedules…
+1305ms ║║Condition group #71 evaluated false (state did not change) (8ms)
+1308ms ║╚Execution stage complete. (1122ms)
+1309ms ╚Event processed successfully (1309ms)

Easiest way to set up echo randomly choosing a list of responses (have Echo Speaks)
#2

I do not see any trigger here for [Front Door].contact…


#3

Agreed. It would appear that it’ll fire when there’s motion after a certain amount of time. @pmjoen, does it announce when someone moves by the motion sensor?


#4

Sorry I posted the wrong image, here is the correct snapshot.


#5

That coding looks awfully familiar. :wink:

Is it the exact same message (same variable phrase) each time? What are you using for presence sensors? Do you have a new log for this piston?

[EDIT]

Personally, I wouldn’t break up the piston as you did. I would set it up so that if any of the presence sensors arrived, it run would through all the possible ifs, assign the correct one, and then a single command at the end to play the assigned message.

  • If (all 11 presence sensors) presence changes to present
    when true - Set variable (whoarrived) = (currenteventdevice)

followed within 2 minutes by

  • Contact 3 or Contact 8 closes

Then

  • if (whoarrived) = presence sensor 1
    -when true - set variable (ReceivedPresenceMsg)
  • if (who arrived) = presence sensor 2
    -when true - set variable (ReceivedPresenceMsg)
  • if (who arrived) = presence sensor 3
    -when true - set variable (ReceivedPresenceMsg)
  • if (who arrived) = presence sensor 4
    -when true - set variable (ReceivedPresenceMsg)
    (and so on)

Then with Music Player 5, speak (ReceivedPresenceMsg)


#6

Both images are identical… (bj84)


#7

I mean, he’s using my piston. Nice to see my work being appreciated. :stuck_out_tongue:


#8

Yes, that is always a good feeling…

What I mean is, I still do not see any trigger here for [Front Door].contact…


#9

It’s this line.


#10

Ha, silly me. He updated the original pic when he posted piston BJ84


#11

Sorry for the delayed response, I will give the suggestions a try. I now realize that it is duplicating for each person that comes in the house but doesn’t change the person who arrived, only the message… Im not sure the suggestion would resolve the issue since the message is different for each person who arrives.


#12

I don’t have any experience with webCoRE (or any other programming).

How do you get the first part of the execute? The bit with the presence sensors and the followed within 2 mins? The IF statement?

Cheers,

Rich


#13

It starts with a regular IF CONDITION. When you add a second condition, they will be joined with an AND statement. Click on the AND statement and you can change it to an OR, XOR (which I know nothing of), and a FOLLOWED BY.


#14

Are the conditions in a group?


#15

OK, yep, it’s a grouped condition. But where does that Set Variable come in? How do I do that?


#16

For the Followed By? I’m not at my computer right now, but if it doesn’t pop up when you switch to Followed By, then I believe you click on Followed By.

Directions are in this thread. Unlocking door when someone comes home & walks in front of the Ring doorbell


#17

I can get the Follwed By up - what I can’t figure out is this:

{
When True
With
Location
Do
Do X1 SetVariable {WhoArrived} = {BlahBlah}

End With

Etc, Etc, Etc.

Where does that When True come in? When I use the group option I don’t see any way to add that in.


#18

Oh, I see. There are advanced settings that can be turned on and off. Upper right hand corner in edit mode


#19

That’s the little swine I was looking for - thanks :+1:


#20

Keep in mind, your screen will get really crowded with all these on. When you’re done, you can turn them off. The ones you created will stay, and the empty ones will disappear.