Storage of nodered data on Revpi

I want to locally save the data I receive from a sensor on my Revpi.

[
    {
        "id": "3773427109966ee3",
        "type": "debug",
        "z": "4baeccbbe8b96cc7",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 580,
        "y": 180,
        "wires": []
    },
    {
        "id": "d832e5323784bb49",
        "type": "group",
        "z": "4baeccbbe8b96cc7",
        "name": "",
        "style": {
            "stroke": "#ffff00",
            "label": true
        },
        "nodes": [
            "fb0560e6fbaf9f57",
            "a59ecdd3cf7436d4",
            "c9bac3d96d3bd19e",
            "13e820eb178b5714"
        ],
        "x": 44,
        "y": 39,
        "w": 1092,
        "h": 82
    },
    {
        "id": "fb0560e6fbaf9f57",
        "type": "inject",
        "z": "4baeccbbe8b96cc7",
        "g": "d832e5323784bb49",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "30",
        "crontab": "",
        "once": false,
        "onceDelay": "1",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 160,
        "y": 80,
        "wires": [
            [
                "a59ecdd3cf7436d4"
            ]
        ]
    },
    {
        "id": "a59ecdd3cf7436d4",
        "type": "function",
        "z": "4baeccbbe8b96cc7",
        "g": "d832e5323784bb49",
        "name": "Abfrage der Werte",
        "func": "\n// 🌡 Werte abrufen\n\nlet temperatur_innen = global.get(\"Temp_Innen\") || 0;\n\n\n\n// 🕒 Zeitstempel generieren\nlet timestamp = new Date().toISOString();\n\n// 📄 CSV-Zeile erstellen\nmsg.payload = `${timestamp},${temperatur_innen}\\n`;\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 400,
        "y": 80,
        "wires": [
            [
                "c9bac3d96d3bd19e",
                "3773427109966ee3"
            ]
        ]
    },
    {
        "id": "c9bac3d96d3bd19e",
        "type": "file",
        "z": "4baeccbbe8b96cc7",
        "g": "d832e5323784bb49",
        "name": "",
        "filename": "/home/pi/temperatur_innen.csv",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "false",
        "encoding": "utf8",
        "x": 740,
        "y": 80,
        "wires": [
            [
                "13e820eb178b5714"
            ]
        ]
    },
    {
        "id": "13e820eb178b5714",
        "type": "debug",
        "z": "4baeccbbe8b96cc7",
        "g": "d832e5323784bb49",
        "name": "debug 17",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1030,
        "y": 80,
        "wires": []
    }
]

I get this:

Fehler beim Anhängen an Datei: Error: EACCES: permission denied, open '/home/pi/temperatur_innen.csv'

How can i fix that ?

Thanks in advance!

How did you install node red?

Can you show us the node red startup log?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.