chrivers / bifrost

Hue Bridge Emulator
GNU General Public License v3.0
124 stars 6 forks source link

Chrivers/z2m parsing improvement #14

Closed chrivers closed 3 months ago

chrivers commented 3 months ago

Rework error handling and diagnostic messages

Previously, all possible zigbee2mqtt messages were represented by the enum z2m::api::Message. This included individual cases for bridge/* topics (z2m internal messages), as well as an Other category (for device update, etc).

The serde crate has a weird quirk, where a message meant for one of the bridge/-categories would land in Other if the schema didn't match.

That made it very difficult to find and present parsing problems.

Now things fail loudly, like they were supposed to from the beginning.