I have connected an IMST PA-iM871A Wireless M-Bus dongle to my PC (Windows). I have installed the drivers correctly because the provided software recognizes the USB stick.
Now, I want to connect to an M-Bus device (a gas meter) via Node-Red. For this, I am using the node-serialport (node-red-node-serialport (node) - Node-RED).
The flow consists of a serial in and a serial out node, configured to connect to my USB dongle. This seems to work well because the green 'connected' indicator is on, and it changes to 'disconnected' when I unplug the USB stick from my computer.
What I want to do now is communicate with my dongle. I have tried various methods to send data via an inject node, but nothing seems to work. Can anyone help me figure out how to send a message to the dongle and receive a message from it? (for example, receive the name of the dongle in Node-Red) Thanks in advance
Here is the flow:
[
{
"id": "d1b0c0e0.7b6a7",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "e1b0d3f7.a2c4e",
"type": "serial in",
"z": "d1b0c0e0.7b6a7",
"name": "",
"serial": "2aec20f3b4664b5e",
"x": 270,
"y": 440,
"wires": [
[
"1b0c2e27.6e3ba2"
]
]
},
{
"id": "1b0c2e27.6e3ba2",
"type": "debug",
"z": "d1b0c0e0.7b6a7",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"x": 590,
"y": 440,
"wires":
},
{
"id": "261fd38a6e1260a0",
"type": "serial out",
"z": "d1b0c0e0.7b6a7",
"name": "",
"serial": "2aec20f3b4664b5e",
"x": 570,
"y": 360,
"wires":
},
{
"id": "0d53a28c830a68d3",
"type": "inject",
"z": "d1b0c0e0.7b6a7",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 360,
"wires": [
[
"261fd38a6e1260a0"
]
]
},
{
"id": "2aec20f3b4664b5e",
"type": "serial-port",
"name": "",
"serialport": "COM4",
"serialbaud": "115200",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "100",
"bin": "bin",
"out": "time",
"addchar": "",
"responsetimeout": "10000"
}
]