Mbus to USB Convertor - solid and pulsed red lights

Hello, long time listener, first time caller.

I have what looks like an intermittent fault with the mBus to USB convertor from the OpenEnergyMonitor shop. I hope someone might be able to help with. (M-Bus to USB Converter | HeatPump Monitoring - Shop | OpenEnergyMonitor)

I’m running an emonPi with the 2022 emonSD. The heat meter is an Ista Ultego III (Landyrs+gyr in disguise). Wiring is to M- and M+ and connected back to USB. I’ve updated the EmonHub config to:

[[MBUS]]
    Type = EmonHubMBUSInterfacer
    [[[init_settings]]]
        device = /dev/ttyUSB0
        baud = 2400
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        read_interval = 10
        validate_checksum = False
        nodename = MBUS
        [[[[meters]]]]
            [[[[[heatmeter]]]]]
                address = 1
                type = standard
                pages = 1    

Most of the time I get the following error.

023-10-29 19:46:00,041 DEBUG    MBUS       Connecting to MBUS serial: /dev/ttyUSB0 2400
2023-10-29 19:46:00,042 ERROR    MBUS       Could not connect to MBUS serial
2023-10-29 19:46:00,043 ERROR    MBUS       Could not write to MBUS serial port
2023-10-29 19:46:00,043 ERROR    MBUS       read_data_frame could not read from serial port
2023-10-29 19:46:00,044 DEBUG    MBUS       Invalid MBUS data received 0 bytes 0.5 ms
2023-10-29 19:46:00,245 ERROR    MBUS       Could not write to MBUS serial port
2023-10-29 19:46:00,246 ERROR    MBUS       read_data_frame could not read from serial port
2023-10-29 19:46:00,246 DEBUG    MBUS       Invalid MBUS data received 0 bytes 0.5 ms
2023-10-29 19:46:00,447 DEBUG    MBUS       Decoded MBUS data: None

Most of the time I have a solid red light closest to the USB connector. But sometimes with a bit of cable movement (or possible wishful thinking) I get the second red light closer to the mBus connectors coming on. When I do, then I get the following.

2023-10-29 19:46:10,070 DEBUG    MBUS       Connecting to MBUS serial: /dev/ttyUSB0 2400
2023-10-29 19:46:11,215 DEBUG    MBUS       Invalid MBUS data received 231 bytes 1138.7 ms
2023-10-29 19:46:11,222 DEBUG    MBUS       Decoded MBUS data: {"Record1": [4, ""], "Record2": [8, ""], "Energy": [1098, "kWh"], "Volume": [347.27, "m3"], "Power": [0, "W"], "FlowRate": [-0.002, "m3/h"], "FlowT": [23.8, "C"], "ReturnT": [15.8, "C"], "DeltaT": [8.0, "C"], "FabNo": [69356458, ""], "Record11": [7, ""], "Ontime Hours_error": [0, "h"], "Ontime Hours": [51989, "h"], "Record14": [566, ""], "Energy2": [0, "kWh"], "Power_Max": [0, "W"], "FlowRate_Max": [0.0, "m3/h"], "FlowT_Max": [39.400000000000006, "C"], "ReturnT_Max": [29.700000000000003, "C"], "Record_Max": [0, ""], "Record_Max2": [0, ""], "Record_Max3": [721228331, ""], "Record_Max4": [721228331, ""], "Energy3": [0, "kWh"], "Volume2": [0.0, "m3"], "Ontime Hours_error2": [44745, "h"], "Record27": [0, ""], "Energy4": [0, "kWh"], "Power_Max2": [0, "W"], "FlowRate_Max2": [0.0, "m3/h"], "FlowT_Max2": [30.400000000000002, "C"], "ReturnT_Max2": [49.6, "C"], "DateTime": [-50391237, ""], "DateTime2": [721228838, ""], "heat_calc": [-18.444444444444443, "W"]}
2023-10-29 19:46:11,223 DEBUG    MBUS       76 NEW FRAME : 
2023-10-29 19:46:11,224 DEBUG    MBUS       76 Timestamp : 1698608770.076363
2023-10-29 19:46:11,225 DEBUG    MBUS       76 From Node : MBUS
2023-10-29 19:46:11,225 DEBUG    MBUS       76    Values : [4, 8, 1098, 347.27, 0, -0.002, 23.8, 15.8, 8, 69356458, 7, 0, 51989, 566, 0, 0, 0, 39.400000000000006, 29.700000000000003, 0, 0, 721228331, 721228331, 0, 0, 44745, 0, 0, 0, 0, 30.400000000000002, 49.6, -50391237, 721228838, -18.444444444444443]
2023-10-29 19:46:11,226 DEBUG    MBUS       76 Sent to channel(start)' : ToEmonCMS
2023-10-29 19:46:11,227 DEBUG    MBUS       76 Sent to channel(end)' : ToEmonCMS

