Skip to content

PyKMP – a Kamstrup meter toolset

Python 3.10+ Checked with mypy Code style: black Ruff 100% test coverage License: Apache 2.0 REUSE compliant

This module is developed for reading out Kamstrup meters using their vendor-specific KMP protocol.

Tested with a MULTICAL® 403, based on documentation of the protocol for the older MULTICAL® models.

Current state: alpha – based on the documentation it "should work" with a MULTICAL® 30x/40x/60x, but for other models: YMMV. Pull requests welcome!

Note

This project is not affiliated with Kamstrup A/S, Kamstrup B.V. or any other entity of the Kamstrup corporation.

Warning: battery consumption impact

Please be informed about the battery consumption impact, read the battery consumption page.

Use at your own risk.

Features ✨

Note that this is a library, intended primarily for development or integration.

  • A bundled CLI tool to interact with the meter for testing/development purposes with JSON format output (optional).
  • Read multiple registers in one go to conserve the meter's internal battery as much as possible.
  • Having it all fully type-annotated (mypy strict, zero type: ignores) should make using this library a breeze.
  • 100% test coverage (library, not the tool yet).
  • Ability to decode the base-10 variable length floating point values in registers without loss of significance.
  • CRC checksum verification (and adding).
  • Agnostic to the direction for message encoding, ie. you could go wild and emulate a meter using your IR optical head. 🤓

License

The majority of the project is Apache 2.0 licensed.

Files deemed insignificant in terms of copyright such as configuration files are licensed under the public domain "no rights reserved" CC0 license.

The repository is REUSE compliant.

Read more on contributing in Contributing.