Hello world!
Has anyone managed to use the node-red file write node on the Cerbo GX?
I am trying to implement a data logger, by writing to a file on the SD card on my Cerbo, and although the write appears to be successful (no error and input of write node written to output), the file is not updated.
I have checked paths are correct by creating a file on the SD card and reading it into node-red, so the issue is with writing.
Does anyone have any ideas?
Update: On node-red forums, it seems that permission issues arise when node-red is installed as root user apparently “this will cause all sorts of problems”. Does anyone @victron have any idea?
Here is the code for reference:
[
{
“id”: “ba8aa8c078a8b619”,
“type”: “file”,
“z”: “3938045e480f9c41”,
“name”: “”,
“filename”: “/run/media/mmcblk0p1/logs/testlog.txt”,
“filenameType”: “str”,
“appendNewline”: true,
“createDir”: true,
“overwriteFile”: “false”,
“encoding”: “ascii”,
“x”: 1130,
“y”: 140,
“wires”: [
[
“3d30281f2ee4265e”
]
]
},
{
“id”: “e084a4ae48fc8987”,
“type”: “inject”,
“z”: “3938045e480f9c41”,
“name”: “”,
“props”: [
{
“p”: “payload”
},
{
“p”: “topic”,
“vt”: “str”
}
],
“repeat”: “”,
“crontab”: “”,
“once”: false,
“onceDelay”: 0.1,
“topic”: “”,
“payload”: “Hello world”,
“payloadType”: “str”,
“x”: 800,
“y”: 140,
“wires”: [
[
“ba8aa8c078a8b619”
]
]
},
{
“id”: “3d30281f2ee4265e”,
“type”: “debug”,
“z”: “3938045e480f9c41”,
“name”: “debug 5”,
“active”: true,
“tosidebar”: true,
“console”: false,
“tostatus”: false,
“complete”: “false”,
“statusVal”: “”,
“statusType”: “auto”,
“x”: 1480,
“y”: 140,
“wires”:
}
]
Thanks!