1) Give a description of the problem
HSL values are incorrect when saving and restoring from a variable.
When any water detection sensor detects water, the piston should:
- Capture current hsl values, then wait for a second
- Change the bulb to a pre-set color (using hsl values), then wait for a second
- Restore the bulb to its previous state via hsl values
Example: I set the bulb to a red color. Here are the values from the different places:
IDE: hue: 100 / sat: 100 / level: 25
Saving current hsl to variables in webcore: hue: 360 / sat: 100 / level: 25
Restoring from variables in webcore: hue: 219 s/ at: 61 / level: 100
2) What is the expected behaviour?
Correct hsl values are stored, then the bulb is restored to those values
3) What is happening/not happening?
Incorrect values are stored, then another set of incorrect values are restored.
**4) Post a Green Snapshot of the piston!
5) Attach logs after turning logging level to Full
9/12/2020, 2:54:41 PM +199ms
+0ms ╔Received event [Home].time = 1599947682530 with a delay of -1332ms
+2079ms ║RunTime Analysis CS > 1932ms > PS > 103ms > PE > 44ms > CE
+2082ms ║Runtime (47375 bytes) successfully initialized in 103ms (v0.3.110.20191009) (2081ms)
+2084ms ║╔Execution stage started
+2140ms ║║Executed physical command [Light - Couch End Table].setColor([[hue:100, saturation:100, level:25]]) (6ms)
+2141ms ║║Executed virtual command [Light - Couch End Table].setHSLColor (9ms)
+2154ms ║║Calculating (string) Restored to - Hue: + (string) 219 >> (string) Restored to - Hue: 219
+2157ms ║║Calculating (string) Restored to - Hue: 219 + (string) / Sat: >> (string) Restored to - Hue: 219 / Sat:
+2165ms ║║Calculating (string) Restored to - Hue: 219 / Sat: + (string) 61 >> (string) Restored to - Hue: 219 / Sat: 61
+2167ms ║║Calculating (string) Restored to - Hue: 219 / Sat: 61 + (string) / Level: >> (string) Restored to - Hue: 219 / Sat: 61 / Level:
+2174ms ║║Calculating (string) Restored to - Hue: 219 / Sat: 61 / Level: + (string) 100 >> (string) Restored to - Hue: 219 / Sat: 61 / Level: 100
+2178ms ║║Restored to - Hue: 219 / Sat: 61 / Level: 100
+2179ms ║║Executed virtual command [Light - Couch End Table].log (2ms)
+2181ms ║╚Execution stage complete. (98ms)
+2182ms ╚Event processed successfully (2182ms)
9/12/2020, 2:54:31 PM +89ms
+1ms ╔Received event [Home].time = 1599947672810 with a delay of -1721ms
+1357ms ║RunTime Analysis CS > 1234ms > PS > 87ms > PE > 36ms > CE
+1360ms ║Runtime (47373 bytes) successfully initialized in 87ms (v0.3.110.20191009) (1358ms)
+1361ms ║╔Execution stage started
+1378ms ║║Cancelling statement #3's schedules...
+1435ms ║║Executed physical command [Light - Couch End Table].setColor([[hue:61, saturation:61, level:100]]) (43ms)
+1436ms ║║Executed virtual command [Light - Couch End Table].setHSLColor (45ms)
+1439ms ║║Executed virtual command [Light - Couch End Table].wait (0ms)
+1441ms ║║Requesting a wake up for Sat, Sep 12 2020 @ 2:54:42 PM MST (in 10.0s)
+1444ms ║╚Execution stage complete. (84ms)
+1445ms ║Setting up scheduled job for Sat, Sep 12 2020 @ 2:54:42 PM MST (in 9.996s)
+1452ms ╚Event processed successfully (1452ms)
9/12/2020, 2:54:22 PM +468ms
+0ms ╔Received event [Home].test = 1599947662467 with a delay of 0ms
+111ms ║RunTime Analysis CS > 22ms > PS > 57ms > PE > 33ms > CE
+114ms ║Runtime (47366 bytes) successfully initialized in 57ms (v0.3.110.20191009) (113ms)
+115ms ║╔Execution stage started
+160ms ║║Condition #2 evaluated false (40ms)
+234ms ║║Comparison (enum) dry is (string) dry = true (2ms)
+236ms ║║Condition #21 evaluated true (75ms)
+238ms ║║Condition group #1 evaluated true (state did not change) (119ms)
+241ms ║║Cancelling statement #22's schedules...
+257ms ║║Executed virtual command setVariable (3ms)
+273ms ║║Executed virtual command setVariable (3ms)
+308ms ║║Executed virtual command setVariable (3ms)
+319ms ║║Calculating (string) Captured -- Hue: + (string) 360 >> (string) Captured -- Hue: 360
+322ms ║║Calculating (string) Captured -- Hue: 360 + (string) / Sat: >> (string) Captured -- Hue: 360 / Sat:
+326ms ║║Calculating (string) Captured -- Hue: 360 / Sat: + (string) 100 >> (string) Captured -- Hue: 360 / Sat: 100
+329ms ║║Calculating (string) Captured -- Hue: 360 / Sat: 100 + (string) / Lvl: >> (string) Captured -- Hue: 360 / Sat: 100 / Lvl:
+332ms ║║Calculating (string) Captured -- Hue: 360 / Sat: 100 / Lvl: + (string) 25 >> (string) Captured -- Hue: 360 / Sat: 100 / Lvl: 25
+336ms ║║Captured -- Hue: 360 / Sat: 100 / Lvl: 25
+337ms ║║Executed virtual command log (2ms)
+340ms ║║Executed virtual command wait (1ms)
+342ms ║║Requesting a wake up for Sat, Sep 12 2020 @ 2:54:32 PM MST (in 10.0s)
+360ms ║╚Execution stage complete. (245ms)
+368ms ║Setting up scheduled job for Sat, Sep 12 2020 @ 2:54:32 PM MST (in 9.975s)
+380ms ╚Event processed successfully (380ms)