1) Give a description of the problem
I am trying to create a piston that will trigger every night when I’m not at home, running just once per night.
2) What is the expected behaviour?
At night, turn on my entrance if I’m not at home. This should happen only the first time in the night (aka if I turn that light off, it should not turn itself on if I leave).
3) What is happening/not happening?
By moving the verification of “Location mode” from a restriction to a triggered condition, my piston was able to subscribe to an event on Location. But that causes the piston to only turn on the light if it is night and THEN I go out (because it needs the location to trigger). I want it to work the other way around too – if I’m not at home and it gets into my target time window, also turn on the lights.
Also, I don’t understand why the logs show “subscribing” to each of my dimmers/switches. I explicitly marked on the code to never subscribe to those (line 32). On webCORE interface, it shows correctly: Subscriptions: 1 event, 9 controls
(the event being my location).
4) Post a Green Snapshot of the piston
5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)
12/8/2019, 1:14:11 PM +480ms
+1ms ╔Starting piston... (v0.3.110.20191009)
+264ms ║╔Subscribing to devices...
+279ms ║║Subscribing to Home.mode...
+378ms ║║Subscribing to Switch 1...
+380ms ║║Subscribing to Dimmer 1...
+381ms ║║Subscribing to Dimmer 2...
+382ms ║║Subscribing to Dimmer 3...
+383ms ║║Subscribing to Dimmer 4...
+384ms ║║Subscribing to Dimmer 5...
+385ms ║║Subscribing to Switch 2...
+386ms ║║Subscribing to Keypad 2...
+387ms ║║Subscribing to Outlet 1...
+388ms ║╚Finished subscribing (141ms)
+427ms ║Comparison (time) 47651890 is_between (time) 1575824400000 .. (time) 1575781200000 = true (11ms)
+428ms ║Time restriction check passed
+434ms ║Comparison (datetime) 1575828851910 is_after (datetime) 1575741846469 = true (2ms)
+435ms ║Time restriction check passed
+442ms ║Comparison (string) :xxxxxxx: changes_to (string) :xxxxxxx: = false (1ms)
+484ms ║Comparison (enum) off is (string) off = true (2ms)
+487ms ║Comparison (enum) off is (string) off = true (2ms)
+490ms ║Comparison (enum) off is (string) off = true (2ms)
+493ms ║Comparison (enum) off is (string) off = true (1ms)
+496ms ║Comparison (enum) off is (string) off = true (1ms)
+498ms ║Comparison (enum) off is (string) off = true (1ms)
+501ms ║Comparison (enum) off is (string) off = true (2ms)
+504ms ║Comparison (enum) off is (string) off = true (1ms)
+506ms ║Comparison (enum) off is (string) off = true (1ms)
+517ms ╚Piston successfully started (517ms)