Skip to content

Ignore the first Hello on embedded stack start - #12

Open
puddly wants to merge 1 commit into
devfrom
puddly/embedded-startup-race
Open

puddly wants to merge 1 commit into
devfrom
puddly/embedded-startup-race

Conversation

@puddly

@puddly puddly commented Oct 30, 2026

Copy link
Copy Markdown
Member

The first Hello() is sent unsolicited by embedded Ziggurat and isn't an immediate firmware reset.

We should maybe include a reset reason in the Hello() message.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 16:08
@puddly puddly changed the title Ignore the first Hello on embedded stack stack Ignore the first Hello on embedded stack start Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fa1edc5) to head (7ca5e41).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines         1213      1217    +4     
=========================================
+ Hits          1213      1217    +4     

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A WebSocket Hello received while the initial Reset request is pending can be mistaken for startup traffic, silently ignoring a real reset and leaving the request unresolved.

1 open issue
What changed in this PR

This PR distinguishes embedded Ziggurat’s initial startup Hello from later firmware-reset notifications, preventing a false disconnect during stack startup.

Changes:

  • Track whether the API has received a frame and ignore a session-opening Hello.
  • Add startup coverage and update the reset-notification test to establish prior traffic.
File Description
zigpy_ziggurat/​zigbee/​api.py Track received frames to distinguish startup announcements from resets.
tests/​test_api.py Test startup Hello handling and subsequent reset detection.

Review effort: Balanced

Comment on lines +270 to +271
if not self._received_frame:
return
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.

2 participants