Skip to content

Commit

Permalink
add capability to select ESPHomeDashboard version
Browse files Browse the repository at this point in the history
get latest available versions at adapter start
if not internet connection available, use fallback of cached data
allow to always use latest version instead of providing specific one
  • Loading branch information
DutchmanNL committed Dec 3, 2023
1 parent 61e6e56 commit 6eed79b
Show file tree
Hide file tree
Showing 17 changed files with 361 additions and 84 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ If you like my work, please consider a personal donation
### __WORK IN PROGRESS__
* (ticaki) Optimize admin configuration interface
* (DutchmanNL) Optimize backend handling of device discovery
* (DutchmanNL) Capability to select ESPHome Dashboard version added, resolves #118

### 0.5.0-beta.8 (2023-11-24)
* (DutchmanNL) Capability to automatically detect new devices added
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Aktivieren Sie das ESPHome-Dashboard",
"existDevicesHeader": "Alle von diesem Adapter verwalteten Geräte und deren Verbindungsstatus",
"hlpDiscoveryListeningAddress": "Erkennen Sie nur Geräte auf dieser Schnittstelle",
"hlpESPHomeDashboardVersion": "Wählen Sie aus, welche Version von ESPHome Dashboard verwendet werden soll",
"hlpInputApiPassword": "API-Passwort (alt, bitte Verschlüsselungsschlüssel verwenden!)",
"hlpInputDeviceIP": "Wählen Sie ein vorhandenes Gerät aus oder geben Sie die IP des neuen Geräts ein",
"hlpInputEncryptionKey": "Geben Sie einen gerätespezifischen Verschlüsselungsschlüssel an (bevorzugt)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Gerät löschen",
"lblDevicesTable": "Alle aktuellen (bekannten) Geräte und deren Verbindungsstatus",
"lblDiscoveryListeningAddress": "Anhörungsadresse",
"lblESPHomeDashboardVersion": "ESPHome Dashboard-Version",
"lblESPHomeIP": "IP-Adresse, unter der ESPHome Dashboard zur Integration in ioBroker Admin ausgeführt wird",
"lblESPHomePort": "Port des ESPHome-Dashboards",
"lblEnableESPHome": "Sie können ESPHome Dashboard entweder separat ausführen oder die Option unten aktivieren, um es nativ in ioBroker auszuführen",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Enable ESPHome Dashboard",
"existDevicesHeader": "All devices managed by this adapter and their connection state",
"hlpDiscoveryListeningAddress": "Only discover devices on this interface",
"hlpESPHomeDashboardVersion": "Choose which version of ESPHome Dashboard must be used",
"hlpInputApiPassword": "API password (legacy, please use encryption key!)",
"hlpInputDeviceIP": "Select existing device or Enter IP of new device",
"hlpInputEncryptionKey": "Provide device specific Encryption Key (preferred)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Delete Device",
"lblDevicesTable": "All current (known) devices and their connection state",
"lblDiscoveryListeningAddress": "Listening address",
"lblESPHomeDashboardVersion": "ESPHome Dashboard version",
"lblESPHomeIP": "IP-Address where ESPHome Dashboard is running to integrate in ioBroker Admin",
"lblESPHomePort": "Port of ESPHome Dashboard",
"lblEnableESPHome": "You can either run ESPHome Dashboard separately, or activate the option below to run it native in ioBroker",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Habilitar el panel ESPHome",
"existDevicesHeader": "Todos los dispositivos gestionados por este adaptador y su estado de conexión.",
"hlpDiscoveryListeningAddress": "Descubrir solo dispositivos en esta interfaz",
"hlpESPHomeDashboardVersion": "Elija qué versión de ESPHome Dashboard debe usarse",
"hlpInputApiPassword": "Contraseña de API (heredada, ¡use una clave de cifrado!)",
"hlpInputDeviceIP": "Seleccione el dispositivo existente o ingrese la IP del nuevo dispositivo",
"hlpInputEncryptionKey": "Proporcionar clave de cifrado específica del dispositivo (preferido)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Eliminar dispositivo",
"lblDevicesTable": "Todos los dispositivos actuales (conocidos) y su estado de conexión",
"lblDiscoveryListeningAddress": "dirección de escucha",
"lblESPHomeDashboardVersion": "Versión del panel ESPHome",
"lblESPHomeIP": "Dirección IP donde se ejecuta ESPHome Dashboard para integrarse en ioBroker Admin",
"lblESPHomePort": "Puerto de ESPHome Dashboard",
"lblEnableESPHome": "Puede ejecutar ESPHome Dashboard por separado o activar la siguiente opción para ejecutarlo de forma nativa en ioBroker.",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Activer le tableau de bord ESPHome",
"existDevicesHeader": "Tous les appareils gérés par cet adaptateur et leur état de connexion",
"hlpDiscoveryListeningAddress": "Découvrez uniquement les appareils sur cette interface",
"hlpESPHomeDashboardVersion": "Choisissez quelle version d'ESPHome Dashboard doit être utilisée",
"hlpInputApiPassword": "Mot de passe API (ancien, veuillez utiliser la clé de cryptage !)",
"hlpInputDeviceIP": "Sélectionnez l'appareil existant ou entrez l'adresse IP du nouvel appareil",
"hlpInputEncryptionKey": "Fournir une clé de cryptage spécifique à l'appareil (de préférence)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Supprimer l'appareil",
"lblDevicesTable": "Tous les appareils actuels (connus) et leur état de connexion",
"lblDiscoveryListeningAddress": "Adresse d'écoute",
"lblESPHomeDashboardVersion": "Version du tableau de bord ESPHome",
"lblESPHomeIP": "Adresse IP sur laquelle ESPHome Dashboard est exécuté pour s'intégrer dans ioBroker Admin",
"lblESPHomePort": "Port du tableau de bord ESPHome",
"lblEnableESPHome": "Vous pouvez soit exécuter ESPHome Dashboard séparément, soit activer l'option ci-dessous pour l'exécuter nativement dans ioBroker",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Abilita la dashboard ESPHome",
"existDevicesHeader": "Tutti i dispositivi gestiti da questo adattatore e il relativo stato di connessione",
"hlpDiscoveryListeningAddress": "Rileva solo i dispositivi su questa interfaccia",
"hlpESPHomeDashboardVersion": "Scegli quale versione di ESPHome Dashboard deve essere utilizzata",
"hlpInputApiPassword": "Password API (legacy, utilizza la chiave di crittografia!)",
"hlpInputDeviceIP": "Seleziona il dispositivo esistente o inserisci l'IP del nuovo dispositivo",
"hlpInputEncryptionKey": "Fornire una chiave di crittografia specifica per il dispositivo (preferibile)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Elimina dispositivo",
"lblDevicesTable": "Tutti i dispositivi attuali (conosciuti) e il relativo stato di connessione",
"lblDiscoveryListeningAddress": "Indirizzo d'ascolto",
"lblESPHomeDashboardVersion": "Versione ESPHome Dashboard",
"lblESPHomeIP": "Indirizzo IP su cui è in esecuzione ESPHome Dashboard per l'integrazione in ioBroker Admin",
"lblESPHomePort": "Porta della dashboard ESPHome",
"lblEnableESPHome": "Puoi eseguire ESPHome Dashboard separatamente o attivare l'opzione seguente per eseguirlo nativo in ioBroker",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Schakel ESPHome-dashboard in",
"existDevicesHeader": "Alle apparaten die door deze adapter worden beheerd en hun verbindingsstatus",
"hlpDiscoveryListeningAddress": "Ontdek alleen apparaten op deze interface",
"hlpESPHomeDashboardVersion": "Kies welke versie van ESPHome Dashboard gebruikt moet worden",
"hlpInputApiPassword": "API-wachtwoord (verouderd, gebruik een coderingssleutel!)",
"hlpInputDeviceIP": "Selecteer bestaand apparaat of voer IP van nieuw apparaat in",
"hlpInputEncryptionKey": "Geef apparaatspecifieke coderingssleutel op (bij voorkeur)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Apparaat verwijderen",
"lblDevicesTable": "Alle huidige (bekende) apparaten en hun verbindingsstatus",
"lblDiscoveryListeningAddress": "Luisteradres",
"lblESPHomeDashboardVersion": "ESPHome Dashboard-versie",
"lblESPHomeIP": "IP-adres waar ESPHome Dashboard wordt uitgevoerd om te integreren in ioBroker Admin",
"lblESPHomePort": "Haven van ESPHome-dashboard",
"lblEnableESPHome": "U kunt ESPHome Dashboard afzonderlijk uitvoeren of de onderstaande optie activeren om het native in ioBroker uit te voeren",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Włącz panel ESPHome",
"existDevicesHeader": "Wszystkie urządzenia zarządzane przez tę kartę i ich stan połączenia",
"hlpDiscoveryListeningAddress": "Odkrywaj tylko urządzenia na tym interfejsie",
"hlpESPHomeDashboardVersion": "Wybierz, która wersja panelu ESPHome ma być używana",
"hlpInputApiPassword": "Hasło API (starsze, użyj klucza szyfrującego!)",
"hlpInputDeviceIP": "Wybierz istniejące urządzenie lub wprowadź adres IP nowego urządzenia",
"hlpInputEncryptionKey": "Podaj klucz szyfrowania specyficzny dla urządzenia (preferowany)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Usuń urządzenie",
"lblDevicesTable": "Wszystkie aktualne (znane) urządzenia i stan ich połączenia",
"lblDiscoveryListeningAddress": "Adres słuchania",
"lblESPHomeDashboardVersion": "Wersja panelu ESPHome",
"lblESPHomeIP": "Adres IP, na którym działa panel ESPHome Dashboard w celu integracji z administratorem ioBroker",
"lblESPHomePort": "Port panelu ESPHome",
"lblEnableESPHome": "Możesz uruchomić panel ESPHome osobno lub aktywować poniższą opcję, aby uruchomić go natywnie w ioBroker",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Habilitar painel ESPHome",
"existDevicesHeader": "Todos os dispositivos gerenciados por este adaptador e seu estado de conexão",
"hlpDiscoveryListeningAddress": "Descubra apenas dispositivos nesta interface",
"hlpESPHomeDashboardVersion": "Escolha qual versão do ESPHome Dashboard deve ser usada",
"hlpInputApiPassword": "Senha da API (herdada, use a chave de criptografia!)",
"hlpInputDeviceIP": "Selecione o dispositivo existente ou insira o IP do novo dispositivo",
"hlpInputEncryptionKey": "Forneça a chave de criptografia específica do dispositivo (preferencial)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Excluir dispositivo",
"lblDevicesTable": "Todos os dispositivos atuais (conhecidos) e seu estado de conexão",
"lblDiscoveryListeningAddress": "Endereço de escuta",
"lblESPHomeDashboardVersion": "Versão do painel ESPHome",
"lblESPHomeIP": "Endereço IP onde o ESPHome Dashboard está sendo executado para integração no ioBroker Admin",
"lblESPHomePort": "Painel do Porto do ESPHome",
"lblEnableESPHome": "Você pode executar o ESPHome Dashboard separadamente ou ativar a opção abaixo para executá-lo nativamente no ioBroker",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "Включить панель управления ESPHome",
"existDevicesHeader": "Все устройства, управляемые этим адаптером, и состояние их подключения",
"hlpDiscoveryListeningAddress": "Обнаруживать устройства только на этом интерфейсе",
"hlpESPHomeDashboardVersion": "Выберите, какую версию ESPHome Dashboard необходимо использовать.",
"hlpInputApiPassword": "Пароль API (устаревший, используйте ключ шифрования!)",
"hlpInputDeviceIP": "Выберите существующее устройство или введите IP нового устройства.",
"hlpInputEncryptionKey": "Предоставьте ключ шифрования для конкретного устройства (предпочтительно)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "Удалить устройство",
"lblDevicesTable": "Все текущие (известные) устройства и состояние их подключения",
"lblDiscoveryListeningAddress": "Адрес прослушивания",
"lblESPHomeDashboardVersion": "Версия панели управления ESPHome",
"lblESPHomeIP": "IP-адрес, на котором работает панель управления ESPHome, для интеграции в администрацию ioBroker.",
"lblESPHomePort": "Панель управления портом ESPHome",
"lblEnableESPHome": "Вы можете запустить панель ESPHome Dashboard отдельно или активировать опцию ниже, чтобы запустить ее в ioBroker.",
Expand Down
2 changes: 2 additions & 0 deletions admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chkEnableESPHome": "启用 ESPHome 仪表板",
"existDevicesHeader": "该适配器管理的所有设备及其连接状态",
"hlpDiscoveryListeningAddress": "只发现该接口上的设备",
"hlpESPHomeDashboardVersion": "选择必须使用哪个版本的 ESPHome Dashboard",
"hlpInputApiPassword": "API密码(旧的,请使用加密密钥!)",
"hlpInputDeviceIP": "选择现有设备或输入新设备的IP",
"hlpInputEncryptionKey": "提供设备特定的加密密钥(首选)",
Expand All @@ -21,6 +22,7 @@
"lblDelDevice": "删除设备",
"lblDevicesTable": "所有当前(已知)设备及其连接状态",
"lblDiscoveryListeningAddress": "收听地址",
"lblESPHomeDashboardVersion": "ESPHome 仪表板版本",
"lblESPHomeIP": "运行 ESPHome 仪表板以集成到 ioBroker Admin 中的 IP 地址",
"lblESPHomePort": "ESPHome 仪表板端口",
"lblEnableESPHome": "您可以单独运行 ESPHome Dashboard,也可以激活以下选项以在 ioBroker 中本机运行它",
Expand Down
19 changes: 14 additions & 5 deletions admin/jsonConfig.json5
Original file line number Diff line number Diff line change
Expand Up @@ -435,23 +435,32 @@
"ESPHomeDashboardEnabled": {
"newLine": true,
"type": "checkbox",
"sm": 2,
"md": 2,
"lg": 2,
"sm": 4,
"md": 4,
"lg": 4,
"label": "chkEnableESPHome"
},
"ESPHomeDashboardVersion": {
"type": "autocompleteSendTo",
"sm": 6,
"label": "lblESPHomeDashboardVersion",
"help": "hlpESPHomeDashboardVersion",
"command": "getESPHomeDashboardVersion",
"jsonData": "{ \"service\": \"${data.deviceInputIP}\" }"
},
"ESPHomeDashboardIP": {
"type": "autocompleteSendTo",
"newLine": true,
"freeSolo": true,
"sm": 3,
"sm": 5,
"label": "lblESPHomeIP",
"command": "getHostIp",
"jsonData": "{ \"service\": \"${data.deviceInputIP}\" }"
},
"ESPHomeDashboardPort": {
"type": "text",
"text": "",
"sm": 1,
"sm": 2,
"readOnly" : true,
"label": "lblESPHomePort"
},
Expand Down
Loading

0 comments on commit 6eed79b

Please sign in to comment.