Arrival of people including multiple people at once


#81

All done @pcgirl65 the announce variable now has random phases and as it has two sets of random for the 1st and 2nd part it is truly random what it come up with :smile:. I’ve tested it a few times and it works great. you should just need to put that variable in your GET string.


Announcement Piston help
#82

Awesome! I will get it setup and test it out! Thanks for working on it!


#83

great let me know how it goes :grinning:


#84

I don’t have a contact sensor so do I need to have that in the piston?


#85

No, I don’t have one yet as well, but think like me you have a PIR by your door? That’s what I’m using, you need something to trigger the speech but you could have the presence arrival trigger it like it is for departure but just increase the time so that your in the house before it trigger.


#86

Yeah, I want the arrival to be triggered by the presence sensors (ie: iphones). How would I do that?


#87

Change line 67-69 to time happens daily at say 2 minutes past {lastnow}

Your need to play around with the minutes and increase it untill it’s correct for you. That’s why it’s better to use a contact sensor or motion sensor as then it’s sure your in the house.


#88

Ok I could use a virtual sensor and have it turned on and then off at the end of the piston. My hubbie just came home and it didn’t send me a push notification. But ST seems to be having a delay on updating the status of presence. The logs recognized that he was home though.


#89

Post a traced green stapshot of the piston on here so I can check what’s happening.

In reference to the pressence sensor, I’m using @ady624 WebCoRE sensor, it’s still in beta and still needs a bit of work to it to make it perfect but for me it’s better than the standard ST one.


#90

part of the log:

1/7/2018, 11:27:28 AM +340ms
+1ms ╔Starting piston… (v0.2.101.20171227)
+456ms ║╔Subscribing to devices…
+500ms ║║Subscribing to Jane.presence…
+524ms ║║Subscribing to Lauren.presence…
+543ms ║║Subscribing to Tom.presence…
+568ms ║║Subscribing to Home/Away Button.contact…
+715ms ║║Subscribing to Kitchen Sonos…
+716ms ║╚Finished subscribing (288ms)
+749ms ║Calculating (datetime) 1515342449085 - (datetime) 1515340330790 >> (datetime) 2118295
+754ms ║Comparison (datetime) 2118295 is_greater_than (integer) 300000 = true (1ms)
+755ms ║Cancelling condition #27’s schedules…
+756ms ║Cancelling condition #24’s schedules…
+778ms ║Calculating (integer) 3 - (integer) 1 >> (integer) 2
+786ms ║Comparison (integer) 2 is_inside_of_range (integer) 0 … (integer) 2 = true (5ms)
+809ms ║Comparison (boolean) false is (boolean) false = true (1ms)
+812ms ║Cancelling condition #29’s schedules…
+822ms ║Comparison (time) 41249158 happens_daily_at (datetime) 1515340330790 = false (1ms)
+823ms ║Cancelling condition #49’s schedules…
+828ms ║Cancelling statement #49’s schedules…
+831ms ║Requesting time schedule wake up at Mon, Jan 8 2018 @ 10:52:40 AM EST
+854ms ║Comparison (boolean) true is (boolean) false = false (1ms)
+862ms ║Comparison (integer) 0 is_greater_than (integer) 0 = false (1ms)
+877ms ║Setting up scheduled job for Mon, Jan 8 2018 @ 10:52:40 AM EST (in 84311.575s)
+1027ms ╚Piston successfully started (1026ms)
1/7/2018, 10:52:39 AM +284ms
+1ms ╔Received event [Home].time = 1515340360790 with a delay of -1506ms
+144ms ║RunTime Analysis CS > 17ms > PS > 58ms > PE > 69ms > CE
+148ms ║Runtime (56509 bytes) successfully initialized in 58ms (v0.2.101.20171227) (146ms)
+149ms ║╔Execution stage started
+161ms ║║Calculating (datetime) 1515340359441 - (datetime) 1515340330790 >> (datetime) 28651
+166ms ║║Comparison (datetime) 28651 is_greater_than (integer) 300000 = false (2ms)
+168ms ║║Cancelling condition #27’s schedules…
+168ms ║║Condition #27 evaluated false (13ms)
+170ms ║║Cancelling condition #24’s schedules…
+170ms ║║Condition group #24 evaluated false (state changed) (15ms)
+186ms ║║Condition #20 evaluated false (8ms)
+186ms ║║Condition group #55 evaluated false (state did not change) (10ms)
+187ms ║║Condition group #11 evaluated false (state did not change) (11ms)
+194ms ║║Comparison (time) 39159475 happens_daily_at (datetime) 1515340330790 = true (1ms)
+195ms ║║Time restriction check passed
+196ms ║║Cancelling condition #49’s schedules…
+197ms ║║Condition #49 evaluated true (7ms)
+203ms ║║Cancelling statement #49’s schedules…
+207ms ║║Requesting time schedule wake up at Mon, Jan 8 2018 @ 10:52:40 AM EST
+222ms ║║Comparison (boolean) true is (boolean) false = false (1ms)
+223ms ║║Condition #48 evaluated false (14ms)
+224ms ║║Condition group #38 evaluated false (state did not change) (34ms)
+231ms ║║Comparison (integer) 0 is_greater_than (integer) 0 = false (1ms)
+232ms ║║Condition #65 evaluated false (5ms)
+233ms ║║Condition group #61 evaluated false (state did not change) (7ms)
+236ms ║╚Execution stage complete. (87ms)
+237ms ║Setting up scheduled job for Mon, Jan 8 2018 @ 10:52:40 AM EST (in 86401.269s)
+246ms ╚Event processed successfully (245ms)
1/7/2018, 10:52:10 AM +506ms
+2ms ╔Received event [Tom].presence = present with a delay of 96ms
+159ms ║RunTime Analysis CS > 17ms > PS > 62ms > PE > 79ms > CE
+162ms ║Runtime (56499 bytes) successfully initialized in 62ms (v0.2.101.20171227) (159ms)
+163ms ║╔Execution stage started


