1) Give a description of the problem
I am trying to create a piston that will control a wall outlet based on the outdoor local temperature provided by the weather channel ($twcweather.) For now, it is simpler to just receive an email notification, while I design the piston. With settings “disable automatic piston state” (though I also tried with automatic state enabled), I created 2 variables: one (Eval_Temp) to retain the value from the previous time the piston ran and also to be updated every time the piston runs; and a second variable (Previous_Temp) whose default value in the “define” block is equal to that of the first variable (Eval_Temp). Then, before adding the IF block, I set the variable Eval_Temp to the current temperature by having it evaluate $twcweather.conditions.temperature and then in the If block I compare the values of both variables.
2) What is the expected behaviour?
I want the piston to turn the outlet OFF if the temperature drops below -30C and ON when the temp goes up over -30C and I want it to be updated hourly. For the purpose of testing the piston now, I just want the piston to send me an email with a particular TEXT every hour if the temperature changes or with a different TEXT if the temperature does not change (in the future, I want it to do nothing if the temperature remains unchanged or does not go up).
3) What is happening/not happening?
Not sure, either the current value is not updating or I have a bad code. I am new to this though.
**4) Post a Green Snapshot of the piston
5) Attach logs after turning logging level to Full
9/14/2019, 3:41:49 PM +501ms
+0ms ╔Received event [MyHome].test = 1568490109498 with a delay of 2ms
+79ms ║RunTime Analysis CS > 23ms > PS > 39ms > PE > 17ms > CE
+82ms ║Runtime (41021 bytes) successfully initialized in 39ms (v0.3.10f.20190822) (79ms)
+83ms ║╔Execution stage started
+113ms ║╚Execution stage complete. (30ms)
+117ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1090.383s)
+129ms ╚Event processed successfully (130ms)
9/14/2019, 3:41:47 PM +534ms
+0ms ╔Received event [MyHome].test = 1568490107533 with a delay of 0ms
+149ms ║RunTime Analysis CS > 14ms > PS > 122ms > PE > 13ms > CE
+151ms ║Runtime (41024 bytes) successfully initialized in 122ms (v0.3.10f.20190822) (150ms)
+152ms ║╔Execution stage started
+158ms ║╚Execution stage complete. (6ms)
+160ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1092.307s)
+171ms ╚Event processed successfully (172ms)
9/14/2019, 3:41:44 PM +328ms
+1ms ╔Received event [MyHome].test = 1568490104328 with a delay of 0ms
+78ms ║RunTime Analysis CS > 22ms > PS > 41ms > PE > 15ms > CE
+81ms ║Runtime (41021 bytes) successfully initialized in 41ms (v0.3.10f.20190822) (78ms)
+82ms ║╔Execution stage started
+89ms ║╚Execution stage complete. (6ms)
+90ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1095.583s)
+101ms ╚Event processed successfully (101ms)
9/14/2019, 3:41:42 PM +160ms
+1ms ╔Received event [MyHome].test = 1568490102158 with a delay of 2ms
+81ms ║RunTime Analysis CS > 22ms > PS > 44ms > PE > 14ms > CE
+83ms ║Runtime (41021 bytes) successfully initialized in 44ms (v0.3.10f.20190822) (80ms)
+85ms ║╔Execution stage started
+117ms ║╚Execution stage complete. (32ms)
+120ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1097.721s)
+132ms ╚Event processed successfully (131ms)
9/14/2019, 3:41:40 PM +566ms
+1ms ╔Received event [MyHome].test = 1568490100564 with a delay of 2ms
+82ms ║RunTime Analysis CS > 24ms > PS > 41ms > PE > 17ms > CE
+85ms ║Runtime (41021 bytes) successfully initialized in 41ms (v0.3.10f.20190822) (82ms)
+91ms ║╔Execution stage started
+120ms ║╚Execution stage complete. (30ms)
+124ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1099.311s)
+135ms ╚Event processed successfully (135ms)
9/14/2019, 3:41:39 PM +36ms
+1ms ╔Received event [MyHome].test = 1568490099036 with a delay of 0ms
+65ms ║RunTime Analysis CS > 15ms > PS > 36ms > PE > 13ms > CE
+67ms ║Runtime (41021 bytes) successfully initialized in 36ms (v0.3.10f.20190822) (65ms)
+69ms ║╔Execution stage started
+76ms ║╚Execution stage complete. (6ms)
+77ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1100.888s)
+88ms ╚Event processed successfully (88ms)
9/14/2019, 3:41:36 PM +60ms
+1ms ╔Received event [MyHome].test = 1568490096058 with a delay of 2ms
+86ms ║RunTime Analysis CS > 23ms > PS > 42ms > PE > 21ms > CE
+90ms ║Runtime (41021 bytes) successfully initialized in 42ms (v0.3.10f.20190822) (87ms)
+91ms ║╔Execution stage started
+128ms ║╚Execution stage complete. (37ms)
+132ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1103.809s)
+143ms ╚Event processed successfully (143ms)
9/14/2019, 3:41:31 PM +763ms
+1ms ╔Starting piston… (v0.3.10f.20190822)
+173ms ║╔Subscribing to devices…
+253ms ║╚Finished subscribing (89ms)
+303ms ║Comparison (integer) 16 is_equal_to (integer) 16 = true (2ms)
+322ms ║Setting up scheduled job for Sat, Sep 14 2019 @ 4:00:00 PM EDT (in 1107.916s)
+334ms ╚Piston successfully started (334ms)