I no longer own this device.
I'm happy to accepts PR's, but I won't be able to develop and test changes myself. If you want to take over the development, let me know.
Intro
This is a custom component for Home Assistant to get the readings from a Kamstrup Multical 66C meter.
According to the docs (attached) this might also work on the 66D and 66E versions. I was not able to test this, in case you've got one of these meters and want to give it a try, I would like to hear back from you. For more technical details about the communication with the meter, you might want to check out pages 33-36. I also found page 9 with the units interesting.
Requirements
To use this component, you'll need a cable with an IR read/write head and connect your machine running Home Assistant directly to the IR sensor of the Kamstrup meter.
The one from Volkszaehler.org seems to work fine, but might be hard to get.
The read/write head looks like this:
Installation
There are a few ways you can install this custom component into your Home Assistant.
A solution I quite often see, is to manually copy all the files from custom_components/mc66c/ folder to your <home_assistant_path>/config/custom_components/mc66c/
A better way would be to check out this git repository in your Home Assistant.
eg. into a folder called external
. So <home_assistant_path>/config/external
and then create a symbolic link for the custom component:
cd <home_assistant_path>/config/custom_components
ln -s ../external/Home-Assistant-Sensor-MC66C/custom_components/mc66c mc66c
Doing this allows you to update the files easily from this repo.
cd <home_assistant_path>/external/Home-Assistant-Sensor-MC66C
git pull
Configuration
Before you add the configuration, make sure you have added all the files and have restarted your Home Assistant.
Also, there are many ways to add this sensor to your configuration. You can add the bellow sensor
and (optional) group
from the example below directly to your configuration.yaml
file.
The way I prefer doing this is making use of the packages approach.
In that case you could use the following configuration in <home_assistant_path>/packages/stadsverwarming.yaml
sensor:
- platform: mc66c
name: Stadsverwarming
port: /dev/ttyUSB1
scan_interval: 30
resources:
- energy
- volume
- op_hrs
- temperature_in
- temperature_out
- temperature_diff
- power
- flow
- peak_power
- info_code
group:
mc66c:
name: Stadsverwarming meter
entities:
- sensor.stadsverwarming_energy
- sensor.stadsverwarming_volume
- sensor.stadsverwarming_operating_hours
- sensor.stadsverwarming_temperature_in
- sensor.stadsverwarming_temperature_out
- sensor.stadsverwarming_temperature_difference
- sensor.stadsverwarming_power
- sensor.stadsverwarming_peak_power
- sensor.stadsverwarming_flow
Configuration variables
This component has the following configuration variables:
platform: mc66c
This is required, to use this platform for the sensor. You can't change this.
name: Stadsverwarming
This is optional, the name will be used to prefix the sensors, mc66c
will be used if the name is specified.
port: /dev/ttyUSB1
This is required, the port that has the IR cable, note if you use docker, that you have to expose this device to the container.
scan_interval: 30
This is optional, the seconds that the sensor will check for updates, 30 is the default.
resources: list
This is optional, however an empty list (the default) will result in no sensors being created. Only the sensors that are being listed will be created. Possible values are:
energy
- Energy usage inGJ
volume
- Volume inM3
op_hrs
- Operating hours, using unithrs
temperature_in
- Temperature in, in°C
temperature_out
- Temperature out in°C
temperature_diff
- difference in temperatures in°C
power
- Power usage inkW
peak_power
- Peak power inkWp
Logging
logger:
logs:
custom_components.mc66c: info
Feedback
If you're facing any issues or have feedback or a request, feel free to raise an issue and I'll see what I can do. I've to admit I'm not very familiar with python
, however, I'll try my best to make this component work for everyone. I'm also happy to accept any PR with fixes/improvements.
Thank you!
Jurgen on Tweakers, pointing out the cable needed for this to project to work.
@RuntimeError123 for his integration using MQTT, it helped me a lot setting up this custom component. If you're looking for a solution where the cable and Home Assistant are not running on the same machine, I recommend using his implementation.