#91

Is this for iphones?


#92

You have the motion sensor detecting “inactive”. I don’t see where it registers for when you are arriving?


#93

Both android and IOS.

You can change it to active if you want but most become active when your there then inactive once you pass. For me as the sensor is outside, once it becomes inactive I’m in the building and can hear the speaker, I don’t want it to speak when I walking up to the door.


#94

Is contact sensor 1 a virtual device? triggered by your presence, hence why the 3 min wait? If it is there is a easier way to do it, let me know and i’ll show you.

On line 65 you removed the inactive but didn’t remove the group, don’t know why as I can’t see why it would, but i did that on another piston and it caused a issue. your need to click on the ( then delete and re add the contact sensor changed to closed (or copy it and past it) back in the right place.


#95

Yes contact sensor is a virtual switch. I don’t need it though if I use my motion sensor in the front hall that will catch us when we enter the house. I had put the 3 minutes wait in to make time for us to get into the house before speaking but actually using the motion sensor is a better way. What do you think?


#96

yeah that will work, but your still need to remove the group between line 64 and 66.


#97

I think this has it. I did notice and issue when I was trying to figure out the announce stuff. In the expression it is showing See you later Lauren, Lauren has home.



#98

That’s correct, because at the end of the piston it clears the variables, that trigger the piston to the speak the correct text. But them variables decide if it say the arrive or depart part so when you evaluate it, it shows what has evaluated at that time which is why it doesn’t make sense. That’s why I no longer clear the push and announce variable at the end, so you can read what it last evaluated to.

yeah that should do it :slight_smile: good luck with it :wink:


#99

OK, makes sense. One more question…if I want to use a GET request to say what is in the Random expression, how would I do that? I tried this, but it didn’t work. It just spoke the whole http://192.168.1.100 blah, blah, blah. Any ideas?


#100

unfortunately not something i have done before it should just be a case of what you were doing before but instead of putting random(bla bla, bla blo) your put {announce}. As it still needs to pull the string in the variable

can you screenshot what you were doing before?