docs: surface the events-ringbuf-size-0 default in the README#37
Open
snabb wants to merge 1 commit into
Open
Conversation
The events-ringbuf-size-{0..2048} features select the per-priority event
buffer size in `Events<N>`. The default of 0 silently no-ops every event
write in rs-matter's `EventWriter::write` (`dm/events.rs`):
if N == 0 { return Ok(()); }
`emit_event()` returns Ok, the subscription's `max_seen_event_number`
advances, but no bytes are ever stored and the controller never sees
event reports. The failure mode is subtle and easy to spend hours
chasing.
This affects any device that emits events, which is most of them:
Generic Switch (0x000F) is unusable without Switch cluster events, and
BasicInformation::StartUp on boot is required by Matter Core 1.5.1
§11.1.6. The Cargo.toml inline comment ("events will not be emitted")
understates the failure mode and isn't visible to anyone reading the
README.
Adds a short Event ring-buffer section with the gotcha, the fix, and
sizing guidance.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi again :)
Same gotcha I just pinged you about on
esp-idf-matter(sysgrok/esp-idf-matter#28), but documented on the side that actually owns the features.Burned a few hours debugging a Matter Generic Switch where
emit_eventreturnedOkandmax_seen_event_numberadvanced on every button press, yet the controller never received an event. Walking back throughrs-matter'sEventWriter::write:…lined up with the
events-ringbuf-size-0default. The `Cargo.toml` inline comment is accurate but invisible to anyone reading the README, and the failure mode is "everything looks fine, controller just sees nothing" — not the easiest to track down.Adds a short README section with the bit, the fix, and a sizing note. Wording is just a sketch.
An alternative (if it makes sense) would be to change the default to a non-zero size like 256 or 512, so devices that emit any event — today that's any cluster handler calling `emit_for`, plus rs-matter's own `AccessControlEntryChanged` event on ACL writes during commissioning — work out of the box, and only users explicitly disabling events would opt into 0.