Arrival of people including multiple people at once


#161

I made that change and the error remains the same???

`|+1ms|╔Received event [Garage Entry Door].contact = closed with a delay of 85ms|

|—|---|
|+194ms|║RunTime Analysis CS > 14ms > PS > 38ms > PE > 143ms > CE|
|+199ms|║Runtime (66788 bytes) successfully initialized in 38ms (v0.2.102.20180116) (197ms)|
|+200ms|║╔Execution stage started|
|+212ms|║║Calculating (datetime) 1516503255910 - (datetime) 1516503052998 >> (datetime) 202912|
|+216ms|║║Comparison (datetime) 202912 is_greater_than (integer) 300000 = false (2ms)|
|+218ms|║║Condition #27 evaluated false (12ms)|
|+219ms|║║Condition group #24 evaluated false (state did not change) (13ms)|
|+222ms|║║Cancelling statement #77’s schedules…|
|+230ms|║║Calculating (string) LOG: The value of i is = + (string) 0 >> (string) LOG: The value of i is = 0|
|+233ms|║║Calculating (string) LOG: The value of i is = 0 + (string) (line 59) >> (string) LOG: The value of i is = 0 (line 59)|
|+238ms|║║LOG: The value of i is = 0 (line 59)|
|+238ms|║║Executed virtual command log (1ms)|
|+263ms|║║Comparison (enum) closed changes_to (string) closed = true (1ms)|
|+265ms|║║Cancelling condition #20’s schedules…|
|+266ms|║║Condition #20 evaluated true (22ms)|
|+267ms|║║Cancelling condition #55’s schedules…|
|+268ms|║║Condition group #55 evaluated true (state changed) (24ms)|
|+275ms|║║Comparison (boolean) false is (boolean) false = true (2ms)|
|+277ms|║║Cancelling condition #29’s schedules…|
|+278ms|║║Condition #29 evaluated true (9ms)|
|+279ms|║║Cancelling condition #11’s schedules…|
|+280ms|║║Condition group #11 evaluated true (state changed) (37ms)|
|+282ms|║║Cancelling statement #12’s schedules…|
|+286ms|║║Executed virtual command wait (1ms)|
|+287ms|║║Waiting for 3000ms|
|+3294ms|║║Executed virtual command setVariable (3ms)|
|+3301ms|║║Comparison (time) 71659000 happens_daily_at (datetime) 1516503052998 = false (0ms)|
|+3303ms|║║Condition #49 evaluated false (5ms)|
|+3304ms|║║Cancelling statement #49’s schedules…|
|+3308ms|║║Requesting time schedule wake up at Sun, Jan 21 2018 @ 7:51:22 PM MST|
|+3310ms|║║Condition group #38 evaluated false (state did not change) (13ms)|
|+3318ms|║║Comparison (integer) 1 is_greater_than (integer) 0 = true (1ms)|
|+3319ms|║║Cancelling condition #65’s schedules…|
|+3320ms|║║Condition #65 evaluated true (7ms)|
|+3321ms|║║Cancelling condition #61’s schedules…|
|+3322ms|║║Condition group #61 evaluated true (state changed) (9ms)|
|+3324ms|║║Cancelling statement #81’s schedules…|
|+3333ms|║║Calculating (string) LOG: The value of i is = + (string) 0 >> (string) LOG: The value of i is = 0|
|+3335ms|║║Calculating (string) LOG: The value of i is = 0 + (string) (line 143) >> (string) LOG: The value of i is = 0 (line 143)|
|+3340ms|║║LOG: The value of i is = 0 (line 143)|
|+3340ms|║║Executed virtual command log (1ms)|
|+3343ms|║║Cancelling statement #52’s schedules…|
|+3558ms|║║Calculating (integer) 7 - (integer) 0 >> (integer) 7|
|+3561ms|║║Calculating (integer) 7 - (integer) 2 >> (integer) 5|
|+3570ms|║║Calculating (string) + (string) and >> (string) and|
|+3575ms|║║Calculating (string) and + (string) eyson >> (string) and eyson|
|+3579ms|║║Calculating (integer) 0 > (integer) 0 >> (boolean) false|
|+3588ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].setVariable (3ms)|
|+3598ms|║║Calculating (string) LOG: The value of whoI is = + (string) 1 >> (string) LOG: The value of whoI is = 1|
|+3601ms|║║Calculating (string) LOG: The value of whoI is = 1 + (string) (Line 150) >> (string) LOG: The value of whoI is = 1 (Line 150)|
|+3607ms|║║LOG: The value of whoI is = 1 (Line 150)|
|+3607ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].log (1ms)|
|+3618ms|║║Calculating (string) LOG: The value of who[whoI] is = + (string) Greyson >> (string) LOG: The value of who[whoI] is = Greyson|
|+3622ms|║║Calculating (string) LOG: The value of who[whoI] is = Greyson + (string) (Line 151) >> (string) LOG: The value of who[whoI] is = Greyson (Line 151)|
|+3626ms|║║LOG: The value of who[whoI] is = Greyson (Line 151)|
|+3627ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].log (1ms)|
|+3645ms|║║Calculating (decimal) 0.0 - (decimal) 1.0 >> (decimal) -1.0|
|+3651ms|║║Calculating (string) ) : -1) is = + (string) -1 >> (string) ) : -1) is = -1|
|+3655ms|║║Calculating (string) ) : -1) is = -1 + (string) (Line 152) >> (string) ) : -1) is = -1 (Line 152)|
|+3658ms|║║Calculating (string) LOG: The value of (contains(who[whoI], , (string) ) ? lastIndexOf(who[whoI], >> (string) LOG: The value of (contains(who[whoI], ) ? lastIndexOf(who[whoI],|
|+3660ms|║║Calculating (string) LOG: The value of (contains(who[whoI], ) ? lastIndexOf(who[whoI], , (string) ) : -1) is = -1 (Line 152) >> (string) LOG: The value of (contains(who[whoI], ) ? lastIndexOf(who[whoI], ) : -1) is = -1 (Line 152)|
|+3665ms|║║LOG: The value of (contains(who[whoI], ) ? lastIndexOf(who[whoI], ) : -1) is = -1 (Line 152)|
|+3665ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].log (1ms)|
|+3679ms|║║Calculating (decimal) 0.0 - (decimal) 1.0 >> (decimal) -1.0|
|+3685ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].setVariable (3ms)|
|+3693ms|║║Calculating (string) LOG: The value of i is = + (string) -1 >> (string) LOG: The value of i is = -1|
|+3696ms|║║Calculating (string) LOG: The value of i is = -1 + (string) (Line 154) >> (string) LOG: The value of i is = -1 (Line 154)|
|+3700ms|║║LOG: The value of i is = -1 (Line 154)|
|+3701ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].log (1ms)|
|+3721ms|║║Calculating (integer) 7 - (integer) -1 >> (integer) 8|
|+3723ms|║║Calculating (integer) 8 - (integer) 2 >> (integer) 6|
|+3731ms|║║Calculating (integer) 1 == (integer) 1 >> (boolean) true|
|+3741ms|║║Calculating (integer) 1 == (integer) 1 >> (boolean) true|
|+3747ms|║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + (string) and >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and|
|+3751ms|║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and + (string) reyson >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and reyson|
|+3755ms|║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and reyson + (string) are >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and reyson are|
|+3759ms|║║Calculating (string) Greyson + (string) is >> (string) Greyson is|
|+3763ms|║║Calculating (integer) -1 > (integer) 0 >> (boolean) false|
|+3769ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].setVariable (3ms)|
|+3777ms|║║Calculating (integer) 1 == (integer) 1 >> (boolean) true|
|+3781ms|║║Calculating (string) Greyson is + (string) now at home. >> (string) Greyson is now at home.|
|+3786ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].setVariable (3ms)|
|+3799ms|║║Calculating (integer) 1 == (integer) 1 >> (boolean) true|
|+3814ms|║║Calculating (integer) 1 == (integer) 2 >> (boolean) false|
|+3820ms|║║Calculating (string) Welcome home + (string) Greyson >> (string) Welcome home Greyson|
|+3823ms|║║Calculating (string) Welcome home Greyson + (string) , >> (string) Welcome home Greyson,|
|+3826ms|║║Calculating (string) Welcome home Greyson, + (string) Greyson is >> (string) Welcome home Greyson, Greyson is|
|+3829ms|║║Calculating (string) Welcome home Greyson, Greyson is + (string) home. >> (string) Welcome home Greyson, Greyson is home.|
|+3833ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].setVariable (2ms)|
|+3854ms|║║Executed virtual command [Family Room Speaker, Lannouncer S8+].sendNotificationToContacts (15ms)|
|+3867ms|║║Comparison (time) 71659559 is_between (time) 21600000 … (time) 86340000 = true (7ms)|
|+3868ms|║║Time restriction check passed|
|+3869ms|║║Condition #75 evaluated true (12ms)|
|+3870ms|║║Condition group #74 evaluated true (state did not change) (14ms)|
|+3871ms|║║Cancelling statement #74’s schedules…|
|+4106ms|║║Executed physical command [Family Room Speaker].speak([Welcome home Greyson, Greyson is home.]) (229ms)|
|+4107ms|║║Executed [Family Room Speaker].speak (231ms)|
|+4149ms|║║Executed physical command [Lannouncer S8+].speak([Welcome home Greyson, Greyson is home.]) (40ms)|
|+4150ms|║║Executed [Lannouncer S8+].speak (42ms)|
|+4153ms|║║Cancelling statement #76’s schedules…|
|+4159ms|║║Executed virtual command setVariable (3ms)|
|+4165ms|║║Executed virtual command setVariable (2ms)|
|+4168ms|║║Cancelling statement #84’s schedules…|
|+4176ms|║║Calculating (string) LOG: The value of i is = + (string) -1 >> (string) LOG: The value of i is = -1|
|+4179ms|║║Calculating (string) LOG: The value of i is = -1 + (string) (line 187) >> (string) LOG: The value of i is = -1 (line 187)|
|+4183ms|║║LOG: The value of i is = -1 (line 187)|
|+4184ms|║║Executed virtual command log (1ms)|
|+4188ms|║╚Execution stage complete. (3987ms)|
|+4189ms|║Setting up scheduled job for Sun, Jan 21 2018 @ 7:51:22 PM MST (in 86223.107s)|
|+4203ms|╚Event processed successfully (4202ms)|
`


