From 7950f92d8b1feb1d3c815b21d8998cfaafb8ce06 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Thu, 14 Dec 2023 13:53:45 +0100 Subject: [PATCH] Feature: Allow links in device profiles These links will be shown on the hardware settings page. --- docs/DeviceProfiles/blinkyparts_esp32.json | 48 +++++++++++++++++++ docs/DeviceProfiles/esp32_stick_poe_a.json | 3 ++ .../lilygo_ttgo_t-internet_poe.json | 9 ++++ docs/DeviceProfiles/olimex_esp32_evb.json | 3 ++ docs/DeviceProfiles/olimex_esp32_poe.json | 9 ++++ docs/DeviceProfiles/wt32-eth01.json | 6 +++ webapp/src/components/PinInfo.vue | 2 +- webapp/src/types/PinMapping.ts | 6 +++ webapp/src/views/DeviceAdminView.vue | 9 ++++ 9 files changed, 94 insertions(+), 1 deletion(-) diff --git a/docs/DeviceProfiles/blinkyparts_esp32.json b/docs/DeviceProfiles/blinkyparts_esp32.json index 0ee922bf..617777f5 100644 --- a/docs/DeviceProfiles/blinkyparts_esp32.json +++ b/docs/DeviceProfiles/blinkyparts_esp32.json @@ -1,6 +1,12 @@ [ { "name": "NRF, LEDs, Display", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-NRF-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HM-Serie-NRF-Modul/blink237542"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": 19, "mosi": 23, @@ -21,6 +27,12 @@ }, { "name": "CMT, LEDs, Display", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-CMT-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HMS-und-HMT-Serie-CMT-Modul/blink238342"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": -1, "mosi": -1, @@ -49,6 +61,12 @@ }, { "name": "NRF, Display", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-NRF-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HM-Serie-NRF-Modul/blink237542"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": 19, "mosi": 23, @@ -65,6 +83,12 @@ }, { "name": "CMT, Display", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-CMT-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HMS-und-HMT-Serie-CMT-Modul/blink238342"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": -1, "mosi": -1, @@ -89,6 +113,12 @@ }, { "name": "NRF, LEDs", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-NRF-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HM-Serie-NRF-Modul/blink237542"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": 19, "mosi": 23, @@ -104,6 +134,12 @@ }, { "name": "CMT, LEDs", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-CMT-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HMS-und-HMT-Serie-CMT-Modul/blink238342"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": -1, "mosi": -1, @@ -127,6 +163,12 @@ }, { "name": "NRF", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-NRF-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HM-Serie-NRF-Modul/blink237542"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": 19, "mosi": 23, @@ -138,6 +180,12 @@ }, { "name": "CMT", + "links": [ + {"name": "Information", "url": "https://shop.blinkyparts.com/de/OpenDTU-CMT-Deine-Auswertung-fuer-deine-Balkonsolaranlage-kompatibel-zu-Hoymiles-HMS-und-HMT-Serie-CMT-Modul/blink238342"}, + {"name": "Manual DE", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_de.pdf"}, + {"name": "Manual EN", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/manual/OpenDTU_Breakout_en.pdf"}, + {"name": "Schematic", "url": "https://binary-kitchen.github.io/SolderingTutorial/OpenDTU_Breakout/ibom.html"} + ], "nrf24": { "miso": -1, "mosi": -1, diff --git a/docs/DeviceProfiles/esp32_stick_poe_a.json b/docs/DeviceProfiles/esp32_stick_poe_a.json index 92c81745..aca95d6b 100644 --- a/docs/DeviceProfiles/esp32_stick_poe_a.json +++ b/docs/DeviceProfiles/esp32_stick_poe_a.json @@ -1,6 +1,9 @@ [ { "name": "Esp32-Stick-PoE-A", + "links": [ + {"name": "Information", "url": "https://github.com/allexoK/Esp32-Stick-Boards-Docs"} + ], "nrf24": { "miso": 2, "mosi": 15, diff --git a/docs/DeviceProfiles/lilygo_ttgo_t-internet_poe.json b/docs/DeviceProfiles/lilygo_ttgo_t-internet_poe.json index 538f3000..b5bb4ace 100644 --- a/docs/DeviceProfiles/lilygo_ttgo_t-internet_poe.json +++ b/docs/DeviceProfiles/lilygo_ttgo_t-internet_poe.json @@ -1,6 +1,9 @@ [ { "name": "LILYGO TTGO T-Internet-POE", + "links": [ + {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-internet-poe"} + ], "nrf24": { "miso": 2, "mosi": 15, @@ -21,6 +24,9 @@ }, { "name": "LILYGO TTGO T-Internet-POE, nrf24 direct solder", + "links": [ + {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-internet-poe"} + ], "nrf24": { "miso": 12, "mosi": 4, @@ -41,6 +47,9 @@ }, { "name": "LILYGO TTGO T-Internet-POE, nrf24 direct solder, SSD1306", + "links": [ + {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-internet-poe"} + ], "nrf24": { "miso": 12, "mosi": 4, diff --git a/docs/DeviceProfiles/olimex_esp32_evb.json b/docs/DeviceProfiles/olimex_esp32_evb.json index 9b66926d..ea0a8065 100644 --- a/docs/DeviceProfiles/olimex_esp32_evb.json +++ b/docs/DeviceProfiles/olimex_esp32_evb.json @@ -1,6 +1,9 @@ [ { "name": "Olimex ESP32-EVB", + "links": [ + { "name": "Datasheet", "url": "https://www.olimex.com/Products/IoT/ESP32/ESP32-EVB/open-source-hardware" } + ], "nrf24": { "miso": 15, "mosi": 2, diff --git a/docs/DeviceProfiles/olimex_esp32_poe.json b/docs/DeviceProfiles/olimex_esp32_poe.json index e43dff24..27f8242f 100644 --- a/docs/DeviceProfiles/olimex_esp32_poe.json +++ b/docs/DeviceProfiles/olimex_esp32_poe.json @@ -1,6 +1,9 @@ [ { "name": "Olimex ESP32-POE", + "links": [ + {"name": "Datasheet", "url": "https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware"} + ], "nrf24": { "miso": 15, "mosi": 2, @@ -21,6 +24,9 @@ }, { "name": "Olimex ESP32-POE with SSD1306", + "links": [ + {"name": "Datasheet", "url": "https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware"} + ], "nrf24": { "miso": 15, "mosi": 2, @@ -46,6 +52,9 @@ }, { "name": "Olimex ESP32-POE with SH1106", + "links": [ + {"name": "Datasheet", "url": "https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware"} + ], "nrf24": { "miso": 15, "mosi": 2, diff --git a/docs/DeviceProfiles/wt32-eth01.json b/docs/DeviceProfiles/wt32-eth01.json index e8aee231..388db209 100644 --- a/docs/DeviceProfiles/wt32-eth01.json +++ b/docs/DeviceProfiles/wt32-eth01.json @@ -1,6 +1,9 @@ [ { "name": "WT32-ETH01", + "links": [ + {"name": "Datasheet", "url": "http://www.wireless-tag.com/portfolio/wt32-eth01/"} + ], "nrf24": { "miso": 4, "mosi": 2, @@ -21,6 +24,9 @@ }, { "name": "WT32-ETH01 with SSD1306", + "links": [ + {"name": "Datasheet", "url": "http://www.wireless-tag.com/portfolio/wt32-eth01/"} + ], "nrf24": { "miso": 4, "mosi": 2, diff --git a/webapp/src/components/PinInfo.vue b/webapp/src/components/PinInfo.vue index af7e788c..3d4616ad 100644 --- a/webapp/src/components/PinInfo.vue +++ b/webapp/src/components/PinInfo.vue @@ -59,7 +59,7 @@ export default defineComponent({ let total: Array = []; total = total.concat(curArray, selArray); - return Array.from(new Set(total)).filter(cat => cat != 'name').sort(); + return Array.from(new Set(total)).filter(cat => cat != 'name' && cat != 'links').sort(); }, }, methods: { diff --git a/webapp/src/types/PinMapping.ts b/webapp/src/types/PinMapping.ts index 0f5492ce..51bb908a 100644 --- a/webapp/src/types/PinMapping.ts +++ b/webapp/src/types/PinMapping.ts @@ -34,8 +34,14 @@ export interface Display { reset: number; } +export interface Links { + name: string; + url: string; +} + export interface Device { name: string; + links: Array; nrf24: Nrf24; cmt: Cmt2300; eth: Ethernet; diff --git a/webapp/src/views/DeviceAdminView.vue b/webapp/src/views/DeviceAdminView.vue index ba6096df..eec104d2 100644 --- a/webapp/src/views/DeviceAdminView.vue +++ b/webapp/src/views/DeviceAdminView.vue @@ -36,6 +36,15 @@ +
+
+
+ +
+
+