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)