Skip to content

FCM keys/URL not updated during install when existing config exists #21

@pliablepixels

Description

@pliablepixels

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions