A Library for Parsing Dutch Smart Meter Requirements (DSMR)

https://news.ycombinator.com/rss Hits: 3
Summary

DSMR A library for parsing Dutch Smart Meter Requirements (DSMR) telegram data. DSMR is the standardized protocol used by smart energy meters in the Netherlands, Belgium, and Luxembourg. These smart meters are installed in homes and businesses to measure electricity and gas consumption in real-time. Smart meters continuously broadcast "telegrams" - structured data packets containing: Current and cumulative electricity usage (delivered and returned to grid) Gas consumption readings Voltage and current measurements per phase Power failure logs and quality statistics Additional M-Bus connected devices (water, thermal, etc.) This library parses these telegrams into Elixir structs, making it easy to build energy monitoring applications, home automation systems, or analytics dashboards. Installation Add dsmr to your list of dependencies in mix.exs : def deps do [ { :dsmr , "~> 1.0" } , { :decimal , "~> 2.0" } # Optional: Required only if you want to use floats: :decimals option for arbitrary precision ] end By default, measurement values are returned as native floats. To use high-precision %Decimal{} structs instead, add the Decimal dependency and pass the floats: :decimals option to DSMR.parse/2 . Supported DSMR Versions This library supports DSMR 4.x and 5.x protocols: DSMR 4.x (version "42", "40") - Older Dutch meters (version "42", "40") - Older Dutch meters DSMR 5.x (version "50") - Current standard in Netherlands, Belgium, Luxembourg The parser automatically handles version differences. The version field in the telegram indicates which protocol version the meter uses. Usage telegram = # String is formatted in separate lines for readability. Enum . join ( [ "/KFM5KAIFA-METER \r " , " \r " , "1-3:0.2.8(42) \r " , "0-0:1.0.0(161113205757W) \r " , "0-0:96.1.1(3960221976967177082151037881335713) \r " , "1-0:1.8.1(001581.123*kWh) \r " , "1-0:1.8.2(001435.706*kWh) \r " , "1-0:2.8.1(000000.000*kWh) \r " , "1-0:2.8.2(000000.000*kWh) \r " , "0-0:96.14.0(0002) \r " , "1-0:1.7....

First seen: 2025-10-10 18:32

Last seen: 2025-10-10 20:33