The alarm panel defaults to a hard-coded 0 state ("Home" mode), which immediately would result in an alarm after restarting Node-RED in case a "Home"-sensor triggers at this time.
I would like to avoid enabling the default use of persistent storage for global context variables just because a single node depends on it, so I extended the alarm panel node. With this adjustment the storage to use becomes selectable.
The alarm panel defaults to a hard-coded
0
state ("Home" mode), which immediately would result in an alarm after restarting Node-RED in case a "Home"-sensor triggers at this time.A workaround for this is documented in https://github.com/Anamico/node-red-contrib-alarm/issues/19#issuecomment-774623392 which consists of defaulting to file-based context storage in the whole Node-RED environment.
I would like to avoid enabling the default use of persistent storage for global context variables just because a single node depends on it, so I extended the alarm panel node. With this adjustment the storage to use becomes selectable.
The new menu item uses the default Node-RED storage , but could be extended by using multiple context stores as documented here: https://nodered.org/docs/user-guide/context#using-multiple-context-stores
Demo:
settings.js
Admin GUI AnamicoAlarmPanel: