Multical 21 custom component for Home Assistant.

To use this custom component, you'll need an optical eye and connect your machine running Home Assistant directly with the optical eye to the Kamstrup multical 21 meter.
The optical eye looks like this:
I ordered it from here
You can also 3d Print this mount
This component can be installed directly via HACS. Search for "Multical 21" in the HACS integration list and click "Download".
- Open the directory for your HA configuration (where you find
configuration.yaml). - If you do not have a
custom_componentsdirectory, create it. - Download the
custom_components/multical_21/directory from this repository as a ZIP and extract it, or clone the repository. - Copy the
multical_21folder into yourcustom_componentsdirectory. - Restart Home Assistant.
- In the HA UI go to "Settings" → "Devices & Services", click "Add Integration" and search for "Multical 21".
It's recommended to use devices as /dev/serial/by-id and not /dev/ttyUSB1 as the port. This is because the first example is a stable identifier, while the second can change when USB devices are added or removed, or even when you perform a system reboot.
The port should look like this: /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_D307PBVY-if00-port0.
Some meters contain a battery, and communicating with the meter does impact battery life. By default, this component updates every 3600 seconds (1 hour). This is configurable. You can also configure the serial timeout. The default value is 1.0 seconds. If you get the error Finished update, No readings from the meter. Please check the IR connection you can try to increase this value. Fractional numbers are allowed (eg. 0.5).
Both settings can be changed by pressing "Configure" on the Integrations page.
When you want to report an issue, please add logs from this component. You can enable logging for this component by configuring the logger in Home Assistant as follows:
logger:
default: warn
logs:
custom_components.multical_21: debugMore info can be found on the Home Assistant logger integration page