From 0048272f89fd0b380b788a9fd59543d69170395a Mon Sep 17 00:00:00 2001 From: Ron Rossi <73606166+KK1L@users.noreply.github.com> Date: Mon, 23 Jan 2023 21:17:53 -0500 Subject: [PATCH] v1.4.0 Improvements to Pi Status Tab * improved solar data image on Pi. * added choice of C or F for CPU Temperature. Fixes #50 Co-authored-by: kd9lsv --- flow.json | 397 ++++++++++++++++++++++++++++++++++++++++++++------- package.json | 2 +- 2 files changed, 345 insertions(+), 54 deletions(-) diff --git a/flow.json b/flow.json index 24b4dfb..fb6d573 100644 --- a/flow.json +++ b/flow.json @@ -396,7 +396,9 @@ "ab98427.85cd3c" ], "x": 474, - "y": 159 + "y": 159, + "w": 272, + "h": 522 }, { "id": "52886121c9629e0b", @@ -420,7 +422,9 @@ "66a43145427ca537" ], "x": 774, - "y": 159 + "y": 159, + "w": 252, + "h": 482 }, { "id": "bebfe5d7e4f0feb0", @@ -444,7 +448,9 @@ "de48727be275102f" ], "x": 1034, - "y": 159 + "y": 159, + "w": 315, + "h": 482 }, { "id": "c6e09ffb3c5a1ce6", @@ -470,7 +476,9 @@ "e1278f8b2f6fee61" ], "x": 214, - "y": 159 + "y": 159, + "w": 242, + "h": 522 }, { "id": "0e3bf66f6ee6d572", @@ -485,7 +493,9 @@ "654b552f9e64203e" ], "x": 214, - "y": 19 + "y": 19, + "w": 252, + "h": 122 }, { "id": "b90980234a451f8d", @@ -500,7 +510,9 @@ "3047a9ba16e10212" ], "x": 1194, - "y": 39 + "y": 39, + "w": 272, + "h": 82 }, { "id": "23eb39063da69706", @@ -524,7 +536,9 @@ "c2d7711a7d230637" ], "x": 1374, - "y": 159 + "y": 159, + "w": 252, + "h": 482 }, { "id": "022672368830e427", @@ -548,7 +562,9 @@ "c4561e5c31134c5d" ], "x": 1654, - "y": 159 + "y": 159, + "w": 252, + "h": 482 }, { "id": "7a5512b5a3f6e8ba", @@ -585,7 +601,9 @@ "4b7abadd74993948" ], "x": -6, - "y": 679 + "y": 679, + "w": 2072, + "h": 302 }, { "id": "28877ac600fea8b9", @@ -610,7 +628,9 @@ "324101084f63a83e" ], "x": 224, - "y": 1019 + "y": 1019, + "w": 632, + "h": 262 }, { "id": "c6a5789101548ba9", @@ -625,7 +645,9 @@ "4e62658f095c2863" ], "x": 1394, - "y": 1099 + "y": 1099, + "w": 252, + "h": 122 }, { "id": "18a3020b4a12ae60", @@ -649,7 +671,9 @@ "89b2058720d8fb99" ], "x": 1954, - "y": 159 + "y": 159, + "w": 282, + "h": 482 }, { "id": "4f4b9f0c82968b60", @@ -812,7 +836,9 @@ "925cebb6bacad025" ], "x": 914, - "y": 999 + "y": 999, + "w": 632, + "h": 82 }, { "id": "f01baabf4527b6e5", @@ -1366,12 +1392,13 @@ { "id": "dea9d7ac.0cefc8", "type": "ui_group", - "name": "Raspberry Pi Status & Control", + "name": "Pi Server Status & Control", "tab": "7f50838.c6d257c", "order": 2, "disp": true, "width": "6", - "collapse": false + "collapse": false, + "className": "" }, { "id": "8ca85278.65932", @@ -1683,7 +1710,7 @@ "tab": "7f50838.c6d257c", "order": 3, "disp": true, - "width": 5, + "width": "8", "collapse": false, "className": "" }, @@ -2103,11 +2130,11 @@ { "id": "00919f6d1599ed5f", "type": "ui_group", - "name": "Distance Measurement", + "name": "Measurement Units", "tab": "08eed6c3517c624e", "order": 14, "disp": true, - "width": 6, + "width": "6", "collapse": false, "className": "config" }, @@ -23864,7 +23891,9 @@ "y": 320, "wires": [ [ - "f042fa28.8f2bf8" + "f042fa28.8f2bf8", + "eb799ba44460adec", + "c0218de0f81a3892" ] ] }, @@ -24232,8 +24261,8 @@ "width": 3, "height": 3, "gtype": "gage", - "title": "CPU Temperature", - "label": "F", + "title": "CPU Temp", + "label": "{{msg.label}}", "format": "{{value}}", "min": 0, "max": "170", @@ -24242,10 +24271,11 @@ "#e6e600", "#ca3838" ], - "seg1": "125", - "seg2": "150", - "x": 1170, - "y": 280, + "seg1": "", + "seg2": "", + "className": "", + "x": 1510, + "y": 320, "wires": [] }, { @@ -24258,7 +24288,7 @@ "width": 3, "height": 3, "gtype": "gage", - "title": "CPU", + "title": "CPU Load", "label": "%", "format": "{{value}}", "min": 0, @@ -24270,8 +24300,9 @@ ], "seg1": "", "seg2": "", - "x": 809.8888931274414, - "y": 387.77777767181396, + "className": "", + "x": 710, + "y": 400, "wires": [] }, { @@ -24363,8 +24394,8 @@ ], "outputs": 1, "useDifferentColor": false, - "x": 1190, - "y": 320, + "x": 1530, + "y": 360, "wires": [ [] ] @@ -24382,13 +24413,13 @@ "outputFieldType": "msg", "roundOutputField": true, "outputFieldDecimals": "1", - "name": "", - "x": 920, - "y": 320, + "statusType": "none", + "name": "C to F", + "x": 1150, + "y": 280, "wires": [ [ - "3d67dce5.112054", - "cd3f0873.755ee8" + "c57859fc4cb050a7" ] ] }, @@ -24445,9 +24476,9 @@ "group": "4c7c4383a5f4d36f", "name": "Solar Data", "order": 1, - "width": 5, - "height": 15, - "format": "\n\n\n
\n \n \n \n \n \n \t\t\t\n \n \n \n \t\t\t\n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \t\t\n \n \n \n \n \n \n \t\t\t\n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \n \t\t\t\n \t\t\t\n \n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \n \n \n \t\t\n \t\t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n \n \n \n \n \n \n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \n \n \t\t\n \n \n
Solar-Terrestrial Data provided by N0NBH
{{msg.payload.solardata.updated[0]}}
SFI:{{msg.payload.solardata.solarflux[0]}}SN:{{msg.payload.solardata.sunspots[0]}}
A-Index:{{msg.payload.solardata.aindex[0]}}K-Index:{{msg.payload.solardata.kindex[0]}}
X-Ray:{{msg.payload.solardata.xray[0]}}
304A:{{msg.payload.solardata.heliumline[0]}} @ SEM
Ptn Flx:{{msg.payload.solardata.protonflux[0]}}Elc Flx:{{msg.payload.solardata.electonflux[0]}}
Auroa: {{msg.payload.solardata.aurora[0]}} / n={{msg.payload.solardata.normalization[0]}}
Bz:{{msg.payload.solardata.magneticfield[0]}}SW:{{msg.payload.solardata.solarwind[0]}}
HF Conditions
BandDayNight
80m-40m{{msg.payload.solardata.calculatedconditions[0].band[0]._}}{{msg.payload.solardata.calculatedconditions[0].band[4]._}}
30m-20m{{msg.payload.solardata.calculatedconditions[0].band[1]._}}{{msg.payload.solardata.calculatedconditions[0].band[5]._}}
17m-15m{{msg.payload.solardata.calculatedconditions[0].band[2]._}}{{msg.payload.solardata.calculatedconditions[0].band[6]._}}
12m-10m{{msg.payload.solardata.calculatedconditions[0].band[3]._}}{{msg.payload.solardata.calculatedconditions[0].band[7]._}}
VHF Conditions
Aur Lat{{msg.payload.solardata.latdegree[0]}}°
Aurora{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[0]._}}
6m EsEU{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[3]._}}
4m EsEU{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[4]._}}
2m EsEU{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[1]._}}
2m EsNA{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[2]._}}
EME Deg\n \t\t\t\t\n \t\t\t\t\t
\n \t\t\t\t
\n \t\t\t
Solar Flare Prb\n \t\t\t\t\n \t\t\t\t\t
\n \t\t\t\t
\n \t\t\t
MUF
MS
\n \t\t\t\t
\n \t\t\t
Geomag Field{{msg.payload.solardata.geomagfield[0]}}
Sig Noise Lvl{{msg.payload.solardata.signalnoise[0]}}
MUF US Boulder{{msg.payload.solardata.muf[0]}}
{{msg.payload.solardata.source[0].$.url}}
© Copyright Paul L Herrman
\n
\n\n", + "width": 0, + "height": 0, + "format": "\n\n\n
\n \n \n \n \n \n \t\t\t\n \n \n \n \t\t\t\n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \t\t\n \n \n \n \n \n \n \t\t\t\n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \n \n \t\t\t\n \n \n \n \t\t\t\n \t\t\t\n \n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \n \n \n \t\t\n \t\t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n \n \n \n \n \n \n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t \n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \n \n \t\t\n \n \n
Solar-Terrestrial Data provided by N0NBH
{{msg.payload.solardata.updated[0]}}
SFI:{{msg.payload.solardata.solarflux[0]}}SN:{{msg.payload.solardata.sunspots[0]}}
A-Index:{{msg.payload.solardata.aindex[0]}}K-Index:{{msg.payload.solardata.kindex[0]}}
X-Ray:{{msg.payload.solardata.xray[0]}}
304A:{{msg.payload.solardata.heliumline[0]}} @ SEM
Ptn Flx:{{msg.payload.solardata.protonflux[0]}}Elc Flx:{{msg.payload.solardata.electonflux[0]}}
Auroa: {{msg.payload.solardata.aurora[0]}} / n={{msg.payload.solardata.normalization[0]}}
Bz:{{msg.payload.solardata.magneticfield[0]}}SW:{{msg.payload.solardata.solarwind[0]}}
HF Conditions
BandDayNight
80m-40m{{msg.payload.solardata.calculatedconditions[0].band[0]._}}{{msg.payload.solardata.calculatedconditions[0].band[4]._}}
30m-20m{{msg.payload.solardata.calculatedconditions[0].band[1]._}}{{msg.payload.solardata.calculatedconditions[0].band[5]._}}
17m-15m{{msg.payload.solardata.calculatedconditions[0].band[2]._}}{{msg.payload.solardata.calculatedconditions[0].band[6]._}}
12m-10m{{msg.payload.solardata.calculatedconditions[0].band[3]._}}{{msg.payload.solardata.calculatedconditions[0].band[7]._}}
VHF Conditions
Aur Lat{{msg.payload.solardata.latdegree[0]}}°
Aurora{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[0]._}}
6m EsEU{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[3]._}}
4m EsEU{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[4]._}}
2m EsEU{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[1]._}}
2m EsNA{{msg.payload.solardata.calculatedvhfconditions[0].phenomenon[2]._}}
EME Deg\n \t\t\t\t\n \t\t\t\t\t
\n \t\t\t\t
\n \t\t\t
Solar Flare Prb\n \t\t\t\t\n \t\t\t\t\t
\n \t\t\t\t
\n \t\t\t
MUF
MS
\n \t\t\t\t
\n \t\t\t
Geomag Field{{msg.payload.solardata.geomagfield[0]}}
Sig Noise Lvl{{msg.payload.solardata.signalnoise[0]}}
MUF US Boulder{{msg.payload.solardata.muf[0]}}
{{msg.payload.solardata.source[0].$.url}}
© Copyright Paul L Herrman
\n
\n\n", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, @@ -24769,6 +24800,179 @@ ] ] }, + { + "id": "c57859fc4cb050a7", + "type": "switch", + "z": "db5600520bb7f279", + "name": "If Fahrenheit", + "property": "temperature_unit", + "propertyType": "global", + "rules": [ + { + "t": "eq", + "v": "F", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 1290, + "y": 280, + "wires": [ + [ + "3d67dce5.112054", + "cd3f0873.755ee8" + ] + ] + }, + { + "id": "eb799ba44460adec", + "type": "switch", + "z": "db5600520bb7f279", + "name": "If Celsius", + "property": "temperature_unit", + "propertyType": "global", + "rules": [ + { + "t": "eq", + "v": "C", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 1300, + "y": 320, + "wires": [ + [ + "3d67dce5.112054", + "cd3f0873.755ee8" + ] + ] + }, + { + "id": "b89a084234eca9ef", + "type": "inject", + "z": "db5600520bb7f279", + "name": "Every 5 secs", + "props": [ + { + "p": "payload" + } + ], + "repeat": "5", + "crontab": "", + "once": true, + "onceDelay": "", + "topic": "", + "payload": "temperature_unit", + "payloadType": "global", + "x": 860, + "y": 360, + "wires": [ + [ + "cd4b0989a632cb00" + ] + ] + }, + { + "id": "cd4b0989a632cb00", + "type": "rbe", + "z": "db5600520bb7f279", + "name": "if temperature_unit change", + "func": "rbe", + "gap": "", + "start": "", + "inout": "out", + "septopics": true, + "property": "payload", + "topi": "topic", + "x": 1080, + "y": 360, + "wires": [ + [ + "7427d9d83b6e6357" + ] + ] + }, + { + "id": "7427d9d83b6e6357", + "type": "change", + "z": "db5600520bb7f279", + "name": "Clear Chart", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "[]", + "tot": "json" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1290, + "y": 360, + "wires": [ + [ + "cd3f0873.755ee8" + ] + ] + }, + { + "id": "c0218de0f81a3892", + "type": "change", + "z": "db5600520bb7f279", + "name": "Set Gauge Display Values", + "rules": [ + { + "t": "set", + "p": "label", + "pt": "msg", + "to": "temperature_unit", + "tot": "global", + "dc": true + }, + { + "t": "set", + "p": "ui_control.seg1", + "pt": "msg", + "to": "temperature_yellow", + "tot": "global" + }, + { + "t": "set", + "p": "ui_control.seg2", + "pt": "msg", + "to": "temperature_red", + "tot": "global" + }, + { + "t": "set", + "p": "ui_control.max", + "pt": "msg", + "to": "temperature_max", + "tot": "global" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1250, + "y": 240, + "wires": [ + [ + "3d67dce5.112054" + ] + ] + }, { "id": "1e5d975d4f33a469", "type": "udp in", @@ -26915,7 +27119,7 @@ "topicType": "msg", "className": "", "x": 1930, - "y": 1020, + "y": 1120, "wires": [ [ "086b1f9232b45a14" @@ -26942,7 +27146,7 @@ "to": "", "reg": false, "x": 2180, - "y": 1020, + "y": 1120, "wires": [ [ "b6c621827fb49298" @@ -26976,7 +27180,7 @@ "name": "Database Lookup Engine Select", "info": "", "x": 1530, - "y": 960, + "y": 1060, "wires": [] }, { @@ -28830,10 +29034,10 @@ "id": "48f5678a75ee7dd8", "type": "ui_dropdown", "z": "204548a488401a1b", - "name": "Distance Measurement", - "label": "Units", + "name": "Disrtance Unit", + "label": "Distance", "tooltip": "", - "place": "Select option", + "place": "Select distance unit", "group": "00919f6d1599ed5f", "order": 1, "width": 6, @@ -28856,7 +29060,7 @@ "topic": "topic", "topicType": "msg", "className": "", - "x": 1850, + "x": 1820, "y": 860, "wires": [ [ @@ -28875,7 +29079,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 2120, + "x": 2060, "y": 860, "wires": [ [ @@ -28981,7 +29185,7 @@ "finalize": "", "libs": [], "x": 1670, - "y": 1020, + "y": 1120, "wires": [ [ "e35dbee7a81b43bc" @@ -28995,7 +29199,7 @@ "name": "Multi OP or S02R Operation", "info": "", "x": 1500, - "y": 1140, + "y": 1240, "wires": [] }, { @@ -29010,7 +29214,7 @@ "finalize": "", "libs": [], "x": 1640, - "y": 1080, + "y": 1180, "wires": [ [ "63f29cb1261063bf" @@ -29053,7 +29257,7 @@ "topicType": "msg", "className": "", "x": 1920, - "y": 1080, + "y": 1180, "wires": [ [ "7d0c7ffca7a6660e" @@ -29080,7 +29284,7 @@ "to": "", "reg": false, "x": 2170, - "y": 1080, + "y": 1180, "wires": [ [ "e0849adea5ad6c37" @@ -30748,7 +30952,8 @@ "ad4c547076b09ade", "543c8ffcfaaf7701", "1dfb81dda6b742b3", - "5eb3915f925752d7" + "5eb3915f925752d7", + "4cc7aa20c7555c0d" ] ] }, @@ -30798,7 +31003,7 @@ "3047a9ba16e10212" ], "x": 1445, - "y": 1060, + "y": 1160, "wires": [ [ "b6c621827fb49298", @@ -31090,6 +31295,92 @@ "y": 2860, "wires": [] }, + { + "id": "da26fb516364abdb", + "type": "ui_dropdown", + "z": "204548a488401a1b", + "name": "Temperature Unit", + "label": "Temperature", + "tooltip": "", + "place": "", + "group": "00919f6d1599ed5f", + "order": 1, + "width": 6, + "height": 1, + "passthru": true, + "multiple": false, + "options": [ + { + "label": "Fahrenheit", + "value": "F", + "type": "str" + }, + { + "label": "Celsius", + "value": "C", + "type": "str" + } + ], + "payload": "", + "topic": "topic", + "topicType": "msg", + "className": "", + "x": 1790, + "y": 960, + "wires": [ + [ + "cd712885f68288ef" + ] + ] + }, + { + "id": "cd712885f68288ef", + "type": "function", + "z": "204548a488401a1b", + "name": "Set Temperature Unit", + "func": "let x = msg.payload\nglobal.set('temperature_unit', x)\nif (x == 'F') {\n global.set('temperature_yellow', 105)\n global.set('temperature_red', 140)\n global.set('temperature_max', 195)\n}\nelse {\n global.set('temperature_yellow', 40)\n global.set('temperature_red', 60)\n global.set('temperature_max', 90)\n}\nreturn msg;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 2020, + "y": 960, + "wires": [ + [ + "4cc7aa20c7555c0d" + ] + ] + }, + { + "id": "1f7dccce6055a5b2", + "type": "comment", + "z": "204548a488401a1b", + "name": "Temperature Unit", + "info": "", + "x": 1520, + "y": 920, + "wires": [] + }, + { + "id": "4cc7aa20c7555c0d", + "type": "function", + "z": "204548a488401a1b", + "name": "Get Temperature Unit", + "func": "", + "outputs": 1, + "noerr": 0, + "initialize": "// Code added here will be run once\n// whenever the node is started.\nlet x = global.get('temperature_unit')\nif (x == 'F') \n{\n msg.payload = 'F';\n}\nelse \n{\n msg.payload = 'C'\n}\nreturn msg;", + "finalize": "", + "libs": [], + "x": 1560, + "y": 960, + "wires": [ + [ + "da26fb516364abdb" + ] + ] + }, { "id": "b8502660ecb5eb37", "type": "inject", diff --git a/package.json b/package.json index 13983a7..86541e4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "n1mm_dashboard", "description": "Dashboard for N1MM Contesting", - "version": "1.3.0", + "version": "1.4.0", "dependencies": { "node-red-contrib-hourglass": "1.5.0", "node-red-contrib-msg-speed": "2.1.0",