Skip to content

Add Kaifa MA309M dump from pos-ei-don#10

Merged
Tomer27cz merged 2 commits into
mainfrom
kaifa_ma309m_dump
Jun 5, 2026
Merged

Add Kaifa MA309M dump from pos-ei-don#10
Tomer27cz merged 2 commits into
mainfrom
kaifa_ma309m_dump

Conversation

@Tomer27cz

Copy link
Copy Markdown
Collaborator

Adds MBUS dump of Kaifa MA309M by @pos-ei-don from this comment

Copilot AI review requested due to automatic review settings June 5, 2026 11:58
@Tomer27cz Tomer27cz requested review from PolarGoose and removed request for Copilot June 5, 2026 11:58
forgot to change back from testing
Copilot AI review requested due to automatic review settings June 5, 2026 12:01
@PolarGoose

Copy link
Copy Markdown
Collaborator

Great job. I like this change :)
If it passes tests then merge it, you should have rights to do so.

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.

Pull request overview

This PR adds a new Kaifa MA309M M-Bus meter dump fixture (from @pos-ei-don’s ESPHome thread) and registers it in the integration test suite, extending real-world coverage for encrypted General-GLO-Ciphering (0xDB) M-Bus framed payloads.

Changes:

  • Add a new expected-fixture header containing the raw frame, decryption key, and expected parsed values for Kaifa MA309M.
  • Register a new SUBCASE in the M-Bus integration tests to exercise the parser against this dump.
  • Add the corresponding raw dump, key, and decoded XML reference files under tests/dumps/.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_meter_dumps.cpp Adds a new M-Bus integration subcase for Kaifa MA309M and sets the decryption key before parsing.
tests/expected/mbus_kaifa_ma309m.h Introduces the Kaifa MA309M raw frame, key, and expected OBIS outputs for the test.
tests/dumps/mbus_kaifa_ma309m.log Adds the raw hex dump used to generate the fixture.
tests/dumps/mbus_kaifa_ma309m.key Adds the (throwaway) AES-GCM decryption key associated with the dump.
tests/dumps/mbus_kaifa_ma309m_decoded.xml Adds a decoded reference view of the payload to aid validation/debugging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/expected/mbus_kaifa_ma309m.h
Comment thread tests/expected/mbus_kaifa_ma309m.h
Comment thread tests/expected/mbus_kaifa_ma309m.h
Comment thread tests/test_meter_dumps.cpp
@Tomer27cz Tomer27cz merged commit b1fd6d9 into main Jun 5, 2026
8 checks passed
@Tomer27cz Tomer27cz deleted the kaifa_ma309m_dump branch June 5, 2026 12:08
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.

3 participants