Went through a lot of others arrival pistons and had issues with just about all of them. This is a basic version that only speaks the names. However this is scalable for the # of arrival sensors and handles multiple people arriving within 5 minutes of each other. The number of minutes is easily adjusted.
Arrival Piston - who arrived
Arrival/departure if/then or case statement?
Welcome Home piston help
Arrival of people including multiple people at once
What music players are you using? Can we use Chromecast Audio or Google Home to broadcast?
My piston looks like this. Very simple. ST is running on an android control tablet. That tablet is running Tasker with AutoNotification, which intercepts the below notifications and says “greetings __________” based on the name.
execute
if
Front Door Lock’s lock #X gets unlocked
then
Send PUSH notification “Frontdoorunlocked ____________” and store in Messages;
end if;
if
Front Door Lock’s lock #2 gets unlocked
then
Send PUSH etc
end execute;
Reliable presence sensor door open announcement
Your piston is awesome! I set it up and configured it and it worked perfectly. I then (mistake time) tried to combine it with my main presence piston and I think I got trapped in that async/task cancellation thing because now it no longer works.
Can you tell where I went wrong?
I wil post a log when I capture a presence even and contact open event.
10/9/2017, 11:40:38 AM +446ms
+2ms ╔Received event [Laundry Room Door].contact = closed with a delay of 152ms
+222ms ║RunTime Analysis CS > 18ms > PS > 49ms > PE > 155ms > CE
+235ms ║Runtime (73801 bytes) successfully initialized in 49ms (v0.2.0f9.20171007) (232ms)
+236ms ║╔Execution stage started
+263ms ║║Comparison (enum) present is (string) not present = false (1ms)
+265ms ║║Condition #13 evaluated false (22ms)
+266ms ║║Condition group #12 evaluated false (state did not change) (24ms)
+267ms ║║Condition group #1 evaluated false (state did not change) (25ms)
+282ms ║║Condition #22 evaluated false (11ms)
+283ms ║║Condition group #21 evaluated false (state did not change) (13ms)
+289ms ║║Comparison (string) :472aa3c15fdca56c034bac858d175e13: is (string) :3101233cb6a3896338af96d248600401: = false (1ms)
+291ms ║║Condition #47 evaluated false (5ms)
+292ms ║║Condition group #45 evaluated false (state did not change) (6ms)
+307ms ║║Comparison (enum) not present is (string) not present = true (2ms)
+309ms ║║Comparison (enum) not present is (string) not present = true (1ms)
+311ms ║║Condition #53 evaluated true (14ms)
+321ms ║║Comparison (enum) present is (string) present = true (2ms)
+323ms ║║Condition #54 evaluated true (10ms)
+329ms ║║Comparison (string) :472aa3c15fdca56c034bac858d175e13: is_any_of (string) :3101233cb6a3896338af96d248600401:,:62cfeb32d55e4be236fd007df7e88b11:,:7d26172d1ac50b98e0031196eaf2c2af: = false (4ms)
+330ms ║║Condition #55 evaluated false (7ms)
+331ms ║║Condition group #52 evaluated false (state did not change) (35ms)
+332ms ║║Condition group #51 evaluated false (state did not change) (37ms)
+334ms ║╚Execution stage complete. (99ms)
+342ms ╚Event processed successfully (342ms)
10/9/2017, 11:40:31 AM +814ms
+1ms ╔Received event [Laundry Room Door].contact = open with a delay of 523ms
+223ms ║RunTime Analysis CS > 34ms > PS > 49ms > PE > 139ms > CE
+233ms ║Runtime (73784 bytes) successfully initialized in 49ms (v0.2.0f9.20171007) (231ms)
+234ms ║╔Execution stage started
+265ms ║║Comparison (enum) present is (string) not present = false (1ms)
+267ms ║║Condition #13 evaluated false (26ms)
+268ms ║║Condition group #12 evaluated false (state did not change) (27ms)
+269ms ║║Condition group #1 evaluated false (state did not change) (29ms)
+284ms ║║Condition #22 evaluated false (11ms)
+285ms ║║Condition group #21 evaluated false (state did not change) (12ms)
+291ms ║║Comparison (string) :472aa3c15fdca56c034bac858d175e13: is (string) :3101233cb6a3896338af96d248600401: = false (2ms)
+292ms ║║Condition #47 evaluated false (5ms)
+293ms ║║Condition group #45 evaluated false (state did not change) (6ms)
+307ms ║║Comparison (enum) not present is (string) not present = true (2ms)
+309ms ║║Comparison (enum) not present is (string) not present = true (1ms)
+311ms ║║Condition #53 evaluated true (14ms)
+321ms ║║Comparison (enum) present is (string) present = true (1ms)
+323ms ║║Condition #54 evaluated true (11ms)
+329ms ║║Comparison (string) :472aa3c15fdca56c034bac858d175e13: is_any_of (string) :3101233cb6a3896338af96d248600401:,:62cfeb32d55e4be236fd007df7e88b11:,:7d26172d1ac50b98e0031196eaf2c2af: = false (3ms)
+331ms ║║Cancelling condition #55’s schedules…
+331ms ║║Condition #55 evaluated false (7ms)
+333ms ║║Cancelling condition #52’s schedules…
+333ms ║║Condition group #52 evaluated false (state changed) (37ms)
+334ms ║║Cancelling condition #51’s schedules…
+335ms ║║Condition group #51 evaluated false (state changed) (39ms)
+338ms ║╚Execution stage complete. (103ms)
+355ms ╚Event processed successfully (355ms)
10/9/2017, 11:39:56 AM +156ms
+0ms ╔Received event [Home].time = 1507563597200 with a delay of -1045ms
+211ms ║RunTime Analysis CS > 18ms > PS > 50ms > PE > 143ms > CE
+224ms ║Runtime (73781 bytes) successfully initialized in 50ms (v0.2.0f9.20171007) (223ms)
+225ms ║╔Execution stage started
+262ms ║║Calculating (enum) not present == (enum) present >> (boolean) false
+277ms ║║Calculating (long) 69840 / (long) 60000 >> (long) 1.164
+280ms ║║Calculating (long) 1 < (long) 5 >> (boolean) true
+283ms ║║Calculating (boolean) false && (boolean) true >> (boolean) false
+300ms ║║Calculating (enum) not present == (enum) present >> (boolean) false
+312ms ║║Calculating (long) 22090149 / (long) 60000 >> (long) 368.16915
+315ms ║║Calculating (long) 368 < (long) 5 >> (boolean) false
+318ms ║║Calculating (boolean) false && (boolean) false >> (boolean) false
+323ms ║║Calculating (dynamic) 0 + (dynamic) 0 >> (dynamic) 0
+324ms ║║Evaluating switch with values [[i:133:null:0, v:[t:dynamic, v:0, vt:string]]]
+328ms ║║Comparison (dynamic) 0 is (integer) 1 = false (2ms)
+334ms ║║Comparison (dynamic) 0 is (integer) 2 = false (2ms)
+339ms ║║Comparison (dynamic) 0 is (integer) 3 = false (1ms)
+420ms ║║Calculating (string) At + (string) 11:39 A.M. >> (string) At 11:39 A.M.
+423ms ║║Calculating (string) At 11:39 A.M. + (string) . I put the house into >> (string) At 11:39 A.M… I put the house into
+427ms ║║Calculating (string) At 11:39 A.M… I put the house into + (string) Babysitter >> (string) At 11:39 A.M… I put the house into Babysitter
+430ms ║║Calculating (string) At 11:39 A.M… I put the house into Babysitter + (string) because everybody left and the babysitter is present. The vacuum is >> (string) At 11:39 A.M… I put the house into Babysitter because everybody left and the babysitter is present. The vacuum is
+433ms ║║Calculating (string) At 11:39 A.M… I put the house into Babysitter because everybody left and the babysitter is present. The vacuum is + (string) paused >> (string) At 11:39 A.M… I put the house into Babysitter because everybody left and the babysitter is present. The vacuum is paused
+435ms ║║Calculating (string) At 11:39 A.M… I put the house into Babysitter because everybody left and the babysitter is present. The vacuum is paused + (string) . >> (string) At 11:39 A.M… I put the house into Babysitter because everybody left and the babysitter is present. The vacuum is paused.
+462ms ║║Executed virtual command [Bedroom Light, Bedroom TV, Helen’s Closet Light, Justin’s Closet, MB Bath MS, MB J Bath 1, MB J Bath2].sendPushNotification (22ms)
+475ms ║║Calculating (string) The location mode is + (string) Babysitter >> (string) The location mode is Babysitter
+479ms ║║Calculating (string) The location mode is Babysitter + (string) and the alarm is >> (string) The location mode is Babysitter and the alarm is
+483ms ║║Calculating (string) The location mode is Babysitter and the alarm is + (string) off >> (string) The location mode is Babysitter and the alarm is off
+488ms ║║Calculating (string) The location mode is Babysitter and the alarm is off + (string) . >> (string) The location mode is Babysitter and the alarm is off.
+493ms ║║Executed virtual command [Bedroom Light, Bedroom TV, Helen’s Closet Light, Justin’s Closet, MB Bath MS, MB J Bath 1, MB J Bath2].setState (2ms)
+557ms ║║Comparison (time) 41996654 is_between (time) 1507547820000 … (time) 1507589940000 = true (9ms)
+558ms ║║Time restriction check passed
+560ms ║║Condition #121 evaluated true (63ms)
+561ms ║║Condition group #113 evaluated true (state did not change) (64ms)
+562ms ║║Cancelling statement #113’s schedules…
+1162ms ║║Executed physical command [Curtains].close() (597ms)
+1163ms ║║Executed [Curtains].close (599ms)
+1181ms ║║Comparison (time) 41997322 is_before (time) 1507564800000 = true (8ms)
+1182ms ║║Time restriction check passed
+1184ms ║║Condition #119 evaluated true (18ms)
+1185ms ║║Condition group #117 evaluated true (state did not change) (19ms)
+1186ms ║║Cancelling statement #117’s schedules…
+2103ms ║║Executed physical command [null].start() (915ms)
+2104ms ║║Executed [Downstairs Vacuum].start (917ms)
+2107ms ║╚Execution stage complete. (1882ms)
+2139ms ╚Event processed successfully (2140ms)
10/9/2017, 11:39:46 AM +483ms
+0ms ╔Received event [Home].time = 1507563587498 with a delay of -1016ms
+411ms ║RunTime Analysis CS > 17ms > PS > 52ms > PE > 343ms > CE
+426ms ║Runtime (73781 bytes) successfully initialized in 52ms (v0.2.0f9.20171007) (424ms)
+427ms ║╔Execution stage started
+468ms ║║Calculating (enum) not present == (enum) present >> (boolean) false
+479ms ║║Calculating (long) 60368 / (long) 60000 >> (long) 1.0061333333
+482ms ║║Calculating (long) 1 < (long) 5 >> (boolean) true
+486ms ║║Calculating (boolean) false && (boolean) true >> (boolean) false
+501ms ║║Calculating (enum) not present == (enum) present >> (boolean) false
+512ms ║║Calculating (long) 22080676 / (long) 60000 >> (long) 368.0112666667
+515ms ║║Calculating (long) 368 < (long) 5 >> (boolean) false
+519ms ║║Calculating (boolean) false && (boolean) false >> (boolean) false
+525ms ║║Calculating (dynamic) 0 + (dynamic) 0 >> (dynamic) 0
+527ms ║║Evaluating switch with values [[i:133:null:0, v:[t:dynamic, v:0, vt:string]]]
+531ms ║║Comparison (dynamic) 0 is (integer) 1 = false (2ms)
+538ms ║║Comparison (dynamic) 0 is (integer) 2 = false (2ms)
+545ms ║║Comparison (dynamic) 0 is (integer) 3 = false (1ms)
+605ms ║║Skipped execution of physical command [Bedroom Light].off([]) because it would make no change to the device. (3ms)
+605ms ║║Executed [Bedroom Light].off (5ms)
+610ms ║║Skipped execution of physical command [Bedroom TV].off([]) because it would make no change to the device. (3ms)
+611ms ║║Executed [Bedroom TV].off (4ms)
+616ms ║║Skipped execution of physical command [Helen’s Closet Light].off([]) because it would make no change to the device. (2ms)
+617ms ║║Executed [Helen’s Closet Light].off (4ms)
+621ms ║║Skipped execution of physical command [Justin’s Closet].off([]) because it would make no change to the device. (2ms)
+622ms ║║Executed [Justin’s Closet].off (4ms)
+629ms ║║Skipped execution of physical command [MB J Bath 1].off([]) because it would make no change to the device. (3ms)
+629ms ║║Executed [MB J Bath 1].off (5ms)
+635ms ║║Skipped execution of physical command [MB J Bath2].off([]) because it would make no change to the device. (4ms)
+636ms ║║Executed [MB J Bath2].off (5ms)
+705ms ║║Executed virtual command [Bedroom Light, Bedroom TV, Helen’s Closet Light, Justin’s Closet, MB Bath MS, MB J Bath 1, MB J Bath2].setLocationMode (64ms)
+714ms ║║Executed virtual command [Bedroom Light, Bedroom TV, Helen’s Closet Light, Justin’s Closet, MB Bath MS, MB J Bath 1, MB J Bath2].wait (1ms)
+716ms ║║Requesting a wake up for Mon, Oct 9 2017 @ 11:39:57 AM EDT (in 10.0s)
+727ms ║╚Execution stage complete. (300ms)
+730ms ║Setting up scheduled job for Mon, Oct 9 2017 @ 11:39:57 AM EDT (in 9.988s)
+753ms ╚Event processed successfully (752ms)
10/9/2017, 11:38:47 AM +163ms
+0ms ╔Received event [Helen].presence = not present with a delay of 573ms
+210ms ║RunTime Analysis CS > 33ms > PS > 44ms > PE > 133ms > CE
+225ms ║Runtime (73810 bytes) successfully initialized in 44ms (v0.2.0f9.20171007) (223ms)
+226ms ║╔Execution stage started
+252ms ║║Comparison (enum) present is (string) not present = false (1ms)
+254ms ║║Condition #13 evaluated false (22ms)
+255ms ║║Condition group #12 evaluated false (state did not change) (23ms)
+256ms ║║Condition group #1 evaluated false (state did not change) (25ms)
+270ms ║║Comparison (enum) not present changes_to (string) present = false (1ms)
+273ms ║║Cancelling condition #22’s schedules…
+274ms ║║Condition #22 evaluated false (14ms)
+275ms ║║Cancelling condition #21’s schedules…
+276ms ║║Condition group #21 evaluated false (state changed) (16ms)
+282ms ║║Comparison (string) :7d26172d1ac50b98e0031196eaf2c2af: is (string) :3101233cb6a3896338af96d248600401: = false (2ms)
+283ms ║║Condition #47 evaluated false (4ms)
+284ms ║║Condition group #45 evaluated false (state did not change) (6ms)
+295ms ║║Comparison (enum) not present is (string) not present = true (1ms)
+298ms ║║Comparison (enum) not present is (string) not present = true (1ms)
+299ms ║║Condition #53 evaluated true (12ms)
+311ms ║║Comparison (enum) present is (string) present = true (2ms)
+313ms ║║Condition #54 evaluated true (13ms)
+320ms ║║Comparison (string) :7d26172d1ac50b98e0031196eaf2c2af: is_any_of (string) :3101233cb6a3896338af96d248600401:,:62cfeb32d55e4be236fd007df7e88b11:,:7d26172d1ac50b98e0031196eaf2c2af: = true (3ms)
+322ms ║║Condition #55 evaluated true (7ms)
+323ms ║║Condition group #52 evaluated true (state did not change) (36ms)
+324ms ║║Condition group #51 evaluated true (state did not change) (37ms)
+327ms ║║Cancelling statement #56’s schedules…
+334ms ║║Executed virtual command [Bedroom Light, Bedroom TV, Helen’s Closet Light, Justin’s Closet, MB Bath MS, MB J Bath 1, MB J Bath2].wait (1ms)
+335ms ║║Requesting a wake up for Mon, Oct 9 2017 @ 11:39:47 AM EDT (in 60.0s)
+340ms ║╚Execution stage complete. (115ms)
+341ms ║Setting up scheduled job for Mon, Oct 9 2017 @ 11:39:47 AM EDT (in 59.994s)
+359ms ╚Event processed successfully (360ms)
10/9/2017, 11:37:30 AM +632ms
+2ms ╔Received event [Helen].presence = present with a delay of 470ms
+231ms ║RunTime Analysis CS > 39ms > PS > 48ms > PE > 143ms > CE
+242ms ║Runtime (73777 bytes) successfully initialized in 48ms (v0.2.0f9.20171007) (239ms)
+243ms ║╔Execution stage started
+269ms ║║Comparison (enum) present is (string) not present = false (1ms)
+271ms ║║Condition #13 evaluated false (20ms)
+272ms ║║Condition group #12 evaluated false (state did not change) (22ms)
+272ms ║║Condition group #1 evaluated false (state did not change) (23ms)
+285ms ║║Comparison (enum) present changes_to (string) present = true (0ms)
+289ms ║║Cancelling condition #22’s schedules…
+290ms ║║Condition #22 evaluated true (14ms)
+291ms ║║Cancelling condition #21’s schedules…
+291ms ║║Condition group #21 evaluated true (state changed) (16ms)
+294ms ║║Cancelling statement #23’s schedules…
+334ms ║║Executed virtual command setLocationMode (38ms)
+338ms ║║Executed virtual command setVariable (1ms)
+344ms ║║Executed virtual command setVariable (2ms)
+352ms ║║Calculating (string) Helen + (string) Arrived - >> (string) Helen Arrived -
+355ms ║║Calculating (string) Helen Arrived - + (string) Mon, Oct 9 2017 @ 11:37:30 AM EDT >> (string) Helen Arrived - Mon, Oct 9 2017 @ 11:37:30 AM EDT
+359ms ║║Helen Arrived - Mon, Oct 9 2017 @ 11:37:30 AM EDT
+361ms ║║Executed virtual command log (3ms)
+367ms ║║Executed virtual command setVariable (2ms)
+371ms ║║Executed virtual command wait (1ms)
+372ms ║║Requesting a wake up for Mon, Oct 9 2017 @ 11:42:31 AM EDT (in 300.0s)
+376ms ║╚Execution stage complete. (133ms)
+378ms ║Setting up scheduled job for Mon, Oct 9 2017 @ 11:42:31 AM EDT (in 299.995s)
+475ms ╚Event processed successfully (475ms)
This is what I was looking for in another post. I just have the presence sensors but I couldn’t figure out how to incorporate multiple people arriving. Thanks!
Hope you were able to get it working for your situation. I went through a LOT of multiple people arrival pistons and none really worked all the time. I ended up with this which isn’t perfect, but it is pretty simple. I’m sure someone could improve it.
I took out the door sensor and adjusted for just 3 people and then put in a web request to have my sonos speak the Welcome Home. However, it didn’t speak. Any ideas why?
You need something to trigger on. I use the door that we always enter through. I don’t think you can trigger on a variable change. Aka… Use whatever the house uses to know you are in the house. Usually people use an entry door closing.
What about setting up a virtual switch and using that? So when someone comes home the switch turns on.
Using the presence sensors like the piston is fine to trigger on who has arrived. However to fire off an action, like speaking who is home. You really need a trigger that you have entered the house so the piston knows WHEN to speak who is home. You must have a man door or garage door?
See this thread…https://community.webcore.co/t/arrival-of-people-including-multiple-people-at-once/3275/5
Just looking at your piston again and I have a question…What is the 60000 in the dynamic variable stand for? Also, is the wait 5 minutes to wait to see who else arrives? Then it would say Welcome Home, right? If I wanted to adjust this time, would I need to adjust the dynamic variable equation also?
See the other thread too. Yes 5 minutes. It considers anyone “home” that has arrived within 5 minutes previous to the door(or motion sensor) being triggered to be “new”. 60000 = 5 minutes
you could do this with any presence sensor detecting presence also but that might get a little tricky because both statements will fire at the same time and the anyonehome might not be set to true yet.