Happy days! The mbus fields and values appear in the inputs. :slight_smile:

But then the red light goes out and we are back to error after error. :frowning:

Starting to lose the plot a bit. Is this me, the meter, a missing config somewhere or have a got a dodgy connection?

Have I missed some important information, then please let me know.

Thanks in advance.

Andy

Welcome, Andy, to the OEM forum.

Don’t lose the plot. If it’s intermittent, it’s pretty unlikely to be a missing configuration. So that leaves you, the meter or a connection. I’d suspect all three, in reverse order.

I’d get just a bit brutal with the connectors: give them a very careful visual check first, tug the cable, wiggle it, does each connector mate soundly or does it feel ‘not quite right’? If it’s screw connections - are the screws clamping into insulation? That’s not unheard of. Insulation displacement and crimps are normally good, but if you have a bad one, they can be very bad. Is there a ball of solder rattling around inside, causing a short occasionally?

I once spent about a year and a half tracking down a poorly soldered joint - every time I tried to find it, I caused just enough movement to scrape the surfaces clean and remove the symptoms, it would take a month or two for the fault to reappear. IIRC, it was hidden under part of the case when I finally found it.

Thanks Robert.

Next step is to go to town on the connection paths from usb to meter. Was a way to spend a rainy Sunday but one I could have done without as I don’t spot the intermittent light till late in the day.

There are precrimped terminals in the cable from the meter that I’m now doubting…

Hey ho, It’s all learning and we come back more knowledgeable.

Thanks

Andy

thumbs_up thumbsup

Hello, does anyone have one of this model of mbus to usb and could please comment on the lights?

Should I expect a solid red usb side and a pulsed red mbus side?

It would assist withe the connection trouble shooting.

Thanks

Andy

:rofl: :rofl: :rofl: :rofl: :rofl: Welcome to the church.

How long have you had it? I’d suggest emailing the shop and asking them.

It should flash each time an MBUS reading is taking place, by default every 10s.

Have you got a different USB cable you can test with?

Thanks Glyn and Brian.

Will be checking connections looking for that pulse ever 10s. Failing that I’ll have a chat with the shop team

Appreciate the help.

Andy

This is probably a USB dongle issue but careful with Ista UK and Ista T230 meters.

The UK outfit has some helpful people working there (Jemma Johnson, Edward Charles et al) but the MD is a dishonest piece of work who gags his employees if the issue needing to be addressed is with an Ista product.

The Ista T230s of late (date range unspecified because they won’t admit there’s an issue) have issues with the wired M-Bus. They get into a state where they send a garbage response in response to any secondary address (the garbage response is bad enough but by responding to every address they also prevent other meters on the same network from responding) or indeed nothing at all.

So be aware if you see small used T230 meters on eBay etc. They’ve probably been ripped out of district heating schemes that have issues with them.

They also have an unusual telegram configuration (setup to give you their whole life story across multiple mbus telegrams) which can cause issues if you’re not expecting it and can be changed using resetb0 commands.

See

Tehničke karakteristike T230 (2).pdf (245.3 KB)

This feels like a dongle issue. Be aware that the meter can need special treatment on the mbus to get the crane containing the information that you’re interested in though!

Thanks for all the comments and suggestions. I spoke to the super helpful shop team and they posted out a new mbus to USB dongle.

I’ve also borrowed an Axioma Qualsonic E3 from the office to test if its the T230 meter that’s the fault. So new dongle, new heat meter, and I’m still getting the same error.

The heat meter reads once and then reverts back to reporting invalid data.

Could this be a USB config issue? I noticed that it first opens the serial port Connecting to MBUS serial: /dev/ttyUSB0 2400 then reopens the serial port at 115200 bits/s - is this USB interfacer overriding the way that the MBUS interfacer is working?

Pretty stumped here and any insights would be useful.

Thanks

Andy

