Thanks @ipaterson, the good news is i haven’t broken webCoRE, the bad news is this piston isn’t working. All i’m trying to do is randomly turn on a light between Sunset+30 and midnight, for a random amount of time, say 2-5 minutes.
Can you have a look at my piston please and see what i’m doing wrong? Robin suggested to calculate the minutes of Sunset+30 to midnight which sounds good but something in my setup clearly isn’t working.
(($sunset/60000)+30)-($midnight/60000)
any reason why this isn’t working? or can you suggest a better way please.
Here is a copy of the piston with the logs.
Logs
04/01/2018, 06:00:19 +331ms
+8ms ╔Starting piston… (v0.2.101.20171227)
+588ms ║╔Subscribing to devices…
+885ms ║║Subscribing to Z Garden Orange…
+886ms ║╚Finished subscribing (310ms)
+1044ms ║Comparison (time) 25220359 is_before (time) 1515020400000 = false (9ms)
+1106ms ║Setting up scheduled job for Thu, Jan 4 2018 @ 5:25:00 PM CET (in 37479.568s)
+1121ms ╚Piston successfully started (1116ms)
03/01/2018, 16:23:59 +118ms
+1ms ╔Received event [Home].time = 1514996640000 with a delay of -882ms
+160ms ║RunTime Analysis CS > 34ms > PS > 93ms > PE > 33ms > CE
+163ms ║Runtime (39496 bytes) successfully initialized in 93ms (v0.2.101.20171227) (161ms)
+164ms ║╔Execution stage started
+210ms ║║Comparison (time) 62639316 is_before (time) 1514934000000 = false (9ms)
+212ms ║║Condition #9 evaluated false (13ms)
+213ms ║║Condition group #2 evaluated false (state did not change) (15ms)
+216ms ║╚Execution stage complete. (52ms)
+218ms ║Setting up scheduled job for Thu, Jan 4 2018 @ 5:24:00 PM CET (in 86400.665s)
+226ms ╚Event processed successfully (226ms)