diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 866cf389..14c14f63 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1,6 +1,6 @@ /*----------------------------------------------------------------------- -TypeScript v3.7.3.2 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf -- abgestimmt auf TFT 46 / v3.7.3 / BerryDriver 8 / Tasmota 12.3.1 +TypeScript v3.8.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf +- abgestimmt auf TFT 47 / v3.8.0 / BerryDriver 8 / Tasmota 12.3.1 @joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker 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) @@ -13,7 +13,7 @@ Achtung Änderung des Sonoff ESP-Temperatursensors !!! 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 Dowengrade +unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Downgrade durchführen und FlashNextion wiederholen. ******************************************************************************* @@ -105,7 +105,14 @@ ReleaseNotes: - 28.12.2022 - v3.7.3.0 Hotfix - bUp case - 28.12.2022 - v3.7.3.0 Update Berry Version 8 - 29.12.2022 - v3.7.3.1 Hotfix - us-p - DateString - Use long/short Weekday and long/short Month - - 29.12.2022 - v3.7.3.2 Add pageItem.id to Submenu; New Parameter targetPage by TT-TOM + - 29.12.2022 - v3.7.3.2 Add pageItem.id to Submenu; New Parameter targetPage by TT-TOM / @tt-tom17 + - 30.12.2022 - v3.8.0 Add New HMI-Navi + - 01.01.2023 - v3.8.0 Add Tasmota "Web Admin Password" + - 02.01.2023 - v3.8.0 Add Navigation bSubPrev and bSubNext and Subpages for bHome + - 03.01.2023 - v3.8.0 Bugfix for cardThermostat - Payload (Minor) + - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia by @egal + - 05.01.2023 - v3.8.0 Upgrade TFT 47 + - 06.01.2023 - v3.8.0 Add Volumio Tracklist by @egal ***************************************************************************************************************** * Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! * @@ -179,7 +186,7 @@ Erforderliche Adapter: Upgrades in Konsole: Tasmota BerryDriver : Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1 - TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.7.3.tft + TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.8.0.tft --------------------------------------------------------------------------------------- */ let Icons = new IconsSelector(); @@ -189,6 +196,9 @@ const autoCreateAlias = true; //Für diese Option muss der Hak const weatherAdapterInstance: string = 'accuweather.0.'; //Möglich 'accuweather.0.' oder 'daswetter.0.' const weatherScreensaverTempMinMax: string = 'MinMax'; // Mögliche Werte: 'Min', 'Max' oder 'MinMax' +const tasmota_web_admin_user: string = 'admin'; // ändern, falls der User im Tasmota vor dem Kompilieren umbenannt wurde (Standard Tasmota: admin) +const tasmota_web_admin_password: string = ''; // setzten, falls "Web Admin Password" in Tasmote vergeben + const NSPanel_Path = '0_userdata.0.NSPanel.1.'; const NSPanel_Alarm_Path = '0_userdata.0.NSPanel.'; //Neuer Pfad für gemeinsame Nutzung durch mehrere Panels (bei Nutzung der cardAlarm) @@ -285,28 +295,34 @@ let vwIconColor = []; let Test_Licht1: PageEntities = { - "type": "cardEntities", - "heading": "Color Aliase 1", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestRGBLichteinzeln", name: "RGB-Licht Hex-Color", interpolateColor: true}, - { id: "alias.0.NSPanel_1.TestRGBLicht", name: "RGB-Licht", minValueBrightness: 0, maxValueBrightness: 100, interpolateColor: true}, - { id: "alias.0.NSPanel_1.TestCTmitHUE", name: "HUE-Licht-CT", minValueBrightness: 0, maxValueBrightness: 70, minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true}, - { id: "alias.0.NSPanel_1.TestHUELicht", name: "HUE-Licht-Color", minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true} + 'type': 'cardEntities', + 'heading': 'Color Aliase 1', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestRGBLichteinzeln', name: 'RGB-Licht Hex-Color', interpolateColor: true}, + { id: 'alias.0.NSPanel_1.TestRGBLicht', name: 'RGB-Licht', minValueBrightness: 0, maxValueBrightness: 100, interpolateColor: true}, + { id: 'alias.0.NSPanel_1.TestCTmitHUE', name: 'HUE-Licht-CT', minValueBrightness: 0, maxValueBrightness: 70, minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true}, + { id: 'alias.0.NSPanel_1.TestHUELicht', name: 'HUE-Licht-Color', minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true} ] }; //Only DEV --> Test let CardChartExample: PageChart = { - "type": "cardChart", - "heading": "Stromzähler L1+L2+L3", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ + 'type': 'cardChart', + 'heading': 'Stromzähler L1+L2+L3', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.NSPanel_1.cardChart', yAxis: 'Leistung [kW]', yAxisTicks: [2,4,6,8,10,2,4,6,8,20,2], @@ -316,201 +332,240 @@ let CardChartExample: PageChart = let CardPowerExample: PagePower = { - "type": "cardPower", - "heading": "cardPower Emulator", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ + 'type': 'cardPower', + 'heading': 'cardPower Emulator', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ { id: 'alias.0.NSPanel_1.Power.PowerCard' }, ] }; let Test_Licht2: PageEntities = { - "type": "cardEntities", - "heading": "Color Aliase 2", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ + 'type': 'cardEntities', + 'heading': 'Color Aliase 2', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ //Beispiel für RGB Light mit neuem PageItem-Parameter colormode: "xy" alternativ colormode: "rgb" oder weglassen //Steuert im z.B. DeConz Adapter unter Lampen die Farben per CIE (XY) - { id: "alias.0.NSPanel_2.WZ_E14_Fenster_rechts", name: "Fensterbank rechts", minValueBrightness: 0, maxValueBrightness: 100, minValueColorTemp: 500, maxValueColorTemp: 150, interpolateColor: true, colormode: "xy"}, - { id: "alias.0.NSPanel_1.TestFarbtemperatur", name: "Farbtemperatur", interpolateColor: true}, + { id: "alias.0.NSPanel_2.WZ_E14_Fenster_rechts", name: 'Fensterbank rechts', minValueBrightness: 0, maxValueBrightness: 100, minValueColorTemp: 500, maxValueColorTemp: 150, interpolateColor: true, colormode: 'xy'}, + { id: "alias.0.NSPanel_1.TestFarbtemperatur", name: 'Farbtemperatur', interpolateColor: true}, ] }; let Test_Funktionen: PageEntities = { - "type": "cardEntities", - "heading": "Sonstige Aliase", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestLautstärke", offColor: MSRed, onColor: MSGreen, name: "Echo Spot Büro", minValue: 0, maxValue: 100 }, - { id: "alias.0.NSPanel_1.TestTemperatur",name: "Temperatur außen", icon: "thermometer", onColor: White }, - { id: "alias.0.NSPanel_1.TestFeuchtigkeit", name: "Luftfeuchte außen", icon: "water-percent", unit: "%H", onColor: White }, - //{ id: "alias.0.NSPanel_1.TestInfo", name: "Windstärke", icon: "wind-power-outline", offColor: MSRed, onColor: MSGreen, unit: "bft", minValue: 0, maxValue: 12, interpolateColor: true, useColor: true }, - { id: "alias.0.NSPanel_1.Ventilator.Fan_1",name: "Ventilator", icon: "fan", onColor: On, offColor: HMIOff, modeList: ['Low', 'Medium', 'High', 'Move', 'Sleep', 'Auto', 'Manual']}, + 'type': 'cardEntities', + 'heading': 'Sonstige Aliase', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestLautstärke', offColor: MSRed, onColor: MSGreen, name: 'Echo Spot Büro', minValue: 0, maxValue: 100 }, + { id: 'alias.0.NSPanel_1.TestTemperatur',name: 'Temperatur außen', icon: 'thermometer', onColor: White }, + { id: 'alias.0.NSPanel_1.TestFeuchtigkeit', name: 'Luftfeuchte außen', icon: 'water-percent', unit: '%H', onColor: White }, + //{ id: 'alias.0.NSPanel_1.TestInfo', name: 'Windstärke', icon: 'wind-power-outline', offColor: MSRed, onColor: MSGreen, unit: 'bft', minValue: 0, maxValue: 12, interpolateColor: true, useColor: true }, + { id: 'alias.0.NSPanel_1.Ventilator.Fan_1',name: 'Ventilator', icon: 'fan', onColor: On, offColor: HMIOff, modeList: ['Low', 'Medium', 'High', 'Move', 'Sleep', 'Auto', 'Manual']}, ] }; let Buero_Seite_1: PageEntities = { - "type": "cardEntities", - "heading": "Büro", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.Schreibtischlampe", interpolateColor: true}, - { id: "alias.0.NSPanel_1.Deckenbeleuchtung", interpolateColor: true}, - { id: "alias.0.NSPanel_1.Testlampe2", name: "Filamentlampe", minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true}, - { id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", icon2: "power",offColor: MSRed, onColor: MSGreen} + 'type': 'cardEntities', + 'heading': 'Büro', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Schreibtischlampe', interpolateColor: true}, + { id: 'alias.0.NSPanel_1.Deckenbeleuchtung', interpolateColor: true}, + { id: 'alias.0.NSPanel_1.Testlampe2', name: 'Filamentlampe', minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true}, + { id: 'alias.0.NSPanel_1.Luftreiniger', icon: 'power', icon2: 'power',offColor: MSRed, onColor: MSGreen} ] }; let Fenster_1: PageEntities = { - "type": "cardEntities", - "heading": "Fenster und Türen", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestFenster", offColor: MSRed, onColor: MSGreen, name: "Büro Fenster"}, - { id: "alias.0.NSPanel_1.Haustuer", offColor: MSRed, onColor: MSGreen, name: "Haustür"}, - { id: "alias.0.NSPanel_1.TestBlind", icon: "blinds-horizontal", offColor: White, onColor: Yellow, name: "Büro", secondRow: "Hier Text für 2. Zeile"}, - { id: "alias.0.NSPanel_1.TestDoorlock", offColor: MSRed, onColor: MSGreen, name: "Türschloss"}, + 'type': 'cardEntities', + 'heading': 'Fenster und Türen', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestFenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'}, + { id: 'alias.0.NSPanel_1.Haustuer', offColor: MSRed, onColor: MSGreen, name: 'Haustür'}, + { id: 'alias.0.NSPanel_1.TestBlind', icon: "blinds-horizontal", offColor: White, onColor: Yellow, name: 'Büro', secondRow: 'Hier Text für 2. Zeile'}, + { id: 'alias.0.NSPanel_1.TestDoorlock', offColor: MSRed, onColor: MSGreen, name: 'Türschloss'}, ] }; //{ id: "alias.0.NS-Panel.Buero.Rollade", icon: "blinds-horizontal", offColor: White, onColor: Yellow, name: "Büro", secondRow: "Hier Text für 2. Zeile"}, let Button_1: PageEntities = { - "type": "cardEntities", - "heading": "Button Aliase", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestTastensensor", name: "Tastensensor (FFN)"}, - { id: "alias.0.NSPanel_1.Radio.NDR2", icon: "radio", name: "Taste (NDR2)", onColor: colorRadio}, - { id: "alias.0.NSPanel_1.TestVentil1", icon: "valve-open", icon2: "valve-closed",offColor: MSRed, onColor: MSGreen, name: "Test-Ventil 1"}, - { id: "alias.0.NSPanel_1.Radio.NDR2", icon: 'alarm-light', name: "Alert mit Zielseite", offColor: MSGreen, onColor: MSRed, targetPage: 'Abfall', buttonText: 'Popup'}, + 'type': 'cardEntities', + 'heading': 'Button Aliase', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestTastensensor', name: 'Tastensensor (FFN)'}, + { id: 'alias.0.NSPanel_1.Radio.NDR2', icon: 'radio', name: 'Taste (NDR2)', onColor: colorRadio}, + { id: 'alias.0.NSPanel_1.TestVentil1', icon: 'valve-open', icon2: 'valve-closed',offColor: MSRed, onColor: MSGreen, name: 'Test-Ventil 1'}, + { id: 'alias.0.NSPanel_1.Radio.NDR2', icon: 'alarm-light', name: 'Alert mit Zielseite', offColor: MSGreen, onColor: MSRed, targetPage: 'Abfall', buttonText: 'Popup'}, ] }; let Subpages_1: PageEntities = { - "type": "cardEntities", - "heading": "Test Subpages", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { navigate: true, id: "Abfall", onColor: White, name: "Abfallkalender"}, - { navigate: true, id: "WLAN", onColor: White, name: "Gäste WLAN"}, + 'type': 'cardEntities', + 'heading': 'Test Subpages', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { navigate: true, id: null, targetPage: 'Abfall', onColor: White, name: "Abfallkalender"}, + { navigate: true, id: 'alias.0.NSPanel_1.TestBlind', targetPage: 'WLAN', name: 'Gäste WLAN', onColor: MSGreen, offColor: MSRed }, ] }; //Subpage 1 von Subpages_1 let Abfall: PageEntities = { - "type": "cardEntities", - "heading": "Abfallkalender", - "useColor": true, - "subPage": true, - "parent": Subpages_1, - "items": [ - { id: "alias.0.NSPanel_1.Abfall.event1",icon: "trash-can"}, - { id: "alias.0.NSPanel_1.Abfall.event2",icon: "trash-can"}, - { id: "alias.0.NSPanel_1.Abfall.event3",icon: "trash-can"}, - { id: "alias.0.NSPanel_1.Abfall.event4",icon: "trash-can"} + 'type': 'cardEntities', + 'heading': 'Abfallkalender', + 'useColor': true, + 'subPage': true, + 'parent': Subpages_1, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Abfall.event1',icon: 'trash-can'}, + { id: 'alias.0.NSPanel_1.Abfall.event2',icon: 'trash-can'}, + { id: 'alias.0.NSPanel_1.Abfall.event3',icon: 'trash-can'}, + { id: 'alias.0.NSPanel_1.Abfall.event4',icon: 'trash-can'} ] }; //Subpage 2 von Subpages_1 let WLAN: PageQR = { - "type": "cardQR", - "heading": "Gäste WLAN", - "useColor": true, - "subPage": true, - "parent": Subpages_1, - "items": [{ id: "alias.0.NSPanel_1.Guest_Wifi", hidePassword: true }] + 'type': 'cardQR', + 'heading': 'Gäste WLAN', + 'useColor': true, + 'subPage': true, + 'parent': Subpages_1, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.NSPanel_1.Guest_Wifi', hidePassword: true }] }; let Buero_Seite_2: PageGrid = { - "type": "cardGrid", - "heading": "Büro 2", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.Schreibtischlampe", name: "Schreibtisch"}, - { id: "alias.0.NSPanel_1.Deckenbeleuchtung", name: "Deckenlampe"}, - { id: "alias.0.NSPanel_1.TestFenster", offColor: MSRed, onColor: MSGreen, name: "Büro Fenster"}, - { id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", offColor: MSRed, onColor: MSGreen}, - { id: "alias.0.NSPanel_1.TestBlind", icon: "projector-screen", onColor: White, name: "Beamer", secondRow: "auch Text"}, - { id: "alias.0.NSPanel_1.Radio.Bob", icon: "play", onColor: White, name: "TuneIn"} + 'type': 'cardGrid', + 'heading': 'Büro 2', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Schreibtischlampe', name: 'Schreibtisch'}, + { id: 'alias.0.NSPanel_1.Deckenbeleuchtung', name: 'Deckenlampe'}, + { id: 'alias.0.NSPanel_1.TestFenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'}, + { id: 'alias.0.NSPanel_1.Luftreiniger', icon: 'power', offColor: MSRed, onColor: MSGreen}, + { id: 'alias.0.NSPanel_1.TestBlind', icon: 'projector-screen', onColor: White, name: 'Beamer', secondRow: 'auch Text'}, + { id: 'alias.0.NSPanel_1.Radio.Bob', icon: 'play', onColor: White, name: 'TuneIn'} ] }; let Radiosender: PageGrid = { - "type": "cardGrid", - "heading": "Büro 2", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.Radio.Bob", icon: "radio", name: "Radio BOB", onColor: colorRadio}, - { id: "alias.0.NSPanel_1.Countdown", icon: "timer-outline", name: "Timer", onColor: White} + 'type': 'cardGrid', + 'heading': 'Büro 2', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Radio.Bob', icon: 'radio', name: 'Radio BOB', onColor: colorRadio}, + { id: 'alias.0.NSPanel_1.Countdown', icon: 'timer-outline', name: 'Timer', onColor: White} ] }; let WLED: PageGrid = { - "type": "cardGrid", - "heading": "WLED Stripes WZ", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.WLED.Example.On", name: "Power", icon: "power", onColor: HMIOn, offColor: HMIOff}, - { id: "alias.0.NSPanel_1.WLED.Example.Sync", name: "Sync", icon: "sync", onColor: HMIOn, offColor: White}, - { id: "alias.0.NSPanel_1.WLED.Example.Segments", icon: "heart-outline", name: "Presets", onColor: White, modeList: ['Preset 0', 'Add Preset']}, - { id: "alias.0.NSPanel_1.WLED.Example.Colors", icon: "palette", name: "Colors", onColor: White, + 'type': 'cardGrid', + 'heading': 'WLED Stripes WZ', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.WLED.Example.On', name: 'Power', icon: 'power', onColor: HMIOn, offColor: HMIOff}, + { id: 'alias.0.NSPanel_1.WLED.Example.Sync', name: 'Sync', icon: 'sync', onColor: HMIOn, offColor: White}, + { id: 'alias.0.NSPanel_1.WLED.Example.Presets', icon: 'heart-outline', name: 'Presets', onColor: White, modeList: ['Preset 0', 'Add Preset']}, + { id: 'alias.0.NSPanel_1.WLED.Example.Colors', icon: 'palette', name: 'Colors', onColor: White, modeList: ['Default', '* Color 1', '* Color Gradient', '* Colors 1&2', '* Colors Only', '* Random Cycle', 'Analogus','April Night', 'Aqua Flash', 'Atlantica', 'Aurora', 'Beach', 'Beech', 'Blink Red', 'Breeze', 'C9', 'C9 New', 'Candy', 'Candy2', 'Cloud', 'Cyane', 'Departure', 'Drywet', 'Fairy Reaf', 'Fire', 'Forest', 'etc' ]}, - { id: "alias.0.NSPanel_1.WLED.Example.Effects", icon: "emoticon-outline", name: "Effects", onColor: White, + { id: 'alias.0.NSPanel_1.WLED.Example.Effects', icon: 'emoticon-outline', name: 'Effects', onColor: White, modeList: ['Solid', 'Android', 'Aurora', 'Blends', 'Blink', 'Blink Rainbow', 'Bouncing Balls','Bpm', 'Breathe', 'Candle', 'Candle Multi', 'Candy Cane', 'Chase', 'Chase 1', 'Chase 2', 'Chase 3', 'Chase Flash', 'Chase Flash Rnd', 'Chase Rainbow', 'Chase Random', 'Chunchun', 'Colorful', 'Colorloop', 'Colortwinkles', 'Colorwaves', 'Dancing Shadows', 'etc' ]}, - { id: "alias.0.NSPanel_1.WLED.Example.Segments", icon: "layers", name: "Segments", onColor: White, modeList: ['Segment 0', 'Add Segment']}, + { id: 'alias.0.NSPanel_1.WLED.Example.Segments', icon: 'layers', name: 'Segments', onColor: White, modeList: ['Segment 0', 'Add Segment']}, ] }; let SensorGrid: PageGrid = { - "type": "cardGrid", - "heading": "Sensor Werte", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestTemperatur", name: "Außentemp. °C", offColor: MSRed, onColor: MSGreen, useValue: true }, - { id: "alias.0.NSPanel_1.TestFeuchtigkeit", name: "Luftfeuchte %", offColor: MSYellow, onColor: MSYellow , useValue: true }, - { id: "alias.0.NSPanel_1.Taupunkt", name: "Taupunkt °C", offColor: MSRed, onColor: MSGreen, useValue: true }, - { id: "alias.0.NSPanel_1.UV_Index", name: "UV Index", offColor: White , onColor: White, useValue: true }, - { id: "alias.0.NSPanel_1.Windstaerke", name: "Windstärke bft", offColor: White , onColor: White, useValue: true }, - { id: "alias.0.NSPanel_1.Luftdruck", name: "Luftdruck hPa", offColor: White , onColor: White, useValue: true } + 'type': 'cardGrid', + 'heading': 'Sensor Werte', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestTemperatur', name: 'Außentemp. °C', offColor: MSRed, onColor: MSGreen, useValue: true }, + { id: 'alias.0.NSPanel_1.TestFeuchtigkeit', name: 'Luftfeuchte %', offColor: MSYellow, onColor: MSYellow , useValue: true }, + { id: 'alias.0.NSPanel_1.Taupunkt', name: 'Taupunkt °C', offColor: MSRed, onColor: MSGreen, useValue: true }, + { id: 'alias.0.NSPanel_1.UV_Index', name: 'UV Index', offColor: White , onColor: White, useValue: true }, + { id: 'alias.0.NSPanel_1.Windstaerke', name: 'Windstärke bft', offColor: White , onColor: White, useValue: true }, + { id: 'alias.0.NSPanel_1.Luftdruck', name: 'Luftdruck hPa', offColor: White , onColor: White, useValue: true } ] }; @@ -523,10 +578,13 @@ let Alexa: PageMedia = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [{ id: AliasPath + 'Media.PlayerAlexa', adapterPlayerInstance: 'alexa2.0.', - mediaDevice: 'G0XXXXXXXXXXXXXX', //Eigene Seriennummer des primären Alexa-Device einstellen + mediaDevice: 'G0XXXXXXXXXXXXXX', speakerList: ['Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche','Echo Spot Buero'], //analog alexa2 Music-Provider playList: ['Spotify-Playlist.PartyPlaylist', @@ -555,10 +613,13 @@ let Sonos: PageMedia = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [{ id: AliasPath + 'Media.PlayerSonos', - adapterPlayerInstance: "sonos.0.", - mediaDevice: "192_168_1_212", + adapterPlayerInstance: 'sonos.0.', + mediaDevice: '192_168_1_212', speakerList: ['Terrasse'], colorMediaIcon: colorSpotify, colorMediaArtist: Yellow, @@ -574,10 +635,13 @@ let SpotifyPremium: PageMedia = "useColor": true, "subPage": false, "parent": undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, "items": [{ id: AliasPath + 'Media.PlayerSpotifyPremium', adapterPlayerInstance: "spotify-premium.0.", - speakerList: ['LOGINT-W11-JB', 'Terrasse','Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche', + speakerList: ['LENOVO-W11-01', 'Terrasse','Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche', 'Echo Spot Buero'], playList: ['PartyPlaylist','Sabaton Radio','Rock Party','This Is Nightwish','Metal Christmas'], repeatList: ['off','context','track'], @@ -592,43 +656,52 @@ let SpotifyPremium: PageMedia = let SqueezeboxRPC: PageMedia = { - "type": "cardMedia", - "heading": "SqueezeboxRPC", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ - id: "alias.0.Media.LMS.SqueezePlay", - adapterPlayerInstance: "squeezeboxrpc.0.Players.SqueezePlay.", + 'type': 'cardMedia', + 'heading': 'SqueezeboxRPC', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ + id: 'alias.0.Media.LMS.SqueezePlay', + adapterPlayerInstance: 'squeezeboxrpc.0.Players.SqueezePlay.', speakerList: ['SqueezePlay'] }] }; let Buero_Themostat: PageThermo = { - "type": "cardThermo", - "heading": "Test Thermostat", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ id: "alias.0.NSPanel_1.Thermostat_Buero", minValue: 50, maxValue: 300 }] + 'type': 'cardThermo', + 'heading': 'Test Thermostat', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.NSPanel_1.Thermostat_Buero', minValue: 50, maxValue: 300 }] }; let Buero_Klimaanlage: PageThermo = { - "type": "cardThermo", - "heading": "Test Klimaanlage", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ - id: "alias.0.NSPanel_1.TestKlimaanlage", + 'type': 'cardThermo', + 'heading': 'Test Klimaanlage', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ + id: 'alias.0.NSPanel_1.TestKlimaanlage', minValue: 50, maxValue: 250, popupThermoMode1: ['Auto','0','1','2','3'], popupThermoMode2: ['Auto','0','1','2','3','4','5'], popupThermoMode3: ['Auto','Manual','Boost',], - popUpThermoName: ["Schwenk-Modus", 'Speed', 'Temperatur'], + popUpThermoName: ['Schwenk-Modus', 'Speed', 'Temperatur'], icon: 'fan', setThermoAlias: ['MODE1','MODE2','MODE3'], setThermoDestTemp2: 'ACTUAL2' @@ -637,12 +710,15 @@ let Buero_Klimaanlage: PageThermo = let Buero_Alarm: PageAlarm = { - "type": "cardAlarm", - "heading": "Alarm", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ id: "alias.0.Alarm" }] + 'type': 'cardAlarm', + 'heading': 'Alarm', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.Alarm' }] }; let button1Page: PageGrid = @@ -652,6 +728,9 @@ let button1Page: PageGrid = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: 'alias.0.NSPanel_1.Radio.FFN', icon: 'radio', name: 'FFN', onColor: colorRadio}, { id: 'alias.0.NSPanel_1.Radio.Antenne' , icon: 'radio', name: 'Antenne Nds.', onColor: colorRadio}, @@ -669,6 +748,9 @@ let button2Page: PageEntities = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: 'alias.0.NSPanel_1.Schreibtischlampe'}, { id: 'alias.0.NSPanel_1.Deckenbeleuchtung'} @@ -684,32 +766,38 @@ let button2Page: PageEntities = let Service: PageEntities = { - "type": "cardEntities", - "heading": "NSPanel Service", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: AliasPath + 'autoUpdate', name: "Auto-Updates" ,icon: "update", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: "NSPanel_Infos", icon: "information-outline", onColor: White, name: "NSPanel Infos"}, - { navigate: true, id: "NSPanel_Firmware_Info", icon: "update", onColor: White, name: "Firmware Infos"}, - { navigate: true, id: "NSPanel_Einstellungen", icon: "wrench-outline", onColor: White, name: "Screensaver"} + 'type': 'cardEntities', + 'heading': 'NSPanel Service', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: AliasPath + 'autoUpdate', name: 'Auto-Updates' ,icon: 'update', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: 'NSPanel_Infos', icon: 'information-outline', onColor: White, name: 'NSPanel Infos'}, + { navigate: true, id: 'NSPanel_Firmware_Info', icon: 'update', onColor: White, name: 'Firmware Infos'}, + { navigate: true, id: 'NSPanel_Einstellungen', icon: 'wrench-outline', onColor: White, name: 'Screensaver'} ] }; //Subpage 1 von Subpages_2 let NSPanel_Infos: PageEntities = { - "type": "cardEntities", - "heading": "NSPanel Infos", - "useColor": true, - "subPage": true, - "parent": Service, - "items": [ + 'type': 'cardEntities', + 'heading': 'NSPanel Infos', + 'useColor': true, + 'subPage': true, + 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ { id: AliasPath + 'Tasmota.Hardware', name: 'Hardware', icon: 'memory', offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Sensor.ESP32.Temperature', name: "ESP Temperatur", icon: "thermometer", unit: "°C", offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Tasmota.Uptime', name: "Uptime", icon: "timeline-clock-outline", offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Tasmota.Wifi.RSSI', name: "Wifi-Signal", icon: "signal-distance-variant", unit: "dBm", offColor: MSYellow, onColor: MSYellow, useColor: true} + { id: AliasPath + 'Sensor.ESP32.Temperature', name: 'ESP Temperatur', icon: 'thermometer', unit: '°C', offColor: MSYellow, onColor: MSYellow, useColor: true}, + { id: AliasPath + 'Tasmota.Uptime', name: 'Uptime', icon: 'timeline-clock-outline', offColor: MSYellow, onColor: MSYellow, useColor: true}, + { id: AliasPath + 'Tasmota.Wifi.RSSI', name: 'Wifi-Signal', icon: 'signal-distance-variant', unit: 'dBm', offColor: MSYellow, onColor: MSYellow, useColor: true} ] }; @@ -721,6 +809,9 @@ let Service: PageEntities = 'useColor': true, 'subPage': true, 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 5, maxValue: 10}, { id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 4}, @@ -737,6 +828,9 @@ let Service: PageEntities = 'useColor': true, 'subPage': true, 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: AliasPath + 'Tasmota.Version', name: 'Tasmota Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true}, { id: AliasPath + 'Display.TFTVersion', name: 'TFT-Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true}, @@ -745,6 +839,669 @@ let Service: PageEntities = ] }; + + +// ********************************************************** +// ** Navigationsstruktur für Gebäude ** +// ********************************************************** + +let Level_0_Grundstueck: PageGrid = +{ + 'type': "cardGrid", + 'heading': "Grundstück", + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { navigate: true, id: null, targetPage: 'Level_1_Haus', name: 'Haus' ,icon: 'home', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_1_Gartenhaus', name: 'Gartenhaus' ,icon: 'storefront-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_1_Aussen', name: 'Aussen' ,icon: 'tree-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_1_Garage', name: 'Garage' ,icon: 'garage', offColor: MSRed, onColor: MSGreen} + ] +}; + + let Level_1_Haus: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Haus', + 'useColor': true, + 'subPage': true, + 'parent': Level_0_Grundstueck, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_0_Grundstueck', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_2_Erdgeschoss_1', name: 'Erdgeschoss' , icon: 'home-floor-0', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_2_Obergeschoss', name: 'Obergeschoss' , icon: 'home-floor-1', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_2_Dachgeschoss', name: 'Dachgeschoss' , icon: 'home-floor-2', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_2_Erdgeschoss_1: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Erdgeschoss (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Haus, + 'prev': undefined, + 'next': 'Level_2_Erdgeschoss_2', + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_3_Wohnzimmer', name: 'Wohnzimmer' , icon: 'sofa-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Esszimmer', name: 'Esszimmer' , icon: 'table-chair', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Buero', name: 'Büro' , icon: 'desk', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Kueche', name: 'Küche' , icon: 'silverware-variant', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Bad', name: 'Bad' , icon: 'bathtub-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Kaminzimmer', name: "Kaminzimmer" , icon: "fireplace", offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Wohnzimmer: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Wohnzimmer', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Licht_1', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Sensoren_1', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Aktoren', name: 'Aktoren' , icon: 'gesture-tap', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_4_Wohnzimmer_Licht_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'WZ Licht (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': 'Level_4_Wohnzimmer_Licht_2', + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Deckenlampe_Couch', name: 'Couchtisch', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Deckenlampe_Esstisch', name: 'Esstisch', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Vitrine', name: 'Vitrine', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Stehlampe', name: 'Stehlampe', interpolateColor: true}, + ] + }; + + let Level_4_Wohnzimmer_Licht_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'WZ Licht (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': 'Level_4_Wohnzimmer_Licht_1', + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.WZ_E14_Fenster_mitte', name: 'Fenster mittig', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.WZ_E14_Fenster_rechts', name: 'Fenster rechts', interpolateColor: true}, + ] + }; + + let Level_4_Wohnzimmer_Sensoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Sensoren', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Temperatur', icon: 'thermometer', name: 'Temperatur', offColor: White, onColor: White}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Luftfeuchte', icon: 'water-percent', name: 'Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Fenster_links', offColor: MSRed, onColor: MSGreen, name: 'Fenster links'}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Fenster_mittig', offColor: MSRed, onColor: MSGreen, name: 'Fenster mittig'}, + ] + }; + + let Level_4_Wohnzimmer_Aktoren: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'WZ Aktoren', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sonstige_Aktoren.Steckdose_OBI', name: 'Steckdose OBI', offColor: MSRed, onColor: MSGreen }, + ] + }; + + let Level_4_Wohnzimmer_Thermostat: PageThermo = + { + 'type': 'cardThermo', + 'heading': 'WZ Thermostat', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [{ id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Thermostate.Thermostat_links', minValue: 50, maxValue: 300 }] + }; + + let Level_3_Esszimmer: PageGrid = + { + "type": "cardGrid", + "heading": "EG Esszimmer", + "useColor": true, + "subPage": true, + "parent": Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + "items": [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: "Licht" , icon: "lightbulb", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: "Sensoren" , icon: "sync-alert", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: "Thermostat" , icon: "thermostat", offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Buero: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Büro', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: "Licht" , icon: "lightbulb", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren_1', name: "Sensoren" , icon: "sync-alert", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Aktoren', name: "Aktoren" , icon: "gesture-tap", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: "Thermostat" , icon: "thermostat", offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_4_Buero_Licht: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Licht', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Licht.Schreibtischlampe', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Licht.Deckenstrahler_Gruppe', name: 'Deckenstrahler', interpolateColor: true}, + ] + }; + + let Level_4_Buero_Sensoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Sensoren (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': 'Level_4_Buero_Sensoren_2', + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Temperatur', icon: 'thermometer', name: 'Temperatur', offColor: White, onColor: White }, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Luftfeuchte', icon: 'water-percent', name: 'Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Fenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'}, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Bewegung', offColor: MSGreen, onColor: MSRed, name: 'Büro Bewegung', useColor: true}, + ] + }; + + let Level_4_Buero_Sensoren_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Sensoren (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_4_Buero_Sensoren_1, + 'prev': 'Level_4_Buero_Sensoren_1', + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Luftdruck', icon: 'speedometer', name: 'Luftdruck', offColor: White, onColor: White }, + ] + }; + + let Level_4_Buero_Aktoren: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Aktoren', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Aktoren.Airbowl', name: 'Airbowl', offColor: MSRed, onColor: MSGreen }, + ] + }; + + let Level_4_Buero_Thermostat: PageThermo = + { + 'type': 'cardThermo', + 'heading': 'Büro Thermostat', + 'useColor': true, + 'subPage': false, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [{ id: 'alias.0.Haus.Erdgeschoss.Buero.Thermostate.Thermostat', minValue: 50, maxValue: 300 }] + }; + + let Level_3_Kueche: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Küche', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Bad: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Küche', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_2_Erdgeschoss_2: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Erdgeschoss (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Haus, + 'prev': 'Level_2_Erdgeschoss_1', + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_3_GaesteWC', name: 'Gäste WC' , icon: 'toilet', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Hauswirtschaftsraum', name: 'Hauswirtschaft' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_FlurVorne', name: 'Flur vorne' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_FlurHinten', name: 'Flur hinten' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Kaminzimmer: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Kaminzimmer', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_GaesteWC: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Gäste WC', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Hauswirtschaftsraum: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Hauswirtschaft', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_FlurVorne: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Flur Vorne', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_FlurHinten: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Flur Hinten', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_1_Gartenhaus: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Gartenhaus', + 'useColor': true, + 'subPage': true, + 'parent': Level_0_Grundstueck, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_0_Grundstueck', + 'items': [ + { id: 'alias.0.Gartenhaus.Schalter_1', name: 'Schalter 1', icon: 'power', icon2: 'power', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Schalter_2', name: 'Schalter 2', icon: 'power', icon2: 'power', offColor: HMIOff, onColor: HMIOn }, + { navigate: true, id: null, targetPage: 'Level_2_GH_Licht', name: 'Licht' , icon: 'lightbulb', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_2_GH_Aktoren_1', name: 'Aktoren' , icon: 'gesture-tap', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_2_GH_Sensoren_1', name: 'Sensoren' , icon: 'sync-alert', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_2_GH_Heizkoerper', name: 'Heizkörper' , icon: 'thermostat', offColor: HMIOff, onColor: HMIOn}, + ] + }; + + let Level_2_GH_Licht: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Gartenhaus Licht', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_0_Grundstueck', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_3_GH_Lampen_1', name: 'Flaschen' , icon: 'bottle-tonic-outline', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_3_GH_LED_Stripes', name: 'LED Stripes' , icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_3_GH_WLED', name: 'WLED' , icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_3_GH_Aussenlampen', name: 'Aussenlampen' , icon: 'coach-lamp', offColor: HMIOff, onColor: HMIOn}, + ] + }; + + let Level_3_GH_Lampen_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': 'Level_3_GH_Lampen_2', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_1', name: 'Jack Daniels 1', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_2', name: 'Jack Daniels 2', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_3', name: 'Jack Daniels 3', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_4', name: 'Jack Daniels 4', interpolateColor: true}, + ] + }; + + let Level_3_GH_Lampen_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': 'Level_3_GH_Lampen_1', + 'next': 'Level_3_GH_Lampen_3', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Chivas', name: 'Chivas Regal', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Veterano_1', name: 'Veterano 1', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Veterano_2', name: 'Veterano 2', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Glasovka', name: 'Glasovka', interpolateColor: true}, + ] + }; + + let Level_3_GH_Lampen_3: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (3)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': 'Level_3_GH_Lampen_2', + 'next': 'Level_3_GH_Lampen_4', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Kraken', name: 'Kraken', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.103', name: '103', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Havana_Club', name: 'Havana_Club', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Chantre', name: 'Chantre', interpolateColor: true}, + ] + }; + + let Level_3_GH_Lampen_4: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (4)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': 'Level_3_GH_Lampen_3', + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Southern_Comfort', name: 'Southern_Comfort', interpolateColor: true}, + ] + }; + + let Level_3_GH_LED_Stripes: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH LED Stripes', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.4Pin_Stripe', icon: 'led-strip-variant', name: 'Laterne links', offColor: HMIOff, onColor: HMIOn, useColor: true }, + { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.5Pin_Stripe', icon: 'led-strip-variant', name: 'Laterne rechts',offColor: HMIOff, onColor: HMIOn, useColor: true }, + { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.Bilder_Stripe', icon: 'led-strip-variant', name: 'Bilder Stripe', offColor: HMIOff, onColor: HMIOn, useColor: true}, + ] + }; + + let Level_3_GH_WLED: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'WLED Stripes WZ', + 'useColor': true, + 'subPage': false, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.NSPanel_1.WLED.Example.On', name: 'Power', icon: 'power', onColor: HMIOn, offColor: HMIOff}, + { id: 'alias.0.NSPanel_1.WLED.Example.Sync', name: 'Sync', icon: 'sync', onColor: HMIOn, offColor: White}, + { id: 'alias.0.NSPanel_1.WLED.Example.Presets', icon: 'heart-outline', name: 'Presets', onColor: White, modeList: ['Preset 0', 'Add Preset']}, + { id: 'alias.0.NSPanel_1.WLED.Example.Colors', icon: 'palette', name: 'Colors', onColor: White, + modeList: ['Default', '* Color 1', '* Color Gradient', '* Colors 1&2', '* Colors Only', '* Random Cycle', 'Analogus','April Night', 'Aqua Flash', 'Atlantica', 'Aurora', + 'Beach', 'Beech', 'Blink Red', 'Breeze', 'C9', 'C9 New', 'Candy', 'Candy2', 'Cloud', + 'Cyane', 'Departure', 'Drywet', 'Fairy Reaf', 'Fire', 'Forest', 'etc' + ]}, + { id: 'alias.0.NSPanel_1.WLED.Example.Effects', icon: 'emoticon-outline', name: 'Effects', onColor: White, + modeList: ['Solid', 'Android', 'Aurora', 'Blends', 'Blink', 'Blink Rainbow', 'Bouncing Balls','Bpm', 'Breathe', 'Candle', 'Candle Multi', + 'Candy Cane', 'Chase', 'Chase 1', 'Chase 2', 'Chase 3', 'Chase Flash', 'Chase Flash Rnd', 'Chase Rainbow', 'Chase Random', + 'Chunchun', 'Colorful', 'Colorloop', 'Colortwinkles', 'Colorwaves', 'Dancing Shadows', 'etc' + ]}, + { id: 'alias.0.NSPanel_1.WLED.Example.Segments', icon: 'layers', name: 'Segments', onColor: White, modeList: ['Segment 0', 'Add Segment']}, + ] + }; + + let Level_3_GH_Aussenlampen: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Außenlampen', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Aussenbeleuchtung.Laterne_aussen_links', icon: 'coach-lamp', name: 'Laterne links', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Licht.Aussenbeleuchtung.Laterne_aussen_rechts', icon: 'coach-lamp', name: 'Laterne rechts',offColor: HMIOff, onColor: HMIOn }, + ] + }; + + let Level_2_GH_Sensoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Sensoren (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': 'Level_2_GH_Sensoren_2', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Temperatur', icon: 'thermometer', name: 'Aqara Temperatur', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Luftfeuchte', icon: 'water-percent', name: 'Aqara Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Luftdruck', icon: 'alert', name: 'Aqara Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Bewegung', offColor: MSGreen, onColor: MSRed, name: 'Aqara Bewegung', useColor: true}, + ] + }; + + let Level_2_GH_Sensoren_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Sensoren (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': 'Level_2_GH_Sensoren_1', + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Sensoren.Envy_Temperatur', icon: 'thermometer', name: 'Envy Temperatur', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Envy_Luftfeuchte', icon: 'water-percent', name: 'Envy Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Envy_Luftqualität', icon: 'alert', name: 'Envy Luftqualität', offColor: White, onColor: White, unit: '%' }, + ] + }; + + let Level_2_GH_Aktoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Aktoren (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': 'Level_2_GH_Aktoren_2', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Aktoren.Steckdose_außen', icon: 'power', name: 'Steckdose außen', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Aktoren.Luftreiniger', icon: 'air-filter', name: 'Airbowl', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Aktoren.Luefter', icon: 'fan', name: 'Lüfter', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Aktoren.Bilder_Stripe', icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn, name: 'Bilder Stripe', useColor: true}, + ] + }; + + let Level_2_GH_Aktoren_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Aktoren (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': 'Level_2_GH_Aktoren_1', + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Aktoren.Welcome', icon: 'image-frame', name: 'Welcome', offColor: HMIOff, onColor: HMIOn }, + ] + }; + + let Level_2_GH_Heizkoerper: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Heizkörper', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Heizkoerper.Brandson', icon: 'heat-wave', name: 'Brandson', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Heizkoerper.Klarstein', icon: 'heat-wave', name: 'Klarstein', offColor: HMIOff, onColor: HMIOn }, + ] + }; + + let Level_1_Aussen: PageGrid = + { + export const config: Config = { panelRecvTopic: 'mqtt.0.SmartHome.NSPanel_1.tele.RESULT', // anpassen panelSendTopic: 'mqtt.0.SmartHome.NSPanel_1.cmnd.CustomSend', // anpassen @@ -760,21 +1517,22 @@ export const config: Config = { timeoutScreensaver: 20, screenSaverDoubleClick: true, locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc. - weatherEntity: 'alias.0.Wetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können + weatherEntity: 'alias.0.DasWetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können defaultOffColor: Off, defaultOnColor: On, defaultColor: Off, defaultBackgroundColor: HMIDark, //New Parameter temperatureUnit: '°C', pages: [ + Level_0_Grundstueck, Buero_Seite_1, //Beispiel-Seite WLED, //Beispiel-Seite Radiosender, //Beispiel-Seite SensorGrid, //Beispiel-Seite - //CardChartExample, //Beispiel-Seite - //CardPowerExample, //Beispiel-Seite + CardChartExample, //Beispiel-Seite + CardPowerExample, //Beispiel-Seite //SqueezeboxRPC, //Beispiel-Seite - //Sonos, //Beispiel-Seite + Sonos, //Beispiel-Seite SpotifyPremium, //Beispiel-Seite Alexa, //Beispiel-Seite Buero_Seite_2, //Beispiel-Seite @@ -796,7 +1554,8 @@ export const config: Config = { NSPanel_Infos, //Auto-Alias Service Page NSPanel_Einstellungen, //Auto-Alias Service Page - NSPanel_Firmware_Info //Auto-Alias Service Page + NSPanel_Firmware_Info, //Auto-Alias Service Page + ], button1Page: button1Page, //Beispiel-Seite auf Button 1, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, button2Page: button2Page //Beispiel-Seite auf Button 2, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, @@ -1327,6 +2086,11 @@ setState(config.panelSendTopic, 'pageType~pageStartup'); get_tasmota_status0(); get_panel_update_data(); check_updates(); +/* +setTimeout(async function () { + setState(config.panelSendTopic, 'pageType~pageStartup'); +}, 60000); +*/ //------------------Begin Update Functions @@ -1592,8 +2356,15 @@ function get_current_berry_driver_version() { if (Debug) { console.log('Requesting current berry driver version'); } + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=GetDriverVersion`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=GetDriverVersion`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=GetDriverVersion`, + + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1619,8 +2390,14 @@ function get_tasmota_status0() { if (Debug) { console.log('Requesting tasmota status0'); } + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Status0`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Status0`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Status0`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1792,8 +2569,14 @@ on({ id: config.panelRecvTopic }, async (obj) => { function update_berry_driver_version() { try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1809,8 +2592,14 @@ function update_tft_firmware() { const tft_version: string = 'v3.7.3'; const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`; try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=FlashNextion ${desired_display_firmware_url}`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=FlashNextion ${desired_display_firmware_url}`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=FlashNextion ${desired_display_firmware_url}`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1825,8 +2614,14 @@ function update_tft_firmware() { function update_tasmota_firmware() { try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Upgrade 1`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Upgrade 1`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Upgrade 1`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -2425,6 +3220,19 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + windowState; case 'motion': + + type = 'text'; + if (val === true) { + optVal = 'On'; + iconColor = GetIconColor(pageItem, true, useColors); + iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('motion-sensor'); + } else { + optVal = 'Off'; + iconColor = GetIconColor(pageItem, false, useColors); + iconId = pageItem.icon2 !== undefined ? Icons.GetIcon(pageItem.icon2) : Icons.GetIcon('motion-sensor'); + } + + return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal; case 'info': @@ -2960,9 +3768,9 @@ function GenerateThermoPage(page: PageThermo): Payload[] { + minTemp + '~' // Thermostat Min-Temperatur + maxTemp + '~' // Thermostat Max-Temperatur + stepTemp + '~' // Schritte für Soll (5°C) - + icon_res + '~' // Icons Status + + icon_res // Icons Status + findLocale('thermostat', 'Currently') + '~' // Bezeichner vor Aktueller Raumtemperatur - + findLocale('thermostat', 'State') + '~' // Bezeichner vor State + + findLocale('thermostat', 'State') + '~~' // Bezeichner vor State + config.temperatureUnit + '~' // iconTemperature dstTempTwoTempMode + destTemp2 + '~' // dstTempTwoTempMode --> Wenn Wert, dann 2 Temp + thermoPopup // PopUp @@ -3101,6 +3909,33 @@ async function createAutoMediaAlias(id: string, mediaDevice: string, adapterPlay } } } + + if (adapterPlayerInstance.startsWith('volumio')) { + if (existsObject(id) == false){ + console.log('Volumio Alias ' + id + ' existiert nicht - wird jetzt angelegt') + + let dpPath: string = adapterPlayerInstance; + try { + setObject(id, {_id: id, type: 'channel', common: {role: 'media', name:'media'}, native: {}}); + await createAliasAsync(id + '.ACTUAL', dpPath + 'playbackInfo.volume', true, { type: 'number', role: 'value.volume', name: 'ACTUAL' }); + await createAliasAsync(id + '.ALBUM', dpPath + 'playbackInfo.album', true, { type: 'string', role: 'media.album', name: 'ALBUM' }); + await createAliasAsync(id + '.ARTIST', dpPath + 'playbackInfo.artist', true, { type: 'string', role: 'media.artist', name: 'ARTIST' }); + await createAliasAsync(id + '.TITLE', dpPath + 'playbackInfo.title', true, { type: 'string', role: 'media.title', name: 'TITLE' }); + await createAliasAsync(id + '.NEXT', dpPath + 'player.next', true, { type: 'boolean', role: 'button.next', name: 'NEXT' }); + await createAliasAsync(id + '.PREV', dpPath + 'player.prev', true, { type: 'boolean', role: 'button.prev', name: 'PREV' }); + await createAliasAsync(id + '.PLAY', dpPath + 'player.play', true, { type: 'boolean', role: 'button.play', name: 'PLAY' }); + await createAliasAsync(id + '.PAUSE', dpPath + 'player.toggle', true, { type: 'boolean', role: 'button.pause', name: 'PAUSE' }); + await createAliasAsync(id + '.STOP', dpPath + 'player.stop', true, { type: 'boolean', role: 'button.stop', name: 'STOP' }); + await createAliasAsync(id + '.STATE', dpPath + 'playbackInfo.status', true, { type: 'boolean', role: 'media.state', name: 'STATE' }); + await createAliasAsync(id + '.VOLUME', dpPath + 'playbackInfo.volume', true, { type: 'number', role: 'level.volume', name: 'VOLUME' }); + await createAliasAsync(id + '.REPEAT', dpPath + 'playbackInfo.repeat', true, { type: 'number', role: 'media.mode.repeat', name: 'REPEAT' }); + await createAliasAsync(id + '.SHUFFLE', dpPath + 'queue.shuffle', true, { type: 'boolean', role: 'media.mode.shuffle', name: 'SHUFFLE' }); + await createAliasAsync(id + '.status', dpPath + 'playbackInfo.status', true, { type: 'string', role: 'media.state', name: 'status' }); + } catch (err) { + console.warn('function createAutoMediaAlias: ' + err.message); + } + } + } } } @@ -3205,6 +4040,13 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } + //Volumio + if (v2Adapter == 'volumio') { + if (name != undefined) { author = author + " [" + name + "]"; } + name = getState(vInstance + 'info.name').val; /* page.heading; + getState(id + '.TRACK').val; */ + } + let volume = getState(id + '.VOLUME').val; let iconplaypause = Icons.GetIcon('pause'); //pause let shuffle_icon = Icons.GetIcon('shuffle-variant'); //shuffle @@ -3213,6 +4055,8 @@ function GenerateMediaPage(page: PageMedia): Payload[] { if (shuffle == 'off' || shuffle == false || shuffle == 0) { shuffle_icon = Icons.GetIcon('shuffle-disabled'); //shuffle } + if (v2Adapter == 'volumio') { shuffle_icon = Icons.GetIcon('refresh'); } //Volumio: refresh playlist + //Für alle Player if (getState(id + '.STATE').val) { @@ -3232,6 +4076,16 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } + //Ausnahme Volumio: status = string: play, pause, stop usw. + if (v2Adapter == 'volumio') { + if (getState(id + '.status').val == 'play') { + onoffbutton = 65535; + iconplaypause = Icons.GetIcon('pause'); //pause + } else { + iconplaypause = Icons.GetIcon('play'); //play + } + } + let currentSpeaker = 'kein Speaker gefunden'; if (v2Adapter == 'alexa2') { @@ -3247,7 +4101,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } //------------------------------------------------------------------------------------------------------------- // nachfolgend alle Alexa-Devices (ist Online / Player- und Commands-Verzeichnis vorhanden) auflisten und verketten - // Wenn Konstante alexaSpeakerList mind. einen Eintrag enthält, wird die Konstante verwendet - ansonsten Alle Devices aus dem Alexa Adapter + // Wenn Konstante alexaSpeakerList mind. einen Eintrag enthält, wird die Konstante verwendet - ansonsten Alle Devices aus dem Alexa Adapter let speakerList = ''; if (page.items[0].speakerList.length > 0) { for (let i_index in page.items[0].speakerList) { @@ -3290,17 +4144,30 @@ function GenerateMediaPage(page: PageMedia): Payload[] { let playListString: string = '~~~~~~' let playListIconCol = rgb_dec565(HMIOff); if (page.items[0].playList != undefined) { + /* Volumio: get actual playlist if empty */ + if (v2Adapter == 'volumio') { + if (page.items[0].playList.length == 0) { + request({ url: `${getState(vInstance+'info.host').val}/api/listplaylists`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result) => { + try { + page.items[0].playList = JSON.parse(result); + if (Debug) console.log(page.items[0].playList); + } catch (err) { + console.log('get_volumio-playlist: ' + err.message); + } + } + ); + } + } playListIconCol = rgb_dec565(HMIOn); playListString = 'input_sel' + '~' + id + '?playlist' + '~' + Icons.GetIcon('playlist-play') + '~' + playListIconCol + '~' + - 'Playlist' + '~' + + 'PlayL ' + page.heading + '~' + 'media1~' } - //Testvariable ******************** - //InSel Playlist let trackListString: string = '~~~~~~' let trackListIconCol = rgb_dec565(HMIOff); @@ -3362,6 +4229,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { repeatIconCol = rgb_dec565(HMIOn); } } + /* Volumio todo: 2 boolean 'Repeat' + 'RepeatSingle' */ if (v2Adapter == 'spotify-premium' || v2Adapter == 'alexa2' || v2Adapter == 'sonos') { repeatButtonString = 'button' + '~' + @@ -3770,6 +4638,10 @@ function HandleButtonEvent(words): void { return; } + if (words[2] == 'bNext' || words[2] == 'bPrev' || words[2] == 'bUp' || words[2] == 'bHome' || words[2] == 'bSubNext' || words[2] == 'bSubPrev' ) { + buttonAction = words[2]; + } + if (Debug) { console.log(buttonAction); } @@ -3808,6 +4680,10 @@ function HandleButtonEvent(words): void { UnsubscribeWatcher(); GeneratePage(config.pages[pageId]); break; + case 'bSubNext': + UnsubscribeWatcher(); + GeneratePage(eval(activePage.next)); + break; case 'bPrev': pageNum = (((pageId - 1) % config.pages.length) + config.pages.length) % config.pages.length; pageId = pageNum; @@ -3826,6 +4702,10 @@ function HandleButtonEvent(words): void { GeneratePage(config.pages[pageId]); } break; + case 'bSubPrev': + UnsubscribeWatcher(); + GeneratePage(eval(activePage.prev)); + break; case 'bExit': if (config.screenSaverDoubleClick && words[2] == 'screensaver') { if (words[4] >= 2) { @@ -3855,7 +4735,11 @@ function HandleButtonEvent(words): void { console.log('bExit: ' + words[4] + ' - ' + pageId); } UnsubscribeWatcher(); - GeneratePage(config.pages[0]); + if (activePage.home != undefined) { + GeneratePage(eval(activePage.home)); + } else { + GeneratePage(config.pages[0]); + } break; case 'notifyAction': if (words[4] == 'yes') { @@ -4097,6 +4981,7 @@ function HandleButtonEvent(words): void { setIfExists(id + '.NEXT', true); break; case 'media-shuffle': + if ((findPageItem(id).adapterPlayerInstance).startsWith("volumio")) { findPageItem(id).playList = []; break; } //Volumio: empty playlist $uha-20230103 if (getState(id + '.SHUFFLE').val == 'off') { setIfExists(id + '.SHUFFLE', 'on'); } else { @@ -4146,6 +5031,7 @@ function HandleButtonEvent(words): void { switch (deviceAdapterPL) { case 'spotify-premium': let strDevicePI = pageItemPL.playList[words[4]] + console.log(strDevicePI) let playlistListString = (getState(adapterInstancePL + 'playlists.playlistListString').val).split(';'); let playlistListIds = (getState(adapterInstancePL + 'playlists.playlistListIds').val).split(';'); let playlistIndex = playlistListString.indexOf(strDevicePI); @@ -4158,6 +5044,24 @@ function HandleButtonEvent(words): void { let tempListItem = pageItemPL.playList[words[4]].split('.'); setState(adapterInstancePL + 'Echo-Devices.' + pageItemPL.mediaDevice + '.Music-Provider.' + tempListItem[0], tempListItem[1]); break; + case 'volumio': + let strDevicePL = pageItemPL.playList[words[4]]; + request({ url:`${getState(adapterInstancePL+'info.host').val}/api/commands/?cmd=playplaylist&name=${strDevicePL}`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result)=>{}); /* nothing todo @ error */ + setTimeout(async function () { + request({ url: `${getState(adapterInstancePL+'info.host').val}/api/getQueue`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result) => { + try { + const QUEUELIST = JSON.parse(result); + globalTracklist = QUEUELIST.queue; + if (Debug) { for (let i_index in QUEUELIST.queue) console.log(QUEUELIST.queue[i_index]); } + } catch (err) { + console.log('get_volumio-queue: ' + err.message); + } + } + ); + }, 2000); + break; } break; case 'mode-tracklist': @@ -4174,6 +5078,10 @@ function HandleButtonEvent(words): void { case 'alexa2': console.log('Aktuell hat alexa2 keine Tracklist') break; + case 'volumio': + request({ url:`${getState(adapterInstanceTL+'info.host').val}/api/commands/?cmd=play&N=${words[4]}`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result)=>{}); /* nothing todo @ error */ + break; } break; case 'mode-repeat': @@ -4418,27 +5326,26 @@ function GetNavigationString(pageId: number): string { console.log(pageId); } - // left navigation arrow | right navigation arrow - // X|X - // 0 = no arrow - // 1|1 = right and left navigation arrow - // 2|0 = (right) up navigation arrow - // 2|2 = (right) up navigation arrow | (left) home navigation icon - - if (activePage.subPage) - return '2|2'; + if (activePage.subPage && activePage.prev == undefined && activePage.next == undefined) { + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~button~bHome~' + Icons.GetIcon('home') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev == undefined && activePage.next != undefined) { + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~button~bSubNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev != undefined && activePage.next != undefined) { + return 'button~bSubPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bSubNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev != undefined && activePage.next == undefined) { + return 'button~bSubPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bHome~' + Icons.GetIcon('home') + '~' + rgb_dec565(White) + '~~'; + } switch (pageId) { case 0: - return '1|1'; case config.pages.length - 1: - return '1|1'; + return 'button~bPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; case -1: - return '2|0'; + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + ' ~~~delete~~~~~'; case -2: - return '2|0'; + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~delete~~~~~'; default: - return '1|1'; + return 'button~bPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; } } catch (err) { @@ -4447,7 +5354,7 @@ function GetNavigationString(pageId: number): string { } function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): Payload[] { - //console.log(type + ' - ' + optional + ' - ' + pageItem.id) + if (Debug) console.log(type + ' - ' + optional + ' - ' + pageItem.id); try { let out_msgs: Array = []; let id = pageItem.id @@ -5067,16 +5974,30 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): let tempItem = pageItem.playList[i].split('.'); tPlayList[i] = tempItem[1]; } - + let tempPlayList = []; for (let i = 0; i < tPlayList.length; i++) { tempPlayList[i] = formatInSelText(tPlayList[i]); } optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : '' - } + } else if (vAdapter == 'volumio') { /* Volumio: limit 900 chars */ + actualState = ''; //todo: no actual playlistname saving + let tempPlayList = []; let tempPll = 0; + for (let i = 0; i < pageItem.playList.length; i++) { + tempPll += pageItem.playList[i].length; if (tempPll > 900) break; + tempPlayList[i] = formatInSelText(pageItem.playList[i]); + } + optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : '' + } /**/ mode = 'playlist'; } else if (optional == 'tracklist') { - actualState = '' + actualState = ''; + /* Volumio: works for files */ + if (vAdapter == 'volumio') { + actualState = getState(pageItem.id + '.TITLE').val; + } else { + actualState = getState(pageItem.adapterPlayerInstance + 'player.trackName').val; + } actualState = getState(pageItem.adapterPlayerInstance + 'player.trackName').val; actualState = (actualState.replace('?','')).split(' -'); actualState = actualState[0].split(" ("); @@ -5086,6 +6007,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): //let trackArray = (function () { try {return JSON.parse(getState(pageItem.adapterPlayerInstance + 'player.playlist.trackListArray').val);} catch(e) {return {};}})(); for (let track_index=0; track_index < 45; track_index++) { let temp_cut_array = getAttr(globalTracklist, track_index + '.title'); + /* Volumio: @local/NAS no title -> name */ + if (temp_cut_array == undefined) { + temp_cut_array = getAttr(globalTracklist, track_index + '.name'); + } + if (Debug) console.log(temp_cut_array); if (temp_cut_array != undefined) { temp_cut_array = (temp_cut_array.replace('?','')).split(' -'); temp_cut_array = temp_cut_array[0].split(" ("); @@ -6222,7 +7148,10 @@ type Page = { items: PageItem[], useColor: boolean, subPage: boolean, - parent: Page + parent: Page, + prev: string, + next: string, + home: string }; interface PageEntities extends Page { @@ -6292,6 +7221,7 @@ type PageItem = { playList: (string[] | undefined), equalizerList: (string[] | undefined), repeatList: (string[] | undefined), + globalTracklist: (string[] | undefined), modeList: (string[] | undefined), hidePassword: (boolean | undefined), autoCreateALias: (boolean | undefined)