#162

This piston has been working fairly well with multiple people coming and going. The only problem that it is having is in the speech part. Some weird sentences are happening. For instance when my hubby came home it said “What’s up Tom. Tom is” and this one "Hello Hope you had a good day Tom, Tom is Lets here it for ". I have gone through the random phrases but I can’t find the problem. Some other eyes on this maybe…


#163

The problem in the last part of line 92. There are two issues: 1) It appears as if you have an opening statement in the closing statement random line. You have 'Lets here it for 'as one of the statements and when you look at the other choice that are all closing statements (‘in the house.’, ‘is here.’) You should move the ‘Lets here is for’ to the opening statement random clause earlier in the expression (before the ‘+ Name +’ part).

  1. There is a closing comma right after 'Lets here is for ’ that should not be there. I believe that is interpreted as a blank option in the random clause so the result is when the random selection is the blank clause you get ‘Tom is’ with nothing else. Remove the comma between ‘Lets here it for’ and the closing parenthesis in the Random clause and that should fix it.

Hope that helps.


#164

Thanks! I will look at this tomorrow as the Raptors are going to start soon:grin:


#166

hey @pcgirl65 I tweaked it a bit so its easier for you to change the messages, I also added your extra words as i was looking for other ideas anyway :smile:


#167

Thanks I will try this!


