Saturday, March 4, 2023

Node Red

When the pi needed reprogramming node red needed some resources. 

http://192.168.1.105:1880/#flow/d07fd454e046853e

Current all Nodes Export :

[
    {
        "id": "d07fd454e046853e",
        "type": "tab",
        "label": "Truck Automation",
        "disabled": false,
        "info": ""
    },
    {
        "id": "bd10299be49cd547",
        "type": "tab",
        "label": "Galley Module",
        "disabled": false,
        "info": ""
    },
    {
        "id": "1105f9d805467111",
        "type": "mqtt-broker",
        "name": "",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    },
    {
        "id": "10e78a89.5b4fd5",
        "type": "mqtt-broker",
        "name": "",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "66682b5f5abb06fa",
        "type": "ui_base",
        "theme": {
            "name": "theme-custom",
            "lightTheme": {
                "default": "#0094CE",
                "baseColor": "#0094CE",
                "baseFont": "Arial,Arial,Helvetica,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": "Blue and Grey",
                "default": "#4B7930",
                "baseColor": "#0094ce",
                "baseFont": "Arial,Arial,Helvetica,sans-serif",
                "reset": false
            },
            "themeState": {
                "base-color": {
                    "default": "#4B7930",
                    "value": "#0094ce",
                    "edited": true
                },
                "page-titlebar-backgroundColor": {
                    "value": "#0094ce",
                    "edited": false
                },
                "page-backgroundColor": {
                    "value": "#6a5e5e",
                    "edited": true
                },
                "page-sidebar-backgroundColor": {
                    "value": "#333333",
                    "edited": true
                },
                "group-textColor": {
                    "value": "#204a87",
                    "edited": true
                },
                "group-borderColor": {
                    "value": "#ffffff",
                    "edited": false
                },
                "group-backgroundColor": {
                    "value": "#d3d7cf",
                    "edited": true
                },
                "widget-textColor": {
                    "value": "#2e3436",
                    "edited": true
                },
                "widget-backgroundColor": {
                    "value": "#65e6d1",
                    "edited": true
                },
                "widget-borderColor": {
                    "value": "#0094ce",
                    "edited": true
                },
                "base-font": {
                    "value": "Arial,Arial,Helvetica,sans-serif"
                }
            },
            "angularTheme": {
                "primary": "indigo",
                "accents": "blue",
                "warn": "red",
                "background": "grey",
                "palette": "light"
            }
        },
        "site": {
            "name": "Truck Dasbboard",
            "hideToolbar": "false",
            "allowSwipe": "false",
            "lockMenu": "false",
            "allowTempTheme": "true",
            "dateFormat": "DD/MM/YYYY",
            "sizes": {
                "sx": 32,
                "sy": 60,
                "gx": 2,
                "gy": 2,
                "cx": 5,
                "cy": 5,
                "px": 2,
                "py": 2
            }
        }
    },
    {
        "id": "a9238198b20b37f9",
        "type": "ui_tab",
        "name": "Truck Interior",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "9e5c61a1a1130ac0",
        "type": "ui_group",
        "name": "Bed",
        "tab": "a9238198b20b37f9",
        "order": 1,
        "disp": true,
        "width": "4",
        "collapse": false,
        "className": ""
    },
    {
        "id": "d9c6af4eb58f033d",
        "type": "ui_group",
        "name": "Light",
        "tab": "a9238198b20b37f9",
        "order": 2,
        "disp": true,
        "width": "4",
        "collapse": false,
        "className": ""
    },
    {
        "id": "f0f525f2ba61551e",
        "type": "ui_group",
        "name": "Temps.",
        "tab": "a9238198b20b37f9",
        "order": 4,
        "disp": true,
        "width": "4",
        "collapse": false,
        "className": ""
    },
    {
        "id": "61285987.c20328",
        "type": "ui_group",
        "name": "Galley",
        "tab": "a9238198b20b37f9",
        "order": 3,
        "disp": true,
        "width": "4",
        "collapse": false,
        "className": ""
    },
    {
        "id": "2e77757e951783bd",
        "type": "ui_group",
        "name": "Humidity",
        "tab": "a9238198b20b37f9",
        "order": 5,
        "disp": true,
        "width": "4",
        "collapse": false,
        "className": ""
    },
    {
        "id": "05423309f8c2b631",
        "type": "nexmobasic"
    },
    {
        "id": "2740492b019ed5fc",
        "type": "nexmobasic"
    },
    {
        "id": "0d8878788067d1e1",
        "type": "ui_group",
        "name": "Camera",
        "tab": "a9238198b20b37f9",
        "order": 6,
        "disp": true,
        "width": "12",
        "collapse": false,
        "className": ""
    },
    {
        "id": "a56365d4022c70fc",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 1 - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 320,
        "wires": [
            [
                "e39eee0825ea7049"
            ]
        ]
    },
    {
        "id": "e39eee0825ea7049",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 1",
        "pin": "7",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 340,
        "wires": []
    },
    {
        "id": "6162e6807761acb6",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 1 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 360,
        "wires": [
            [
                "e39eee0825ea7049"
            ]
        ]
    },
    {
        "id": "a85db59e76ada9a8",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 2  - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 460,
        "wires": [
            [
                "f9a37bf602523ab1"
            ]
        ]
    },
    {
        "id": "a5ec34e75b7de5ae",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 2 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 500,
        "wires": [
            [
                "f9a37bf602523ab1"
            ]
        ]
    },
    {
        "id": "f9a37bf602523ab1",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 2",
        "pin": "11",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 480,
        "wires": []
    },
    {
        "id": "6283130edf132a17",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 3",
        "pin": "13",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 620,
        "wires": []
    },
    {
        "id": "1419fe36941b0ebe",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 3 - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 600,
        "wires": [
            [
                "6283130edf132a17"
            ]
        ]
    },
    {
        "id": "dcc73868013fb118",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 3 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 640,
        "wires": [
            [
                "6283130edf132a17"
            ]
        ]
    },
    {
        "id": "e3dcc698b8481e92",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 4",
        "pin": "15",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 740,
        "wires": []
    },
    {
        "id": "a261a16ebd2533b4",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 4 - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 720,
        "wires": [
            [
                "e3dcc698b8481e92"
            ]
        ]
    },
    {
        "id": "966e8add85e05f26",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 4 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 760,
        "wires": [
            [
                "e3dcc698b8481e92"
            ]
        ]
    },
    {
        "id": "55de875dfca7124b",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 5",
        "pin": "21",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 880,
        "wires": []
    },
    {
        "id": "cc6942619b7176de",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 5 - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 860,
        "wires": [
            [
                "55de875dfca7124b"
            ]
        ]
    },
    {
        "id": "af4c6c5f5fb573a7",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 5 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 900,
        "wires": [
            [
                "55de875dfca7124b"
            ]
        ]
    },
    {
        "id": "63c32887220ba57d",
        "type": "ui_switch",
        "z": "d07fd454e046853e",
        "name": "TBA1",
        "label": "TBA1",
        "tooltip": "",
        "group": "d9c6af4eb58f033d",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "1",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 270,
        "y": 280,
        "wires": [
            [
                "e39eee0825ea7049"
            ]
        ]
    },
    {
        "id": "5d2df55f106f5c5b",
        "type": "ui_switch",
        "z": "d07fd454e046853e",
        "name": "Centre",
        "label": "Centre",
        "tooltip": "",
        "group": "d9c6af4eb58f033d",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "1",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 270,
        "y": 420,
        "wires": [
            [
                "f9a37bf602523ab1"
            ]
        ]
    },
    {
        "id": "30add1ebf7b8ac67",
        "type": "ui_switch",
        "z": "d07fd454e046853e",
        "name": "Side Table",
        "label": "Side Table",
        "tooltip": "",
        "group": "d9c6af4eb58f033d",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "1",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 290,
        "y": 560,
        "wires": [
            [
                "6283130edf132a17"
            ]
        ]
    },
    {
        "id": "d059ff878774bb3a",
        "type": "ui_switch",
        "z": "d07fd454e046853e",
        "name": "Aft",
        "label": "Aft",
        "tooltip": "",
        "group": "9e5c61a1a1130ac0",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "1",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 270,
        "y": 680,
        "wires": [
            [
                "e3dcc698b8481e92"
            ]
        ]
    },
    {
        "id": "8275b563d57c9363",
        "type": "ui_switch",
        "z": "d07fd454e046853e",
        "name": "Reading",
        "label": "Reading",
        "tooltip": "",
        "group": "9e5c61a1a1130ac0",
        "order": 1,
        "width": "4",
        "height": 1,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "1",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 300,
        "y": 820,
        "wires": [
            [
                "55de875dfca7124b"
            ]
        ]
    },
    {
        "id": "cf4a0584a6aa077b",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 6",
        "pin": "29",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 1020,
        "wires": []
    },
    {
        "id": "e20b177702369989",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 6 - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 1000,
        "wires": [
            [
                "cf4a0584a6aa077b"
            ]
        ]
    },
    {
        "id": "986cffea790c424f",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 6 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 1040,
        "wires": [
            [
                "cf4a0584a6aa077b"
            ]
        ]
    },
    {
        "id": "2563009d7471326c",
        "type": "mqtt out",
        "z": "d07fd454e046853e",
        "name": "",
        "topic": "",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "1105f9d805467111",
        "x": 190,
        "y": 1840,
        "wires": []
    },
    {
        "id": "2d666e7ccef9524c",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 7",
        "pin": "31",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 1160,
        "wires": []
    },
    {
        "id": "e676c40f62be9954",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 7 - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 1140,
        "wires": [
            [
                "2d666e7ccef9524c"
            ]
        ]
    },
    {
        "id": "f6810ceaff5d6cd8",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 7 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 1180,
        "wires": [
            [
                "2d666e7ccef9524c"
            ]
        ]
    },
    {
        "id": "c80956ea561295b6",
        "type": "rpi-gpio out",
        "z": "d07fd454e046853e",
        "name": "IN 8",
        "pin": "33",
        "set": true,
        "level": "0",
        "freq": "",
        "out": "out",
        "x": 510,
        "y": 1300,
        "wires": []
    },
    {
        "id": "85d290e061a82303",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 8 - On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 140,
        "y": 1280,
        "wires": [
            [
                "c80956ea561295b6"
            ]
        ]
    },
    {
        "id": "afb46033f2d6523d",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "IN 8 - Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 140,
        "y": 1320,
        "wires": [
            [
                "c80956ea561295b6"
            ]
        ]
    },
    {
        "id": "3f8737fa0cbce13f",
        "type": "shutdown",
        "z": "d07fd454e046853e",
        "name": "",
        "x": 440,
        "y": 40,
        "wires": []
    },
    {
        "id": "1c8607c45d77fbfd",
        "type": "restart",
        "z": "d07fd454e046853e",
        "name": "",
        "x": 430,
        "y": 80,
        "wires": []
    },
    {
        "id": "dc968fdcb9bc907b",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "Shutdown",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "str",
        "x": 140,
        "y": 40,
        "wires": [
            [
                "3f8737fa0cbce13f"
            ]
        ]
    },
    {
        "id": "b0d41cf383314ab3",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "Restart",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "True",
        "payloadType": "str",
        "x": 130,
        "y": 80,
        "wires": [
            [
                "1c8607c45d77fbfd"
            ]
        ]
    },
    {
        "id": "2c111828dd6e3ef8",
        "type": "rpi-dht22",
        "z": "d07fd454e046853e",
        "name": "Temp / Hum",
        "topic": "rpi-dht22",
        "dht": 22,
        "pintype": "2",
        "pin": "12",
        "x": 270,
        "y": 1400,
        "wires": [
            [
                "839791be674f428e",
                "6e6258d77d6d1007"
            ]
        ]
    },
    {
        "id": "762009f79011c1ea",
        "type": "inject",
        "z": "d07fd454e046853e",
        "name": "5 Sec",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "60",
        "crontab": "",
        "once": true,
        "onceDelay": "10",
        "topic": "",
        "payloadType": "date",
        "x": 120,
        "y": 1400,
        "wires": [
            [
                "2c111828dd6e3ef8"
            ]
        ]
    },
    {
        "id": "839791be674f428e",
        "type": "function",
        "z": "d07fd454e046853e",
        "name": "Humidity",
        "func": "msg.payload = msg.humidity\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 440,
        "y": 1420,
        "wires": [
            [
                "e7c4a573f6fef1f3",
                "b8a58fb8b8c2e720"
            ]
        ]
    },
    {
        "id": "6e6258d77d6d1007",
        "type": "ui_gauge",
        "z": "d07fd454e046853e",
        "name": "",
        "group": "f0f525f2ba61551e",
        "order": 2,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Inside",
        "label": "Celcius",
        "format": "{{value}}",
        "min": 0,
        "max": "50",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "15",
        "seg2": "35",
        "x": 570,
        "y": 1360,
        "wires": []
    },
    {
        "id": "e7c4a573f6fef1f3",
        "type": "ui_gauge",
        "z": "d07fd454e046853e",
        "name": "",
        "group": "2e77757e951783bd",
        "order": 1,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Humidity",
        "label": "%",
        "format": "{{value}}",
        "min": 0,
        "max": "100",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "15",
        "seg2": "60",
        "className": "",
        "x": 580,
        "y": 1400,
        "wires": []
    },
    {
        "id": "0adb06a959e38f43",
        "type": "comment",
        "z": "d07fd454e046853e",
        "name": "Unused - yet",
        "info": "",
        "x": 400,
        "y": 980,
        "wires": []
    },
    {
        "id": "6d21acd7f78e5eb4",
        "type": "comment",
        "z": "d07fd454e046853e",
        "name": "Unused - yet",
        "info": "",
        "x": 410,
        "y": 1100,
        "wires": []
    },
    {
        "id": "741fd1774f7816dd",
        "type": "comment",
        "z": "d07fd454e046853e",
        "name": "Unused - yet",
        "info": "",
        "x": 410,
        "y": 1220,
        "wires": []
    },
    {
        "id": "d56158387d864495",
        "type": "mqtt out",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "10e78a89.5b4fd5",
        "x": 550,
        "y": 380,
        "wires": []
    },
    {
        "id": "6b95bcc4944078ee",
        "type": "mqtt in",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/temperature",
        "qos": "2",
        "datatype": "auto",
        "broker": "10e78a89.5b4fd5",
        "nl": false,
        "rap": false,
        "x": 230,
        "y": 160,
        "wires": [
            [
                "409874d0bd7185ff",
                "89d652a125b6e896"
            ]
        ]
    },
    {
        "id": "4b3a40b5c6c3bcd1",
        "type": "ui_switch",
        "z": "bd10299be49cd547",
        "name": "Cooker",
        "label": "Cooker",
        "tooltip": "",
        "group": "61285987.c20328",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "",
        "topicType": "str",
        "style": "",
        "onvalue": "1on",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "1off",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "animate": true,
        "className": "",
        "x": 400,
        "y": 380,
        "wires": [
            [
                "d56158387d864495"
            ]
        ]
    },
    {
        "id": "409874d0bd7185ff",
        "type": "debug",
        "z": "bd10299be49cd547",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 430,
        "y": 120,
        "wires": []
    },
    {
        "id": "0a24426085cb52fb",
        "type": "mqtt in",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay/toggle",
        "qos": "2",
        "datatype": "auto",
        "broker": "10e78a89.5b4fd5",
        "nl": false,
        "rap": false,
        "x": 230,
        "y": 340,
        "wires": [
            [
                "4b3a40b5c6c3bcd1",
                "47a672d90d1bce3a"
            ]
        ]
    },
    {
        "id": "47a672d90d1bce3a",
        "type": "debug",
        "z": "bd10299be49cd547",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 410,
        "y": 300,
        "wires": []
    },
    {
        "id": "89d652a125b6e896",
        "type": "ui_chart",
        "z": "bd10299be49cd547",
        "name": "Outside Temp",
        "group": "f0f525f2ba61551e",
        "order": 1,
        "width": 0,
        "height": 0,
        "label": "Outside",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "0",
        "ymax": "35",
        "removeOlder": "5",
        "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": 440,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "ebc4b5954592a495",
        "type": "mqtt out",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "10e78a89.5b4fd5",
        "x": 550,
        "y": 540,
        "wires": []
    },
    {
        "id": "1d552fe4bab62368",
        "type": "ui_switch",
        "z": "bd10299be49cd547",
        "name": "Forward",
        "label": "Forward",
        "tooltip": "",
        "group": "61285987.c20328",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "",
        "topicType": "str",
        "style": "",
        "onvalue": "2on",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "2off",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "animate": true,
        "className": "",
        "x": 400,
        "y": 540,
        "wires": [
            [
                "ebc4b5954592a495"
            ]
        ]
    },
    {
        "id": "ff6d7cc81ab21990",
        "type": "mqtt in",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay/toggle",
        "qos": "2",
        "datatype": "auto",
        "broker": "10e78a89.5b4fd5",
        "nl": false,
        "rap": false,
        "x": 230,
        "y": 500,
        "wires": [
            [
                "1d552fe4bab62368",
                "68ccf73c8865e81d"
            ]
        ]
    },
    {
        "id": "68ccf73c8865e81d",
        "type": "debug",
        "z": "bd10299be49cd547",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 410,
        "y": 460,
        "wires": []
    },
    {
        "id": "f803c707ec2a94e0",
        "type": "mqtt out",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "10e78a89.5b4fd5",
        "x": 550,
        "y": 700,
        "wires": []
    },
    {
        "id": "19def10c4627a977",
        "type": "ui_switch",
        "z": "bd10299be49cd547",
        "name": "Outside",
        "label": "Outside",
        "tooltip": "",
        "group": "61285987.c20328",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "",
        "topicType": "str",
        "style": "",
        "onvalue": "3on",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "3off",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "animate": true,
        "className": "",
        "x": 400,
        "y": 700,
        "wires": [
            [
                "f803c707ec2a94e0"
            ]
        ]
    },
    {
        "id": "68e2f6bc1eeb3de5",
        "type": "mqtt in",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay/toggle",
        "qos": "2",
        "datatype": "auto",
        "broker": "10e78a89.5b4fd5",
        "nl": false,
        "rap": false,
        "x": 230,
        "y": 660,
        "wires": [
            [
                "19def10c4627a977",
                "4c37d2b4c4949675"
            ]
        ]
    },
    {
        "id": "4c37d2b4c4949675",
        "type": "debug",
        "z": "bd10299be49cd547",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 410,
        "y": 620,
        "wires": []
    },
    {
        "id": "11c2c59433562e33",
        "type": "mqtt out",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "10e78a89.5b4fd5",
        "x": 550,
        "y": 860,
        "wires": []
    },
    {
        "id": "d66190994d4c39c4",
        "type": "ui_switch",
        "z": "bd10299be49cd547",
        "name": "Shower",
        "label": "Shower",
        "tooltip": "",
        "group": "61285987.c20328",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "",
        "topicType": "str",
        "style": "",
        "onvalue": "4on",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "4off",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "animate": true,
        "className": "",
        "x": 400,
        "y": 860,
        "wires": [
            [
                "11c2c59433562e33"
            ]
        ]
    },
    {
        "id": "8398dff8571102c3",
        "type": "mqtt in",
        "z": "bd10299be49cd547",
        "name": "",
        "topic": "esp32/relay/toggle",
        "qos": "2",
        "datatype": "auto",
        "broker": "10e78a89.5b4fd5",
        "nl": false,
        "rap": false,
        "x": 230,
        "y": 820,
        "wires": [
            [
                "d66190994d4c39c4",
                "c065c65fe55f1625"
            ]
        ]
    },
    {
        "id": "c065c65fe55f1625",
        "type": "debug",
        "z": "bd10299be49cd547",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 410,
        "y": 780,
        "wires": []
    },
    {
        "id": "6d40d5abef956dcf",
        "type": "smart-plug",
        "z": "d07fd454e046853e",
        "name": "Heater",
        "device": "192.168.1.101",
        "interval": 10000,
        "eventInterval": 1000,
        "x": 530,
        "y": 1640,
        "wires": [
            []
        ]
    },
    {
        "id": "f790075f7f029896",
        "type": "ui_switch",
        "z": "d07fd454e046853e",
        "name": "",
        "label": "Heater",
        "tooltip": "",
        "group": "9e5c61a1a1130ac0",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "true",
        "onvalueType": "bool",
        "onicon": "",
        "oncolor": "",
        "offvalue": "false",
        "offvalueType": "bool",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 290,
        "y": 1640,
        "wires": [
            [
                "6d40d5abef956dcf"
            ]
        ]
    },
    {
        "id": "7591edfde749f5bd",
        "type": "sendsms",
        "z": "d07fd454e046853e",
        "creds": "2740492b019ed5fc",
        "to": "0484941923",
        "fr": "Mark's Truck",
        "text": "The Humidity is over 75 percent.",
        "unicode": false,
        "x": 650,
        "y": 1520,
        "wires": [
            []
        ]
    },
    {
        "id": "b8a58fb8b8c2e720",
        "type": "function",
        "z": "d07fd454e046853e",
        "name": "Humidity Alarm",
        "func": "var payload=msg.payload;\nvar alarm_flag=context.get(\"alarm_flag\");\nif(typeof alarm_flag==\"undefined\")\nalarm_flag=false;\n\nif (payload>75 && !alarm_flag)\n{\n    alarm_flag=true;\n    msg.alarm=1;\n    context.set(\"alarm_flag\",alarm_flag);\n    return msg;\n}\nif (payload<=20 && alarm_flag)\n{\n    alarm_flag=false;\n    msg.alarm=0;\n    context.set(\"alarm_flag\",alarm_flag);\n    return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 1480,
        "wires": [
            [
                "b7133b3e817c2def"
            ]
        ]
    },
    {
        "id": "b7133b3e817c2def",
        "type": "function",
        "z": "d07fd454e046853e",
        "name": "",
        "func": "var temp=msg.payload;\nmsg.to=\"Mark\";\nmsg.from=\"noreply@gmail.com\";\n\nvar d =new Date();\nvar message=\"\";\nif(msg.alarm)\n{\n    msg.topic=\"High Humidity Alarm\";\n    message=\" High Temperature Alarm temp= \";    \n}\nelse\n{\n    message=\" Temperature now normal temp= \"; \n   msg.topic=\"Temperature Alarm Reset\";\n} \nmsg.payload=\"time:\"+d+message +msg.payload;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 480,
        "y": 1520,
        "wires": [
            [
                "7591edfde749f5bd"
            ]
        ]
    },
    {
        "id": "08503f4cc6c98c7c",
        "type": "dynamic thermostat",
        "z": "d07fd454e046853e",
        "name": "",
        "x": 250,
        "y": 1500,
        "wires": [
            []
        ],
        "inputLabels": [
            "Temperature"
        ],
        "outputLabels": [
            "Heater"
        ]
    },
    {
        "id": "995dc991f874db62",
        "type": "ui_template",
        "z": "d07fd454e046853e",
        "group": "0d8878788067d1e1",
        "name": "ESP 32 Cam",
        "order": 0,
        "width": 0,
        "height": 0,
        "format": "<div>\n    <img src=\"http://192.168.1.100\" width=\"600\" height=\"400\">\n</div>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": false,
        "templateScope": "local",
        "className": "",
        "x": 130,
        "y": 180,
        "wires": [
            []
        ]
    }
]

No comments:

Post a Comment