Questions about context saving and something more

Hello Community,
I admit I give up. I searched almost 2h or more the forum and internet and I couldn't find answers.
I am with Node-RED for almost a week. And also not more than 2h/day with at least half of that time watching videos about flows and Node-RED stuff. So I am a complete rookie here. So:
Using Node-RED version: v3.1.3, Node.js version: v18.19.0
I enabled context storage in settings.js
contextStorage: {
default: {
module:"localfilesystem"
},
},
I noticed that all my variables are saved. The issue is that I don't want to save 4 of them. All *Status variables I don't want to be saved. How can I achieve that? Nodes used: node-red, node-red-contrib-bme280, node-red-dashboard, node-red-node-pi-gpio.
Here is my flow:

[
    {
        "id": "ba1766ac927b6d8a",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "41ddb89135a8a655",
        "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": "7945abd2dee810c1",
        "type": "ui_tab",
        "name": "Dry Curing Chamber",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "d7bffd698c60b2d8",
        "type": "ui_group",
        "name": "Temperature",
        "tab": "7945abd2dee810c1",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "312de576584cdf1c",
        "type": "ui_group",
        "name": "Humidity",
        "tab": "7945abd2dee810c1",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "07a56ae4b449b70e",
        "type": "ui_group",
        "name": "Chart",
        "tab": "7945abd2dee810c1",
        "order": 3,
        "disp": true,
        "width": "12",
        "collapse": false,
        "className": ""
    },
    {
        "id": "fc5e95b89a8c7b3a",
        "type": "Bme280",
        "z": "ba1766ac927b6d8a",
        "name": "temp/hum",
        "bus": "1",
        "address": "0x77",
        "topic": "bme280",
        "extra": false,
        "preasure": 1013.25,
        "x": 620,
        "y": 800,
        "wires": [
            [
                "87e85ec88092e28a",
                "65bebf7f18fe535a",
                "febf4d206e063e1f",
                "9f28b460a9cecc69"
            ]
        ]
    },
    {
        "id": "9f24dff7a06255d6",
        "type": "inject",
        "z": "ba1766ac927b6d8a",
        "name": "cycle",
        "props": [],
        "repeat": "1",
        "crontab": "",
        "once": false,
        "onceDelay": "1",
        "topic": "",
        "x": 190,
        "y": 800,
        "wires": [
            [
                "637ee11584e829a2",
                "065a4a1854d62a58",
                "c40e6c412d49dd1b",
                "fc5e95b89a8c7b3a",
                "1520796f4d8620c4",
                "2eb20c2c9da81599",
                "c822c326d67bbb78"
            ]
        ]
    },
    {
        "id": "65bebf7f18fe535a",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Temperature ctrl Heat",
        "func": "flow.set(\"BME280Temp\", msg.payload.temperature_C);\nvar heat_sts = flow.get(\"HeaterStatus\");\nvar HtrThrOn = flow.get(\"HeaterThrOn\");\nvar HtrThrOff = flow.get(\"HeaterThrOff\");\nvar tempmeas = parseFloat(msg.payload.temperature_C).toFixed(1); // msg.payload.temperature_C;\n\nif (tempmeas >= HtrThrOff) {\n    heat_sts = \"OFF\";\n}\nif (tempmeas <= HtrThrOn) {\n    heat_sts = \"ON\";\n}\nflow.set(\"HeaterStatus\", heat_sts);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 700,
        "wires": []
    },
    {
        "id": "87e85ec88092e28a",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Humidity ctrl Humidifier",
        "func": "flow.set(\"BME280Humidity\", msg.payload.humidity);\nvar hum_sts = flow.get(\"HumStatus\");\nvar HThrOn = flow.get(\"HumThrOn\");\nvar HThrOff = flow.get(\"HumThrOff\");\nvar hummeas = parseFloat(msg.payload.humidity).toFixed(1); // msg.payload.temperature_C;\n\nif (hummeas >= HThrOff) {\n    hum_sts = \"OFF\";\n}\nif (hummeas <= HThrOn) {\n    hum_sts = \"ON\";\n}\nflow.set(\"HumStatus\", hum_sts);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 870,
        "y": 840,
        "wires": []
    },
    {
        "id": "f6d9a4e249c64e60",
        "type": "ui_gauge",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "group": "d7bffd698c60b2d8",
        "order": 1,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Temperature",
        "label": "",
        "format": "{{value | number:1}}ºC",
        "min": 0,
        "max": "50",
        "colors": [
            "#00bfff",
            "#1be600",
            "#ca3838"
        ],
        "seg1": "10",
        "seg2": "14",
        "diff": false,
        "className": "",
        "x": 1150,
        "y": 400,
        "wires": []
    },
    {
        "id": "833130836412f40e",
        "type": "ui_gauge",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "group": "312de576584cdf1c",
        "order": 1,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Humidity",
        "label": "",
        "format": "{{value | number:1}}%",
        "min": 0,
        "max": "100",
        "colors": [
            "#b30000",
            "#fff700",
            "#54f000"
        ],
        "seg1": "50",
        "seg2": "72",
        "diff": false,
        "className": "",
        "x": 1080,
        "y": 980,
        "wires": []
    },
    {
        "id": "637ee11584e829a2",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "TemperatureDisplay",
        "func": "var TempMeas = flow.get(\"BME280Temp\");\n// var TempThrOff = global.get(\"TempThresholdOff\");\nmsg.topic = 'Temperature'\nmsg.payload = parseFloat(TempMeas).toFixed(1);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 400,
        "wires": [
            [
                "f6d9a4e249c64e60",
                "9cf0309359fe2175"
            ]
        ]
    },
    {
        "id": "065a4a1854d62a58",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "compressor status",
        "func": "\nvar CS = flow.get(\"CompressorStatus\");\nif(CS === \"ON\") {\n    msg.topic = \"ON\";\n    msg.payload = 1;\n} else {\n    msg.topic = \"OFF\";\n    msg.payload = 0;\n}\n// node.warn(\"CS = \" + CS);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 850,
        "y": 580,
        "wires": [
            [
                "fa04f07d52495e4a",
                "ae54e613ed1aca37"
            ]
        ]
    },
    {
        "id": "a4927327b2eacbf4",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Cool Threshold ON, ºC",
        "tooltip": "ºC",
        "group": "d7bffd698c60b2d8",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "50",
        "step": "0.1",
        "className": "",
        "x": 860,
        "y": 160,
        "wires": [
            [
                "614ae7cb152de833"
            ]
        ]
    },
    {
        "id": "614ae7cb152de833",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Cool Thr ON",
        "func": "flow.set(\"TempThresholdOn\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1110,
        "y": 160,
        "wires": []
    },
    {
        "id": "c9129fada9bd6717",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Cool Threshold OFF, ºC",
        "tooltip": "ºC",
        "group": "d7bffd698c60b2d8",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "50",
        "step": "0.1",
        "className": "",
        "x": 870,
        "y": 120,
        "wires": [
            [
                "caf7488496ccaaa6"
            ]
        ]
    },
    {
        "id": "caf7488496ccaaa6",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Cool Thr OFF",
        "func": "flow.set(\"TempThresholdOff\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1120,
        "y": 120,
        "wires": []
    },
    {
        "id": "ae54e613ed1aca37",
        "type": "rpi-gpio out",
        "z": "ba1766ac927b6d8a",
        "name": "Compressor state",
        "pin": "17",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "bcm": true,
        "x": 1110,
        "y": 580,
        "wires": []
    },
    {
        "id": "fa04f07d52495e4a",
        "type": "ui_text",
        "z": "ba1766ac927b6d8a",
        "group": "d7bffd698c60b2d8",
        "order": 4,
        "width": "0",
        "height": "0",
        "name": "",
        "label": "Compressor",
        "format": "{{msg.topic}}",
        "layout": "row-spread",
        "className": "",
        "style": true,
        "font": "",
        "fontSize": "18",
        "color": "#000000",
        "x": 1090,
        "y": 640,
        "wires": []
    },
    {
        "id": "c40e6c412d49dd1b",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Heater status",
        "func": "\nvar HS = flow.get(\"HeaterStatus\");\nif(HS === \"ON\") {\n    msg.topic = \"ON\";\n    msg.payload = 1;\n} else {\n    msg.topic = \"OFF\";\n    msg.payload = 0;\n}\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 830,
        "y": 520,
        "wires": [
            [
                "3f1363a5353a05fb",
                "0495176a95583ace"
            ]
        ]
    },
    {
        "id": "0495176a95583ace",
        "type": "rpi-gpio out",
        "z": "ba1766ac927b6d8a",
        "name": "Heater state",
        "pin": "27",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "bcm": true,
        "x": 1090,
        "y": 520,
        "wires": []
    },
    {
        "id": "3f1363a5353a05fb",
        "type": "ui_text",
        "z": "ba1766ac927b6d8a",
        "group": "d7bffd698c60b2d8",
        "order": 4,
        "width": "0",
        "height": "0",
        "name": "",
        "label": "Heater",
        "format": "{{msg.topic}}",
        "layout": "row-spread",
        "className": "",
        "style": true,
        "font": "",
        "fontSize": "18",
        "color": "#000000",
        "x": 1070,
        "y": 480,
        "wires": []
    },
    {
        "id": "6edae8b45d461328",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Heater Threshold ON, ºC",
        "tooltip": "ºC",
        "group": "d7bffd698c60b2d8",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "50",
        "step": "0.1",
        "className": "",
        "x": 870,
        "y": 80,
        "wires": [
            [
                "ad05051ab022cf1b"
            ]
        ]
    },
    {
        "id": "ad05051ab022cf1b",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Heater threshold On",
        "func": "flow.set(\"HeaterThrOn\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1140,
        "y": 80,
        "wires": []
    },
    {
        "id": "febf4d206e063e1f",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Temperature ctrl Cool",
        "func": "var compressor_sts = flow.get(\"CompressorStatus\");\nvar TempThrOff = flow.get(\"TempThresholdOff\");\nvar TempThrOn = flow.get(\"TempThresholdOn\");\nvar tempmeas = parseFloat(msg.payload.temperature_C).toFixed(1); // msg.payload.temperature_C;\n\nif (tempmeas >= TempThrOn) {\n    compressor_sts = \"ON\";\n}\nif (tempmeas <= TempThrOff) {\n    compressor_sts = \"OFF\";\n}\nflow.set(\"CompressorStatus\", compressor_sts);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "// Code added here will be run once\n// whenever the node is started.\ncontext.set(\"prev_state\", \"0\");\ncontext.set(\"state\", \"0\");",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 760,
        "wires": []
    },
    {
        "id": "38ada0924d906779",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Heater Threshold OFF, ºC",
        "tooltip": "ºC",
        "group": "d7bffd698c60b2d8",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "50",
        "step": "0.1",
        "className": "",
        "x": 870,
        "y": 40,
        "wires": [
            [
                "de9c9f582fb74663"
            ]
        ]
    },
    {
        "id": "de9c9f582fb74663",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Heater threshold Off",
        "func": "flow.set(\"HeaterThrOff\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1140,
        "y": 40,
        "wires": []
    },
    {
        "id": "9f28b460a9cecc69",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Humidity ctrl Dehumidifier",
        "func": "var dehum_sts = flow.get(\"DehumStatus\");\nvar DehumThrOn = flow.get(\"DehumThrOn\");\nvar DehumThrOff = flow.get(\"DehumThrOff\");\nvar hummeas = parseFloat(msg.payload.humidity).toFixed(1); // msg.payload.temperature_C;\n\nif (hummeas <= DehumThrOff) {\n    dehum_sts = \"OFF\";\n}\nif (hummeas >= DehumThrOn) {\n    dehum_sts = \"ON\";\n}\nflow.set(\"DehumStatus\", dehum_sts);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 870,
        "y": 900,
        "wires": []
    },
    {
        "id": "1c8f5f4d8c32fa93",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Dehumidifier Threshold ON, %",
        "tooltip": "%",
        "group": "312de576584cdf1c",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "100",
        "step": "0.1",
        "className": "",
        "x": 890,
        "y": 340,
        "wires": [
            [
                "27e976a7d36c7151"
            ]
        ]
    },
    {
        "id": "27e976a7d36c7151",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Dehum Thr ON",
        "func": "flow.set(\"DehumThrOn\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1120,
        "y": 340,
        "wires": []
    },
    {
        "id": "30a097b19409a578",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Dehumidifier Threshold OFF, %",
        "tooltip": "%",
        "group": "312de576584cdf1c",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": true,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "100",
        "step": "0.1",
        "className": "",
        "x": 890,
        "y": 300,
        "wires": [
            [
                "5e74845496290964"
            ]
        ]
    },
    {
        "id": "5e74845496290964",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Dehum Thr OFF",
        "func": "flow.set(\"DehumThrOff\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1120,
        "y": 300,
        "wires": []
    },
    {
        "id": "a4e368dade20e65d",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Humidifier Threshold ON, %",
        "tooltip": "%",
        "group": "312de576584cdf1c",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": true,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "100",
        "step": "0.1",
        "className": "",
        "x": 880,
        "y": 260,
        "wires": [
            [
                "70c84fb536fb565b"
            ]
        ]
    },
    {
        "id": "70c84fb536fb565b",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Humidity threshold On",
        "func": "flow.set(\"HumThrOn\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1140,
        "y": 260,
        "wires": []
    },
    {
        "id": "212389964ae6fea6",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Humidity threshold Off",
        "func": "flow.set(\"HumThrOff\", msg.payload);\n",
        "outputs": 0,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1140,
        "y": 220,
        "wires": []
    },
    {
        "id": "3962696337f26607",
        "type": "ui_numeric",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "label": "Humidifier Threshold OFF, %",
        "tooltip": "%",
        "group": "312de576584cdf1c",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": true,
        "passthru": false,
        "topic": "payload",
        "topicType": "msg",
        "format": "{{value | number:1}}",
        "min": 0,
        "max": "100",
        "step": "0.1",
        "className": "",
        "x": 880,
        "y": 220,
        "wires": [
            [
                "212389964ae6fea6"
            ]
        ]
    },
    {
        "id": "1520796f4d8620c4",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "HumidityDisplay",
        "func": "var HumMeas = flow.get(\"BME280Humidity\");\nmsg.topic = 'Humidity'\nmsg.payload = parseFloat(HumMeas).toFixed(1);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 840,
        "y": 980,
        "wires": [
            [
                "833130836412f40e",
                "9cf0309359fe2175"
            ]
        ]
    },
    {
        "id": "c822c326d67bbb78",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Dehumidifier status",
        "func": "\nvar DHS = flow.get(\"DehumStatus\");\nif(DHS === \"ON\") {\n    msg.topic = \"ON\";\n    msg.payload = 1;\n} else {\n    msg.topic = \"OFF\";\n    msg.payload = 0;\n}\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 850,
        "y": 1160,
        "wires": [
            [
                "81faf4b1b0b3ec77",
                "d0f0b7a4f4db8eae"
            ]
        ]
    },
    {
        "id": "d0f0b7a4f4db8eae",
        "type": "rpi-gpio out",
        "z": "ba1766ac927b6d8a",
        "name": "Dehumidifier state",
        "pin": "24",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "bcm": true,
        "x": 1110,
        "y": 1160,
        "wires": []
    },
    {
        "id": "81faf4b1b0b3ec77",
        "type": "ui_text",
        "z": "ba1766ac927b6d8a",
        "group": "312de576584cdf1c",
        "order": 4,
        "width": "0",
        "height": "0",
        "name": "",
        "label": "Dehumidifier",
        "format": "{{msg.topic}}",
        "layout": "row-spread",
        "className": "",
        "style": true,
        "font": "",
        "fontSize": "18",
        "color": "#000000",
        "x": 1090,
        "y": 1220,
        "wires": []
    },
    {
        "id": "2eb20c2c9da81599",
        "type": "function",
        "z": "ba1766ac927b6d8a",
        "name": "Humidifier status",
        "func": "\nvar HS = flow.get(\"HumStatus\");\nif(HS === \"ON\") {\n    msg.topic = \"ON\";\n    msg.payload = 1;\n} else {\n    msg.topic = \"OFF\";\n    msg.payload = 0;\n}\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 850,
        "y": 1100,
        "wires": [
            [
                "de0ffcbc7d212283",
                "5a99c5f778f265aa"
            ]
        ]
    },
    {
        "id": "5a99c5f778f265aa",
        "type": "rpi-gpio out",
        "z": "ba1766ac927b6d8a",
        "name": "Humidifier state",
        "pin": "23",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "bcm": true,
        "x": 1100,
        "y": 1100,
        "wires": []
    },
    {
        "id": "de0ffcbc7d212283",
        "type": "ui_text",
        "z": "ba1766ac927b6d8a",
        "group": "312de576584cdf1c",
        "order": 4,
        "width": "0",
        "height": "0",
        "name": "",
        "label": "Humidifier",
        "format": "{{msg.topic}}",
        "layout": "row-spread",
        "className": "",
        "style": true,
        "font": "",
        "fontSize": "18",
        "color": "#000000",
        "x": 1080,
        "y": 1040,
        "wires": []
    },
    {
        "id": "9cf0309359fe2175",
        "type": "ui_chart",
        "z": "ba1766ac927b6d8a",
        "name": "",
        "group": "07a56ae4b449b70e",
        "order": 0,
        "width": 0,
        "height": 0,
        "label": "Parameters",
        "chartType": "line",
        "legend": "true",
        "xformat": "auto",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "",
        "ymax": "",
        "removeOlder": 1,
        "removeOlderPoints": "",
        "removeOlderUnit": "3600",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 1450,
        "y": 540,
        "wires": [
            []
        ]
    }
]