2023-11-09 20:12:50,035 DEBUG    MBUS       **Connecting to MBUS serial: /dev/ttyUSB0 2400**
2023-11-09 20:12:50,558 DEBUG    MBUS       Invalid MBUS data received 98 bytes 516.2 ms
2023-11-09 20:12:50,561 DEBUG    MBUS       Decoded MBUS data: {"Ontime": [66040059, "s"], "OperatingTime": [66040059, "s"], "Energy": [0, "kWh"], "Volume": [0.0, "m3"], "Power": [0, "W"], "FlowRate": [0.0, "m3/h"], "FlowT": [7.99, "C"], "ReturnT": [7.95, "C"], "DeltaT": [0.03, "C"], "FabNo": [3043712, ""], "ManSpec": [10726, ""], "heat_calc": [0.0, "W"]}
2023-11-09 20:12:50,562 DEBUG    MBUS       777 NEW FRAME : 
2023-11-09 20:12:50,563 DEBUG    MBUS       777 Timestamp : 1699560770.041769
2023-11-09 20:12:50,563 DEBUG    MBUS       777 From Node : MBUS
2023-11-09 20:12:50,564 DEBUG    MBUS       777    Values : [66040059, 66040059, 0, 0, 0, 0, 7.99, 7.95, 0.03, 3043712, 10726, 0]
2023-11-09 20:12:50,564 DEBUG    MBUS       777 Sent to channel(start)' : ToEmonCMS
2023-11-09 20:12:50,565 DEBUG    MBUS       777 Sent to channel(end)' : ToEmonCMS
2023-11-09 20:12:50,707 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_Ontime 66040059
2023-11-09 20:12:50,709 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_OperatingTime 66040059
2023-11-09 20:12:50,710 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_Energy 0
2023-11-09 20:12:50,712 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_Volume 0
2023-11-09 20:12:50,713 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_Power 0
2023-11-09 20:12:50,715 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_FlowRate 0
2023-11-09 20:12:50,716 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_FlowT 7.99
2023-11-09 20:12:50,717 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_ReturnT 7.95
2023-11-09 20:12:50,719 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_DeltaT 0.03
2023-11-09 20:12:50,720 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_FabNo 3043712
2023-11-09 20:12:50,722 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_ManSpec 10726
2023-11-09 20:12:50,723 DEBUG    MQTT       Publishing: emon/MBUS/heatmeter_heat_calc 0
2023-11-09 20:12:52,083 DEBUG    USB0       **Opening serial port: /dev/ttyUSB0 @ 115200 bits/s**

2023-11-09 20:13:02,094 DEBUG    MBUS       Invalid MBUS data received 0 bytes 2004.7 ms

2023-11-09 20:13:04,300 DEBUG    MBUS       Invalid MBUS data received 0 bytes 2004.8 ms
2023-11-09 20:13:04,501 DEBUG    MBUS       Decoded MBUS data: None

emoncms config is below in full. I’ve noticed a non standard node name emonpi_5 and the USB interfacer having a different node name.

#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md
#######################################################################
#######################    emonHub  settings    #######################
#######################################################################

[hub]
    ### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
    loglevel = DEBUG
    autoconf = 1
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]
    ### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
    [[EmonPi2]]
        Type = EmonHubOEMInterfacer
        [[[init_settings]]]
            com_port = /dev/ttyAMA0
            com_baud = 38400
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
            subchannels = ToRFM12,

[[MBUS]]
    Type = EmonHubMBUSInterfacer
    [[[init_settings]]]
        device = /dev/ttyUSB0
        baud = 2400
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        read_interval = 10
        validate_checksum = False
        nodename = MBUS
        [[[[meters]]]]
            [[[[[heatmeter]]]]]
                address = 1
                type = qalcosonic_e3
                

    [[USB0]]
        Type = EmonHubOEMInterfacer
        [[[init_settings]]]
            com_port = /dev/ttyUSB0
            com_baud = 115200
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
            subchannels = ToRFM12,
            nodename = emonTx4



    [[SPI]]
        Type = EmonHubRFM69LPLInterfacer
        [[[init_settings]]]
            nodeid = 5
            networkID = 210
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
    
    
    [[MQTT]]
        Type = EmonHubMqttInterfacer
        [[[init_settings]]]
            mqtt_host = 127.0.0.1
            mqtt_port = 1883
            mqtt_user = emonpi
            mqtt_passwd = emonpimqtt2016
        
        [[[runtimesettings]]]
            pubchannels = ToRFM12,
            subchannels = ToEmonCMS,
            
            # emonhub/rx/10/values format
            # Use with emoncms Nodes module
            node_format_enable = 0
            node_format_basetopic = emonhub/
            
            # emon/emontx/power1 format - use with Emoncms MQTT input
            # http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
            nodevar_format_enable = 1
            nodevar_format_basetopic = emon/
            
            # Single JSON payload published  - use with Emoncms MQTT
            node_JSON_enable = 0
            node_JSON_basetopic = emon/
    
    [[emoncmsorg]]
        Type = EmonHubEmoncmsHTTPInterfacer
        [[[init_settings]]]
        [[[runtimesettings]]]
            pubchannels = ToRFM12,
            subchannels = ToEmonCMS,
            url = https://emoncms.org
            apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            senddata = 1    # Enable sending data to Emoncms.org
            sendnames = 1    # Send full input names (compression will be automatically enabled)
            interval = 30    # Bulk send interval to Emoncms.org in seconds

