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?