Bad idea to use VIrtual Omni Sensor to store data for variables?

I had been using the setVariable attribute in the Virtual Omni Sensor to store store per-user data used in rules. But does that data persist after a hub restart? Recently the values in the omni sensor were not correct and I suspect it was due to a hub restart / upgrade.

The reason I store data in a device and not a global variable is because my workflow is to update a template rule and then update per-user rules by cloning the template... and the cloning process nicely prompts for the update of devices.

Hub restart does nothing to app / device states or attribute values.

So is the persistency of device states/attributes dependent on who/how the device code is written? Meaning I would need to test it by setting a device attribute, reboot, and then see if the attribute is the same?

1 Like

Not generally, no. Reboot is generally a no-op as to all devices and apps, certainly to their states. It would take explicit effort for a driver or app to intentionally deal with reboot. This is done in certain drivers, such as the Lutron Telnet driver that needs to reestablish a connection upon system start. But, in general, device state and attributes are not affected by reboot. Device attribute values are certainly expected to be the same after a reboot as they were before.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.