This writing is based on my findings when trying to integrate the Kamstrup Multical21 digital watermeter into my parents (homeassistant-based) smarthome. It doesn’t cover every aspect and detail, I just wanted to collect all my personal findings in one place and make them available, so that anyone who in the future runs into the same situation at least has a good place to start from. If you feel that crucial information is missing or wrong, please let me know. Big kudos to the people who figured out the tricky stuff around protocols etc and wrote tools and scripts and documentation for their individual usecases, I’ll add links to github repos and forum entries wherever it helps.
This article doesn’t just cover the technical aspects of the concrete water meter, but also general considerations around water usage monitoring and data privacy and data protection, partially based directly on conversations I had with water providers/authorities.
I cannot promise I’ll keep this updated continuously, but I’ll do my best.
If you’re only interested in the tech infos, skip the next 2 chapters. I might reference some of the highlevel stuff though within the tech part.
General: why monitor water usage at all? (beyond the urge to have everything covered in your smarthome because you can)
Understand your own water usage.
There is plenty of information available how much water in average is used by a morning shower. Or by a dishwasher or washing machine. But in the end these values only provide a rough guidance for your own personal situation. Your devices might be older or newer, your showering habits might be different, etcetc. So in order to actually understand your own personal water usage, your own water meter is the place to go to.
Identify appliances that use a lot or too much water.
Talking about washing machines and dishwashers: water usage between older or newer devices can be massively different, same as the program(s) you are using with those appliances. Monitoring your water usage can help you identify those undetected or unexpected cases.
Detect unnoticed leakages.
Not every pipe burst in one go and floods your apartment within 15 minutes. Especially leaking pipes in ground floor rooms might stay undetected for weeks or months, still doing quite a bit of damage in the meantime.
Detect burst pipes and be notified about it.
Depending on your local situation, a burst pipe might flood your home and create considerable damage within minutes or hours. Getting a notification in realtime allows you to at least minimize the damage.
General: Data protection (why it’s a thing at all when it comes to digital watermeters, and how the scenarios look like)
As long as your watermeter is only accessible by someone actually going into your basement, and the only piece of information it provides is the overall water volume that ran through it so far, there is very little risk for a data abuse scenario. Someone who is not you would a) need to get access to your basement, and b) on a regular basis. But with digital watermeters the situation is massively different. A watermeter that transmits its current meter value and additional infos via radio multiple times per minute, or which continuously stores hourly/daily/monthly/… data in an internal storage potentially opens the door to various scenarios where the wrong people could gain all kinds of insights into your private lifes. Water meter companies and water authorities today are quite aware of these topics, and try to mitigate them. Sometimes successful, sometimes not. Some in the interest of the home owners, some not.
Scenario 1: your local water provider/authority gains detailed insights into your water usage, way beyond what they need for providing their service to you and to invoice you correctly. At least in Germany water usually is invoiced on a yearly basis, except when a house or apartment changes owners inbetween. Therefore any information beyond „this household used 10000 liters since the last meter reading“ is not needed and should not be collected. Some water meters send out their current value via radio connection continuously every 16 seconds. If your water provider actually only collects meter reading once a year by drive-by-readout, this isn’t a problem. But some water meter companies don’t just offer the meters and the tech for a yearly reading, but offer permanently installed receivers that can gather the radio messages of the water meters for a whole neighborhood continuiously. This potentially allows the creation of very granular water usage profiles of a household, or if it’s a one-person-household down to a single person. When does someone get up or go to bed, what type of employement do they have (shift vs 9to5 vs unemployment, …), when and how long did people go on vacation, does a household have a „suspiciously high“ water usage, etcetc. When you start combining or compairing the data from different households or people, you can even get insights beyond that. Two households next to eachother, where one of the partners and the kids leave in the morning to go to school and work, and then a peak in water usage the size of an average shower for both households at the same time 2 hours later might uncover a secret affair. As always with data protection topics: not all data that gets collected is automatically being abused. But data that lays around sooner or later tends to create a craving for it in people and authorities. For more on this just google „data minimization“ or „data avoidance“ or „Datensparsamkeit“.
Scenario 2: detecting/checking if a house or apartment is empty at the moment. Already for ages burglars detect low-risk househoulds for break-ins by checking for signs that the inhabitants are on vacation or just away for a longer time. Closed shutters during daytime, a full mailbox, no lights anywhere even in the evening, stuff like that. A complete lack of water usage within a household can be an additional puzzle piece of insight.
Scenario 3: the new inhabitant of a house or apartment gains insights into the water usage of the previous owners. Detailed water usage profiles are personal information and therefore already „by design“ not meant for the person inhabiting the place after you move out. But the new inhabitant digging up a supposed „burst pipe“ from 6 months ago in the info log of a water meter which was actually a broken garden hose on the lawn instead of an indoor water pipe might be tempted to challenge the history of the house he bought, and therefore the price he paid.
Scenario 4: nosy neighbours, stalkers, ex-partners. Data privacy is not just about big companies and authorities and criminals. It’s also just none of your neighbours business at which time you take a shower, or how long, or if you use in their opinion too little or too much water for watering your plants. So also while you still live in your apartment nobody outside of it should have detailed insights into your water usage. No matter if it’s just a random neighbour, or a madly-in-love employee of a water provider who „for the best reasons“ tries to gain insights into the daily rhythmn of his crush.
Okay, let’s move to the tech stuff.
Tech: Kamstrup digital water meters (models, configurations, interfaces, …)
Kamstrup has various different models, each of them in themselves then available in different configurations each, depending on what the water suppliers order from Kamstrup. So depending on which model and configuration you have installed at your home, you might have different interfaces available to pull data from the meter with, and the logs (long-term storage) might be more or less granular and far-reaching. To give an example: the multical21 model that I looked into does store daily summed-up values for the last 460 days, but the otherwise rather similar flowIQ 2200 model also stores hourly values for the last 100 days. This will become relevant again depending on which interface you will be able to connect to in your specific situation.
Collected/available data points (most relevant/interesting ones only)
Overall volume measured (in m³/liters)
Water temperature (current, min, max)
Water flow (curent, min, max, in liters per minute)
Info codes (LEAK, BURST, …)
Data log
- hourly values for the last 100 days (flowIQ 2200, not available in multical21)
- daily values for the last 460 days
- monthly values for the last 36 months
- yearly values for the last 10 years
Interfaces (and how to get data from them)
Display
All models have a digital display, by default showing the current meter value in m³ and liters. The granularity of the volume shown in the display (1l, 10l, 100l, 1m³) can be defined by the ordering water provider, but 1l seems to be the default. If the other interfaces mentioned below dont work for you, using ai on the edge allows reading the meter values. An esp cam takes a photo on a regular basis, and a dedicatedly trained AI model „reads“ the individual digits and makes the value available to HA via MQTT. Disadvantage: at least so far ai on the edge only supports numbers, so the detection of the LEAK and BURST info codes in the display only works via workarounds.
Wireless mbus radio
This interface is meant to provide the meter values to the water providers without having to rely on house owners to send in the values or having to enter every household individually. Depending on the configuration the water meter sends out a bunch of data points every 16 seconds, which can be easily picked up by an esp8266 running esp-multical21, connected to a c1101 868MHz receiver module. The module doesn’t have to be close to the water meter, in my case it easily picked up the signals from the meter in the basement while sitting on the living room table two stories above. It also includes the info codes as dedicated fields, so building a next-to-realtime notification for issues with your water installation on top of it is super easy.
The problem: the data packages are AES128 encrypted, so there is no way around asking your water provider for the code of your meter. Something that at least in Germany most water providers refuse to do, for different reasons. Some of them ordered all the meters they install in peoples houses to have the same code. Giving that code to end users would allow reading all water meters within a certain radius, with the above-mentioned hardware easily the closest 3-4 houses around you. And of course potentially more once you walk around your neighbourhood. Asking a water provider who uses a single code for all its meters to hand over that code is completely useless, they will not provide it (and rightfully so!). Some water providers who ordered their meters to have individual codes do indeed provide these codes to their endclients on request. They usually require you to sign a form and at least in the cases I found online it took very little time until people had their code. If your water provider is one of them, call yourself lucky. Being able to get updated meter values every 16 seconds with hardware worth 10€ which can be installed anywhere in your house is the most convenient option you can get. Don’t be surprised if your water provider doesn’t want to provide the code though. From what I found the codes per water meter are „hard-wired“ once the meter leaves the factory, so even your water provider cannot just switch off or change the code of a certain water meter. So in order to keep you from monitoring the water usage of the person that bought your house after you moved out, the water provider would have to switch the water meter to a different one on the day of you moving out. With these meters usually being in place for multiple years, and water providers having hundrets and thousands of water meters within their area, they shy away from these additional efforts, and the risk of getting into trouble when they don’t react fast enough and the old meter keeps running for weeks or months after the change of house owner.
Interesting side note: there is an alternative to water authorities handing out the actual codes for your meter. Kamstrup offers a dedicated wireless mbus receiver module which gets programmed with the code of your meter, either directly by Kamstrup or by the water provider. This module then translates the wireless mbus data packages into wired mbus, for which you then still need to buy an mbus master module. This does resolve the problem of handing out plaintext codes to endusers, but as the endusers still would have to buy the (rather pricey) module from their own money, also in that scenario nothing would keep them from using the module to read the water usage from the new owners after moving out.
Infrared Read/Write port
The IR port of Kamstrup water meters is usually built around the Kamstrup Meter Protocol (KMP). Same as with the wireless mbus interface it’s not meant to be used by the endusers, but by the water providers for maintenance and log extractions in case the house owners question the validity of a meter reading. The base protocol seems to be at least 20 years old (as some documents about it date back to the mid-2000s), and the interesting part is: neither the commands nor the responses are encrypted. It’s still a complicated protocol built around combinations of HEX values and (by now often undocumented) register addresses, and Kamstrup over the years more and more refrained from providing any (new) documentation. But if your water provider didnt switch the whole IR interface off before installing your meter, you at least don’t need any key or decryption code. The IR port does have one big disadvantage though, especially compared to the wireless mbus approach: as IR was only meant for occasional usage by the water provider staff, using it once every minute or hour continuously for data gathering would drain the built-in battery way too fast. Kamstrup therefore put 2 measures in place to avoid that: to activate the IR port a magnet needs to be placed on the rim of the water meter, with the right polarity and position. This magnet is usually part of the IR head. Just leaving the magnet and IR head on is also not an option, as the IR interface deactivates itself after a few minutes. In order to get it back up, the magnet needs to be removed and put back again. Furthermore the water meter has a maximum number of IR connections per day, after which the IR port gets deactivated until the next day. For smarthome purposes this interface therefore only can be used once per day, to be on the safe side. And you need a way to place a magnet at the right place in an automated way before reading the values. A small servo can achieve this, but it of course then also needs the matching code to control it, timed with the reading of the meter via IR afterwards. The flowIQ2200 meter has hourly values for the last 100 days, there you can at least get a bit more granularity, but the multical21 only has daily values. As reading data from the long-term data log is trickier than just reading the current meter value, just reading the current meter value from the multical21 once every night at the same time would be my proposed way to go. Reading from the long-term log does not provide additional value for that value.
Hardware: any regular IR read/write head should be fine (e.g. available at USB IR(Infrarot) Lese-/Schreibkopf für Stromzähler / Smart Meter – Bayha Electronics), depending on what you want to connect it to you can either get one with a serial2usb chip (easier für raspberry or NUC usage) or one with the bare R/T pins exposed.
To get a starting point for the software side you can either try pykamstrup (there is an open pull request available that extends it for the multical21 and includes the registers for the most important values) and built on it, or you can try if the custom commands of the esphome KMP component are enough to read the multical21 registers: Kamstrup Meter Protocol [KMP] — ESPHome
IR pulse (1 pulse per 10l)
Contrary to other smartmeters (especially most power smartmeters), the multical21 doesn’t by default have a IR diode that „blinks“ once for every 1 or 10 liters of water. Kamstrup did however offer an (again rather pricey) accessory that can get fixed to the top of the meter and provides a closed-contact pulse via 2 wires for every 10 liters of water. As the meter by default doesn’t send out a signal that can be picked up on, the device as part of the setup process requires you to push a button under the top cover which then triggers a one-time-communication with the water meter to activate the „PULSE ON“ mode. I’m still in conversations with my water provider if they can also manually activate that mode. The official device/adapter costs ~150 Euros, which I find a bit excessive when an IR sensor that picks up on a blinking IR diode costs 3-4 Euros. Paying an additional 145 Euros just to get the meter set to the pulse mode is not an option for me.
For the sake of completeness: some Kamstrup models also support other/additional interfaces (sigfox, wired mbus, …), but I didn’t look into those.
Additional discussions around the topic and other ressources: