TRB143 Mbus to Mqtt problem

Hi I got a problem with my TRB 143 sending the MBUS-data over MQTT as JSON.

What I get sent up to the MQTT server is the following:

{“mbus”:[{“timestamp”:1698256927,“date”:“25/10/2023 20:02:07”,“bdate”:null,“name”:“M_BUS”,“data”:null,“size”:5075}]}

When I think I should have seen at least the following:

{ “MBusData”: { “SlaveInformation”: { “Id”: “32480001”, “Manufacturer”: “EFE”, “Version”: “0”, “ProductName”: “Engelmann / Elster SensoStar 2”, “Medium”: “Heat / Cooling load meter”, “AccessNumber”: “38”, “Status”: “00”, “Signature”: “0000” }, “DataRecord”: [ { “id”: “0”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Fabrication number”, “Value”: “32480001”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “1”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Energy (kWh)”, “Value”: “3”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “2”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Volume (m m^3)”, “Value”: “12613726”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “3”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Power (W)”, “Value”: “121308”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “4”, “Function”: “Maximum value”, “StorageNumber”: “0”, “Unit”: “Power (W)”, “Value”: “254643”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “5”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Volume flow (m m^3/h)”, “Value”: “9619”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “6”, “Function”: “Maximum value”, “StorageNumber”: “0”, “Unit”: “Volume flow (m m^3/h)”, “Value”: “10117”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “7”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Flow temperature (deg C)”, “Value”: “32”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “8”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Return temperature (deg C)”, “Value”: “43”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “9”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Temperature Difference (1e-2 deg C)”, “Value”: “-1095”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “10”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “On time (days)”, “Value”: “133”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “11”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Time Point (time & date)”, “Value”: “2023-10-25T19:03:00”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “12”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Unit”: “Energy (kWh)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “13”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Unit”: “Volume (m m^3)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “14”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Unit”: “Time Point (date)”, “Value”: “2000-00-00”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “15”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Error flags”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “16”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Unit”: “Model / Version”, “Value”: “5”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “17”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Tariff”: “1”, “Device”: “0”, “Unit”: “Energy (kWh)”, “Value”: “50801”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “18”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Tariff”: “1”, “Device”: “0”, “Unit”: “Energy (kWh)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “19”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Tariff”: “2”, “Device”: “0”, “Unit”: “Energy (kWh)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “20”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Tariff”: “2”, “Device”: “0”, “Unit”: “Energy (kWh)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “21”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Tariff”: “3”, “Device”: “0”, “Unit”: “Energy (kWh)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “22”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Tariff”: “3”, “Device”: “0”, “Unit”: “Energy (kWh)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “23”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Tariff”: “0”, “Device”: “1”, “Unit”: “Volume (m m^3)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “24”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Tariff”: “0”, “Device”: “1”, “Unit”: “Volume (m m^3)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “25”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Tariff”: “0”, “Device”: “2”, “Unit”: “Volume (m m^3)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “26”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Tariff”: “0”, “Device”: “2”, “Unit”: “Volume (m m^3)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “27”, “Function”: “Instantaneous value”, “StorageNumber”: “0”, “Tariff”: “0”, “Device”: “3”, “Unit”: “Volume (m m^3)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” }, { “id”: “28”, “Function”: “Instantaneous value”, “StorageNumber”: “1”, “Tariff”: “0”, “Device”: “3”, “Unit”: “Volume (m m^3)”, “Value”: “0”, “Timestamp”: “2023-10-25T18:04:17Z” } ] } }

The M-bus is set up as Json
and DAta to server has the following setup:
Type: m-bus data
Format Type Json
Data Filtering: All
Segment Count : 64 (Also benn testing 1 and 1 with “Send as Object” marked)
And Database is in RAM

Hello,

Maybe there was no M-bus data collected when it was time to send it to the server?

Could you please share your M-Bus and Data to Server configurations please? Before sharing, please hide any sensitive information, such as URLs, Public IPs, etc.

Kind Regards,

Ok File information:
“Data Sender”

config settings ‘settings’
option loglevel ‘1’

