Restoring RGBW from saved state gives erratic results


#1

1) Give a description of the problem
It’s an Alert piston, that set’s several RGBW lights to ‘Red’ if any external doors are open or unlocked. The state of the RGBW lights is saved on the first fault, and hopefully restored once all faults are cleared. The restoration is usually incorrect.

2) What is the expected behavior?
The saved state should be consistently restored to all 3 RGBW bulbs,.

3) What is happening/not happening?
The results are erratic. Most times, at least one of the RGBW is not set to the saved state. It’s not always the same RGBW bulb that is mis-set. Most times, at least one bulb is set to a seemingly random color. Sometimes the on/off state is incorrectly set on RBGW bulb.

**4) Post a Green Snapshot of the piston

**5) Attach any logs (From [ST IDE]
Logs appear correct - I see the relevant saveStateGlobally and loadStateGlobally commands at the proper time. But while loadState does report the values it’s setting, saveState does not record what got saved. So I can’t tell if the problem is in the save or the load.


#2

Try capturing the hsl values only and restoring the same. Oh and switch off course.


#3

I’ve made the change and so far it appears to have worked. I want to give it a few more cycles before saying that solved it.

You had to have seen this before to solve it that fast. I’d been banging my head on this for at least 3 months.


#4

Yes, we’ve seen it it before where color and hsl values are stored and restored ending up with mixed results. For a specific color, it has its corresponding HSL values so I’d recommend using one or the other.