You can have more than one context store. You can have a memory only context AND file backed context at the same time.

Alternate, you could delete the 4 unwanted context variables on start up:

Inject (set to fire on start) > change node (delete variable)

tell me more about both options. If I enable more context stores, can I point where these to be saved with code? Like flow.set/get.
Regarding second option: I don't know how to delete them because my inject is cyclic. This flow is supposed to work mostly unattended. Even with loss of connectivity and with power disruptions.

It's in the docs: Writing Functions : Node-RED

E.g.

const myCount = flow.get("count", "memory");
flow.set("count", 123); // goes to default store

Thanks,
I will try this tomorrow.
Just about second solution. Will that work? I was just going to bed its 2 am here :slight_smile:
image
image

Hello @bravogogo, I hope you are enjoying Node-red.

I don't think the documentation around context storage is as clear as it might be.

There are two readymade context storage options available: "localfilesystem" and "memory"
Clearly localfilesystem storage should survive a restart, memory storage should not.

To use them both you need this in settings.js:

contextStorage: {
   default: {
      module:"localfilesystem",
      config: { // Optional config
      }
   },
   memory: {
      module:"memory",
   },
},

After restarting Node-red they should both be available.
eg in a change node


(I am not sure if both options having the same icon is a bug or a fault in my setup)

