Help Location mode not seeming to work


#1

1) Give a description of the problem
Piston to change modes for my video surv system. All seems to work EXCEPT when I arrive Home. I’m using location mode and time but it seems to evaluate false.

2) What is the expected behavior?
When Location mode changes to Home and time is between sunrise and sunset it should execute the URL

3) What is happening/not happening?
URL not firing

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
1

So notice in the logs that condition 38 evaluates to FALSE. I had this originally cleaner but pulled the home and away out into their own IF’s because it was not working as I thought. Ironically when I leave and location mode changes to away…it triggers. I’m sure I’m missing something simple…


#2

Do you have another piston that uses presence to set your modes? Or are you using routines?


#3

Routines


#5

I tried it with a trimmed down version of his piston and mine worked…

7/25/2018, 1:27:54 PM +129ms
+1ms	╔Received event [Home].mode = Home with a delay of 183ms
+97ms	║RunTime Analysis CS > 23ms > PS > 52ms > PE > 21ms > CE
+100ms	║Runtime (40231 bytes) successfully initialized in 52ms (v0.3.105.20180628) (98ms)
+101ms	║╔Execution stage started
+110ms	║║Comparison (string) :194b6136a884d43aee90b8a6d03886c3: changes_to (string) :a62dc96c43a17a1d96448c60a071617c: = false (1ms)
+112ms	║║Condition #22 evaluated false (4ms)
+113ms	║║Condition group #13 evaluated false (state did not change) (5ms)
+118ms	║║Comparison (string) :194b6136a884d43aee90b8a6d03886c3: changes_to (string) :194b6136a884d43aee90b8a6d03886c3: = true (1ms)
+120ms	║║Cancelling condition #38's schedules...
+121ms	║║Condition #38 evaluated true (4ms)
+136ms	║║Comparison (time) 48474251 is_between (time) 1532522040000 .. (time) 1532572260000 = true (10ms)
+137ms	║║Time restriction check passed
+139ms	║║Condition #36 evaluated true (18ms)
+140ms	║║Cancelling condition #37's schedules...
+141ms	║║Condition group #37 evaluated true (state changed) (25ms)
+143ms	║║Cancelling statement #19's schedules...
+150ms	║║Daytime and Mode changed to HOME, setting to HOME
+151ms	║║Executed virtual command log (1ms)
+154ms	║╚Execution stage complete. (53ms)
+155ms	╚Event processed successfully (155ms)


#7

It looks like it did.

image


#8

Update… so this morning Sunrise was 6:09 and piston ran and did what was expected. (at 1 minute before sunrise it sent the URL to put the cameras into Daytime mode)

AT 6:30am, the Wake up Routine is executed by webcore as part of a wakeup piston(which changes the mode to Home). And the last IF statement executed fine. However as seen above that was when someone returned home and the “I’m Back” routine ran then it didn’t execute.

EDIT: I also changed this to SHM rather than Location Mode. As suggested above that probably makes more sense to match it the the state of the Alarm.


#9

Sooo…that didn’t work. New piston…

Then this:

download1

I’m really baffled…condition 38 False

And to compare…when I run the routine “Goodbye”:

download2


#10

@eibyer I imported the piston you created and am going to see what that does. It was bit odd that when I imported it it said that I didn’t have a location mode “Away” please choose one to replace it with…then it gave me an option of “Away”. Same for Home

Oddly…the new piston works as expected. I guess it’s possible something was messed up inside my original?


#11

Possibly, especially if it gets edited/re-edited a few times. I’ve imported some pistons that I had to redo from scratch due to something corrupted within it (not sure what exactly).