|
|
|
@@ -1,14 +1,10 @@
|
|
|
|
/*-----------------------------------------------------------------------
|
|
|
|
/*-----------------------------------------------------------------------
|
|
|
|
TypeScript v5.0.2.1 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @ticaki / @Britzelpuf / @Sternmiere / @ravenS0ne
|
|
|
|
TypeScript v4.9.5.1 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @ticaki / @Britzelpuf / @Sternmiere / @ravenS0ne
|
|
|
|
- abgestimmt auf TFT 59 / v5.0.2 / BerryDriver 10 / Tasmota 15.0.1
|
|
|
|
- abgestimmt auf TFT 58 / v4.9.5 / BerryDriver 10 / Tasmota 15.0.1
|
|
|
|
|
|
|
|
@joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker
|
|
|
|
Projekt:
|
|
|
|
|
|
|
|
https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker
|
|
|
|
|
|
|
|
https://github.com/ticaki/ioBroker.nspanel-lovelace-ui/tree/main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts
|
|
|
|
NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts
|
|
|
|
icon_mapping.ts: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/icon_mapping.ts (TypeScript muss in global liegen)
|
|
|
|
icon_mapping.ts: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/icon_mapping.ts (TypeScript muss in global liegen)
|
|
|
|
ioBroker-Unterstützung: https://forum.iobroker.net/topic/58170/sonoff-nspanel-mit-lovelace-ui
|
|
|
|
ioBroker-Unterstützung: https://forum.iobroker.net/topic/50888/sonoff-nspanel
|
|
|
|
@Kuckuckmann: WIKI zu diesem Projekt unter: https://github.com/joBr99/nspanel-lovelace-ui/wiki (siehe Sidebar)
|
|
|
|
@Kuckuckmann: WIKI zu diesem Projekt unter: https://github.com/joBr99/nspanel-lovelace-ui/wiki (siehe Sidebar)
|
|
|
|
|
|
|
|
|
|
|
|
***************************************************************************************************************
|
|
|
|
***************************************************************************************************************
|
|
|
|
@@ -18,12 +14,14 @@ Achtung: Keine Beispiele mehr im Script. Die Beispiele sind jetzt unter nachfolg
|
|
|
|
|
|
|
|
|
|
|
|
Icons unter: https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html
|
|
|
|
Icons unter: https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html
|
|
|
|
|
|
|
|
|
|
|
|
************************************************************************************************
|
|
|
|
|
|
|
|
Achtung Tasmota 15.1.0 lässt kein FlashNextion zu --> stattdessen v15.0.1 verwenden
|
|
|
|
|
|
|
|
************************************************************************************************
|
|
|
|
************************************************************************************************
|
|
|
|
Achtung Änderung des Sonoff ESP-Temperatursensors
|
|
|
|
Achtung Änderung des Sonoff ESP-Temperatursensors
|
|
|
|
!!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!!
|
|
|
|
!!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!!
|
|
|
|
************************************************************************************************
|
|
|
|
************************************************************************************************
|
|
|
|
|
|
|
|
In bestimmten Situationen kommt es vor, dass sich das Panel mit FlashNextion
|
|
|
|
|
|
|
|
unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Downgrade
|
|
|
|
|
|
|
|
durchführen und FlashNextion wiederholen.
|
|
|
|
|
|
|
|
************************************************************************************************
|
|
|
|
Ab Tasmota > 13.0.0 ist für ein Upgrade ggfs. eine Umpartitionierung erforderlich
|
|
|
|
Ab Tasmota > 13.0.0 ist für ein Upgrade ggfs. eine Umpartitionierung erforderlich
|
|
|
|
https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Tasmota-FAQ#3-tasmota-update-probleme
|
|
|
|
https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Tasmota-FAQ#3-tasmota-update-probleme
|
|
|
|
*****************************************************************************************************************************
|
|
|
|
*****************************************************************************************************************************
|
|
|
|
@@ -88,18 +86,12 @@ ReleaseNotes:
|
|
|
|
- 05.08.2025 - v4.9.4.2 Prevent version search to the old directory path (Berry-Driver) + New Berry Update Path (RAW)
|
|
|
|
- 05.08.2025 - v4.9.4.2 Prevent version search to the old directory path (Berry-Driver) + New Berry Update Path (RAW)
|
|
|
|
- 08.08.2025 - v4.9.4.3 Add Beta Logic for cardThermo2 (future)
|
|
|
|
- 08.08.2025 - v4.9.4.3 Add Beta Logic for cardThermo2 (future)
|
|
|
|
- 10.08.2025 - v4.9.4.3 Add Pirate-Weather Adapter
|
|
|
|
- 10.08.2025 - v4.9.4.3 Add Pirate-Weather Adapter
|
|
|
|
- 11.08.2025 - v4.9.5 TFT 58 / 4.9.5 - Add cardThermo2 (eu)
|
|
|
|
- 11.08.2025 - v4.9.5 TFT 58 / 4.9.5 - Add cardThermo2 (eu/us-l/us-p)
|
|
|
|
- 21.08.2025 - v4.9.5.2 Add Bright Sky Weather Adapter
|
|
|
|
|
|
|
|
- 05.09.2025 - v5.0.0 TFT 59 / 5.0.0 - EU Changes in cardMedia, popupInSel, card Grid 1, 2, 3
|
|
|
|
|
|
|
|
- 08.09.2025 - v5.0.0 TFT 59 / 5.0.0 - US-L/US-P Changes in cardMedia, popupInSel, card Grid 1, 2, 3
|
|
|
|
|
|
|
|
- 19.09.2025 - v5.0.0.2 Remove Startup Scheedule at 3:30am / Small fix
|
|
|
|
|
|
|
|
- 19.10.2025 - v5.0.2.1 TFT 59 / 5.0.2 - EU/US-L/US-P - Fix cardAlarm Icon; Fix Notification in Advanced Screensaver; Fix Dimensions in cardChart/cardLChart
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
***************************************************************************************************************
|
|
|
|
***************************************************************************************************************
|
|
|
|
* DE: Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObject" gesetzt sein! *
|
|
|
|
* DE: Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObject" gesetzt sein! *
|
|
|
|
* EN: In order for the script to create the aliases, “setObject” must be set in the JavaScript instance! *
|
|
|
|
* EN: In order for the script to create the aliases, “setObject” must be set in the JavaScript instance! *
|
|
|
|
***************************************************************************************************************
|
|
|
|
***************************************************************************************************************{
|
|
|
|
|
|
|
|
|
|
|
|
Wenn Rule definiert, dann können die Hardware-Tasten ebenfalls für Seitensteuerung (dann nicht mehr als Relais) genutzt werden
|
|
|
|
Wenn Rule definiert, dann können die Hardware-Tasten ebenfalls für Seitensteuerung (dann nicht mehr als Relais) genutzt werden
|
|
|
|
|
|
|
|
|
|
|
|
@@ -120,7 +112,6 @@ Mögliche Seiten-Ansichten:
|
|
|
|
9 horizontal angeordnete Steuerelemente in 3 Reihen a 3 Steuerelemente - auch als Subpage - beim US-Modell im Portrait-Modus
|
|
|
|
9 horizontal angeordnete Steuerelemente in 3 Reihen a 3 Steuerelemente - auch als Subpage - beim US-Modell im Portrait-Modus
|
|
|
|
cardGrid3 Page - 4 horizontal angeordnete Steuerelemente in 2 Reihen a 2 Steuerelemente - auch als Subpage
|
|
|
|
cardGrid3 Page - 4 horizontal angeordnete Steuerelemente in 2 Reihen a 2 Steuerelemente - auch als Subpage
|
|
|
|
cardThermo Page - Thermostat mit Solltemperatur, Isttemperatur, Mode - Weitere Eigenschaften können im Alias definiert werden
|
|
|
|
cardThermo Page - Thermostat mit Solltemperatur, Isttemperatur, Mode - Weitere Eigenschaften können im Alias definiert werden
|
|
|
|
cardThermo2 Page - weiterer Thermostat (Circular Slider) mit Solltemperatur, Isttemperatur, Mode - Weitere Eigenschaften können im Alias definiert werden
|
|
|
|
|
|
|
|
cardMedia Page - Mediaplayer - Ausnahme: Alias sollte mit Alias-Manager automatisch über Alexa-Verzeichnis Player angelegt werden
|
|
|
|
cardMedia Page - Mediaplayer - Ausnahme: Alias sollte mit Alias-Manager automatisch über Alexa-Verzeichnis Player angelegt werden
|
|
|
|
cardAlarm Page - Alarmseite mit Zustand und Tastenfeld
|
|
|
|
cardAlarm Page - Alarmseite mit Zustand und Tastenfeld
|
|
|
|
cardPower Page - Energiefluss
|
|
|
|
cardPower Page - Energiefluss
|
|
|
|
@@ -132,16 +123,12 @@ Mögliche Seiten-Ansichten:
|
|
|
|
https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker-Card-Definitionen-(Seiten)
|
|
|
|
https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker-Card-Definitionen-(Seiten)
|
|
|
|
|
|
|
|
|
|
|
|
Popup-Pages:
|
|
|
|
Popup-Pages:
|
|
|
|
popupLight - in Abhängigkeit zum gewählten Alias werden "Helligkeit", "Farbtemperatur" und "Farbauswahl" bereitgestellt
|
|
|
|
popupLight Page - in Abhängigkeit zum gewählten Alias werden "Helligkeit", "Farbtemperatur" und "Farbauswahl" bereitgestellt
|
|
|
|
popupLight2 - (größere Elemente) in Abhängigkeit zum gewählten Alias werden "Helligkeit", "Farbtemperatur" und "Farbauswahl" bereitgestellt
|
|
|
|
popupShutter Page - die Shutter-Position (Rollo, Jalousie, Markise, Leinwand, etc.) kann über einen Slider verändert werden.
|
|
|
|
popupShutter - die Shutter-Position (Rollo, Jalousie, Markise, Leinwand, etc.) kann über einen Slider verändert werden.
|
|
|
|
popupNotify Page - Info - Seite mit Headline Text und Buttons - Intern für manuelle Updates / Extern zur Befüllung von Datenpunkten unter 0_userdata
|
|
|
|
popupShutter2 - die Shutter-Position (Rollo, Jalousie, Markise, Leinwand, etc.) kann über einen Slider verändert werden.
|
|
|
|
|
|
|
|
popupNotify - Info - Seite mit Headline Text und Buttons - Intern für manuelle Updates / Extern zur Befüllung von Datenpunkten unter 0_userdata
|
|
|
|
|
|
|
|
screensaver Notify - Über zwei externe Datenpunkte in 0_userdata können "Headline" und "Text" an den Screensaver zur Info gesendet werden
|
|
|
|
screensaver Notify - Über zwei externe Datenpunkte in 0_userdata können "Headline" und "Text" an den Screensaver zur Info gesendet werden
|
|
|
|
popupInSel - Auswahlliste (InputSelect)
|
|
|
|
popupInSel Page - Auswahlliste (InputSelect)
|
|
|
|
popupSlider - 3 vertikal ausgerichtete Slider. Abweichender 0 Punkt möglich
|
|
|
|
popupSlider Page - 3 vertikal ausgerichtete Slider. Abweichender 0 Punkt möglich
|
|
|
|
popupFan - Ventilatorsteuerung
|
|
|
|
|
|
|
|
popupTimer - Stopuhr, Countdown, Wecker oder Zeitschaltuhr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mögliche Aliase: (Vorzugsweise mit ioBroker-Adapter "Geräte verwalten" konfigurieren, da SET, GET, ACTUAL, etc. verwendet werden)
|
|
|
|
Mögliche Aliase: (Vorzugsweise mit ioBroker-Adapter "Geräte verwalten" konfigurieren, da SET, GET, ACTUAL, etc. verwendet werden)
|
|
|
|
Info - Werte aus Datenpunkt
|
|
|
|
Info - Werte aus Datenpunkt
|
|
|
|
@@ -169,10 +156,10 @@ Mögliche Aliase: (Vorzugsweise mit ioBroker-Adapter "Geräte verwalten" konfigu
|
|
|
|
Klimaanlage - Buttons zur Steuerung der Klimaanlage im unteren Bereich
|
|
|
|
Klimaanlage - Buttons zur Steuerung der Klimaanlage im unteren Bereich
|
|
|
|
Temperatur - Anzeige von Temperatur - Datenpunkten, analog Info
|
|
|
|
Temperatur - Anzeige von Temperatur - Datenpunkten, analog Info
|
|
|
|
Feuchtigkeit - Anzeige von Humidity - Datenpunkten, analog Info
|
|
|
|
Feuchtigkeit - Anzeige von Humidity - Datenpunkten, analog Info
|
|
|
|
Medien - Steuerung von Alexa, etc. - Der erforderliche Media Alias-Channel legt sich selbst an
|
|
|
|
Medien - Steuerung von Alexa, etc. - Über Alias-Manager im Verzeichnis Player automatisch anlegen (Geräte-Manager funktioniert nicht)
|
|
|
|
Wettervorhersage - Aktuelle Außen-Temperatur (Temp) und aktuelles AccuWeather-Icon (Icon) für Screensaver
|
|
|
|
Wettervorhersage - Aktuelle Außen-Temperatur (Temp) und aktuelles AccuWeather-Icon (Icon) für Screensaver
|
|
|
|
Warnung - Abfall, etc. -- Info mit IconColor
|
|
|
|
Warnung - Abfall, etc. -- Info mit IconColor
|
|
|
|
Ventilator - An/Aus mit Steuerung über popupFan
|
|
|
|
|
|
|
|
Timer (siehe Wiki)
|
|
|
|
Timer (siehe Wiki)
|
|
|
|
|
|
|
|
|
|
|
|
Vollständige Liste zur Einrichtung unter:
|
|
|
|
Vollständige Liste zur Einrichtung unter:
|
|
|
|
@@ -190,8 +177,7 @@ Tasmota-Status0 - (zyklische Ausführung)
|
|
|
|
|
|
|
|
|
|
|
|
Erforderliche Adapter:
|
|
|
|
Erforderliche Adapter:
|
|
|
|
|
|
|
|
|
|
|
|
Pirate-Weather oder BrightSky oder OpenWeatherMap --> Bei Nutzung der Wetterfunktionen (und zur Icon-Konvertierung) im Screensaver
|
|
|
|
OpenWeatherMap oder DasWetter: - Bei Nutzung der Wetterfunktionen (und zur Icon-Konvertierung) im Screensaver
|
|
|
|
!!!DasWetter deprecated - Dienst nur noch für ältere Accounts funktional
|
|
|
|
|
|
|
|
!!!AccuWeather deprecated - Dienst schaltet Free-Account ab!!!
|
|
|
|
!!!AccuWeather deprecated - Dienst schaltet Free-Account ab!!!
|
|
|
|
Alexa2: - Bei Nutzung der dynamischen SpeakerList in der cardMedia
|
|
|
|
Alexa2: - Bei Nutzung der dynamischen SpeakerList in der cardMedia
|
|
|
|
Geräte verwalten - Für Erstellung der Aliase
|
|
|
|
Geräte verwalten - Für Erstellung der Aliase
|
|
|
|
@@ -202,11 +188,10 @@ Install/Upgrades in Konsole:
|
|
|
|
|
|
|
|
|
|
|
|
Tasmota BerryDriver Install: Backlog UrlFetch https://raw.githubusercontent.com/ticaki/ioBroker.nspanel-lovelace-ui/refs/heads/main/tasmota/berry/10/autoexec.be; Restart 1
|
|
|
|
Tasmota BerryDriver Install: Backlog UrlFetch https://raw.githubusercontent.com/ticaki/ioBroker.nspanel-lovelace-ui/refs/heads/main/tasmota/berry/10/autoexec.be; Restart 1
|
|
|
|
Tasmota BerryDriver Update: Backlog UpdateDriverVersion https://raw.githubusercontent.com/ticaki/ioBroker.nspanel-lovelace-ui/refs/heads/main/tasmota/berry/10/autoexec.be; Restart 1
|
|
|
|
Tasmota BerryDriver Update: Backlog UpdateDriverVersion https://raw.githubusercontent.com/ticaki/ioBroker.nspanel-lovelace-ui/refs/heads/main/tasmota/berry/10/autoexec.be; Restart 1
|
|
|
|
|
|
|
|
TFT EU STABLE Version: FlashNextionAdv0 http://nspanel.de/nspanel-v4.9.5.tft
|
|
|
|
|
|
|
|
|
|
|
|
TFT EU STABLE Version: FlashNextionAdv0 http://nspanel.de/nspanel-v5.0.2.tft
|
|
|
|
TFT US-L STABLE Version: FlashNextionAdv0 http://nspanel.de/nspanel-us-l-v4.9.5.tft
|
|
|
|
|
|
|
|
TFT US-P STABLE Version: FlashNextionAdv0 http://nspanel.de/nspanel-us-p-v4.9.5.tft
|
|
|
|
TFT US-L STABLE Version: FlashNextionAdv0 http://nspanel.de/nspanel-us-l-v5.0.2.tft
|
|
|
|
|
|
|
|
TFT US-P STABLE Version: FlashNextionAdv0 http://nspanel.de/nspanel-us-p-v5.0.2.tft
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------------------
|
|
|
|
---------------------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
@@ -234,11 +219,10 @@ const tasmota_web_admin_password: string = '';
|
|
|
|
|
|
|
|
|
|
|
|
// DE: Setzen der bevorzugten Tasmota32-Version (für Updates)
|
|
|
|
// DE: Setzen der bevorzugten Tasmota32-Version (für Updates)
|
|
|
|
// EN: Set preferred Tasmota32 version (for updates)
|
|
|
|
// EN: Set preferred Tasmota32 version (for updates)
|
|
|
|
const tasmotaOtaVersion: string = 'tasmota32-nspanel.bin';
|
|
|
|
const tasmotaOtaVersion: string = 'tasmota32-DE.bin';
|
|
|
|
// DE: Es können ebenfalls andere Versionen verwendet werden wie zum Beispiel:
|
|
|
|
// DE: Es können ebenfalls andere Versionen verwendet werden wie zum Beispiel:
|
|
|
|
// EN: 'tasmota32-DE.bin' oder 'tasmota32.bin' oder 'tasmota32-DE.bin' oder etc.
|
|
|
|
// EN: Other versions can also be used, such as:
|
|
|
|
// DE: !!!Anmerkung!!! Seit Tasmota v15.0.X wird der 4Mb PSRAM im ESP32 nur noch in der tasmota32-nspanel.bin verwendet
|
|
|
|
// 'tasmota32-nspanel.bin' or 'tasmota32.bin' or 'tasmota32-DE.bin' or etc.
|
|
|
|
// EN: !!!Note!!! Since Tasmota v15.0.X, the 4Mb PSRAM in the ESP32 is only used in the tasmota32-nspanel.bin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***** 2. Directories in 0_userdata.0... *****/
|
|
|
|
/***** 2. Directories in 0_userdata.0... *****/
|
|
|
|
@@ -254,9 +238,9 @@ const NSPanel_Alarm_Path = '0_userdata.0.NSPanel.';
|
|
|
|
|
|
|
|
|
|
|
|
/***** 3. Weather adapter Config *****/
|
|
|
|
/***** 3. Weather adapter Config *****/
|
|
|
|
|
|
|
|
|
|
|
|
// DE: Mögliche Wetteradapter 'pirate-weather.0.' oder 'brightsky.0.' oder 'openweathermap.0.' oder 'daswetter.0.' (deprecated) oder 'accuweather.0.' (deprecated)
|
|
|
|
// DE: Mögliche Wetteradapter 'openweathermap.0.' oder 'daswetter.0.' oder 'accuweather.0.' (deprecated)
|
|
|
|
// EN: Possible weather adapters 'pirate-weather.0.' or 'brightsky.0.' or 'openweathermap.0.' or 'daswetter.0.' (deprecated) or 'accuweather.0.' (deprecated)
|
|
|
|
// EN: Possible weather adapters 'openweathermap.0.' or 'daswetter.0.' or 'accuweather.0.' (deprecated)
|
|
|
|
const weatherAdapterInstance: string = 'pirate-weather.0.';
|
|
|
|
const weatherAdapterInstance: string = 'openweathermap.0.';
|
|
|
|
|
|
|
|
|
|
|
|
// DE: Mögliche Werte: 'Min', 'Max' oder 'MinMax' im Screensaver
|
|
|
|
// DE: Mögliche Werte: 'Min', 'Max' oder 'MinMax' im Screensaver
|
|
|
|
// EN: Possible values: 'Min', 'Max' or 'MinMax' in the screensaver
|
|
|
|
// EN: Possible values: 'Min', 'Max' or 'MinMax' in the screensaver
|
|
|
|
@@ -264,7 +248,7 @@ const weatherScreensaverTempMinMax: string = 'MinMax';
|
|
|
|
|
|
|
|
|
|
|
|
// DE: Dieser Alias wird automatisch für den gewählten Wetter erstellt und kann entsprechend angepasst werden
|
|
|
|
// DE: Dieser Alias wird automatisch für den gewählten Wetter erstellt und kann entsprechend angepasst werden
|
|
|
|
// EN: This alias is automatically created for the selected weather and can be adjusted accordingly
|
|
|
|
// EN: This alias is automatically created for the selected weather and can be adjusted accordingly
|
|
|
|
const weatherEntityPath: string = 'alias.0.Pirate_Weather'; //Please rename if change weatherAdapterInstance!
|
|
|
|
const weatherEntityPath: string = 'alias.0.OWMWetter';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***** 4. Color constants for use in the PageItems *****/
|
|
|
|
/***** 4. Color constants for use in the PageItems *****/
|
|
|
|
@@ -288,8 +272,8 @@ const DarkBlue: RGB = {red: 0, green: 0, blue: 136};
|
|
|
|
const Gray: RGB = {red: 136, green: 136, blue: 136};
|
|
|
|
const Gray: RGB = {red: 136, green: 136, blue: 136};
|
|
|
|
const Black: RGB = {red: 0, green: 0, blue: 0};
|
|
|
|
const Black: RGB = {red: 0, green: 0, blue: 0};
|
|
|
|
const Cyan: RGB = {red: 0, green: 255, blue: 255};
|
|
|
|
const Cyan: RGB = {red: 0, green: 255, blue: 255};
|
|
|
|
const Magenta: RGB = {red: 255, green: 0, blue: 255};
|
|
|
|
const Magenta: RGB = {red: 255, green: 0, blue: 255}
|
|
|
|
const Orange: RGB = {red: 255, green: 130, blue: 0};
|
|
|
|
const Orange: RGB = { red: 255, green: 130, blue: 0 };
|
|
|
|
const colorSpotify: RGB = {red: 30, green: 215, blue: 96};
|
|
|
|
const colorSpotify: RGB = {red: 30, green: 215, blue: 96};
|
|
|
|
const colorAlexa: RGB = {red: 49, green: 196, blue: 243};
|
|
|
|
const colorAlexa: RGB = {red: 49, green: 196, blue: 243};
|
|
|
|
const colorSonos: RGB = {red: 216, green: 161, blue: 88};
|
|
|
|
const colorSonos: RGB = {red: 216, green: 161, blue: 88};
|
|
|
|
@@ -406,10 +390,10 @@ const defaultBackgroundColorParam: any = HMIDark;
|
|
|
|
- Servicemenü aus pages "NSPanel_Service" unter pages kommentieren ("//" hinzufügen)
|
|
|
|
- Servicemenü aus pages "NSPanel_Service" unter pages kommentieren ("//" hinzufügen)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************************************
|
|
|
|
/*************************************************************************************************
|
|
|
|
** Service pages with auto alias (subsequent pages are automatically created with alias) **
|
|
|
|
** Service pages with auto alias (subsequent pages are automatically created with alias) **
|
|
|
|
** https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Service-Men%C3%BC **
|
|
|
|
** https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Service-Men%C3%BC **
|
|
|
|
***********************************************************************************************/
|
|
|
|
************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/* EN: English
|
|
|
|
/* EN: English
|
|
|
|
If the service menu needs to be secured, a cardUnlock can be installed upstream.
|
|
|
|
If the service menu needs to be secured, a cardUnlock can be installed upstream.
|
|
|
|
@@ -822,7 +806,7 @@ export const config: Config = {
|
|
|
|
NSPanel_Wifi_Info_2, //Auto-Alias Service Page
|
|
|
|
NSPanel_Wifi_Info_2, //Auto-Alias Service Page
|
|
|
|
NSPanel_Sensoren, //Auto-Alias Service Page
|
|
|
|
NSPanel_Sensoren, //Auto-Alias Service Page
|
|
|
|
NSPanel_Hardware, //Auto-Alias Service Page
|
|
|
|
NSPanel_Hardware, //Auto-Alias Service Page
|
|
|
|
NSPanel_IoBroker, //Auto-Alias Service Page
|
|
|
|
NSPanel_IoBroker, //Auot-Alias Service Page
|
|
|
|
NSPanel_Einstellungen, //Auto-Alias Service Page
|
|
|
|
NSPanel_Einstellungen, //Auto-Alias Service Page
|
|
|
|
NSPanel_Screensaver, //Auto-Alias Service Page
|
|
|
|
NSPanel_Screensaver, //Auto-Alias Service Page
|
|
|
|
NSPanel_ScreensaverDimmode, //Auto-Alias Service Page
|
|
|
|
NSPanel_ScreensaverDimmode, //Auto-Alias Service Page
|
|
|
|
@@ -992,9 +976,9 @@ export const config: Config = {
|
|
|
|
// _________________________________ DE: Ab hier keine Konfiguration mehr _____________________________________
|
|
|
|
// _________________________________ DE: Ab hier keine Konfiguration mehr _____________________________________
|
|
|
|
// _________________________________ EN: No more configuration from here _____________________________________
|
|
|
|
// _________________________________ EN: No more configuration from here _____________________________________
|
|
|
|
|
|
|
|
|
|
|
|
const scriptVersion: string = 'v5.0.2.1';
|
|
|
|
const scriptVersion: string = 'v4.9.5.1';
|
|
|
|
const tft_version: string = 'v5.0.2';
|
|
|
|
const tft_version: string = 'v4.9.5';
|
|
|
|
const desired_display_firmware_version = 59;
|
|
|
|
const desired_display_firmware_version = 58;
|
|
|
|
const berry_driver_version = 10;
|
|
|
|
const berry_driver_version = 10;
|
|
|
|
|
|
|
|
|
|
|
|
const tasmotaOtaUrl: string = 'http://ota.tasmota.com/tasmota32/release/';
|
|
|
|
const tasmotaOtaUrl: string = 'http://ota.tasmota.com/tasmota32/release/';
|
|
|
|
@@ -1062,6 +1046,7 @@ onStop(function scriptStop () {
|
|
|
|
if (scheduleSendTime != null) _clearSchedule(scheduleSendTime);
|
|
|
|
if (scheduleSendTime != null) _clearSchedule(scheduleSendTime);
|
|
|
|
if (scheduleSendDate != null) _clearSchedule(scheduleSendDate);
|
|
|
|
if (scheduleSendDate != null) _clearSchedule(scheduleSendDate);
|
|
|
|
if (scheduleSwichScreensaver != null) _clearSchedule(scheduleSwichScreensaver);
|
|
|
|
if (scheduleSwichScreensaver != null) _clearSchedule(scheduleSwichScreensaver);
|
|
|
|
|
|
|
|
if (scheduleStartup != null) _clearSchedule(scheduleStartup);
|
|
|
|
if (scheduleCheckUpdates != null) _clearSchedule(scheduleCheckUpdates);
|
|
|
|
if (scheduleCheckUpdates != null) _clearSchedule(scheduleCheckUpdates);
|
|
|
|
if (scheduleInitDimModeDay != null) _clearSchedule(scheduleInitDimModeDay);
|
|
|
|
if (scheduleInitDimModeDay != null) _clearSchedule(scheduleInitDimModeDay);
|
|
|
|
if (scheduleInitDimModeNight != null) _clearSchedule(scheduleInitDimModeNight);
|
|
|
|
if (scheduleInitDimModeNight != null) _clearSchedule(scheduleInitDimModeNight);
|
|
|
|
@@ -2566,43 +2551,6 @@ async function CreateWeatherAlias () {
|
|
|
|
} catch (err: any) {
|
|
|
|
} catch (err: any) {
|
|
|
|
log('error at function CreateWeatherAlias pirate-weather.' + weatherAdapterInstanceNumber + '.: ' + err.message, 'warn');
|
|
|
|
log('error at function CreateWeatherAlias pirate-weather.' + weatherAdapterInstanceNumber + '.: ' + err.message, 'warn');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (weatherAdapterInstance == 'brightsky.' + weatherAdapterInstanceNumber + '.') {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (isSetOptionActive) {
|
|
|
|
|
|
|
|
if (!existsState(config.weatherEntity + '.ICON') && existsState('brightsky.' + weatherAdapterInstanceNumber + '.current.icon')) {
|
|
|
|
|
|
|
|
log('Weather alias for brightsky.' + weatherAdapterInstanceNumber + '. does not exist yet, will be created now', 'info');
|
|
|
|
|
|
|
|
setObject(config.weatherEntity, {_id: config.weatherEntity, type: 'channel', common: {role: 'weatherCurrent', name: 'weatherCurrent'}, native: {}});
|
|
|
|
|
|
|
|
await createAliasAsync(config.weatherEntity + '.ICON', ('brightsky.' + weatherAdapterInstanceNumber + '.current.icon'), true, {
|
|
|
|
|
|
|
|
type: 'string',
|
|
|
|
|
|
|
|
role: 'value',
|
|
|
|
|
|
|
|
name: 'ICON',
|
|
|
|
|
|
|
|
alias: {id: 'brightsky.' + weatherAdapterInstanceNumber + '.current.icon'},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await createAliasAsync(config.weatherEntity + '.TEMP', 'brightsky.' + weatherAdapterInstanceNumber + '.current.temperature', true, {
|
|
|
|
|
|
|
|
type: 'number',
|
|
|
|
|
|
|
|
role: 'value.temperature',
|
|
|
|
|
|
|
|
name: 'TEMP',
|
|
|
|
|
|
|
|
alias: {id: 'brightsky.' + weatherAdapterInstanceNumber + '.current.temperature', read: 'Math.round(val*10)/10'},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await createAliasAsync(config.weatherEntity + '.TEMP_MIN', 'brightsky.' + weatherAdapterInstanceNumber + '.daily.00.temperature_min', true, {
|
|
|
|
|
|
|
|
type: 'number',
|
|
|
|
|
|
|
|
role: 'value.temperature.forecast.0',
|
|
|
|
|
|
|
|
name: 'TEMP_MIN',
|
|
|
|
|
|
|
|
alias: {id: 'brightsky.' + weatherAdapterInstanceNumber + '.daily.00.temperature_min', read: 'Math.round(val)'},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await createAliasAsync(config.weatherEntity + '.TEMP_MAX', 'brightsky.' + weatherAdapterInstanceNumber + '.daily.00.temperature_max', true, {
|
|
|
|
|
|
|
|
type: 'number',
|
|
|
|
|
|
|
|
role: 'value.temperature.max.forecast.0',
|
|
|
|
|
|
|
|
name: 'TEMP_MAX',
|
|
|
|
|
|
|
|
alias: {id: 'brightsky.' + weatherAdapterInstanceNumber + '.daily.00.temperature_max', read: 'Math.round(val)'},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
log('weather alias for brightsky.' + weatherAdapterInstanceNumber + '. already exists', 'info');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (err: any) {
|
|
|
|
|
|
|
|
log('error at function CreateWeatherAlias brightsky.' + weatherAdapterInstanceNumber + '.: ' + err.message, 'warn');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (err: any) {
|
|
|
|
} catch (err: any) {
|
|
|
|
@@ -3467,6 +3415,11 @@ let scheduleSendDate = adapterSchedule(new Date().setMinutes(0, 0), 60 * 60, ()
|
|
|
|
SendDate();
|
|
|
|
SendDate();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3:30 a.m. Perform startup and receive current TFT version
|
|
|
|
|
|
|
|
let scheduleStartup = adapterSchedule({hour: 3, minute: 30}, 24 * 60 * 60, async () => {
|
|
|
|
|
|
|
|
setIfExists(config.panelSendTopic, 'pageType~pageStartup');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Check for updates with Start
|
|
|
|
// Check for updates with Start
|
|
|
|
get_locales();
|
|
|
|
get_locales();
|
|
|
|
get_locales_servicemenu();
|
|
|
|
get_locales_servicemenu();
|
|
|
|
@@ -3895,7 +3848,6 @@ function get_current_tasmota_ip_address () {
|
|
|
|
log('error at function get_current_tasmota_ip_address: ' + err.message, 'warn');
|
|
|
|
log('error at function get_current_tasmota_ip_address: ' + err.message, 'warn');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Retrieves the current IP address of the Tasmota device.
|
|
|
|
* Retrieves the current IP address of the Tasmota device.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@@ -4374,6 +4326,7 @@ on({id: config.panelRecvTopic}, async (obj) => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Updates the Berry driver version on the NSPanel.
|
|
|
|
* Updates the Berry driver version on the NSPanel.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@@ -5337,7 +5290,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
|
|
|
|
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
|
|
|
|
} else if (role == 'humidity' || role == 'value.humidity') {
|
|
|
|
} else if (role == 'humidity' || role == 'value.humidity') {
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert', 'water-percent']);
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert' , 'water-percent']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
|
|
|
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -5444,7 +5397,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
type = 'light';
|
|
|
|
type = 'light';
|
|
|
|
} else if (pageItem.popupVersion == 2) {
|
|
|
|
} else if (pageItem.popupVersion == 2){
|
|
|
|
type = 'light2';
|
|
|
|
type = 'light2';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -5488,7 +5441,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
type = 'light';
|
|
|
|
type = 'light';
|
|
|
|
} else if (pageItem.popupVersion == 2) {
|
|
|
|
} else if (pageItem.popupVersion == 2){
|
|
|
|
type = 'light2';
|
|
|
|
type = 'light2';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -5528,7 +5481,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
type = 'light';
|
|
|
|
type = 'light';
|
|
|
|
} else if (pageItem.popupVersion == 2) {
|
|
|
|
} else if (pageItem.popupVersion == 2){
|
|
|
|
type = 'light2';
|
|
|
|
type = 'light2';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -5583,7 +5536,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
type = 'light';
|
|
|
|
type = 'light';
|
|
|
|
} else if (pageItem.popupVersion == 2) {
|
|
|
|
} else if (pageItem.popupVersion == 2){
|
|
|
|
type = 'light2';
|
|
|
|
type = 'light2';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -5610,7 +5563,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (Debug) log('CIE wurde zuletzt geändert - Lampe ist Color-Mode');
|
|
|
|
if (Debug) log('CIE wurde zuletzt geändert - Lampe ist Color-Mode');
|
|
|
|
if (getState(pageItem.id + '.CIE').val != null) {
|
|
|
|
if (getState(pageItem.id + '.CIE').val != null) {
|
|
|
|
let cie: string = getState(pageItem.id + '.CIE').val;
|
|
|
|
let cie: string = getState(pageItem.id + '.CIE').val;
|
|
|
|
let cieArray = (cie.substring(1, cie.length - 1)).split(',');
|
|
|
|
let cieArray = (cie.substring(1, cie.length -1)).split(',');
|
|
|
|
let rgb: RGB = cie_to_rgb(parseFloat(cieArray[0]), parseFloat(cieArray[1]), 254);
|
|
|
|
let rgb: RGB = cie_to_rgb(parseFloat(cieArray[0]), parseFloat(cieArray[1]), 254);
|
|
|
|
let cRGB: RGB = lightenDarkenColor(ConvertRGBtoHex(rgb.red, rgb.green, rgb.blue), (100 - brightness) * -1);
|
|
|
|
let cRGB: RGB = lightenDarkenColor(ConvertRGBtoHex(rgb.red, rgb.green, rgb.blue), (100 - brightness) * -1);
|
|
|
|
iconColor = rgb_dec565(pageItem.interpolateColor !== undefined ? cRGB : config.defaultOnColor);
|
|
|
|
iconColor = rgb_dec565(pageItem.interpolateColor !== undefined ? cRGB : config.defaultOnColor);
|
|
|
|
@@ -5637,7 +5590,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
type = 'light';
|
|
|
|
type = 'light';
|
|
|
|
} else if (pageItem.popupVersion == 2) {
|
|
|
|
} else if (pageItem.popupVersion == 2){
|
|
|
|
type = 'light2';
|
|
|
|
type = 'light2';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -5693,7 +5646,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
type = 'light';
|
|
|
|
type = 'light';
|
|
|
|
} else if (pageItem.popupVersion == 2) {
|
|
|
|
} else if (pageItem.popupVersion == 2){
|
|
|
|
type = 'light2';
|
|
|
|
type = 'light2';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -5719,7 +5672,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion !== undefined) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
if (pageItem.popupVersion == 1) {
|
|
|
|
type = 'shutter';
|
|
|
|
type = 'shutter';
|
|
|
|
} else if (pageItem.popupVersion == 2) {
|
|
|
|
} else if (pageItem.popupVersion == 2){
|
|
|
|
type = 'shutter2';
|
|
|
|
type = 'shutter2';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -5860,7 +5813,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
|
|
|
|
if (role == 'temperature' || role == 'value.temperature' || role == 'thermostat') {
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['snowflake-thermometer', 'sun-thermometer', 'thermometer']);
|
|
|
|
} else if (role == 'humidity' || role == 'value.humidity') {
|
|
|
|
} else if (role == 'humidity' || role == 'value.humidity') {
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert', 'water-percent']);
|
|
|
|
iconId = determinePageItemStatusIcon(pageItem, val, iconId, ['water-off', 'water-percent-alert' , 'water-percent']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
|
|
|
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
|
|
|
@@ -5908,7 +5861,7 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (existsState(pageItem.id + '.ACTUAL') && (pageItem.icon2 != undefined || pageItem.useValue)) {
|
|
|
|
if (existsState(pageItem.id + '.ACTUAL') && pageItem.icon2 != undefined) {
|
|
|
|
// Read Alias Datapoint Objectdata
|
|
|
|
// Read Alias Datapoint Objectdata
|
|
|
|
let obj = getObject(pageItem.id + ".ACTUAL");
|
|
|
|
let obj = getObject(pageItem.id + ".ACTUAL");
|
|
|
|
// Read origin Datapoint Objectdata
|
|
|
|
// Read origin Datapoint Objectdata
|
|
|
|
@@ -5920,22 +5873,16 @@ function CreateEntity (pageItem: PageItem, placeId: number, useColors: boolean =
|
|
|
|
if (obj2.type === 'state' && obj2.common.type == "boolean") {
|
|
|
|
if (obj2.type === 'state' && obj2.common.type == "boolean") {
|
|
|
|
if (Debug) log(getState(obj.common.alias.id).val, 'info');
|
|
|
|
if (Debug) log(getState(obj.common.alias.id).val, 'info');
|
|
|
|
if (getState(obj.common.alias.id).val) {
|
|
|
|
if (getState(obj.common.alias.id).val) {
|
|
|
|
if (!pageItem.useValue) iconId = pageItem.icon != undefined ? Icons.GetIcon(pageItem.icon) : iconId;
|
|
|
|
iconId = pageItem.icon != undefined ? Icons.GetIcon(pageItem.icon) : iconId;
|
|
|
|
iconColor = pageItem.onColor != undefined ? rgb_dec565(pageItem.onColor) : iconColor;
|
|
|
|
iconColor = pageItem.onColor != undefined ? rgb_dec565(pageItem.onColor) : iconColor;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (!pageItem.useValue) iconId = pageItem.icon2 != undefined ? Icons.GetIcon(pageItem.icon2) : iconId;
|
|
|
|
iconId = pageItem.icon2 != undefined ? Icons.GetIcon(pageItem.icon2) : iconId;
|
|
|
|
iconColor = pageItem.offColor != undefined ? rgb_dec565(pageItem.offColor) : iconColor;
|
|
|
|
iconColor = pageItem.offColor != undefined ? rgb_dec565(pageItem.offColor) : iconColor;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (existsState(pageItem.id + '.COLORDEC')) {
|
|
|
|
|
|
|
|
if (Debug) log('iconcolor von ' + pageItem.id + '.COLORDEC: ' + getState(pageItem.id + '.COLORDEC').val, 'info');
|
|
|
|
|
|
|
|
RegisterEntityWatcher(pageItem.id + '.COLORDEC');
|
|
|
|
|
|
|
|
iconColor = getState(pageItem.id + '.COLORDEC').val;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Debug) log('CreateEntity Icon role info, humidity, temperature, value.temperature, value.humidity, sensor.door, sensor.window, thermostat', 'info');
|
|
|
|
if (Debug) log('CreateEntity Icon role info, humidity, temperature, value.temperature, value.humidity, sensor.door, sensor.window, thermostat', 'info');
|
|
|
|
if (Debug) log('CreateEntity ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal + ' ' + unit, 'info');
|
|
|
|
if (Debug) log('CreateEntity ~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal + ' ' + unit, 'info');
|
|
|
|
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal + ' ' + unit;
|
|
|
|
return '~' + type + '~' + placeId + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal + ' ' + unit;
|
|
|
|
@@ -7038,7 +6985,7 @@ function GenerateThermo2Page (page: NSPanel.PageThermo2): NSPanel.Payload[] {
|
|
|
|
'~' +
|
|
|
|
'~' +
|
|
|
|
getNavigationString(pageId) + // 2-13 Page Navigation
|
|
|
|
getNavigationString(pageId) + // 2-13 Page Navigation
|
|
|
|
/*-Temp Control-----------------------------------*/
|
|
|
|
/*-Temp Control-----------------------------------*/
|
|
|
|
'~' + id + '~' + destTemp + '~' + minTemp + '~' + maxTemp + '~' + stepTemp + '~' + unit + '~' + /* 20 */ actualModeState +
|
|
|
|
'~' + id + '~' + destTemp + '~' + minTemp + '~' + maxTemp + '~' + stepTemp + '~' + unit + '~' + '1' +
|
|
|
|
/* Entity 1 - Actual Temperature (Icon) */
|
|
|
|
/* Entity 1 - Actual Temperature (Icon) */
|
|
|
|
'~text~' + pageId + '?1~' + Icons.GetIcon('thermometer') + '~' + tempColor + '~~' +
|
|
|
|
'~text~' + pageId + '?1~' + Icons.GetIcon('thermometer') + '~' + tempColor + '~~' +
|
|
|
|
/* Entity 2 - Actual Temperature (Temp) */
|
|
|
|
/* Entity 2 - Actual Temperature (Temp) */
|
|
|
|
@@ -7052,7 +6999,7 @@ function GenerateThermo2Page (page: NSPanel.PageThermo2): NSPanel.Payload[] {
|
|
|
|
/* Entity 6 - Actual Humidity (Unit) */
|
|
|
|
/* Entity 6 - Actual Humidity (Unit) */
|
|
|
|
'~text~' + pageId + '?6~' + humidityUnit + '~' + humColor + '~~' +
|
|
|
|
'~text~' + pageId + '?6~' + humidityUnit + '~' + humColor + '~~' +
|
|
|
|
/* Entity 7 - Text-State */
|
|
|
|
/* Entity 7 - Text-State */
|
|
|
|
'~text~' + pageId + '?7~' + modeStatus + '~' + textStateColor + '~~' + /* 62 */ actualModeState;
|
|
|
|
'~text~' + pageId + '?7~' + modeStatus + '~' + textStateColor + '~~' + actualModeState;
|
|
|
|
|
|
|
|
|
|
|
|
for (let i=0; i<9; i++) {
|
|
|
|
for (let i=0; i<9; i++) {
|
|
|
|
if(page.items[i] != undefined) {
|
|
|
|
if(page.items[i] != undefined) {
|
|
|
|
@@ -7158,7 +7105,6 @@ function subscribeMediaSubscriptionsSonosAdd (id: string): void {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates media aliases for a specific media device and adapter player instance.
|
|
|
|
* Creates media aliases for a specific media device and adapter player instance.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@@ -8015,9 +7961,9 @@ function GenerateMediaPage (page: NSPanel.PageMedia): NSPanel.Payload[] {
|
|
|
|
page.items[0].playList = getState(page.items[0].adapterPlayerInstance + 'playlists.playlistListString').val.split(';');
|
|
|
|
page.items[0].playList = getState(page.items[0].adapterPlayerInstance + 'playlists.playlistListString').val.split(';');
|
|
|
|
} else if (v2Adapter == 'mpd') {
|
|
|
|
} else if (v2Adapter == 'mpd') {
|
|
|
|
let tempPL = getState(page.items[0].adapterPlayerInstance + 'listplaylists').val;
|
|
|
|
let tempPL = getState(page.items[0].adapterPlayerInstance + 'listplaylists').val;
|
|
|
|
tempPL = tempPL.replace('[', '');
|
|
|
|
tempPL = tempPL.replace('[','');
|
|
|
|
tempPL = tempPL.replace(']', '');
|
|
|
|
tempPL = tempPL.replace(']','');
|
|
|
|
tempPL = tempPL.replaceAll('"', '');
|
|
|
|
tempPL = tempPL.replaceAll('"','');
|
|
|
|
page.items[0].playList = tempPL.split(',');
|
|
|
|
page.items[0].playList = tempPL.split(',');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
playListIconCol = rgb_dec565(HMIOn);
|
|
|
|
playListIconCol = rgb_dec565(HMIOn);
|
|
|
|
@@ -8732,7 +8678,7 @@ function GenerateQRPage (page: NSPanel.PageQR): NSPanel.Payload[] {
|
|
|
|
'~' + //iconColor
|
|
|
|
'~' + //iconColor
|
|
|
|
displayName2 +
|
|
|
|
displayName2 +
|
|
|
|
'~' + //displayName
|
|
|
|
'~' + //displayName
|
|
|
|
optionalValue2
|
|
|
|
optionalValue2,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (Debug) {
|
|
|
|
if (Debug) {
|
|
|
|
@@ -9100,7 +9046,6 @@ function triggerButton (id: string): boolean {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// End Monobutton
|
|
|
|
// End Monobutton
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@@ -11367,49 +11312,6 @@ function GenerateDetailPage (type: NSPanel.PopupType, optional: NSPanel.mediaOpt
|
|
|
|
hSlider3Visibility // If Slider Tap > --> tmSerial 28
|
|
|
|
hSlider3Visibility // If Slider Tap > --> tmSerial 28
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else { // no Media Item
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let tSlider2: string = "";
|
|
|
|
|
|
|
|
let tIconS2M: string = Icons.GetIcon("minus-box");
|
|
|
|
|
|
|
|
let tIconS2P: string = Icons.GetIcon("plus-box");
|
|
|
|
|
|
|
|
let hSlider2MinVal: number = pageItem.minValue ?? 0;
|
|
|
|
|
|
|
|
let hSlider2MaxVal: number = pageItem.maxValue ?? 100;
|
|
|
|
|
|
|
|
let hSlider2ZeroVal: number = 0;
|
|
|
|
|
|
|
|
let hSlider2CurVal: number = getState(id + '.ACTUAL').val;
|
|
|
|
|
|
|
|
let hSlider2Step: number = 1;
|
|
|
|
|
|
|
|
let hSlider2Visibility: string = "enable";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
out_msgs.push({
|
|
|
|
|
|
|
|
payload:
|
|
|
|
|
|
|
|
'entityUpdateDetail' +
|
|
|
|
|
|
|
|
'~' + //entityUpdateDetail
|
|
|
|
|
|
|
|
tempId +
|
|
|
|
|
|
|
|
// Slider1
|
|
|
|
|
|
|
|
'~~~~~~~~~disable' +
|
|
|
|
|
|
|
|
// Slider2
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
tSlider2 + // Slider2 Headline --> tmSerial 11
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
tIconS2M + // Slider2 Left Icon --> tmSerial 12
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
tIconS2P + // Slider2 Right Icon --> tmSerial 13
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
hSlider2CurVal + // Slider2 Current Slider Value --> tmSerial 14
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
hSlider2MinVal + // Slider2 Minimal Slider Value --> tmSerial 15
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
hSlider2MaxVal + // Slider2 Maximal Slider Value --> tmSerial 16
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
hSlider2ZeroVal + // If Slider2 0 is betweeb Min and Max --> tmSerial 17
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
hSlider2Step + // If Slider2 Tap > 1 --> tmSerial 18
|
|
|
|
|
|
|
|
'~' +
|
|
|
|
|
|
|
|
hSlider2Visibility + // If Slider Tap > --> tmSerial 19
|
|
|
|
|
|
|
|
// Slider3
|
|
|
|
|
|
|
|
'~~~~~~~~~disable'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -12312,7 +12214,6 @@ function scale (number: number, inMin: number, inMax: number, outMin: number, ou
|
|
|
|
* @function UnsubscribeWatcher
|
|
|
|
* @function UnsubscribeWatcher
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function UnsubscribeWatcher (): void {
|
|
|
|
function UnsubscribeWatcher (): void {
|
|
|
|
//log(Object.entries(subscriptions));
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
for (const [key, value] of Object.entries(subscriptions)) {
|
|
|
|
for (const [key, value] of Object.entries(subscriptions)) {
|
|
|
|
//@ts-ignore
|
|
|
|
//@ts-ignore
|
|
|
|
@@ -12391,7 +12292,7 @@ function HandleScreensaverUpdate (): void {
|
|
|
|
} else if (weatherAdapterInstance == 'openweathermap.' + weatherAdapterInstanceNumber + '.') {
|
|
|
|
} else if (weatherAdapterInstance == 'openweathermap.' + weatherAdapterInstanceNumber + '.') {
|
|
|
|
entityIcon = Icons.GetIcon(GetOpenWeatherMapIcon(icon));
|
|
|
|
entityIcon = Icons.GetIcon(GetOpenWeatherMapIcon(icon));
|
|
|
|
entityIconCol = GetOpenWeatherMapIconColor(icon);
|
|
|
|
entityIconCol = GetOpenWeatherMapIconColor(icon);
|
|
|
|
} else if (weatherAdapterInstance == 'pirate-weather.' + weatherAdapterInstanceNumber + '.' || weatherAdapterInstance == 'brightsky.' + weatherAdapterInstanceNumber + '.') {
|
|
|
|
} else if (weatherAdapterInstance == 'pirate-weather.' + weatherAdapterInstanceNumber + '.') {
|
|
|
|
entityIcon = Icons.GetIcon(GetPirateWeatherIcon(icon));
|
|
|
|
entityIcon = Icons.GetIcon(GetPirateWeatherIcon(icon));
|
|
|
|
entityIconCol = GetPirateWeatherIconColor(icon);
|
|
|
|
entityIconCol = GetPirateWeatherIconColor(icon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -12582,30 +12483,6 @@ function HandleScreensaverUpdate (): void {
|
|
|
|
RegisterScreensaverEntityWatcher('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.0' + String(i-1) + '.time');
|
|
|
|
RegisterScreensaverEntityWatcher('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.0' + String(i-1) + '.time');
|
|
|
|
RegisterScreensaverEntityWatcher('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.0' + String(i-1) + '.icon');
|
|
|
|
RegisterScreensaverEntityWatcher('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.0' + String(i-1) + '.icon');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (weatherAdapterInstance == 'brightsky.' + weatherAdapterInstanceNumber + '.') {
|
|
|
|
|
|
|
|
if (i < 6) {
|
|
|
|
|
|
|
|
//Maximal 8 Tage bei openweathermap - pirate-weather.0.weather.daily.00.icon
|
|
|
|
|
|
|
|
TempMin = existsObject('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.temperature_min')
|
|
|
|
|
|
|
|
? Math.round(getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.temperature_min').val * 10) / 10
|
|
|
|
|
|
|
|
: 0;
|
|
|
|
|
|
|
|
TempMax = existsObject('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.temperature_max')
|
|
|
|
|
|
|
|
? Math.round(getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.temperature_max').val * 10) / 10
|
|
|
|
|
|
|
|
: 0;
|
|
|
|
|
|
|
|
DayOfWeek = existsObject('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.timestamp')
|
|
|
|
|
|
|
|
? formatDate(getDateObject((getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.timestamp').val)), 'W', 'de')
|
|
|
|
|
|
|
|
: 0;
|
|
|
|
|
|
|
|
WeatherIcon = existsObject('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.icon')
|
|
|
|
|
|
|
|
? GetPirateWeatherIcon(getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.icon').val)
|
|
|
|
|
|
|
|
: '';
|
|
|
|
|
|
|
|
WheatherColor = existsObject('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.icon')
|
|
|
|
|
|
|
|
? GetPirateWeatherIconColor(String(getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.icon').val))
|
|
|
|
|
|
|
|
: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RegisterScreensaverEntityWatcher('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.temperature_min');
|
|
|
|
|
|
|
|
RegisterScreensaverEntityWatcher('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.temperature_max');
|
|
|
|
|
|
|
|
RegisterScreensaverEntityWatcher('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.timestamp');
|
|
|
|
|
|
|
|
RegisterScreensaverEntityWatcher('brightsky.' + weatherAdapterInstanceNumber + '.daily.0' + String(i-1) + '.icon');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let tempMinMaxString: string = '';
|
|
|
|
let tempMinMaxString: string = '';
|
|
|
|
@@ -12674,31 +12551,7 @@ function HandleScreensaverUpdate (): void {
|
|
|
|
|
|
|
|
|
|
|
|
arraySunEvent[0] = getDateObject(getState('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.00.sunriseTime').val).getTime();
|
|
|
|
arraySunEvent[0] = getDateObject(getState('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.00.sunriseTime').val).getTime();
|
|
|
|
arraySunEvent[1] = getDateObject(getState('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.00.sunsetTime').val).getTime();
|
|
|
|
arraySunEvent[1] = getDateObject(getState('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.00.sunsetTime').val).getTime();
|
|
|
|
arraySunEvent[2] = getDateObject(getState('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.01.sunriseTime').val).getTime();
|
|
|
|
arraySunEvent[0] = getDateObject(getState('pirate-weather.' + weatherAdapterInstanceNumber + '.weather.daily.00.sunriseTime').val).getTime();
|
|
|
|
|
|
|
|
|
|
|
|
let j = 0;
|
|
|
|
|
|
|
|
for (j = 0; j < 3; j++) {
|
|
|
|
|
|
|
|
if (arraySunEvent[j] > valDateNow) {
|
|
|
|
|
|
|
|
nextSunEvent = j;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let sun = '';
|
|
|
|
|
|
|
|
if (j == 1) {
|
|
|
|
|
|
|
|
sun = 'weather-sunset-down';
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
sun = 'weather-sunset-up';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
payloadString += '~' + '~' + Icons.GetIcon(sun) + '~' + rgb_dec565(MSYellow) + '~' + 'Sonne' + '~' + formatDate(getDateObject(arraySunEvent[nextSunEvent]), 'hh:mm') + '~';
|
|
|
|
|
|
|
|
} else if (weatherAdapterInstance == 'brightsky.' + weatherAdapterInstanceNumber + '.' && i == 6) {
|
|
|
|
|
|
|
|
let nextSunEvent = 0;
|
|
|
|
|
|
|
|
let valDateNow = getDateObject((new Date().getTime())).getTime();
|
|
|
|
|
|
|
|
let arraySunEvent: number[] = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arraySunEvent[0] = getDateObject(getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.00.sunrise').val).getTime();
|
|
|
|
|
|
|
|
arraySunEvent[1] = getDateObject(getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.00.sunset').val).getTime();
|
|
|
|
|
|
|
|
arraySunEvent[2] = getDateObject(getState('brightsky.' + weatherAdapterInstanceNumber + '.daily.01.sunrise').val).getTime();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let j = 0;
|
|
|
|
let j = 0;
|
|
|
|
for (j = 0; j < 3; j++) {
|
|
|
|
for (j = 0; j < 3; j++) {
|
|
|
|
@@ -13921,7 +13774,6 @@ on({id: config.panelRecvTopic.substring(0, config.panelRecvTopic.length - 'RESUL
|
|
|
|
log('error Trigger reading senor-data: ' + err.message, 'warn');
|
|
|
|
log('error Trigger reading senor-data: ' + err.message, 'warn');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//------------------End Read Internal Sensor Data
|
|
|
|
//------------------End Read Internal Sensor Data
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@@ -14369,7 +14221,6 @@ function determineStatusIcon (
|
|
|
|
if (min === undefined || max === undefined) {
|
|
|
|
if (min === undefined || max === undefined) {
|
|
|
|
return iconId;
|
|
|
|
return iconId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function pickIcon(iconKey?: string, defIndex?: number): string {
|
|
|
|
function pickIcon(iconKey?: string, defIndex?: number): string {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
(iconKey && existsState(iconKey) && Icons.GetIcon(getState(iconKey).val)) ||
|
|
|
|
(iconKey && existsState(iconKey) && Icons.GetIcon(getState(iconKey).val)) ||
|
|
|
|
@@ -14410,7 +14261,6 @@ function spotifyGetDeviceID (vDeviceString: string): string {
|
|
|
|
let strDevID = arrayDeviceListIds[indexPos];
|
|
|
|
let strDevID = arrayDeviceListIds[indexPos];
|
|
|
|
return strDevID;
|
|
|
|
return strDevID;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Join arguments with ~ and return the string;
|
|
|
|
* Join arguments with ~ and return the string;
|
|
|
|
* @param tokens unlimited numbers of strings
|
|
|
|
* @param tokens unlimited numbers of strings
|
|
|
|
@@ -14486,7 +14336,6 @@ function _schedule (time: {hour?: number; minute?: number} | undefined | number,
|
|
|
|
const timeout = targetTime - new Date().getTime();
|
|
|
|
const timeout = targetTime - new Date().getTime();
|
|
|
|
scheduleList[ref] = setTimeout(_schedule, timeout, time, ref, repeatTime, callback);
|
|
|
|
scheduleList[ref] = setTimeout(_schedule, timeout, time, ref, repeatTime, callback);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Clears a scheduled task based on the reference ID.
|
|
|
|
* Clears a scheduled task based on the reference ID.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@@ -14501,7 +14350,6 @@ function _clearSchedule (ref: number): null {
|
|
|
|
delete scheduleList[ref];
|
|
|
|
delete scheduleList[ref];
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const ArrayPlayerTypeWithMediaDevice = ['alexa2', 'sonos', 'squeezeboxrpc'] as const;
|
|
|
|
const ArrayPlayerTypeWithMediaDevice = ['alexa2', 'sonos', 'squeezeboxrpc'] as const;
|
|
|
|
const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'bosesoundtouch', 'mpd'] as const;
|
|
|
|
const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'bosesoundtouch', 'mpd'] as const;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -14517,7 +14365,6 @@ const ArrayPlayerTypeWithOutMediaDevice = ['spotify-premium', 'volumio', 'boseso
|
|
|
|
function isPlayerWithMediaDevice (F: string | NSPanel._PlayerTypeWithMediaDevice): F is NSPanel._PlayerTypeWithMediaDevice {
|
|
|
|
function isPlayerWithMediaDevice (F: string | NSPanel._PlayerTypeWithMediaDevice): F is NSPanel._PlayerTypeWithMediaDevice {
|
|
|
|
return ArrayPlayerTypeWithMediaDevice.indexOf(F as NSPanel._PlayerTypeWithMediaDevice) != -1;
|
|
|
|
return ArrayPlayerTypeWithMediaDevice.indexOf(F as NSPanel._PlayerTypeWithMediaDevice) != -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** check if NSPanel.adapterPlayerInstanceType has all Playertypes */
|
|
|
|
/** check if NSPanel.adapterPlayerInstanceType has all Playertypes */
|
|
|
|
function checkSortedPlayerType (F: NSPanel.notSortedPlayerType) {
|
|
|
|
function checkSortedPlayerType (F: NSPanel.notSortedPlayerType) {
|
|
|
|
const test: NSPanel.adapterPlayerInstanceType = F;
|
|
|
|
const test: NSPanel.adapterPlayerInstanceType = F;
|
|
|
|
@@ -14603,12 +14450,10 @@ function isPopupType (F: NSPanel.PopupType | string): F is NSPanel.PopupType {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// If u get a error here u forgot something in PagetypeType or PageType
|
|
|
|
// If u get a error here u forgot something in PagetypeType or PageType
|
|
|
|
function checkPageType (F: NSPanel.PagetypeType, A: NSPanel.PageType) {
|
|
|
|
function checkPageType (F: NSPanel.PagetypeType, A: NSPanel.PageType) {
|
|
|
|
A.type = F;
|
|
|
|
A.type = F;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function isPageMediaItem (F: NSPanel.PageItem | NSPanel.PageMediaItem): F is NSPanel.PageMediaItem {
|
|
|
|
function isPageMediaItem (F: NSPanel.PageItem | NSPanel.PageMediaItem): F is NSPanel.PageMediaItem {
|
|
|
|
return 'adapterPlayerInstance' in F;
|
|
|
|
return 'adapterPlayerInstance' in F;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -14620,7 +14465,6 @@ function isPageThermoItem (F: PageItem | NSPanel.PageThermoItem): F is NSPanel.P
|
|
|
|
function isPageMedia (F: NSPanel.PageType | NSPanel.PageMedia): F is NSPanel.PageMedia {
|
|
|
|
function isPageMedia (F: NSPanel.PageType | NSPanel.PageMedia): F is NSPanel.PageMedia {
|
|
|
|
return F.type == 'cardMedia';
|
|
|
|
return F.type == 'cardMedia';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function isPagePower (F: NSPanel.PageType | NSPanel.PagePower): F is NSPanel.PagePower {
|
|
|
|
function isPagePower (F: NSPanel.PageType | NSPanel.PagePower): F is NSPanel.PagePower {
|
|
|
|
return F.type == 'cardPower';
|
|
|
|
return F.type == 'cardPower';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -14965,18 +14809,6 @@ namespace NSPanel {
|
|
|
|
popupVersion?: number;
|
|
|
|
popupVersion?: number;
|
|
|
|
shutterType?: string;
|
|
|
|
shutterType?: string;
|
|
|
|
shutterZeroIsClosed?: boolean;
|
|
|
|
shutterZeroIsClosed?: boolean;
|
|
|
|
sliderItems?: [sliderItems?, sliderItems?, sliderItems?] | null;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type sliderItems = {
|
|
|
|
|
|
|
|
heading: string;
|
|
|
|
|
|
|
|
icon1?: string;
|
|
|
|
|
|
|
|
icon2?: string;
|
|
|
|
|
|
|
|
minValue?: number;
|
|
|
|
|
|
|
|
maxValue?: number;
|
|
|
|
|
|
|
|
stepValue?: number;
|
|
|
|
|
|
|
|
zeroValue?: boolean;
|
|
|
|
|
|
|
|
id?: string; // writeable overwrite actual and set
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
type shutterIcons = {
|
|
|
|
type shutterIcons = {
|
|
|
|
|