This is what I get when exporting current flow.
[
{
"id": "8eba06c2d561584a",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "3f964824e41821b8",
"type": "modbus-read",
"z": "8eba06c2d561584a",
"name": "",
"topic": "",
"showStatusActivities": true,
"logIOActivities": false,
"showErrors": true,
"unitid": "",
"dataType": "HoldingRegister",
"adr": "0",
"quantity": "10",
"rate": "2",
"rateUnit": "s",
"delayOnStart": false,
"startDelayTime": "",
"server": "a39cafbda5d1a286",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"x": 150,
"y": 200,
"wires": [
[],
[
"dcf04a493af33c1b"
]
]
},
{
"id": "dcf04a493af33c1b",
"type": "function",
"z": "8eba06c2d561584a",
"name": "get the data we want",
"func": "\n//pull the variables we want out of the array\n//divide by 10 to get the resolution right\n\nvar p1Amps = msg.payload.data [0]/10;\nvar p2Amps = msg.payload.data [2]/10;\nvar p1Hours = msg.payload.data [4]/10;\nvar p2Hours = msg.payload.data [6]/10;\nvar waterlevel = msg.payload.data [8]/10;\n\n// separate them and add a topic to send to the local dashboard.\n\nvar p1A = { payload: p1Amps, topic: \"Pump 1 Amps\" };\nvar p2A = { payload: p2Amps, topic: \"Pump 2 Amps\" };\nvar p1H = { payload: p1Hours, topic: \"Pump 1 Hours\" };\nvar p2H = { payload: p2Hours, topic: \"Pump 2 Hours\" };\nvar watlev = { payload: waterlevel, topic: \"Water Level\" };\n\n\n\n//collect the data and format it in one payload to send to sqlite\nvar sqlite= {}\nsqlite.payload = { \"Pump 1 Amps\": p1Amps, \"Pump 2 Amps\": p2Amps, \"Pump 1 Hours\": p1Hours, \"Pump 2 Hours\": p2Hours, \"Water Level\": waterlevel};\n\n//return the variables on individual node outputs\nreturn [p1A, p2A, p1H, p2H, watlev, sqlite];\n\n",
"outputs": 6,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 200,
"wires": [
[
"a7d9d7b6f2d5d187",
"9d01d7bd2e0e2adc"
],
[
"7aa4f90ceea3e66f",
"9d01d7bd2e0e2adc"
],
[
"1f6d7455338598e2"
],
[
"6010df42fb592dc9"
],
[
"2d8bb3a2398c9bce",
"9d01d7bd2e0e2adc"
],
[
"870f74b5fed802d7",
"cd718b1ffe8dd8f0"
]
]
},
{
"id": "a7d9d7b6f2d5d187",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P1 amps",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 180,
"wires": []
},
{
"id": "7aa4f90ceea3e66f",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P2 amps",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 220,
"wires": []
},
{
"id": "1f6d7455338598e2",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P1 hours",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 260,
"wires": []
},
{
"id": "6010df42fb592dc9",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P2 hours",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 300,
"wires": []
},
{
"id": "2d8bb3a2398c9bce",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "level",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 340,
"wires": []
},
{
"id": "9d01d7bd2e0e2adc",
"type": "ui_chart",
"z": "8eba06c2d561584a",
"name": "",
"group": "5898ce021b9512c6",
"order": 0,
"width": 0,
"height": 0,
"label": "local chart",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "5",
"removeOlderPoints": "2500",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 890,
"y": 440,
"wires": [
[]
]
},
{
"id": "870f74b5fed802d7",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "SQlite",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 400,
"wires": []
},
{
"id": "6d26aef86a598ff8",
"type": "inject",
"z": "8eba06c2d561584a",
"name": "reset local dashboard graph",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "[ ]",
"payloadType": "json",
"x": 180,
"y": 420,
"wires": [
[
"9d01d7bd2e0e2adc"
]
]
},
{
"id": "09a078dc88def992",
"type": "sqlite",
"z": "8eba06c2d561584a",
"mydb": "9cd4a3cdd1baab8c",
"sqlquery": "msg.topic",
"sql": "INSERT INTO rhod_testing (LEVEL, PUMPONEAMPS)\nVALUES (msg.payload.P1amps,msg.payload.P2amps);\n",
"name": "Rhododendron SQlite",
"x": 740,
"y": 720,
"wires": [
[]
]
},
{
"id": "935d4e40d3897d6d",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "to SQlite",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "topic",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 720,
"y": 780,
"wires": []
},
{
"id": "cd718b1ffe8dd8f0",
"type": "function",
"z": "8eba06c2d561584a",
"name": "Rhododendron SQlite",
"func": "//compile msg to send to sqlite. add time in the first column. SqLite interprets \"current_timestamp and returns the correct time in the DB\"\n\nvar dbMsg = {\n \"topic\": \"INSERT INTO Rhododendron VALUES ( CURRENT_TIMESTAMP, \" + msg.payload[\"Pump 1 Amps\"] + \", \" + msg.payload[\"Pump 2 Amps\"] + \", \" + msg.payload[\"Pump 1 Hours\"] + \", \" + msg.payload[\"Pump 2 Hours\"] + \", \" + msg.payload[\"Water Level\"] + \")\"\n}\nreturn dbMsg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 460,
"y": 740,
"wires": [
[
"935d4e40d3897d6d",
"09a078dc88def992"
]
]
},
{
"id": "a47db449e7205e14",
"type": "comment",
"z": "8eba06c2d561584a",
"name": "disect the array coming via modbus",
"info": "",
"x": 420,
"y": 120,
"wires": []
},
{
"id": "7c2956420f6f0c12",
"type": "comment",
"z": "8eba06c2d561584a",
"name": "load information into msg.topic to send to Sqlite",
"info": "",
"x": 420,
"y": 660,
"wires": []
},
{
"id": "a39cafbda5d1a286",
"type": "modbus-client",
"name": "",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"tcpHost": "10.16.41.1",
"tcpPort": "502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "1",
"commandDelay": "1",
"clientTimeout": "5000",
"reconnectOnTimeout": true,
"reconnectTimeout": "1000",
"parallelUnitIdsAllowed": false
},
{
"id": "5898ce021b9512c6",
"type": "ui_group",
"name": "Default",
"tab": "36adcc21cef5324f",
"order": 1,
"disp": true,
"width": "29",
"collapse": false,
"className": ""
},
{
"id": "9cd4a3cdd1baab8c",
"type": "sqlitedb",
"db": "/home/leslie/SQlite Databases/Rhododendron",
"mode": "RWC"
},
{
"id": "36adcc21cef5324f",
"type": "ui_tab",
"name": "level graph",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
This is what I get when exporting all flows.
[
{
"id": "8eba06c2d561584a",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "a39cafbda5d1a286",
"type": "modbus-client",
"name": "",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"tcpHost": "10.16.41.1",
"tcpPort": "502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "1",
"commandDelay": "1",
"clientTimeout": "5000",
"reconnectOnTimeout": true,
"reconnectTimeout": "1000",
"parallelUnitIdsAllowed": false
},
{
"id": "36adcc21cef5324f",
"type": "ui_tab",
"name": "level graph",
"icon": "dashboard",
"disabled": false,
"hidden": false
},
{
"id": "d337100f15b0caf3",
"type": "ui_base",
"theme": {
"name": "theme-light",
"lightTheme": {
"default": "#0094CE",
"baseColor": "#0094CE",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
},
"darkTheme": {
"default": "#097479",
"baseColor": "#097479",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": false
},
"customTheme": {
"name": "Untitled Theme 1",
"default": "#4B7930",
"baseColor": "#4B7930",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
},
"themeState": {
"base-color": {
"default": "#0094CE",
"value": "#0094CE",
"edited": false
},
"page-titlebar-backgroundColor": {
"value": "#0094CE",
"edited": false
},
"page-backgroundColor": {
"value": "#fafafa",
"edited": false
},
"page-sidebar-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"group-textColor": {
"value": "#1bbfff",
"edited": false
},
"group-borderColor": {
"value": "#ffffff",
"edited": false
},
"group-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"widget-textColor": {
"value": "#111111",
"edited": false
},
"widget-backgroundColor": {
"value": "#0094ce",
"edited": false
},
"widget-borderColor": {
"value": "#ffffff",
"edited": false
},
"base-font": {
"value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
}
},
"angularTheme": {
"primary": "indigo",
"accents": "blue",
"warn": "red",
"background": "grey",
"palette": "light"
}
},
"site": {
"name": "Node-RED Dashboard",
"hideToolbar": "false",
"allowSwipe": "false",
"lockMenu": "false",
"allowTempTheme": "true",
"dateFormat": "DD/MM/YYYY",
"sizes": {
"sx": 48,
"sy": 48,
"gx": 6,
"gy": 6,
"cx": 6,
"cy": 6,
"px": 0,
"py": 0
}
}
},
{
"id": "5898ce021b9512c6",
"type": "ui_group",
"name": "Default",
"tab": "36adcc21cef5324f",
"order": 1,
"disp": true,
"width": "29",
"collapse": false,
"className": ""
},
{
"id": "9cd4a3cdd1baab8c",
"type": "sqlitedb",
"db": "/home/leslie/SQlite Databases/Rhododendron",
"mode": "RWC"
},
{
"id": "3f964824e41821b8",
"type": "modbus-read",
"z": "8eba06c2d561584a",
"name": "",
"topic": "",
"showStatusActivities": true,
"logIOActivities": false,
"showErrors": true,
"unitid": "",
"dataType": "HoldingRegister",
"adr": "0",
"quantity": "10",
"rate": "2",
"rateUnit": "s",
"delayOnStart": false,
"startDelayTime": "",
"server": "a39cafbda5d1a286",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"x": 150,
"y": 200,
"wires": [
[],
[
"dcf04a493af33c1b"
]
]
},
{
"id": "dcf04a493af33c1b",
"type": "function",
"z": "8eba06c2d561584a",
"name": "get the data we want",
"func": "\n//pull the variables we want out of the array\n//divide by 10 to get the resolution right\n\nvar p1Amps = msg.payload.data [0]/10;\nvar p2Amps = msg.payload.data [2]/10;\nvar p1Hours = msg.payload.data [4]/10;\nvar p2Hours = msg.payload.data [6]/10;\nvar waterlevel = msg.payload.data [8]/10;\n\n// separate them and add a topic to send to the local dashboard.\n\nvar p1A = { payload: p1Amps, topic: \"Pump 1 Amps\" };\nvar p2A = { payload: p2Amps, topic: \"Pump 2 Amps\" };\nvar p1H = { payload: p1Hours, topic: \"Pump 1 Hours\" };\nvar p2H = { payload: p2Hours, topic: \"Pump 2 Hours\" };\nvar watlev = { payload: waterlevel, topic: \"Water Level\" };\n\n\n\n//collect the data and format it in one payload to send to sqlite\nvar sqlite= {}\nsqlite.payload = { \"Pump 1 Amps\": p1Amps, \"Pump 2 Amps\": p2Amps, \"Pump 1 Hours\": p1Hours, \"Pump 2 Hours\": p2Hours, \"Water Level\": waterlevel};\n\n//return the variables on individual node outputs\nreturn [p1A, p2A, p1H, p2H, watlev, sqlite];\n\n",
"outputs": 6,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 200,
"wires": [
[
"a7d9d7b6f2d5d187",
"9d01d7bd2e0e2adc"
],
[
"7aa4f90ceea3e66f",
"9d01d7bd2e0e2adc"
],
[
"1f6d7455338598e2"
],
[
"6010df42fb592dc9"
],
[
"2d8bb3a2398c9bce",
"9d01d7bd2e0e2adc"
],
[
"870f74b5fed802d7",
"cd718b1ffe8dd8f0"
]
]
},
{
"id": "a7d9d7b6f2d5d187",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P1 amps",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 180,
"wires": []
},
{
"id": "7aa4f90ceea3e66f",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P2 amps",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 220,
"wires": []
},
{
"id": "1f6d7455338598e2",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P1 hours",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 260,
"wires": []
},
{
"id": "6010df42fb592dc9",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "P2 hours",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 300,
"wires": []
},
{
"id": "2d8bb3a2398c9bce",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "level",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 340,
"wires": []
},
{
"id": "9d01d7bd2e0e2adc",
"type": "ui_chart",
"z": "8eba06c2d561584a",
"name": "",
"group": "5898ce021b9512c6",
"order": 0,
"width": 0,
"height": 0,
"label": "local chart",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "5",
"removeOlderPoints": "2500",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 890,
"y": 440,
"wires": [
[]
]
},
{
"id": "870f74b5fed802d7",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "SQlite",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 400,
"wires": []
},
{
"id": "6d26aef86a598ff8",
"type": "inject",
"z": "8eba06c2d561584a",
"name": "reset local dashboard graph",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "[ ]",
"payloadType": "json",
"x": 180,
"y": 420,
"wires": [
[
"9d01d7bd2e0e2adc"
]
]
},
{
"id": "09a078dc88def992",
"type": "sqlite",
"z": "8eba06c2d561584a",
"mydb": "9cd4a3cdd1baab8c",
"sqlquery": "msg.topic",
"sql": "INSERT INTO rhod_testing (LEVEL, PUMPONEAMPS)\nVALUES (msg.payload.P1amps,msg.payload.P2amps);\n",
"name": "Rhododendron SQlite",
"x": 740,
"y": 720,
"wires": [
[]
]
},
{
"id": "935d4e40d3897d6d",
"type": "debug",
"z": "8eba06c2d561584a",
"name": "to SQlite",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "topic",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 720,
"y": 780,
"wires": []
},
{
"id": "cd718b1ffe8dd8f0",
"type": "function",
"z": "8eba06c2d561584a",
"name": "Rhododendron SQlite",
"func": "//compile msg to send to sqlite. add time in the first column. SqLite interprets \"current_timestamp and returns the correct time in the DB\"\n\nvar dbMsg = {\n \"topic\": \"INSERT INTO Rhododendron VALUES ( CURRENT_TIMESTAMP, \" + msg.payload[\"Pump 1 Amps\"] + \", \" + msg.payload[\"Pump 2 Amps\"] + \", \" + msg.payload[\"Pump 1 Hours\"] + \", \" + msg.payload[\"Pump 2 Hours\"] + \", \" + msg.payload[\"Water Level\"] + \")\"\n}\nreturn dbMsg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 460,
"y": 740,
"wires": [
[
"935d4e40d3897d6d",
"09a078dc88def992"
]
]
},
{
"id": "a47db449e7205e14",
"type": "comment",
"z": "8eba06c2d561584a",
"name": "disect the array coming via modbus",
"info": "",
"x": 420,
"y": 120,
"wires": []
},
{
"id": "7c2956420f6f0c12",
"type": "comment",
"z": "8eba06c2d561584a",
"name": "load information into msg.topic to send to Sqlite",
"info": "",
"x": 420,
"y": 660,
"wires": []
}
]
I'm not sure why there is a difference since I can only see one flow but its seems like the all flows has more information.
I have searched and can't find anything about "ubidot" in either of these files.
Sorry, my node red server is running in a proxmox VM at the moment, and I can't copy/paste from that terminal. I should have ssh'ed for you.