GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — All nodes are deleted on power restart · Issue #5 · andryblack/esp-coordinator

This repository was archived by the owner on Apr 2, 2026. It is now read-only.
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

All nodes are deleted on power restart #5

Copy link
Copy link
Closed
#14
Closed
All nodes are deleted on power restart#5
#14
Copy link

Description

@mahdi1-kh
mahdi1-kh
opened on Feb 3, 2025
Issue body actions

Thank you for this project.

I am currently testing it on an ESP32-H2 and have encountered a fundamental issue. When I disconnect and reconnect the power to the ESP32-H2, all connected devices are deleted/disconnected (similar to the force remove feature in z2m).

Could you please provide guidance on how to resolve this issue?

Thank you.

Reacted by Morteza24 and Eventi

Activity

  1. mahdi1-kh
    added a commit that references this issue on Feb 4, 2025

    fixes andryblack#5

    This issue will close once commit da8c9b6 is merged into the 'master' branch.
    da8c9b6
  2. mahdi1-kh
    closed this as completedon Feb 4, 2025
  3. burjakremen
    added a commit that references this issue on Apr 8, 2025

    Update zb_ncp.cpp

    04a8704
  4. diepeterpan commented on Aug 17, 2025

    @diepeterpan
    diepeterpan
    on Aug 17, 2025
    More actions

    I created some binaries with the pull requests, other fixes and readme update - https://github.com/diepeterpan/esp-coordinator/releases/tag/V0.0.5.4

  5. diepeterpan
    added 4 commits that reference this issue on Aug 21, 2025

    Stable build with a custom sdkconfig and required code changes

    This issue will close once commit 4302525 is merged into the 'master' branch.
    4302525

    Stable config with custom sdkconfig

    This issue will close once commit fe674cf is merged into the 'master' branch.
    fe674cf

    Stable config with custom sdkconfig

    This issue will close once commit ca1f591 is merged into the 'master' branch.
    ca1f591

    Stable config with custom sdkconfig

    This issue will close once commit 7ddf3b3 is merged into the 'master' branch.
    7ddf3b3
  6. andryblack
    added a commit that references this issue on Oct 12, 2025

    Merge pull request #6 from mahdi1-kh/master

    This issue will close once commit b313522 is merged into the 'master' branch.
    b313522
  7. sucubus666 commented on Mar 31, 2026

    @sucubus666
    sucubus666
    on Mar 31, 2026
    More actions

    ESP32-C6 (zboss coordinator) loses all paired devices after physical disconnect/power loss - workaround found
    Problem:
    When using an ESP32-C6 as a Zigbee coordinator with the esp-coordinator firmware (zboss adapter), all paired devices are lost from the Z2M database every time the coordinator is physically disconnected or loses power. This happens because the ESP32-C6 does not persist the Zigbee network state in its NVS flash across power cycles. On reconnect, zboss forms a new network, startup() in driver.js returns "reset", and zigbee-herdsman's controller.js calls this.database.clear(), wiping all paired devices.
    Affected setup:

    Coordinator: ESP32-C6 with andryblack/esp-coordinator firmware (zboss)
    Z2M version: 2.9.1 (zigbee-herdsman 9.0.9)
    Also requires removing the .reverse() on extendedPanID in driver.js (line with TODO: bug in extendedPanID)

    Workaround:
    In node_modules/zigbee-herdsman/dist/adapter/zboss/driver.js, inside the startup() function, change:

    result = "reset";
    to
    result = "resumed";

    This prevents Z2M from clearing the database when the coordinator reforms the network. Devices will need to re-join the network after a coordinator power cycle, but they will not be removed from the database and will reconnect automatically once in range.
    Note: This is a temporary workaround until the zboss firmware properly persists network state in NVS across power cycles.

  8. tostmann
    added 2 commits that reference this issue on Apr 1, 2026

    fixes #5

    This issue will close once commit 16cb1cb is merged into the 'master' branch.
    16cb1cb

    Merge pull request #6 from mahdi1-kh/master

    This issue will close once commit f176e43 is merged into the 'master' branch.
    f176e43
  9. sucubus666 commented on Apr 2, 2026

    @sucubus666
    sucubus666
    on Apr 2, 2026
    More actions

    Thank you for confirming the root cause.

    Based on your explanation, the fix should be implemented in esp-coordinator firmware:
    ZBOSS must complete NVRAM loading before the NCP starts answering host requests.

    Until this is fixed, every physical disconnect or power loss of the ESP32-C6 causes:

    1. ZBOSS forms a new network on restart (NVRAM not loaded in time)
    2. zigbee-herdsman detects "reset" state
    3. database.clear() is called, wiping ALL paired devices

    Current workaround (applied on zigbee-herdsman side):

    • Patch driver.js startup() to return "resumed" instead of "reset"
    • This prevents database wipe, but devices still need to re-join after power cycle

    Requested fix in esp-coordinator firmware:

    • Ensure ZBOSS NVRAM datasets are fully loaded before NCP responds to host
    • This would preserve network state across power cycles without requiring re-pairing
    • Tested hardware: ESP32-C6 Super Mini with esp-coordinator v0.0.1

    This is a critical issue for any production deployment — a simple power outage
    destroys the entire Zigbee network configuration. Any timeline for a fix?

  10. tostmann commented on Apr 2, 2026

    @tostmann
    tostmann
    on Apr 2, 2026
    More actions

    I did some of those in my fork: https://github.com/tostmann/esp-coordinator
    check it out ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.