Hi Steve,
thanks for your help!
I preffer V2 because I can not change the arduino code, otherwise the old software will stop working.
This i have as Flow:
[
{
"id": "484d58c6fda0204f",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "70c288ddb00829f0",
"type": "serial in",
"z": "484d58c6fda0204f",
"name": "ArduinioPort",
"serial": "e13e4297edea67b8",
"x": 490,
"y": 440,
"wires": [
[
"f3075837afc8ecaa",
"d09df61af789b1bf"
]
]
},
{
"id": "f3075837afc8ecaa",
"type": "buffer-parser",
"z": "484d58c6fda0204f",
"name": "",
"data": "payload",
"dataType": "msg",
"specification": "spec",
"specificationType": "ui",
"items": [
{
"type": "ascii",
"name": "item1",
"offset": 0,
"length": 7,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item2",
"offset": 7,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item3",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item4",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item5",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item6",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item7",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item8",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item9",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "int16le",
"name": "item10",
"offset": 0,
"length": 2,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item11",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item12",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item13",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "floatle",
"name": "item14",
"offset": 0,
"length": 4,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "bool",
"name": "item15",
"offset": 0,
"length": 1,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "bool",
"name": "item16",
"offset": 0,
"length": 1,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "int16le",
"name": "item17",
"offset": 0,
"length": 2,
"offsetbit": 0,
"scale": "1",
"mask": ""
}
],
"swap1": "",
"swap2": "",
"swap3": "",
"swap1Type": "swap",
"swap2Type": "swap",
"swap3Type": "swap",
"msgProperty": "payload",
"msgPropertyType": "str",
"resultType": "keyvalue",
"resultTypeType": "return",
"multipleResult": true,
"fanOutMultipleResult": true,
"setTopic": true,
"outputs": 17,
"x": 730,
"y": 440,
"wires": [
[
"bf613881860aaf1a"
],
[
"91eefa1028143076"
],
[
"72e0116ee8825d57"
],
[
"35605d33d591b35b"
],
[
"3206eef2438376e7"
],
[
"32ed571a9719ca26"
],
[
"e7d656daf2a59cac"
],
[
"66405361458ad166"
],
[
"4444c120928448e4"
],
[
"545d20babe835532"
],
[
"4b573e4edd1a3d3a"
],
[
"471a20e59a9d9251"
],
[
"d225840e0ef1d705"
],
[
"e521a8c056709bfa"
],
[
"5c33f5e401997df5"
],
[
"f2036dc190b0f857"
],
[
"78110d4e44e217e9"
]
]
},
{
"id": "bf613881860aaf1a",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 0,
"width": 0,
"height": 0,
"name": "",
"label": "Start",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 200,
"wires": []
},
{
"id": "e7d656daf2a59cac",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 10,
"width": 0,
"height": 0,
"name": "",
"label": "Item 7",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 440,
"wires": []
},
{
"id": "66405361458ad166",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 11,
"width": 0,
"height": 0,
"name": "",
"label": "Item 8",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 480,
"wires": []
},
{
"id": "4444c120928448e4",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Temperature",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1050,
"y": 520,
"wires": []
},
{
"id": "4b573e4edd1a3d3a",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "Voltage 50V",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1050,
"y": 600,
"wires": []
},
{
"id": "d225840e0ef1d705",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 3,
"width": 0,
"height": 0,
"name": "",
"label": "Voltage 12V",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1050,
"y": 680,
"wires": []
},
{
"id": "e521a8c056709bfa",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 4,
"width": 0,
"height": 0,
"name": "",
"label": "Voltage 5V",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1050,
"y": 720,
"wires": []
},
{
"id": "471a20e59a9d9251",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 16,
"width": 0,
"height": 0,
"name": "",
"label": "Item 12",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1040,
"y": 640,
"wires": []
},
{
"id": "545d20babe835532",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 12,
"width": 0,
"height": 0,
"name": "",
"label": "Band",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 560,
"wires": []
},
{
"id": "3206eef2438376e7",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 8,
"width": 0,
"height": 0,
"name": "",
"label": "Item 5",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 360,
"wires": []
},
{
"id": "72e0116ee8825d57",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 6,
"width": 0,
"height": 0,
"name": "",
"label": "Item 3",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 280,
"wires": []
},
{
"id": "35605d33d591b35b",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 7,
"width": 0,
"height": 0,
"name": "",
"label": "Item 4",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 320,
"wires": []
},
{
"id": "32ed571a9719ca26",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 9,
"width": 0,
"height": 0,
"name": "",
"label": "Item 6",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 400,
"wires": []
},
{
"id": "5c33f5e401997df5",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 13,
"width": 0,
"height": 0,
"name": "",
"label": "PS On",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 760,
"wires": []
},
{
"id": "91eefa1028143076",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 5,
"width": 0,
"height": 0,
"name": "",
"label": "Item 2",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1030,
"y": 240,
"wires": []
},
{
"id": "78110d4e44e217e9",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 15,
"width": 0,
"height": 0,
"name": "",
"label": "Error Code",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1050,
"y": 840,
"wires": []
},
{
"id": "f2036dc190b0f857",
"type": "ui_text",
"z": "484d58c6fda0204f",
"group": "1920b9a01dbfe9cc",
"order": 14,
"width": 0,
"height": 0,
"name": "",
"label": "Fan On",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1040,
"y": 800,
"wires": []
},
{
"id": "d09df61af789b1bf",
"type": "debug",
"z": "484d58c6fda0204f",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 620,
"wires": []
},
{
"id": "e13e4297edea67b8",
"type": "serial-port",
"serialport": "/dev/ttyACM0",
"serialbaud": "57600",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "\\n",
"bin": "bin",
"out": "char",
"addchar": "",
"responsetimeout": "10000"
},
{
"id": "1920b9a01dbfe9cc",
"type": "ui_group",
"name": "First Try",
"tab": "a70e322edb38e88c",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "a70e322edb38e88c",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
And this is from my com port:
29.12.2021, 19:46:46node: d09df61af789b1bfmsg.payload : buffer[62]
[83,84,65,84,85,83,58,43,170,101,53,242,222,123,56,43,170,101,53,242,222,123,56,0,0,0,0,0,0,0,0,0,0,128,127,0,0,194,65,17,0,189,230,130,61,0,0,0,0,205,204,68,65,232,105,160,64,0,0,0,0,10]
Hope you can use it.
In your parser I config all 17 items with the right definition (float/int/bool)