or in a function

flow.set ("persistentvariable",  "Save me",    "localfilesystem") // specify fs
flow.set ("transientvariable",   "Discard me", "memory")          // specify memory
flow.set ("anothervariable",     "Dont care")                     // Whichever is default

Edit - I see you are using node-red-contrib-bme280, so I guess your sensor is wired directly to GPIO pins on a single board computer?
Are you happy with the BME output, or do you think the readings are skewed by heating from the BME board itself or the SBC?
I would be interested to see a pic of your setup.

A couple things

  1. here is a post I wrote explaining persistent storage you might find helpful
    A guide to understanding 'Persistent Context'

  2. the top eight flows
    Screenshot 2024-01-07 at 5.24.43 AM
    You could use a change node in place of the function nodes
    Screenshot 2024-01-07 at 5.26.47 AM

1 Like

Thank you @jbudd.
So far so good. This is the storage place:
gogobravo@gogorpi:~/.node-red $ cat context/0fb121ca40372a2a/flow.json
{
"TempThresholdOn": 24,
"TempThresholdOff": 23.5,
"HeaterThrOn": 23,
"HeaterThrOff": 23.5,
"DehumThrOn": 83,
"DehumThrOff": 78,
"HumThrOff": 78,
"HumThrOn": 73
}
All status variables are gone. But next problem occur. Everything works fine except in one case. And it is big one :slight_smile: When I power cycle I see this:


