Skip to content

Use RESCHEDULE source route discovery mode#716

Draft
TheJulianJES wants to merge 1 commit intozigpy:devfrom
TheJulianJES:tjj/source_routing_use_reschedule
Draft

Use RESCHEDULE source route discovery mode#716
TheJulianJES wants to merge 1 commit intozigpy:devfrom
TheJulianJES:tjj/source_routing_use_reschedule

Conversation

@TheJulianJES
Copy link
Copy Markdown
Contributor

DRAFT/TODO: Check if we want this at startup.

AI summary

SourceRouteDiscoveryMode.ON only schedules the periodic MTORR; it does not trigger an immediate broadcast. Devices joining or rejoining during the first interval after startup therefore have no source-route table entry on the NCP and fall back to AODV/route discovery — the opposite of what enabling the concentrator is meant to achieve. With MTOR_MAX_INTERVAL currently at 3600s, that gap can be up to an hour.

Per the SDK enum docs (sl_zigbee_types.h /
ember-types.h):

  • SL_ZIGBEE_SOURCE_ROUTE_DISCOVERY_OFF no source route discovery is scheduled
  • SL_ZIGBEE_SOURCE_ROUTE_DISCOVERY_ON source routes discovery is scheduled, and it is triggered periodically
  • SL_ZIGBEE_SOURCE_ROUTE_DISCOVERY_RESCHEDULE source routes discoveries are re-scheduled to be sent once immediately and then triggered periodically

zigbee-herdsman's ember adapter uses RESCHEDULE for this reason. Switch bellows to match.

…ting

`SourceRouteDiscoveryMode.ON` only schedules the *periodic* MTORR; it
does not trigger an immediate broadcast. Devices joining or rejoining
during the first interval after startup therefore have no source-route
table entry on the NCP and fall back to AODV/route discovery — the
opposite of what enabling the concentrator is meant to achieve. With
`MTOR_MAX_INTERVAL` currently at 3600s, that gap can be up to an hour.

Per the SDK enum docs (`sl_zigbee_types.h` /
`ember-types.h`):

  ON          source routes discovery is scheduled, and it is
              triggered periodically
  RESCHEDULE  source routes discoveries are re-scheduled to be sent
              once immediately and then triggered periodically

zigbee-herdsman's ember adapter uses `RESCHEDULE` for this reason.
Switch bellows to match.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (4b97a6d) to head (9c778fa).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #716   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          61       61           
  Lines        4147     4147           
=======================================
  Hits         4128     4128           
  Misses         19       19           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant