Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "2a8b02ca.5fe626",
- "type": "tab",
- "label": "My Observatory",
- "disabled": false,
- "info": ""
- },
- {
- "id": "229c1832.a883c8",
- "type": "inject",
- "z": "2a8b02ca.5fe626",
- "name": "5 secs",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "120",
- "crontab": "",
- "once": true,
- "onceDelay": "5",
- "topic": "",
- "payload": "",
- "payloadType": "str",
- "x": 160,
- "y": 80,
- "wires": [
- [
- "d46fc348.cc279",
- "beacc2947ed75bd4"
- ]
- ]
- },
- {
- "id": "d46fc348.cc279",
- "type": "http request",
- "z": "2a8b02ca.5fe626",
- "name": "Solo last data",
- "method": "GET",
- "ret": "txt",
- "paytoqs": "ignore",
- "url": "http://192.168.1.215/cgi-bin/cgiLastData",
- "tls": "",
- "persist": false,
- "proxy": "",
- "insecureHTTPParser": false,
- "authType": "basic",
- "senderr": false,
- "headers": [],
- "x": 340,
- "y": 80,
- "wires": [
- [
- "d947db47.b47568"
- ]
- ]
- },
- {
- "id": "d947db47.b47568",
- "type": "split",
- "z": "2a8b02ca.5fe626",
- "name": "",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "x": 510,
- "y": 80,
- "wires": [
- [
- "b249af28.d8cb98",
- "911943bf.375648",
- "57eedad6.3fcc7c",
- "3cfd061c.04627a",
- "16d5ea54.eb9b06",
- "eb0b42cd.95a43",
- "232c352c.97a3aa"
- ]
- ]
- },
- {
- "id": "b249af28.d8cb98",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Sky temp",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "clouds=",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 680,
- "y": 80,
- "wires": [
- [
- "490dfc4b.3723e4"
- ]
- ]
- },
- {
- "id": "490dfc4b.3723e4",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted = msg.payload.split(\"=\");\nmsg.payload = msg.splitted[1] * 9 / 5 + 32;\nmsg.topic = \"Sky\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 860,
- "y": 80,
- "wires": [
- [
- "405c85dc.d9315c",
- "7c8fa3a5782168b2",
- "81a496cb18d389cb"
- ]
- ]
- },
- {
- "id": "11ad28c8.47b987",
- "type": "ui_chart",
- "z": "2a8b02ca.5fe626",
- "name": "Wind History",
- "group": "dc0984f6.cbae78",
- "order": 20,
- "width": 14,
- "height": 5,
- "label": "Wind History",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "0",
- "ymax": "50",
- "removeOlder": "1",
- "removeOlderPoints": "",
- "removeOlderUnit": "86400",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#fafafa",
- "#ff0f0f",
- "#787878",
- "#fafafa",
- "#ff9896",
- "#787878",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "outputs": 1,
- "useDifferentColor": false,
- "className": "",
- "x": 1110,
- "y": 280,
- "wires": [
- []
- ],
- "info": "MPH"
- },
- {
- "id": "41bd3758.a1e248",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1] * 0.621371;\nmsg.topic = \"Wind\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 870,
- "y": 220,
- "wires": [
- [
- "11ad28c8.47b987",
- "ab6551534cddcb92"
- ]
- ]
- },
- {
- "id": "911943bf.375648",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Wind speed",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "wind",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 690,
- "y": 200,
- "wires": [
- [
- "41bd3758.a1e248",
- "2e60f98ae28c395d"
- ]
- ]
- },
- {
- "id": "57eedad6.3fcc7c",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Ambient",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "temp=",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 680,
- "y": 120,
- "wires": [
- [
- "faeb7e0b.baa44"
- ]
- ]
- },
- {
- "id": "faeb7e0b.baa44",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1]*9/5+32;\nmsg.topic = \"Ambient\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 870,
- "y": 120,
- "wires": [
- [
- "405c85dc.d9315c",
- "dd5da46eef95e760"
- ]
- ]
- },
- {
- "id": "405c85dc.d9315c",
- "type": "ui_chart",
- "z": "2a8b02ca.5fe626",
- "name": "Temperature History",
- "group": "dc0984f6.cbae78",
- "order": 22,
- "width": 14,
- "height": 5,
- "label": "Temperature History",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "-50",
- "ymax": "115",
- "removeOlder": "1",
- "removeOlderPoints": "",
- "removeOlderUnit": "86400",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#00ffe1",
- "#2ac00c",
- "#919191",
- "#34ea10",
- "#98df8a",
- "#d62728",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "outputs": 1,
- "useDifferentColor": false,
- "className": "",
- "x": 1120,
- "y": 140,
- "wires": [
- []
- ]
- },
- {
- "id": "fd03b3c7.8e64b8",
- "type": "ui_gauge",
- "z": "2a8b02ca.5fe626",
- "name": "Wind Gust",
- "group": "dc0984f6.cbae78",
- "order": 9,
- "width": 3,
- "height": 3,
- "gtype": "gage",
- "title": "Gust",
- "label": "MPH",
- "format": "{{value|number:1}}",
- "min": "0",
- "max": "50",
- "colors": [
- "#2ce272",
- "#eeba58",
- "#ff0000"
- ],
- "seg1": "13",
- "seg2": "20",
- "className": "",
- "x": 1090,
- "y": 240,
- "wires": [],
- "inputLabels": [
- "msg.payload"
- ]
- },
- {
- "id": "3cfd061c.04627a",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Wind gust",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "gust",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 680,
- "y": 240,
- "wires": [
- [
- "e45b502c.11e3a8"
- ]
- ]
- },
- {
- "id": "e45b502c.11e3a8",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1]*0.621371;\nmsg.topic=\"Gust\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 870,
- "y": 260,
- "wires": [
- [
- "fd03b3c7.8e64b8",
- "11ad28c8.47b987"
- ]
- ]
- },
- {
- "id": "eb0b42cd.95a43",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Light",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "light",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 670,
- "y": 460,
- "wires": [
- [
- "dc128149.203448"
- ]
- ]
- },
- {
- "id": "16d5ea54.eb9b06",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Safe",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "safe",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 670,
- "y": 540,
- "wires": [
- [
- "a8df9c0f.e188a8"
- ]
- ]
- },
- {
- "id": "232c352c.97a3aa",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Rain",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "rain",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 670,
- "y": 340,
- "wires": [
- [
- "623d83ba.b8d834"
- ]
- ]
- },
- {
- "id": "a8df9c0f.e188a8",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nif ( parseInt( msg.payload) === 0) {\n msg.payload = \"Unsafe\";\n msg.color = \"red\" \n} else {\n msg.payload = \"Safe\";\n msg.color = \"#EFEFEF\"\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 850,
- "y": 540,
- "wires": [
- [
- "995f122ac631455f"
- ]
- ]
- },
- {
- "id": "dc128149.203448",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nmsg.topic = \"Light\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 850,
- "y": 460,
- "wires": [
- [
- "a052e7e1f59dbe80",
- "ef7e80efa50cfba6"
- ]
- ]
- },
- {
- "id": "623d83ba.b8d834",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 850,
- "y": 340,
- "wires": [
- [
- "d971640f73d07862",
- "d4c3cfac51dc218b"
- ]
- ]
- },
- {
- "id": "18ba1e16.c3d6c2",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 3,
- "width": 1,
- "height": 1,
- "name": "Light",
- "label": "",
- "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
- "layout": "col-center",
- "className": "",
- "x": 1250,
- "y": 420,
- "wires": []
- },
- {
- "id": "ecb5fcbf.781158",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 2,
- "width": 1,
- "height": 1,
- "name": "Precip",
- "label": "",
- "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
- "layout": "col-center",
- "className": "",
- "x": 1270,
- "y": 340,
- "wires": []
- },
- {
- "id": "ab6551534cddcb92",
- "type": "ui_gauge",
- "z": "2a8b02ca.5fe626",
- "name": "Wind Speed",
- "group": "dc0984f6.cbae78",
- "order": 8,
- "width": 3,
- "height": 3,
- "gtype": "gage",
- "title": "Wind Speed",
- "label": "MPH",
- "format": "{{value|number:1}}",
- "min": "0",
- "max": "50",
- "colors": [
- "#2ce272",
- "#eeba58",
- "#ff0000"
- ],
- "seg1": "9",
- "seg2": "14",
- "className": "",
- "x": 1090,
- "y": 200,
- "wires": [],
- "inputLabels": [
- "msg.payload"
- ]
- },
- {
- "id": "d971640f73d07862",
- "type": "ui_chart",
- "z": "2a8b02ca.5fe626",
- "name": "Precipitation History",
- "group": "dc0984f6.cbae78",
- "order": 21,
- "width": 14,
- "height": 5,
- "label": "Precipitation History",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "0",
- "ymax": "5000",
- "removeOlder": 1,
- "removeOlderPoints": "",
- "removeOlderUnit": "86400",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#1f77b4",
- "#aec7e8",
- "#ff7f0e",
- "#2ca02c",
- "#98df8a",
- "#d62728",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "outputs": 1,
- "useDifferentColor": false,
- "className": "",
- "x": 1100,
- "y": 380,
- "wires": [
- []
- ]
- },
- {
- "id": "bc9abb7205fdc08d",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1];\nmsg.topic = \"Precipitation\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 850,
- "y": 340,
- "wires": [
- []
- ]
- },
- {
- "id": "d4c3cfac51dc218b",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Make status",
- "func": "if (msg.payload > 3199) {\n msg.payload = \"Dry\";\n msg.color = \"#EFEFEF\";\n}\nelse if (msg.payload > 2799) {\n msg.payload = \"Dew\";\n msg.color = \"#EFEFEF\"\n}\nelse {\n msg.payload = \"Rain\";\n msg.color = \"red\";\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1070,
- "y": 340,
- "wires": [
- [
- "ecb5fcbf.781158"
- ]
- ]
- },
- {
- "id": "dd5da46eef95e760",
- "type": "ui_gauge",
- "z": "2a8b02ca.5fe626",
- "name": "Temp",
- "group": "dc0984f6.cbae78",
- "order": 10,
- "width": 3,
- "height": 3,
- "gtype": "gage",
- "title": "Temp",
- "label": "F",
- "format": "{{value|number:1}}",
- "min": "-40",
- "max": "120",
- "colors": [
- "#94dfff",
- "#e6b400",
- "#ca3838"
- ],
- "seg1": "50",
- "seg2": "80",
- "className": "",
- "x": 1070,
- "y": 100,
- "wires": [],
- "inputLabels": [
- "msg.payload"
- ]
- },
- {
- "id": "a052e7e1f59dbe80",
- "type": "ui_chart",
- "z": "2a8b02ca.5fe626",
- "name": "Light History",
- "group": "dc0984f6.cbae78",
- "order": 23,
- "width": 14,
- "height": 5,
- "label": "Light History",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "0",
- "ymax": "60000",
- "removeOlder": 1,
- "removeOlderPoints": "",
- "removeOlderUnit": "86400",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#ffea00",
- "#aec7e8",
- "#ff7f0e",
- "#2ca02c",
- "#98df8a",
- "#d62728",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "outputs": 1,
- "useDifferentColor": false,
- "className": "",
- "x": 1090,
- "y": 460,
- "wires": [
- []
- ]
- },
- {
- "id": "c6409890b9f89df6",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 4,
- "width": 1,
- "height": 1,
- "name": "Clouds",
- "label": "",
- "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
- "layout": "col-center",
- "className": "",
- "x": 1280,
- "y": 20,
- "wires": []
- },
- {
- "id": "995f122ac631455f",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 5,
- "width": 1,
- "height": 1,
- "name": "Safe",
- "label": "",
- "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
- "layout": "col-center",
- "className": "",
- "x": 1270,
- "y": 540,
- "wires": []
- },
- {
- "id": "ef7e80efa50cfba6",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Make status",
- "func": "if (msg.payload > 3199) {\n msg.payload = \"Dark\";\n msg.color = \"#EFEFEF\";\n}\nelse {\n msg.payload = \"Light\";\n msg.color = \"yellow\";\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1090,
- "y": 420,
- "wires": [
- [
- "18ba1e16.c3d6c2"
- ]
- ]
- },
- {
- "id": "7c8fa3a5782168b2",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Make status",
- "func": "if (msg.payload > 0) {\n msg.payload = \"Clear\";\n msg.color = \"#EFEFEF\";\n} \nelse {\n msg.payload = \"Cloudy\";\n msg.color = \"red\"\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1150,
- "y": 20,
- "wires": [
- [
- "c6409890b9f89df6"
- ]
- ]
- },
- {
- "id": "84d5f8cd91983c52",
- "type": "ui_template",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "name": "moon",
- "order": 12,
- "width": 3,
- "height": 4,
- "format": "<div style=\"font-size: 144px; text-align: center; vertical-align: center\">\n <i class=\"wi {{msg.payload}}\"></i>\n</div>",
- "storeOutMessages": true,
- "fwdInMessages": false,
- "resendOnRefresh": true,
- "templateScope": "local",
- "className": "",
- "x": 450,
- "y": 380,
- "wires": [
- []
- ]
- },
- {
- "id": "beacc2947ed75bd4",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "calc phase",
- "func": "msg.now = new Date;\nmsg.unixnow = Math.round(msg.now.getTime() / 1000);\n\n// The duration in days of a lunar cycle\nmsg.lunardays = 29.53058770576;\n\n// Seconds in lunar cycle\nmsg.lunarsecs = msg.lunardays * (24 * 60 * 60);\n\n// Date time of first new moon in year 2000\nmsg.then = new Date(2000, 1, 6, 12, 14, 0, 0);\nmsg.unixthen = Math.round(msg.then.getTime() / 1000);\n\n\n// Calculate seconds between date and new moon 2000\nmsg.totalsecs = msg.unixnow - msg.unixthen;\n\n// Calculate modulus to drop completed cycles\n// Note: for real numbers use fmod() instead of % operator\nmsg.currentsecs = msg.totalsecs % msg.lunarsecs;\n\n// If negative number (date before new moon 2000) add $lunarsecs\nif (msg.currentsecs < 0) {\n msg.currentsecs += msg.lunarsecs;\n}\n\n// Calculate the fraction of the moon cycle\nmsg.currentfrac = msg.currentsecs / msg.lunarsecs;\n\n// Calculate days in current cycle (moon age)\nmsg.currentdays = msg.currentfrac * msg.lunardays;\n//msg.payload=msg.currentdays;\n//return msg;\n\nif (msg.currentdays <= 1) {\n msg.payload = \"wi-moon-new-dark\";\n msg.phase = \"New Moon\";\n} else if (msg.currentdays <= 1.638264692644) {\n msg.payload = \"wi-wax-cres-dark\";\n msg.phase = \"Waxing Crescent\";\n} else if (msg.currentdays <= 8.38264692644) { \n msg.payload = \"wi-moon-first-quart-dark\";\n msg.phase = \"First Quarter\";\n} else if (msg.currentdays <= 13.76529385288) {\n msg.payload = \"wi-moon-wax-gibb-dark\";\n msg.phase = \"Waxing Gibbous\";\n} else if (msg.currentdays <=15.76529385288) {\n msg.payload = \"wi-moon-full-dark\";\n msg.phase = \"Full Moon\";\n} else if (msg.currentdays <= 21.14784077932) {\n msg.payload = \"wi-moon-wan-gibb-dark\";\n msg.phase = \"Waning Gibbous\";\n} else if (msg.currentdays <= 23.14794077932) {\n msg.payload = \"wi-moon-third-quart-dark\";\n msg.phase = \"Third Quarter\";\n} else if (msg.currentdays <= 28.53058770576) {\n msg.payload = \"wi-moon-wan-cres-dark\";\n msg.phase = \"Waning Cresent\";\n} else {\n msg.payload = \"wi-moon-new-dark\";\n}\n /*\n\n\n \n (\n array(\"new\", 0, 1),\n array(\"waxing crescent\", 1, 6.38264692644),\n array(\"first quarter\", 6.38264692644, 8.38264692644),\n array(\"waxing gibbous\", 8.38264692644, 13.76529385288),\n array(\"full\", 13.76529385288, 15.76529385288),\n array(\"waning gibbous\", 15.76529385288, 21.14794077932),\n array(\"last quarter\", 21.14794077932, 23.14794077932),\n array(\"waning crescent\", 23.14794077932, 28.53058770576),\n array(\"new\", 28.53058770576, 29.53058770576),\n );\n\n// Find current phase in the array\nfor ($i = 0; $i < 9; $i++) {\n if (($currentdays >= $phases[$i][1]) && ($currentdays <= $phases[$i][2])) {\n $thephase = $phases[$i][0];\n break;\n }\n}*/\n\n\nreturn msg;\n",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 190,
- "y": 380,
- "wires": [
- [
- "84d5f8cd91983c52",
- "afcfbf2bc4831528"
- ]
- ]
- },
- {
- "id": "68d4b086dd06e122",
- "type": "http request",
- "z": "2a8b02ca.5fe626",
- "name": "config.pl",
- "method": "GET",
- "ret": "txt",
- "paytoqs": "ignore",
- "url": "http://192.168.1.215/cgi-bin/config.pl",
- "tls": "",
- "persist": false,
- "proxy": "",
- "insecureHTTPParser": false,
- "authType": "basic",
- "senderr": false,
- "headers": [],
- "x": 320,
- "y": 140,
- "wires": [
- [
- "51a55a599ccac9e8",
- "b0118a046bdab59b"
- ]
- ]
- },
- {
- "id": "51a55a599ccac9e8",
- "type": "split",
- "z": "2a8b02ca.5fe626",
- "name": "",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "x": 470,
- "y": 140,
- "wires": [
- [
- "686ba038e60c5103",
- "6eec1904c749b1bb"
- ]
- ]
- },
- {
- "id": "ca50cb5bcea88b4f",
- "type": "inject",
- "z": "2a8b02ca.5fe626",
- "name": "5 minutes",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "300",
- "crontab": "",
- "once": true,
- "onceDelay": "5",
- "topic": "",
- "payload": "",
- "payloadType": "str",
- "x": 150,
- "y": 460,
- "wires": [
- [
- "68d4b086dd06e122",
- "a4436576abb33f7c",
- "c67724ea8afa3192",
- "8b0450750ecafb6a",
- "c3beb69378b75b9b",
- "aee27c2a931e7560",
- "073acc5fce15b99b",
- "48d2ed481c3805ce"
- ]
- ]
- },
- {
- "id": "686ba038e60c5103",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Wind limit",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "Sw_Wind=",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 680,
- "y": 160,
- "wires": [
- [
- "14033dd4fdd4753b"
- ]
- ]
- },
- {
- "id": "14033dd4fdd4753b",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted=msg.payload.split( \"=\" );\nmsg.payload = msg.splitted[1] * 0.621371;\nmsg.topic = \"Limit\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 870,
- "y": 180,
- "wires": [
- [
- "11ad28c8.47b987"
- ]
- ]
- },
- {
- "id": "6eec1904c749b1bb",
- "type": "switch",
- "z": "2a8b02ca.5fe626",
- "name": "Cloud limit",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "cont",
- "v": "Sw_Clouds=",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 450,
- "y": 200,
- "wires": [
- [
- "5a1ae7a4e274001d"
- ]
- ]
- },
- {
- "id": "5a1ae7a4e274001d",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Get the value",
- "func": "msg.splitted = msg.payload.split(\"=\");\nmsg.payload = msg.splitted[1] * 9 / 5 + 32;\nmsg.topic = \"Limit\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 610,
- "y": 280,
- "wires": [
- [
- "405c85dc.d9315c"
- ]
- ]
- },
- {
- "id": "a4436576abb33f7c",
- "type": "ui_template",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "name": "script",
- "order": 24,
- "width": 0,
- "height": 0,
- "format": "<script type=\"text/javascript\"\n src=\"https://astrosphericcloudstorage.blob.core.windows.net/embed/astrosphericembed.js\" />",
- "storeOutMessages": true,
- "fwdInMessages": true,
- "resendOnRefresh": true,
- "templateScope": "global",
- "className": "",
- "x": 390,
- "y": 460,
- "wires": [
- []
- ]
- },
- {
- "id": "c67724ea8afa3192",
- "type": "ui_template",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "name": "astrospheric",
- "order": 6,
- "width": 8,
- "height": 14,
- "format": "<!--Create a div for the Astrospheric Control to live in -->\n<div id=\"AstrosphericEmbedContainer\">\n</div>\n\n<!--Now setup the control with the Javascript API -->\n<script type=\"text/javascript\">\n // Initialize the control\n\t\t\tm_AstrosphericEmbed.Create(\"AstrosphericEmbedContainer\", {{payload}}, {{long}});\n\n</script>",
- "storeOutMessages": true,
- "fwdInMessages": false,
- "resendOnRefresh": true,
- "templateScope": "local",
- "className": "",
- "x": 370,
- "y": 540,
- "wires": [
- []
- ]
- },
- {
- "id": "81a496cb18d389cb",
- "type": "ui_gauge",
- "z": "2a8b02ca.5fe626",
- "name": "Sky Temp",
- "group": "dc0984f6.cbae78",
- "order": 11,
- "width": 3,
- "height": 3,
- "gtype": "gage",
- "title": "Sky Temp",
- "label": "F",
- "format": "{{value|number:1}}",
- "min": "-40",
- "max": "120",
- "colors": [
- "#94dfff",
- "#e6b400",
- "#ca3838"
- ],
- "seg1": "50",
- "seg2": "80",
- "className": "",
- "x": 1240,
- "y": 100,
- "wires": [],
- "inputLabels": [
- "msg.payload"
- ]
- },
- {
- "id": "2e60f98ae28c395d",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Make status",
- "func": "if (msg.payload > 14) {\n msg.payload = \"Very Windy\";\n msg.color = \"red\";\n}\nelse if (msg.payload > 9) {\n msg.payload = \"Windy\";\n msg.color = \"yellow\"\n}\nelse {\n msg.payload = \"Calm\";\n msg.color = \"#EFEFEF\";\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1250,
- "y": 220,
- "wires": [
- [
- "fabd3a86aba31870"
- ]
- ]
- },
- {
- "id": "fabd3a86aba31870",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 1,
- "width": 2,
- "height": 1,
- "name": "Wind",
- "label": "",
- "format": "<font color={{msg.color}} size=\"+2\">{{msg.payload}}</font>",
- "layout": "col-center",
- "className": "",
- "x": 1330,
- "y": 280,
- "wires": []
- },
- {
- "id": "afcfbf2bc4831528",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 17,
- "width": 3,
- "height": 1,
- "name": "Phase",
- "label": "",
- "format": "<font size=\"+2\">{{msg.phase}}</font>",
- "layout": "col-center",
- "className": "",
- "x": 510,
- "y": 420,
- "wires": []
- },
- {
- "id": "fcdd5d492edb480d",
- "type": "debug",
- "z": "2a8b02ca.5fe626",
- "name": "debug 1",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "true",
- "targetType": "full",
- "statusVal": "",
- "statusType": "auto",
- "x": 440,
- "y": 640,
- "wires": []
- },
- {
- "id": "b0118a046bdab59b",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "Lat/Long",
- "func": "msg.lines = msg.payload.split(\"\\n\");\nfor (msg.i=0; msg.i<msg.lines.length; msg.i++) {\n msg.pair = msg.lines[msg.i].split(\"=\");\n if (msg.pair[0] == \"Latitude\") {\n msg.lat = Number(msg.pair[1]);\n } \n if (msg.pair[0] == \"Longitude\") {\n msg.long = Number(msg.pair[1]);\n }\n}\nmsg.payload = msg.lat;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 160,
- "y": 680,
- "wires": [
- [
- "c67724ea8afa3192",
- "fcdd5d492edb480d"
- ]
- ]
- },
- {
- "id": "e19f826d4076368e",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 15,
- "width": 3,
- "height": 1,
- "name": "Moonrise",
- "label": "<font size=\"+2\">Moonrise:</font>",
- "format": "<font size=\"+2\">{{msg.payload}}</font>",
- "layout": "row-spread",
- "className": "",
- "x": 240,
- "y": 780,
- "wires": []
- },
- {
- "id": "4cdd62346387b047",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 16,
- "width": 3,
- "height": 1,
- "name": "Moonset",
- "label": "<font size=\"+2\">Moonset:</font>",
- "format": "<font size=\"+2\">{{msg.payload}}</font>",
- "layout": "row-spread",
- "className": "",
- "x": 240,
- "y": 820,
- "wires": []
- },
- {
- "id": "2ed1fc9fc3b18be0",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 13,
- "width": 3,
- "height": 1,
- "name": "Sunset",
- "label": "<font size=\"+2\">Sunset:</font>",
- "format": "<font size=\"+2\">{{msg.payload}}</font>",
- "layout": "row-spread",
- "className": "",
- "x": 240,
- "y": 860,
- "wires": []
- },
- {
- "id": "fb58c01a301caf78",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 14,
- "width": 3,
- "height": 1,
- "name": "Sunset",
- "label": "<font size=\"+2\">Sunrise:</font>",
- "format": "<font size=\"+2\">{{msg.payload}}</font>",
- "layout": "row-spread",
- "className": "",
- "x": 240,
- "y": 900,
- "wires": []
- },
- {
- "id": "fa9468f5551f22f4",
- "type": "ui_text",
- "z": "2a8b02ca.5fe626",
- "group": "dc0984f6.cbae78",
- "order": 18,
- "width": 3,
- "height": 1,
- "name": "Illumination",
- "label": "<font size=\"+2\">Illumination:</font>",
- "format": "<font size=\"+2\">{{msg.payload}}</font>",
- "layout": "row-spread",
- "className": "",
- "x": 250,
- "y": 940,
- "wires": []
- },
- {
- "id": "48d2ed481c3805ce",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "function 1",
- "func": "msg.payload = \"50%\"\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 80,
- "y": 940,
- "wires": [
- [
- "fa9468f5551f22f4"
- ]
- ]
- },
- {
- "id": "8b0450750ecafb6a",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "function 2",
- "func": "msg.payload = \"HH:MM\"\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 80,
- "y": 780,
- "wires": [
- [
- "e19f826d4076368e"
- ]
- ]
- },
- {
- "id": "c3beb69378b75b9b",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "function 3",
- "func": "msg.payload = \"HH:MM\"\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 80,
- "y": 820,
- "wires": [
- [
- "4cdd62346387b047"
- ]
- ]
- },
- {
- "id": "aee27c2a931e7560",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "function 4",
- "func": "msg.payload = \"HH:MM\"\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 80,
- "y": 860,
- "wires": [
- [
- "2ed1fc9fc3b18be0"
- ]
- ]
- },
- {
- "id": "073acc5fce15b99b",
- "type": "function",
- "z": "2a8b02ca.5fe626",
- "name": "function 5",
- "func": "msg.payload = \"HH:MM\"\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 80,
- "y": 900,
- "wires": [
- [
- "fb58c01a301caf78"
- ]
- ]
- },
- {
- "id": "f8964443d5522abd",
- "type": "ui_spacer",
- "z": "2a8b02ca.5fe626",
- "name": "spacer",
- "group": "dc0984f6.cbae78",
- "order": 7,
- "width": 6,
- "height": 1
- },
- {
- "id": "d77b7d4d57b4fd65",
- "type": "ui_spacer",
- "z": "2a8b02ca.5fe626",
- "name": "spacer",
- "group": "dc0984f6.cbae78",
- "order": 19,
- "width": 6,
- "height": 1
- },
- {
- "id": "dc0984f6.cbae78",
- "type": "ui_group",
- "name": "CloudWatcher Weather data",
- "tab": "91f4bb8c.094048",
- "order": 1,
- "disp": true,
- "width": "14",
- "collapse": false
- },
- {
- "id": "91f4bb8c.094048",
- "type": "ui_tab",
- "name": "My observatory",
- "icon": "mi-home",
- "order": 1,
- "disabled": false,
- "hidden": false
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement