I finally got around to this. Here’s my starting point:
[
{
"id": "00d6db422d0210d3",
"type": "tab",
"label": "Phase A",
"disabled": false,
"info": "",
"env": []
},
{
"id": "21bfe22916dd246d",
"type": "inject",
"z": "00d6db422d0210d3",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "1",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 110,
"y": 260,
"wires": [
[
"2671615dc599a099",
"a0c0acdc395c52b2",
"5102b38812ddb616",
"c1196323a7277dbd",
"4821646f570cc36e",
"f1b18003614a577b",
"adf9285e6ed56a69"
]
]
},
{
"id": "c45224d718b59e08",
"type": "debug",
"z": "00d6db422d0210d3",
"name": "PHASE A",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 580,
"y": 80,
"wires": []
},
{
"id": "2671615dc599a099",
"type": "groov-io-read",
"z": "00d6db422d0210d3",
"device": "bb3ded0f0b40af19",
"dataType": "channel-analog",
"moduleIndex": "0",
"channelIndex": "0",
"mmpAddress": "0xF0D81000",
"mmpType": "int32",
"mmpLength": "1",
"mmpEncoding": "ascii",
"value": "",
"valueType": "msg.payload",
"itemName": "",
"name": "Phase A Voltage",
"x": 320,
"y": 80,
"wires": [
[
"c45224d718b59e08",
"e972eedb202fa4d9"
]
]
},
{
"id": "a0c0acdc395c52b2",
"type": "groov-io-read",
"z": "00d6db422d0210d3",
"device": "bb3ded0f0b40af19",
"dataType": "channel-analog",
"moduleIndex": "0",
"channelIndex": "1",
"mmpAddress": "0xF0D81000",
"mmpType": "int32",
"mmpLength": "1",
"mmpEncoding": "ascii",
"value": "",
"valueType": "msg.payload",
"itemName": "",
"name": "Phase A Current",
"x": 320,
"y": 120,
"wires": [
[
"c45224d718b59e08",
"e972eedb202fa4d9"
]
]
},
{
"id": "5102b38812ddb616",
"type": "groov-io-read",
"z": "00d6db422d0210d3",
"device": "bb3ded0f0b40af19",
"dataType": "channel-analog",
"moduleIndex": "0",
"channelIndex": "8",
"mmpAddress": "0xF0D81000",
"mmpType": "int32",
"mmpLength": "1",
"mmpEncoding": "ascii",
"value": "",
"valueType": "msg.payload",
"itemName": "",
"name": "Phase A Frequency",
"x": 330,
"y": 280,
"wires": [
[
"c45224d718b59e08",
"e972eedb202fa4d9"
]
]
},
{
"id": "f1b18003614a577b",
"type": "groov-io-read",
"z": "00d6db422d0210d3",
"device": "bb3ded0f0b40af19",
"dataType": "channel-analog",
"moduleIndex": "0",
"channelIndex": "7",
"mmpAddress": "0xF0D81000",
"mmpType": "int32",
"mmpLength": "1",
"mmpEncoding": "ascii",
"value": "",
"valueType": "msg.payload",
"itemName": "",
"name": "Phase A Peak Current",
"x": 340,
"y": 240,
"wires": [
[
"c45224d718b59e08",
"e972eedb202fa4d9"
]
]
},
{
"id": "4821646f570cc36e",
"type": "groov-io-read",
"z": "00d6db422d0210d3",
"device": "bb3ded0f0b40af19",
"dataType": "channel-analog",
"moduleIndex": "0",
"channelIndex": "6",
"mmpAddress": "0xF0D81000",
"mmpType": "int32",
"mmpLength": "1",
"mmpEncoding": "ascii",
"value": "",
"valueType": "msg.payload",
"itemName": "",
"name": "Phase A Peak Voltage",
"x": 340,
"y": 200,
"wires": [
[
"c45224d718b59e08",
"e972eedb202fa4d9"
]
]
},
{
"id": "c1196323a7277dbd",
"type": "groov-io-read",
"z": "00d6db422d0210d3",
"device": "bb3ded0f0b40af19",
"dataType": "channel-analog",
"moduleIndex": "0",
"channelIndex": "5",
"mmpAddress": "0xF0D81000",
"mmpType": "int32",
"mmpLength": "1",
"mmpEncoding": "ascii",
"value": "",
"valueType": "msg.payload",
"itemName": "",
"name": "Phase A PowerFactor",
"x": 340,
"y": 160,
"wires": [
[
"c45224d718b59e08",
"e972eedb202fa4d9"
]
]
},
{
"id": "adf9285e6ed56a69",
"type": "groov-io-read",
"z": "00d6db422d0210d3",
"device": "bb3ded0f0b40af19",
"dataType": "channel-analog",
"moduleIndex": "0",
"channelIndex": "9",
"mmpAddress": "0xF0D81000",
"mmpType": "int32",
"mmpLength": "1",
"mmpEncoding": "ascii",
"value": "",
"valueType": "msg.payload",
"itemName": "",
"name": "Phase A Pwr@Fund.Freq",
"x": 350,
"y": 320,
"wires": [
[
"c45224d718b59e08",
"e972eedb202fa4d9"
]
]
},
{
"id": "224e8ecf7984e59b",
"type": "file",
"z": "00d6db422d0210d3",
"name": "Phase A",
"filename": "/run/media/sda2/PhaseA.csv",
"appendNewline": false,
"createDir": true,
"overwriteFile": "false",
"encoding": "none",
"x": 1040,
"y": 140,
"wires": [
[]
]
},
{
"id": "611515608b6d4b4c",
"type": "csv",
"z": "00d6db422d0210d3",
"name": "",
"sep": ",",
"hdrin": true,
"hdrout": "once",
"multi": "mult",
"ret": "\\r\\n",
"temp": "Voltage, Current, Power Factor, Peak Voltage, Peak Current, Frequency, Pwr@Freq",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 830,
"y": 140,
"wires": [
[
"25938cad784dd6c2",
"224e8ecf7984e59b"
]
]
},
{
"id": "e972eedb202fa4d9",
"type": "join",
"z": "00d6db422d0210d3",
"name": "",
"mode": "custom",
"build": "array",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "7",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 630,
"y": 140,
"wires": [
[
"099294c8f9d4e4b2",
"611515608b6d4b4c"
]
]
},
{
"id": "099294c8f9d4e4b2",
"type": "debug",
"z": "00d6db422d0210d3",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 80,
"wires": []
},
{
"id": "25938cad784dd6c2",
"type": "debug",
"z": "00d6db422d0210d3",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1010,
"y": 80,
"wires": []
},
{
"id": "bb3ded0f0b40af19",
"type": "groov-io-device",
"address": "localhost",
"msgQueueFullBehavior": "DROP_OLD"
}
]
[power to csv flows.zip|attachment](upload://r9752sig2mySoAgczYIuxxpDrWA.zip) (1.4 KB)
The problem I am having is the values are occasionally getting out of sync so the csv file values are not always placed in the correct columns. Where can I fix this/make it better? Also, how can I add a date/timestamp column?
Thank you!