1) Give a description of the problem
Trying to get piston to fire based on a presence sensor arriving at certain time
2) What is the expected behavior?
I’d like a the foyer light to come on for a short time on the nights I work (my nights vary so it can’t be a specific set of nights)
3) What is happening/not happening?
Tested with virtual presence sensor and light does not come on.
**4) Post a Green Snapshot of the
5) Attach any logs (From ST IDE and by turning logging level to Full)
Toggle navigation
Back
Work
Script
///* Work *////* Author : Ryan // Created : 1/31/2019, 9:20:02 PM // Modified : 1/31/2019, 11:00:29 PM // Build : 4 // UI version : v0.3.109.20181207 *//**************************************************************/ execute
if
Test Presence’s presencechanges to present
and
(
{$time} is ‘After 22:00:00 PM’
and
{$time} is’Before 11:59:00 PM’
)
then
withFoyer Lightdo
Turn on;
Set level to 1%;
end with;
withFoyer Lightdo
Wait 1 hours;
Turn off;
end with;
end if;
end execute;
Logs
1/31/2019, 11:11:30 PM +476ms
+2ms ╔Received event [Test Presence].presence = present with a delay of 130ms
+90ms ║RunTime Analysis CS > 22ms > PS > 55ms > PE > 13ms > CE
+93ms ║Runtime (37949 bytes) successfully initialized in 55ms (v0.3.109.20181207) (90ms)
+94ms ║╔Execution stage started
+105ms ║║Comparison (enum) present changes_to (string) present = true (1ms)
+107ms ║║Cancelling condition #2’s schedules…
+109ms ║║Condition #2 evaluated true (7ms)
+116ms ║║Comparison (string) 11:11 P.M. is (string) After 22:00:00 PM = false (2ms)
+119ms ║║Condition #4 evaluated false (7ms)
+120ms ║║Condition group #3 evaluated false (state did not change) (10ms)
+121ms ║║Condition group #1 evaluated false (state did not change) (21ms)
+124ms ║╚Execution stage complete. (30ms)
+126ms ╚Event processed successfully (125ms)
1/31/2019, 11:11:26 PM +923ms
+2ms ╔Received event [Test Presence].presence = not present with a delay of 55ms
+77ms ║RunTime Analysis CS > 18ms > PS > 46ms > PE > 13ms > CE
+80ms ║Runtime (37947 bytes) successfully initialized in 46ms (v0.3.109.20181207) (77ms)
+81ms ║╔Execution stage started
+92ms ║║Comparison (enum) not present changes_to (string) present = false (1ms)
+94ms ║║Cancelling condition #2’s schedules…
+95ms ║║Condition #2 evaluated false (7ms)
+96ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+99ms ║╚Execution stage complete. (18ms)
+101ms ╚Event processed successfully (100ms)
Clear
Full Nothing selected None Minimal Medium Full
Logging level
Variables
Local variables
(no variables defined)
Global variables
(no variables defined)
System variables
dynamic$argsnull
integer$day31
integer$dayOfWeek4
string$dayOfWeekNameThursday
device$deviceLocation
device$devicesLocation
integer$hour11
integer$hour2423
string$httpContentType
integer$httpStatusCode
boolean$httpStatusOk
integer$iftttStatusCode
boolean$iftttStatusOk
dynamic$incidentsnull
decimal$index
dynamic$jsonnull
datetime$localNow1548976349632
device$locationLocation
string$locationModeDisarm
integer$mediaSize0
string$meridianPM
string$meridianWithDotsP.M.
datetime$midnight1/31/2019, 12:00:00 AM
integer$minute12
integer$month1
string$monthNameJanuary
string$nameWork
datetime$nextMidnight2/1/2019, 12:00:00 AM
datetime$nextNoon2/1/2019, 12:00:00 PM
datetime$nextScheduledTimeInvalid Date
datetime$nextSunrise2/1/2019, 7:48:00 AM
datetime$nextSunset2/1/2019, 5:49:00 PM
dynamic$nflnull
datetime$noon1/31/2019, 12:00:00 PM
datetime$now1/31/2019, 11:12:29 PM
dynamic$placesnull
decimal$random0.9675935696335316
string$randomColor#DC143C
string$randomColorNameSandy Brown
integer$randomHue51
integer$randomLevel11
integer$randomSaturation93
dynamic$responsenull
integer$second29
boolean$shmTrippedfalse
string$state(not set)
datetime$sunrise1/31/2019, 7:48:00 AM
datetime$sunset1/31/2019, 5:49:00 PM
string$time11:12 P.M.
string$time2423:12
datetime$utc1548994349684
string$versionv0.3.109.20181207
dynamic$weathernull
integer$year2019
Evaluation Console
ValueExpression*REMOVE BELOW AFTER READING**
If a solution is found for your question then please mark the post as the solution.