NittyGritty icon

Auriol

NittyGritty | PRO | 05/24/22 08:08:11 AM UTC | 0 ⭐ | 1172 👁️ | Never ⏰ | []
JavaScript |

2.96 KB

|

None

|

0 👍

/

0 👎

[
    {
        "id": "8426234b5f907e85",
        "type": "rflink in",
        "z": "9e1907dfa62da951",
        "device": "1b59f00c149d6177",
        "name": "Auriol-Badfenster",
        "x": 470,
        "y": 1500,
        "wires": [
            [
                "c457bdea862bd687"
            ]
        ]
    },
    {
        "id": "c457bdea862bd687",
        "type": "function",
        "z": "9e1907dfa62da951",
        "name": "",
        "func": "var Knoten = \"Auriol-Badfenster\"\n\nvar Temp = msg.payload.temp\nvar Hum  = msg.payload.hum\n\nvar temp = -1.0*Temp;\n    es = 6.112*Math.exp(-1.0*17.67*temp/(243.5 - temp));\n\ted = Hum/100.0*es;\n\teln = Math.log(ed/6.112);\n\ttd = -243.5*eln/(eln - 17.67 );\n\tDew = parseFloat( td.toFixed(1) );\n\nvar time = Date.now();\n\nvar Influx = [{\n    Room: Knoten,\n    Temp: Temp,\n    Hum: Hum,\n    Dew: Dew\n}]\n\nvar newMsg1 = {payload:time};\nvar newMsg2 = {payload:Influx};\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Temp: \" + Temp + \"°C, Hum: \" + Hum + \"%, Dew: \" + Dew + \"°C\" });\n\nreturn [newMsg1, newMsg2];",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 680,
        "y": 1500,
        "wires": [
            [
                "aeb4891857fda7e4"
            ],
            [
                "25c6a1d23c468d7d"
            ]
        ]
    },
    {
        "id": "aeb4891857fda7e4",
        "type": "moment",
        "z": "9e1907dfa62da951",
        "name": "",
        "topic": "",
        "input": "payload",
        "inputType": "msg",
        "inTz": "ETC/GMT",
        "adjAmount": "0",
        "adjType": "hours",
        "adjDir": "subtract",
        "format": "dd DD. MMMM YYYY HH:mm:ss ",
        "locale": "de_DE",
        "output": "",
        "outputType": "msg",
        "outTz": "Europe/Berlin",
        "x": 1100,
        "y": 1440,
        "wires": [
            [
                "4787e2b06c19396d"
            ]
        ]
    },
    {
        "id": "4787e2b06c19396d",
        "type": "debug",
        "z": "9e1907dfa62da951",
        "name": "",
        "active": true,
        "tosidebar": false,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1150,
        "y": 1480,
        "wires": []
    },
    {
        "id": "25c6a1d23c468d7d",
        "type": "debug",
        "z": "9e1907dfa62da951",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1150,
        "y": 1540,
        "wires": []
    },
    {
        "id": "1b59f00c149d6177",
        "type": "rflink device",
        "devname": "Auriol V3",
        "devid": "7403"
    }
]

Comments