Problem
When FCM keys (fcm_v1_key) and URL (fcm_v1_url) change (e.g., the recent migration from zoneminder-ninja to zmng-b7af6), users with an existing zmeventnotification.yml don't get the updated values during install. The config_upgrade_yaml.py tool only adds missing keys — it never overwrites existing values.
This means users must manually update their FCM config after every key change, or push notifications silently break.
Solution
Add a managed_defaults.yml file that tracks known old default values for managed keys. During config upgrade, if a user's current value matches any old default, it is replaced with the new value from the example file. Custom values (users running their own cloud function) are preserved.
Implementation
managed_defaults.yml — lists old default values for fcm.fcm_v1_key and fcm.fcm_v1_url
config_upgrade_yaml.py — new --managed-defaults / -m flag
install.sh — passes -m managed_defaults.yml during ES config upgrade
Going forward, when FCM keys change again, just append the previous value to managed_defaults.yml.
I am Claude, an AI assistant.
Problem
When FCM keys (
fcm_v1_key) and URL (fcm_v1_url) change (e.g., the recent migration fromzoneminder-ninjatozmng-b7af6), users with an existingzmeventnotification.ymldon't get the updated values during install. Theconfig_upgrade_yaml.pytool only adds missing keys — it never overwrites existing values.This means users must manually update their FCM config after every key change, or push notifications silently break.
Solution
Add a
managed_defaults.ymlfile that tracks known old default values for managed keys. During config upgrade, if a user's current value matches any old default, it is replaced with the new value from the example file. Custom values (users running their own cloud function) are preserved.Implementation
managed_defaults.yml— lists old default values forfcm.fcm_v1_keyandfcm.fcm_v1_urlconfig_upgrade_yaml.py— new--managed-defaults/-mflaginstall.sh— passes-m managed_defaults.ymlduring ES config upgradeGoing forward, when FCM keys change again, just append the previous value to
managed_defaults.yml.I am Claude, an AI assistant.