Kamstrup Multical 402

Hi folks,

I’ve got an emonHP and a (pre-existing) Multical 402 heat meter which I just added the M-Bus module to. At the moment I’ve got no way of knowing whether the M-Bus module is working at all because it doesn’t look like the emonHP is reading from it properly.

Based on the documentation of the Multical I’ve set the address to the last three digits of the customer number - 723 on the meter - and hoping a Multical 402 isn’t too different from a Multical 403 I’ve set the type to kamstrup403:

    [[MBUS]]
        Type = EmonHubMBUSInterfacer
        [[[init_settings]]]
            device_vid = 1659
            device_pid = 9123
            baud = 2400
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
            read_interval = 10
            validate_checksum = False
            nodename = heatpump
            [[[[meters]]]]
                [[[[[heatmeter]]]]]
                    address = 723
                    type = kamstrup403

However I don’t think this is actually relevant as we’re not getting to this point of actually reading/writing anything from the meter - it seems to be failing at the serial port level:

2025-10-28 11:26:00,898 INFO MainThread MBUS device found: /dev/ttyUSB0, vid:1659, pid:9123
2025-10-28 11:26:00,898 DEBUG MainThread Connecting to MBUS serial: /dev/ttyUSB0 2400
2025-10-28 11:26:00,904 INFO MainThread Setting MBUS read_interval: 10
2025-10-28 11:26:00,904 INFO MainThread Setting MBUS nodename: heatpump
2025-10-28 11:26:00,905 INFO MainThread Setting MBUS validate_checksum: False
2025-10-28 11:26:00,905 INFO MainThread Setting MBUS meters: {“heatmeter”: {“address”: “723”, “type”: “kamstrup403”}}
2025-10-28 11:26:00,905 DEBUG MainThread Setting MBUS pubchannels: [‘ToEmonCMS’]
2025-10-28 11:26:00,906 ERROR MBUS Could not write to MBUS serial port
2025-10-28 11:26:00,906 DEBUG MainThread Automatic configuration of nodes enabled
2025-10-28 11:26:01,228 DEBUG digital 1 NEW FRAME :
2025-10-28 11:26:01,229 DEBUG digital 1 Timestamp : 1761650760.000000
2025-10-28 11:26:01,229 DEBUG digital 1 From Node : gpio
2025-10-28 11:26:01,229 DEBUG digital 1 Values : [0]
2025-10-28 11:26:01,229 DEBUG digital 1 Sent to channel(start)’ : ToEmonCMS
2025-10-28 11:26:01,229 DEBUG digital 1 Sent to channel(end)’ : ToEmonCMS
2025-10-28 11:26:01,352 INFO MQTT Connecting to MQTT Server
2025-10-28 11:26:01,453 INFO MQTT connection status: Connection successful
2025-10-28 11:26:01,454 DEBUG emoncmsorg Buffer size: 1
2025-10-28 11:26:01,454 DEBUG MQTT CONACK => Return code: 0
2025-10-28 11:26:01,454 INFO emoncmsorg sending: ``https://emoncms.org/input/bulk.json?sentat=1761650761`` (33 bytes of data, 1 frames, uncompressed)
2025-10-28 11:26:01,455 INFO emoncmsorg compression ratio: 124%, sent original
2025-10-28 11:26:01,555 INFO MQTT on_subscribe
2025-10-28 11:26:01,975 ERROR MBUS read_data_frame could not read from serial port
2025-10-28 11:26:01,976 DEBUG MBUS Invalid MBUS data received 0 bytes 0.4 ms, count: 1
2025-10-28 11:26:02,109 DEBUG emoncmsorg acknowledged receipt with ‘ok’ from ``https://emoncms.org`` (653 ms)
2025-10-28 11:26:02,176 ERROR MBUS Could not write to MBUS serial port
2025-10-28 11:26:02,176 ERROR MBUS read_data_frame could not read from serial port
2025-10-28 11:26:02,176 DEBUG MBUS Invalid MBUS data received 0 bytes 0.1 ms, count: 2
2025-10-28 11:26:02,377 DEBUG MBUS Decoded MBUS data: None

What’s the ssh user/pass if I want to get in and check the serial ports are working properly, maybe run a script to see if I can read anything from the M-Bus USB? Any bright ideas to debug?

Thanks,
Rob

Ahhhhhh….. I somehow misread and it’s the last two digits of the customer number I want, not the last three. Changing to 023 and voila… it all springs to life. type = standard seems to work and give me more fields - is there anything to choose between them?

I’m not sure if this is always true. You can set the MBUS ID using this script:

sudo service emonhub stop
cd /opt/emoncms/modules/usefulscripts/mbus/
python3 mbus_set_address.py

Follow the instructions, I think accepting the defaults is usually fine assuming you only have one USB device connected.

Then start emonhub again

sudo service emonhub start1

I would recommend using type = kamstrup403

See: https://docs.openenergymonitor.org/emonhub/emonhub-interfacers.html#kamstrup-multical-403