config collection ‘1’
option sender_id ‘1’
option period ‘60’
option name ‘toIndoor’
option output ‘2’
option enabled ‘1’
option retry ‘0’
list input ‘3’
option format ‘json’

config input ‘3’
option mbus_filter_invert ‘0’
option mbus_filter ‘all’
option plugin ‘mbus’
option mbus_db ‘/tmp/mbus_db’
option name ‘mbus’
option mbus_segments ‘64’
option format ‘json’

config output ‘2’
option name ‘toIndoor_output’
option mqtt_qos ‘0’
option mqtt_tls ‘0’
option mqtt_port ‘1883’
option plugin ‘mqtt’
option mqtt_keepalive ‘60’
option mqtt_host ‘ANNONYMIZED_IP-ADDRESS’
option mqtt_use_credentials ‘ANNONYMIZED-USER-CRED’
option mqtt_topic ‘teltonika/CUSTOMER’

“MBUS Client”

config main ‘main’
option baudrate ‘2400’
option flash_db ‘0’
option enabled ‘1’

config record ‘MBUS’
option period ‘60’
option enabled ‘1’
option store_fail_msg ‘0’
option name ‘M_BUS’
option fail_mode ‘all’

config request_MBUS ‘1’
option enabled ‘1’
option addr ‘11’
option fcb ‘0’
option data_type ‘4’

data sender log:

[Data sender]
{
“name”: “toIndoor”,
“running”: true,
“uptime”: 95029,
“next_run_time”: “Wed Oct 25 19:54:16 2023”,
“next_run”: 1698256456,
“diff”: 25,
“input”: [
{
“section”: “3”,
“plugin”: “mbus”,
“stats”: {
“success”: 1569,
“err”: 13
},
“config”: {
“mbus_db”: “/tmp/mbus_db”,
“mbus_segments”: 64
}
}
],
“output”: {
“section”: “2”,
“plugin”: “mqtt”,
“stats”: {
“success”: 1569,
“err”: 0
},
“config”: {
“mqtt_host”: “ANONYMIZED IP”,
“mqtt_port”: 1883,
“mqtt_keepalive”: 60,
“mqtt_topic”: “teltonika/CUSTOMER”,
“mqtt_qos”: 0,
“mqtt_tls_type”: “cert”
}
},
“format”: {
“plugin”: “json”,
“stats”: {
“success”: 1569,
“err”: 0
}
},
“config”: {
“timer”: “period”,
“retry_count”: 10,
“retry_timeout”: 1,
“input”: [
“3”
],
“format”: “json”,
“name”: “toIndoor”
}
}

I get the same message when I publish to the local broker at 127.0.0.1 on the teltonika gateway.

If I change the “data to server” setting to Custom and use %data% as only information I get the following (I have changed device to another one on the mbus system - but same problem… this is the new devices anser:

{“mbus”:“{\n"MBusData": {\n"SlaveInformation": {\n"Id": "30680536",\n"Manufacturer": "INV",\n"Version": "64",\n"ProductName": "",\n"Medium": "Water",\n"AccessNumber": "96",\n"Status": "00",\n"Signature": "0000"\n},\n"DataRecord": [\n{\n"id": "0",\n"Function": "Instantaneous value",\n"StorageNumber": "0",\n"Unit": "Fabrication number",\n"Value": "30680536",\n"Timestamp": "2023-10-27T19:23:19Z"\n},\n{\n"id": "1",\n"Function": "Instantaneous value",\n"StorageNumber": "0",\n"Unit": "Volume (m m^3)",\n"Value": "319529",\n"Timestamp": "2023-10-27T19:23:19Z"\n}\n]\n}\n}\n”}

Hello,

So, the JSON option results in no M-Bus data being received, while selecting the custom option only sends partial data. Is that correct?

Have you used the ‘test configuration’ button in M-bus settings? What are the results?

Since the data to server functionality was completely changed with v7.05, would it be possible for you to reset the device to factory defaults in System → Maintenance → Backup and reconfigure the device again?

Please, keep me updated on this case.

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.