#######################################################################
#######################          Nodes          #######################
#######################################################################

## See config user guide: https://github.com/openenergymonitor/emonhub
## If autoconf is enabled above, node configuration will automatically
## populate based on templates listed in available.conf

[nodes]
    [[5]]
        nodename = emonpi_5
        [[[rx]]]
            names = power1, power2, power1pluspower2, vrms, t1, t2, t3, t4, t5, t6, pulsecount
            datacodes = h, h, h, h, h, h, h, h, h, h, L
            scales = 1.0, 1.0, 1.0, 0.01, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0
            units = W, W, W, V, C, C, C, C, C, C, p

115.2k baud would explain it!

Wants to be opened at 2400 baud.

@marko Oh dear ! very useful information . I did the mistake of purchasing 3 ISTA ultigo meters from eBay and just getting invalid Mbus data received errors. Can you let me know how it can be reset or if anything can be done .

Refer to manual linked above for all there is to know I’m afraid.

Ista UK declined to support their products.

Looks like ttyAMA0 is actually the same physical device as ttyUSB0.

image

You need to SSH in and examine the 2 serial ports and see what it is actually connected to (I’m sure someone will be along to say how).

Thanks all,

Problem resolved. It was a conflict with the OEM USB interfacer which I had not removed from the emoncms configuration file.

To be fair this is in bold in the instructions in this page emonHub Interfacers — OpenEnergyMonitor 0.0.1 documentation

Still learning here, but should have RTFM :slight_smile:

@higopi my ISTA ultego (also an ebay special) still shows as invalid data in the emoncms log, but then it decodes just fine. I’ve had it working just fine for the last week and I’m getting consistent data.

2023-11-18 20:38:21,173 DEBUG MBUS Invalid MBUS data received 231 bytes 1138.0 ms
2023-11-18 20:38:21,176 DEBUG MBUS Decoded MBUS data: {“Record1”: [4, “”], “Record2”: [8, “”], “Energy”: [2042, “kWh”], “Volume”: [583.89, "m3…

my config file has this as the interface entry.

[[MBUS]]
    Type = EmonHubMBUSInterfacer
    [[[init_settings]]]
        device = /dev/ttyUSB0
        baud = 2400
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        read_interval = 10
        validate_checksum = False
        nodename = MBUS
        [[[[meters]]]]
            [[[[[heatmeter]]]]]
                address = 1
                type = standard
                pages = 1

I got the same invalid MBUS data message in the log with a new Axioma Qualsonic E3 that I borrowed from the office, so I don’t think that the issue is the Ista Ultego.

2023-11-09 20:12:50,558 DEBUG MBUS Invalid MBUS data received 98 bytes 516.2 ms
2023-11-09 20:12:50,561 DEBUG MBUS Decoded MBUS data: {“Ontime”: [66040059, “s”], “OperatingTime”: [66040059, “s”], “Energy”: [0, “kWh”], “Volume”: [0.0, “m3”], “Power”: [0, “W”], “FlowRate”: [0.0, “m3/h”], “FlowT”: [7.99, “C”], “ReturnT”: [7.95, “C”], “DeltaT”: [0.03, “C”], “FabNo”: [3043712, “”], “ManSpec”: [10726, “”], “heat_calc”: [0.0, “W”]}

1 Like

If you are still having issues, have you seen this thread? Rather an obscure config item solved this one.

hi @AndyV1.2 , thanks working here now too !!
Did you know how to change the mbus address or use the secondary address if unchangable …
it was cheap as chips on eBay so got a few

Hello @higopi

You can change mbus address in the ista by

Loop 4
---- C

Enter the current date in day / month. i.e. today is 1911

This enters the settings menu if you cycle though you will get to

0 A

This is the mbus primary address.

Aww thank you @AndyV1.2 !!! That was super useful!