And I assume the problem is here:
image
All these deliver data but no one is setting the numbers into them. How can I "refresh" these at start?

I completely agree. Maybe for very high level guys it is fine, but for guys like me, who are always near to the hardware, dealing with status bits in volatile memory areas and knowing only C, assembler and python (for testing purposes only :wink: ), it is little vague.

Yes, I am. I choose this sensor because it is accurate (in particular for the humidity) and provides 3 quantities. This flow is just initial version. I will use the pressure to calculate the dew point which is an extra feature to my dry curing chamber/cheese cave. At higher ambient temperatures I see some differences at about +- 0.5°C. But for less than 20°C the fluctuation goes to the second digit after the point. Maybe I did wrong when I mounted it into a box. It is connected with 1.5m cable to the board. The sensor board is Adafriut and it is powered with 3.3V


blue - BME280,
red - RPI,
white - relay board

I am very impressed. Thank you. This is the guide! I will seek some expansion for this in the future. Regarding change nodes. Now everything works with some minor issues which I hope to fix soon. I don't have time for additional debugging. Maybe after some time I will use them. Red-Node unties people hands and now I see I can implement a lot of things with it easy within short time.
Thank you again

2 Likes

They won't send a message unless something is entered into them.

If you have these values stored in persistent context:

  • In the dashboard numerics nodes, tick "If msg arrives on input, pass through to output"

  • Use inject nodes set to fire at startup, wired to the dashboard node inputs, with msg.payload = your persistent flow context var.

This will initialise the data and synchronise the dashboard display.

Thanks for the pic. Oh wow, a cheese cave!

I use BME280 and BME680 sensors too but just for home monitoring.
I took a different approach: The BME is attached to an ESP8266 (together in a small case) which sends readings by MQTT over Wifi to Node-red on my Pi.
It lets me experiment with deep sleep on the ESP.
When the ESP wakes up I can observe a small increase in the temperature reading over several seconds.
I suspect the BME board is self heating, even though the sensor itself is on a little peninsula.
In one case it's definitely so, due to my poor soldering skills.
No doubt your larger, ventilated case is better than my small enclosed one.

:grinning:

It is too expensive sensor to use it only for monitoring :wink: .But 680 is fine it senses gas. And basically I love to control physical quantities. This is my specialty from the university till now 25 years later :-). your next steps will be to attach some actuators and you also will control, not only monitor :wink:
Thank you very much
P.S. and the dry curing chamber/cheese cave are actually fridges with some devices attached with hoses to it :smiley:

1 Like

Yes, but cheese!

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