#168

Here is my latest version adapted from all of the good work created by others in this thread. I have added additional ‘random’ phrases as a small contribution to the effort.

I also want to capture the current speaker volume setting (level?) before the announcement is made, set the level for the announcement, speak the announcement, then return the level to its original setting. I attempted this code, but have not been able to test it. I don’t know if this will work as I have four Fabriq speakers defined in my ‘Speaker’ group. Ideally each speaker will do this independently (each setting and then returning to it’s prior volume level setting after the announcement). I want to prevent someone from turning the volume all the way down (or up) on the speaker and therefore affecting the announcement volume level. It you know a better, or proper way, to accomplish this, I would greatly appreciate the advice.

Thanks.


#169

This should already be happing using speak and restore.

Again in the speak and restore bit it is set to go to the volume of your choice but should then restore to what it was before.

Where is it?


#170

My piston is sending multilple notifications when we leave. Today it sent “Jane has left the Building” then again “Jane has left the building” then it sent "Jane and Jane has left the building. It seems to be duplicating. Here are the logs…
1/30/2018, 8:58:22 AM +341ms
+0ms ╔Received event [Home].time = 1517320703779 with a delay of -1439ms
+209ms ║RunTime Analysis CS > 48ms > PS > 36ms > PE > 125ms > CE
+212ms ║Runtime (64290 bytes) successfully initialized in 36ms (v0.2.102.20180116) (211ms)
+213ms ║╔Execution stage started
+225ms ║║Calculating (datetime) 1517320702563 - (datetime) 1517320673779 >> (datetime) 28784
+230ms ║║Comparison (datetime) 28784 is_greater_than (integer) 300000 = false (2ms)
+231ms ║║Condition #27 evaluated false (11ms)
+232ms ║║Condition group #24 evaluated false (state did not change) (12ms)
+255ms ║║Condition #56 evaluated false (17ms)
+256ms ║║Condition group #55 evaluated false (state did not change) (17ms)
+257ms ║║Condition group #11 evaluated false (state did not change) (19ms)
+267ms ║║Comparison (time) 32302601 happens_daily_at (datetime) 1517320673779 = true (5ms)
+268ms ║║Time restriction check passed
+270ms ║║Cancelling condition #49’s schedules…
+270ms ║║Condition #49 evaluated true (11ms)
+279ms ║║Cancelling statement #49’s schedules…
+283ms ║║Requesting time schedule wake up at Wed, Jan 31 2018 @ 8:58:23 AM EST
+296ms ║║Comparison (boolean) true is (boolean) false = false (2ms)
+297ms ║║Cancelling condition #48’s schedules…
+298ms ║║Condition #48 evaluated false (12ms)
+299ms ║║Condition group #38 evaluated false (state did not change) (40ms)
+306ms ║║Comparison (integer) 0 is_greater_than (integer) 0 = false (2ms)
+307ms ║║Cancelling condition #65’s schedules…
+308ms ║║Condition #65 evaluated false (6ms)
+309ms ║║Cancelling condition #61’s schedules…
+310ms ║║Condition group #61 evaluated false (state changed) (8ms)
+313ms ║╚Execution stage complete. (100ms)
+314ms ║Setting up scheduled job for Wed, Jan 31 2018 @ 8:58:23 AM EST (in 86401.124s)
+322ms ╚Event processed successfully (323ms)
1/30/2018, 8:58:06 AM +709ms
+0ms ╔Received event [Home].wc_async_reply = httpRequest with a delay of 0ms
+211ms ║RunTime Analysis CS > 23ms > PS > 48ms > PE > 141ms > CE
+215ms ║Runtime (64294 bytes) successfully initialized in 48ms (v0.2.102.20180116) (214ms)
+216ms ║╔Execution stage started
+217ms ║╚Execution stage complete. (2ms)
+219ms ║Setting up scheduled job for Tue, Jan 30 2018 @ 8:58:23 AM EST (in 16.852s)
+229ms ╚Event processed successfully (229ms)
1/30/2018, 8:57:59 AM +198ms
+0ms ╔Received event [Home].wc_async_reply = httpRequest with a delay of 0ms
+203ms ║RunTime Analysis CS > 17ms > PS > 52ms > PE > 135ms > CE
+207ms ║Runtime (64302 bytes) successfully initialized in 52ms (v0.2.102.20180116) (206ms)
+208ms ║╔Execution stage started
+259ms ║║Cancelling statement #76’s schedules…
+266ms ║║Executed virtual command setVariable (5ms)
+273ms ║║Executed virtual command setVariable (4ms)
+277ms ║╚Execution stage complete. (68ms)
+279ms ║Setting up scheduled job for Tue, Jan 30 2018 @ 8:58:23 AM EST (in 24.303s)
+289ms ╚Event processed successfully (288ms)
1/30/2018, 8:57:53 AM +462ms
+1ms ╔Received event [Jane].presence = not present with a delay of 146ms
+205ms ║RunTime Analysis CS > 18ms > PS > 58ms > PE > 129ms > CE
+208ms ║Runtime (64230 bytes) successfully initialized in 58ms (v0.2.102.20180116) (206ms)
+210ms ║╔Execution stage started
+222ms ║║Calculating (datetime) 1517320673680 - (datetime) 1517320638815 >> (datetime) 34865
+227ms ║║Comparison (datetime) 34865 is_greater_than (integer) 300000 = false (2ms)
+228ms ║║Condition #27 evaluated false (12ms)
+229ms ║║Condition group #24 evaluated false (state did not change) (13ms)
+237ms ║║Cancelling statement #3’s schedules…
+250ms ║║Executed virtual command setVariable (4ms)
+266ms ║║Calculating (integer) 3 - (integer) 1 >> (integer) 2
+269ms ║║Comparison (integer) 0 is_inside_of_range (integer) 0 … (integer) 2 = true (2ms)
+271ms ║║Condition #8 evaluated true (18ms)
+272ms ║║Condition group #2 evaluated true (state did not change) (19ms)
+275ms ║║Cancelling statement #34’s schedules…
+283ms ║║Calculating (dynamic) not present == (dynamic) present >> (boolean) false
+289ms ║║Executed virtual command setVariable (3ms)
+307ms ║║Calculating (string) Jane + (string) , >> (string) Jane,
+310ms ║║Calculating (string) Jane, + (string) Jane >> (string) Jane, Jane
+316ms ║║Executed virtual command setVariable (4ms)
+322ms ║║Executed virtual command setVariable (3ms)
+342ms ║║Comparison (enum) not present changes_to (string) present = false (0ms)
+344ms ║║Condition #56 evaluated false (17ms)
+345ms ║║Condition group #55 evaluated false (state did not change) (18ms)
+346ms ║║Condition group #11 evaluated false (state did not change) (19ms)
+352ms ║║Comparison (time) 32273811 happens_daily_at (datetime) 1517320673779 = false (0ms)
+354ms ║║Cancelling condition #49’s schedules…
+355ms ║║Condition #49 evaluated false (6ms)
+356ms ║║Cancelling statement #49’s schedules…
+360ms ║║Requesting time schedule wake up at Tue, Jan 30 2018 @ 8:58:23 AM EST
+362ms ║║Cancelling condition #38’s schedules…
+363ms ║║Condition group #38 evaluated false (state changed) (15ms)
+371ms ║║Comparison (integer) 2 is_greater_than (integer) 0 = true (1ms)
+372ms ║║Condition #65 evaluated true (6ms)
+373ms ║║Condition group #61 evaluated true (state did not change) (7ms)
+375ms ║║Cancelling statement #52’s schedules…
+389ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+589ms ║║Calculating (integer) 10 - (integer) 4 >> (integer) 6
+592ms ║║Calculating (integer) 6 - (integer) 2 >> (integer) 4
+599ms ║║Calculating (string) Jane + (string) and >> (string) Jane and
+603ms ║║Calculating (string) Jane and + (string) Jane >> (string) Jane and Jane
+607ms ║║Calculating (integer) 4 > (integer) 0 >> (boolean) true
+613ms ║║Executed virtual command [Kitchen Sonos].setVariable (4ms)
+633ms ║║Calculating (integer) 10 - (integer) 4 >> (integer) 6
+636ms ║║Calculating (integer) 6 - (integer) 2 >> (integer) 4
+644ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+654ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+661ms ║║Calculating (string) Jane + (string) and >> (string) Jane and
+666ms ║║Calculating (string) Jane and + (string) Jane >> (string) Jane and Jane
+670ms ║║Calculating (string) Jane and Jane + (string) have >> (string) Jane and Jane have
+674ms ║║Calculating (string) Jane, Jane + (string) has >> (string) Jane, Jane has
+677ms ║║Calculating (integer) 4 > (integer) 0 >> (boolean) true
+683ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+694ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+698ms ║║Calculating (string) Jane and Jane have + (string) left the building. >> (string) Jane and Jane have left the building.
+703ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+724ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+743ms ║║Calculating (integer) 2 == (integer) 2 >> (boolean) true
+749ms ║║Calculating (string) Have a nice day + (string) Jane and Jane >> (string) Have a nice day Jane and Jane
+752ms ║║Calculating (string) Have a nice day Jane and Jane + (string) , >> (string) Have a nice day Jane and Jane,
+755ms ║║Calculating (string) Have a nice day Jane and Jane, + (string) Jane and Jane have >> (string) Have a nice day Jane and Jane, Jane and Jane have
+758ms ║║Calculating (string) Have a nice day Jane and Jane, Jane and Jane have + (string) popped out. >> (string) Have a nice day Jane and Jane, Jane and Jane have popped out.
+763ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+786ms ║║Executed virtual command [Kitchen Sonos].sendPushNotification (18ms)
+799ms ║║Comparison (time) 32274251 is_between (time) 25200000 … (time) 79200000 = true (7ms)
+800ms ║║Time restriction check passed
+801ms ║║Condition #75 evaluated true (12ms)
+802ms ║║Condition group #74 evaluated true (state did not change) (14ms)
+803ms ║║Cancelling statement #74’s schedules…
+810ms ║║Calculating (string) http://192.168.1.100:5005/sayall/ + (string) Have a nice day Jane and Jane, Jane and Jane have popped out. >> (string) http://192.168.1.100:5005/sayall/Have a nice day Jane and Jane, Jane and Jane have popped out.
+813ms ║║Calculating (string) http://192.168.1.100:5005/sayall/Have a nice day Jane and Jane, Jane and Jane have popped out. + (string) /50 >> (string) http://192.168.1.100:5005/sayall/Have a nice day Jane and Jane, Jane and Jane have popped out./50
+819ms ║║Sending internal web request to: 192.168.1.100:5005/sayall/Have%20a%20nice%20day%20Jane%20and%20Jane,%20Jane%20and%20Jane%20have%20popped%20out./50
+822ms ║║Executed virtual command httpRequest (3ms)
+823ms ║║Requesting a wake up for Tue, Jan 30 2018 @ 8:58:14 AM EST (in 20.0s)
+830ms ║╚Execution stage complete. (621ms)
+832ms ║Setting up scheduled job for Tue, Jan 30 2018 @ 8:58:14 AM EST (in 19.992s), with 1 more job pending
+841ms ╚Event processed successfully (841ms)
1/30/2018, 8:57:46 AM +308ms
+1ms ╔Received event [Home].time = 1517320667581 with a delay of -1273ms
+209ms ║RunTime Analysis CS > 21ms > PS > 38ms > PE > 149ms > CE
+213ms ║Runtime (64240 bytes) successfully initialized in 38ms (v0.2.102.20180116) (211ms)
+214ms ║╔Execution stage started
+231ms ║║Calculating (datetime) 1517320666534 - (datetime) 1517320638815 >> (datetime) 27719
+237ms ║║Comparison (datetime) 27719 is_greater_than (integer) 300000 = false (2ms)
+238ms ║║Condition #27 evaluated false (15ms)
+239ms ║║Condition group #24 evaluated false (state did not change) (17ms)
+264ms ║║Cancelling condition #56’s schedules…
+265ms ║║Condition #56 evaluated false (19ms)
+266ms ║║Cancelling condition #55’s schedules…
+267ms ║║Condition group #55 evaluated false (state changed) (21ms)
+268ms ║║Cancelling condition #11’s schedules…
+269ms ║║Condition group #11 evaluated false (state changed) (24ms)
+281ms ║║Comparison (time) 32266581 happens_daily_at (datetime) 1517320638815 = true (4ms)
+282ms ║║Time restriction check passed
+283ms ║║Cancelling condition #49’s schedules…
+284ms ║║Condition #49 evaluated true (12ms)
+285ms ║║Cancelling statement #49’s schedules…
+291ms ║║Requesting time schedule wake up at Tue, Jan 30 2018 @ 8:57:48 AM EST
+306ms ║║Comparison (boolean) false is (boolean) false = true (2ms)
+308ms ║║Condition #48 evaluated true (14ms)
+309ms ║║Cancelling condition #38’s schedules…
+310ms ║║Condition group #38 evaluated true (state changed) (38ms)
+312ms ║║Cancelling statement #39’s schedules…
+318ms ║║Executed virtual command setVariable (2ms)
+326ms ║║Comparison (integer) 2 is_greater_than (integer) 0 = true (2ms)
+328ms ║║Cancelling condition #65’s schedules…
+329ms ║║Condition #65 evaluated true (6ms)
+330ms ║║Cancelling condition #61’s schedules…
+330ms ║║Condition group #61 evaluated true (state changed) (9ms)
+333ms ║║Cancelling statement #52’s schedules…
+352ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+374ms ║║Calculating (integer) 4 - (integer) -1 >> (integer) 5
+377ms ║║Calculating (integer) 5 - (integer) 2 >> (integer) 3
+385ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + (string) and >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and
+389ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and + (string) ane >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane
+393ms ║║Calculating (integer) -1 > (integer) 0 >> (boolean) false
+400ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+422ms ║║Calculating (integer) 4 - (integer) -1 >> (integer) 5
+425ms ║║Calculating (integer) 5 - (integer) 2 >> (integer) 3
+434ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+445ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+452ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + (string) and >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and
+457ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and + (string) ane >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane
+462ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane + (string) have >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane have
+466ms ║║Calculating (string) Jane + (string) has >> (string) Jane has
+470ms ║║Calculating (integer) -1 > (integer) 0 >> (boolean) false
+476ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+488ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+494ms ║║Calculating (string) Jane has + (string) left the building. >> (string) Jane has left the building.
+500ms ║║Executed virtual command [Kitchen Sonos].setVariable (4ms)
+526ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+547ms ║║Calculating (integer) 2 == (integer) 2 >> (boolean) true
+554ms ║║Calculating (string) Have a nice day + (string) Jane >> (string) Have a nice day Jane
+559ms ║║Calculating (string) Have a nice day Jane + (string) , >> (string) Have a nice day Jane,
+562ms ║║Calculating (string) Have a nice day Jane, + (string) Jane has >> (string) Have a nice day Jane, Jane has
+566ms ║║Calculating (string) Have a nice day Jane, Jane has + (string) gone out. >> (string) Have a nice day Jane, Jane has gone out.
+571ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+606ms ║║Executed virtual command [Kitchen Sonos].sendPushNotification (30ms)
+620ms ║║Comparison (time) 32266918 is_between (time) 25200000 … (time) 79200000 = true (8ms)
+621ms ║║Time restriction check passed
+623ms ║║Cancelling condition #75’s schedules…
+624ms ║║Condition #75 evaluated true (14ms)
+625ms ║║Cancelling condition #74’s schedules…
+626ms ║║Condition group #74 evaluated true (state changed) (17ms)
+627ms ║║Cancelling statement #74’s schedules…
+634ms ║║Calculating (string) http://192.168.1.100:5005/sayall/ + (string) Have a nice day Jane, Jane has gone out. >> (string) http://192.168.1.100:5005/sayall/Have a nice day Jane, Jane has gone out.
+637ms ║║Calculating (string) http://192.168.1.100:5005/sayall/Have a nice day Jane, Jane has gone out. + (string) /50 >> (string) http://192.168.1.100:5005/sayall/Have a nice day Jane, Jane has gone out./50
+650ms ║║Sending internal web request to: 192.168.1.100:5005/sayall/Have%20a%20nice%20day%20Jane,%20Jane%20has%20gone%20out./50
+653ms ║║Executed virtual command httpRequest (10ms)
+654ms ║║Requesting a wake up for Tue, Jan 30 2018 @ 8:58:06 AM EST (in 20.0s)
+662ms ║║Fast executing schedules, waiting for 1846ms to sync up
+2522ms ║║Calculating (datetime) 1517320668826 - (datetime) 1517320638815 >> (datetime) 30011
+2528ms ║║Comparison (datetime) 30011 is_greater_than (integer) 300000 = false (2ms)
+2529ms ║║Condition #27 evaluated false (13ms)
+2530ms ║║Condition group #24 evaluated false (state did not change) (14ms)
+2556ms ║║Condition #56 evaluated false (20ms)
+2557ms ║║Condition group #55 evaluated false (state did not change) (21ms)
+2558ms ║║Condition group #11 evaluated false (state did not change) (23ms)
+2565ms ║║Comparison (time) 32268869 happens_daily_at (datetime) 1517320638815 = true (1ms)
+2566ms ║║Time restriction check passed
+2567ms ║║Condition #49 evaluated true (6ms)
+2568ms ║║Cancelling statement #49’s schedules…
+2573ms ║║Requesting time schedule wake up at Wed, Jan 31 2018 @ 8:57:48 AM EST
+2582ms ║║Comparison (boolean) false is (boolean) false = true (2ms)
+2584ms ║║Condition #48 evaluated true (8ms)
+2585ms ║║Condition group #38 evaluated true (state did not change) (23ms)
+2587ms ║║Cancelling statement #39’s schedules…
+2594ms ║║Executed virtual command setVariable (4ms)
+2602ms ║║Comparison (integer) 2 is_greater_than (integer) 0 = true (2ms)
+2603ms ║║Condition #65 evaluated true (5ms)
+2604ms ║║Condition group #61 evaluated true (state did not change) (7ms)
+2607ms ║║Cancelling statement #52’s schedules…
+2619ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+2640ms ║║Calculating (integer) 4 - (integer) -1 >> (integer) 5
+2643ms ║║Calculating (integer) 5 - (integer) 2 >> (integer) 3
+2650ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + (string) and >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and
+2654ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and + (string) ane >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane
+2658ms ║║Calculating (integer) -1 > (integer) 0 >> (boolean) false
+2664ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+2685ms ║║Calculating (integer) 4 - (integer) -1 >> (integer) 5
+2688ms ║║Calculating (integer) 5 - (integer) 2 >> (integer) 3
+2696ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+2707ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+2714ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + (string) and >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and
+2718ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and + (string) ane >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane
+2722ms ║║Calculating (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane + (string) have >> (string) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 and ane have
+2727ms ║║Calculating (string) Jane + (string) has >> (string) Jane has
+2731ms ║║Calculating (integer) -1 > (integer) 0 >> (boolean) false
+2736ms ║║Executed virtual command [Kitchen Sonos].setVariable (2ms)
+2746ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+2751ms ║║Calculating (string) Jane has + (string) left the building. >> (string) Jane has left the building.
+2756ms ║║Executed virtual command [Kitchen Sonos].setVariable (3ms)
+2775ms ║║Calculating (integer) 2 == (integer) 1 >> (boolean) false
+2793ms ║║Calculating (integer) 2 == (integer) 2 >> (boolean) true
+2798ms ║║Calculating (string) Bye + (string) Jane >> (string) Bye Jane
+2802ms ║║Calculating (string) Bye Jane + (string) , >> (string) Bye Jane,
+2805ms ║║Calculating (string) Bye Jane, + (string) Jane has >> (string) Bye Jane, Jane has
+2808ms ║║Calculating (string) Bye Jane, Jane has + (string) buggered off. >> (string) Bye Jane, Jane has buggered off.
+2812ms ║║Executed virtual command [Kitchen Sonos].setVariable (2ms)
+2832ms ║║Executed virtual command [Kitchen Sonos].sendPushNotification (15ms)
+2848ms ║║Comparison (time) 32269145 is_between (time) 25200000 … (time) 79

And the Piston I am using.


#171

Sorry about that I was having trouble uploading the piston last night. I edited my post and the piston is there now.


#172

Mine does that sometimes but I don’t think it’s to do with the piston. I’ll investigate a bit more when I’m back from my holidays but it seems to happen when I have a poor internet connection. It does only happens on the push yes?

Although this one is a new one on me

And going through your loges it correctly evaluated like that


#173

The other day my husband and I went out together. First it pushed Tom has left the building and then it pushed Tom and Tom has left the building and then it pushed Tom and Tom and Jane have left the building.


#174

I wonder if something missing getting cancelled where it’s breaking slightly to sent to web request? On the last “then” try changing it to don’t cancel (click one of the with statements and click the cog, select task cancellation policy and select don’t cancel).

Should look like this once done


#175

No worries I can see you made a few more tweets to make it clearer to understand :smile:. I like the extra messages, I just couldn’t think of meany for the departure, was having a brain fart at the time! I’ll make the changes for the speaker you need and re post.

I’ve made the changes but I can’t test it, you had set the variable as fixed for the speaker rather than grabbing it when you wanted. But like I said before you don’t need to select a separate volume as that is done in the speak command if you open it you will see. It is also recalling the previous level twice as again this is in one of webCore’s commands of speak text and restore previous state. But try this and see.
@pcgirl65 you could also use this as have added the don’t cancel bits too.


#176

I did not know that is what Speak and Restore did. I agree that I should not need the SpeakerVolume variable at all if this performs as you described. I will give it is shot and let you know.

I know I can add log.info (debug) statements to tell me the volume levels before and after the ‘Speak and Restore’ statement … but how to verify the actual level that the ‘Speak and Restore’ statement uses? (How do i know it is working other than listening and making a judgement that it ‘sounds’ about right?) Is there way to report out what the level is on a Speak and Restore statement?

Thanks!


#177

Maybe watch the log in ST developer and see what the level is at before it does the Speak and Restore. It would show it in the logging in there.


#178

I put in some logging and this is what I see. The logs indicated that the ‘level’ of each speaker BEFORE the Speak … Restore was at 72. The Speak …Restore statement executed and that was set at a level of ‘50.’ I do not know how to validate that it actually was at 50 when it spoke? I then I had more logging showing the level AFTER the Speak … Restore statement and again it indicated the level was at 72. That indicated to me that it probably worked as expected.

However, the next person came home a few minutes later and the level of the speakers both before and after the Speak and Restore were logged at 50? I don’t understand how it went from 72 after the first person returned home to 50 before the second person returned home?

I will try to add back in the logic I had of capturing the current level into a variable before the Speak and Restore statement and then restoring that variable to the level after the Speak and restore statement.


#179

Seen this happen before when I tried to grab the volume in a variable and use speak and restore using both seems to mess it up a bit. You can select the volume you want the speaker to play at. On the speak and restore statement click it and at the bottom there is a extra parameter that you can select you choose value and put in the level (it should already be filled in with I think 70, which is my value)


#180

Did some more testing. I think I just didn’t allow enough time for the statements to complete. I added some ‘wait for 5 seconds’ before my log.info statements and I now see that the levels are all being set as expected.

Again, Thanks for your help.


#181

It seems to be still doing the Jane and Jane have left the building.