diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..95ff90c0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,16 @@ +name: docs-ci + +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.x + - run: pip install mkdocs-material mkdocs-video markdown-include + - run: mkdocs gh-deploy --force \ No newline at end of file diff --git a/.github/workflows/nextion2text.yml b/.github/workflows/nextion2text.yml index 2957766f..30b64740 100644 --- a/.github/workflows/nextion2text.yml +++ b/.github/workflows/nextion2text.yml @@ -75,7 +75,7 @@ jobs: continue-on-error: true run: | find -name "**.txt" - rm Nextion2Text.py* + rm Nextion2Text.py* ignore-id.py out.txt - uses: stefanzweifel/git-auto-commit-action@v4 with: diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index 94104924..0a4356b9 100644 --- a/HMI/US/landscape/diff-eu-version.txt +++ b/HMI/US/landscape/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-06-08 20:00:07.004980492 +0000 -+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-06-08 20:00:08.089056883 +0000 +--- HMI/n2t-out/Program.s.txt 2022-06-12 12:21:18.432756347 +0000 ++++ HMI/US/landscape/n2t-out/Program.s.txt 2022-06-12 12:21:19.348768343 +0000 @@ -11,6 +11,4 @@ // dim value int dimValue=40 @@ -9,8 +9,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt - lcd_dev fffb 0002 0000 0020 page pageStartup diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-06-08 20:00:07.004980492 +0000 -+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-06-08 20:00:08.089056883 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-06-12 12:21:18.432756347 +0000 ++++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-06-12 12:21:19.348768343 +0000 @@ -177,7 +177,7 @@ recmod=1 bauds=115200 diff --git a/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt b/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt index bdba6347..b8d4ed65 100644 --- a/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt +++ b/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt @@ -14,10 +14,6 @@ cardMedia 34 Component(s) 363 Line(s) of event code 195 Unique line(s) of event code -pageStartup - 19 Component(s) - 157 Line(s) of event code - 117 Unique line(s) of event code cardGrid 42 Component(s) 439 Line(s) of event code @@ -26,6 +22,10 @@ cardQR 32 Component(s) 374 Line(s) of event code 218 Unique line(s) of event code +pageStartup + 19 Component(s) + 157 Line(s) of event code + 117 Unique line(s) of event code popupNotify 17 Component(s) 204 Line(s) of event code diff --git a/HMI/US/landscape/n2t-out-visual/pageStartup.txt b/HMI/US/landscape/n2t-out-visual/pageStartup.txt index 3d4fb838..6de25d7e 100644 --- a/HMI/US/landscape/n2t-out-visual/pageStartup.txt +++ b/HMI/US/landscape/n2t-out-visual/pageStartup.txt @@ -402,7 +402,7 @@ Text tVersion Horizontal Alignment : center Vertical Alignment : center Input Type : character - Text : 36 + Text : 37 Max. Text Size : 10 Word wrap : disabled Horizontal Spacing : 0 diff --git a/HMI/US/landscape/n2t-out/pageStartup.txt b/HMI/US/landscape/n2t-out/pageStartup.txt index dd50a033..fdf5af14 100644 --- a/HMI/US/landscape/n2t-out/pageStartup.txt +++ b/HMI/US/landscape/n2t-out/pageStartup.txt @@ -152,7 +152,7 @@ Text tVersion Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none - Text : 36 + Text : 37 Max. Text Size : 10 Picture p0 diff --git a/HMI/US/landscape/nspanel_US_L.HMI b/HMI/US/landscape/nspanel_US_L.HMI index 9cb4b9b4..11ba67f7 100644 Binary files a/HMI/US/landscape/nspanel_US_L.HMI and b/HMI/US/landscape/nspanel_US_L.HMI differ diff --git a/HMI/US/landscape/nspanel_US_L.tft b/HMI/US/landscape/nspanel_US_L.tft index 6fed31ad..d14eeef9 100644 Binary files a/HMI/US/landscape/nspanel_US_L.tft and b/HMI/US/landscape/nspanel_US_L.tft differ diff --git a/HMI/US/portrait/diff-eu-version.txt b/HMI/US/portrait/diff-eu-version.txt index f82ff3a5..6012039e 100644 --- a/HMI/US/portrait/diff-eu-version.txt +++ b/HMI/US/portrait/diff-eu-version.txt @@ -1,6 +1,6 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt ---- HMI/n2t-out/Program.s.txt 2022-06-08 20:00:07.004980492 +0000 -+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-08 20:00:07.521016838 +0000 +--- HMI/n2t-out/Program.s.txt 2022-06-12 12:21:18.432756347 +0000 ++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-12 12:21:18.872762109 +0000 @@ -11,6 +11,6 @@ // dim value int dimValue=40 @@ -11,8 +11,8 @@ diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt + //lcd_dev fffb 0002 0000 0020 page pageStartup diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt ---- HMI/n2t-out/cardEntities.txt 2022-06-08 20:00:07.004980492 +0000 -+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-08 20:00:07.521016838 +0000 +--- HMI/n2t-out/cardEntities.txt 2022-06-12 12:21:18.436756399 +0000 ++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-12 12:21:18.876762161 +0000 @@ -63,6 +63,16 @@ vis bText4,0 vis hSlider4,0 @@ -467,59 +467,9 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt } if(tInstruction.txt=="pageType") { -diff -bur HMI/n2t-out/cardMedia.txt HMI/US/portrait/n2t-out/cardMedia.txt ---- HMI/n2t-out/cardMedia.txt 2022-06-08 20:00:07.004980492 +0000 -+++ HMI/US/portrait/n2t-out/cardMedia.txt 2022-06-08 20:00:07.521016838 +0000 -@@ -45,12 +45,6 @@ - Scope: local - Value: 0 - --Variable (string) vaMenu -- Attributes -- Scope : local -- Text : -- Max. Text Size: 50 -- - Text tSend - Attributes - Scope : local -@@ -218,24 +212,6 @@ - Text : - Max. Text Size : 10 - -- Events -- Touch Release Event -- if(vaMenu.txt!="") -- { -- tSend.txt="event,buttonPress2,"+vaMenu.txt+",button" -- //send calc crc -- btlen tSend.txt,sys0 -- crcrest 1,0xffff // reset CRC -- crcputh 55 bb -- crcputs sys0,2 -- crcputs tSend.txt,0 -- //send cmd -- printh 55 bb -- prints sys0,2 -- prints tSend.txt,0 -- prints crcval,2 -- } -- - Text t1 - Attributes - Scope : local -@@ -644,8 +620,6 @@ - vis t5,1 - covx tTmp.txt,t5.pco,0,0 - } -- //tIconBtnEntityName -- spstr strCommand.txt,vaMenu.txt,"~",12 - } - if(tInstruction.txt=="time") - { diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt ---- HMI/n2t-out/pageStartup.txt 2022-06-08 20:00:07.004980492 +0000 -+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-08 20:00:07.525017120 +0000 +--- HMI/n2t-out/pageStartup.txt 2022-06-12 12:21:18.432756347 +0000 ++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-12 12:21:18.872762109 +0000 @@ -142,7 +142,7 @@ Disable release event after dragging: 0 Send Component ID : disabled diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index c9c00a94..decaa5c4 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,8 +1,8 @@ -+++ HMI/US/portrait/diff-eu-version.txt 2022-06-08 20:00:07.557019374 +0000 -+--- HMI/n2t-out/Program.s.txt 2022-06-08 20:00:07.004980492 +0000 -++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-08 20:00:07.521016838 +0000 -+--- HMI/n2t-out/cardEntities.txt 2022-06-08 20:00:07.004980492 +0000 -++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-08 20:00:07.521016838 +0000 ++++ HMI/US/portrait/diff-eu-version.txt 2022-06-12 12:21:18.904762528 +0000 ++--- HMI/n2t-out/Program.s.txt 2022-06-12 12:21:18.432756347 +0000 +++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-06-12 12:21:18.872762109 +0000 ++--- HMI/n2t-out/cardEntities.txt 2022-06-12 12:21:18.436756399 +0000 +++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-06-12 12:21:18.876762161 +0000 +@@ -63,6 +63,16 @@ +@@ -120,6 +130,18 @@ +@@ -156,6 +178,15 @@ @@ -12,52 +12,5 @@ +@@ -970,6 +1149,33 @@ +@@ -1075,6 +1281,28 @@ +@@ -1850,6 +2078,169 @@ -+diff -bur HMI/n2t-out/cardMedia.txt HMI/US/portrait/n2t-out/cardMedia.txt -+--- HMI/n2t-out/cardMedia.txt 2022-06-08 20:00:07.004980492 +0000 -++++ HMI/US/portrait/n2t-out/cardMedia.txt 2022-06-08 20:00:07.521016838 +0000 -+@@ -45,12 +45,6 @@ -+ Scope: local -+ Value: 0 -+ -+-Variable (string) vaMenu -+- Attributes -+- Scope : local -+- Text : -+- Max. Text Size: 50 -+- -+ Text tSend -+ Scope : local -+@@ -218,24 +212,6 @@ -+ Text : -+ Max. Text Size : 10 -+- Events -+- Touch Release Event -+- if(vaMenu.txt!="") -+- { -+- tSend.txt="event,buttonPress2,"+vaMenu.txt+",button" -+- //send calc crc -+- btlen tSend.txt,sys0 -+- crcrest 1,0xffff // reset CRC -+- crcputh 55 bb -+- crcputs sys0,2 -+- crcputs tSend.txt,0 -+- //send cmd -+- printh 55 bb -+- prints sys0,2 -+- prints tSend.txt,0 -+- prints crcval,2 -+- } -+- -+ Text t1 -+ Scope : local -+@@ -644,8 +620,6 @@ -+ vis t5,1 -+ covx tTmp.txt,t5.pco,0,0 -+ } -+- //tIconBtnEntityName -+- spstr strCommand.txt,vaMenu.txt,"~",12 -+ } -+ if(tInstruction.txt=="time") -+ { -+--- HMI/n2t-out/pageStartup.txt 2022-06-08 20:00:07.004980492 +0000 -++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-08 20:00:07.525017120 +0000 ++--- HMI/n2t-out/pageStartup.txt 2022-06-12 12:21:18.432756347 +0000 +++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-06-12 12:21:18.872762109 +0000 diff --git a/HMI/US/portrait/n2t-out-visual/cardMedia.txt b/HMI/US/portrait/n2t-out-visual/cardMedia.txt index eaac00ca..1b973cb5 100644 --- a/HMI/US/portrait/n2t-out-visual/cardMedia.txt +++ b/HMI/US/portrait/n2t-out-visual/cardMedia.txt @@ -57,6 +57,13 @@ Variable (int32) vaSpeakerPos Scope: local Value: 0 +Variable (string) vaMenu + Attributes + ID : 33 + Scope : local + Text : + Max. Text Size: 50 + Text tSend Attributes ID : 2 @@ -444,6 +451,24 @@ Text tIcon Horizontal Spacing : 0 Vertical Spacing : 0 + Events + Touch Release Event + if(vaMenu.txt!="") + { + tSend.txt="event,buttonPress2,"+vaMenu.txt+",button" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + } + Text t1 Attributes ID : 21 @@ -1069,6 +1094,8 @@ Timer tmSerial vis t5,1 covx tTmp.txt,t5.pco,0,0 } + //tIconBtnEntityName + spstr strCommand.txt,vaMenu.txt,"~",12 } if(tInstruction.txt=="time") { diff --git a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt index 855b7e49..af51356a 100644 --- a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt +++ b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt @@ -22,6 +22,10 @@ cardQR 32 Component(s) 374 Line(s) of event code 218 Unique line(s) of event code +pageStartup + 19 Component(s) + 157 Line(s) of event code + 117 Unique line(s) of event code popupNotify 17 Component(s) 204 Line(s) of event code @@ -30,6 +34,10 @@ cardThermo 53 Component(s) 555 Line(s) of event code 292 Unique line(s) of event code +cardMedia + 34 Component(s) + 363 Line(s) of event code + 195 Unique line(s) of event code screensaver 38 Component(s) 319 Line(s) of event code @@ -42,21 +50,13 @@ cardGrid 42 Component(s) 439 Line(s) of event code 259 Unique line(s) of event code -cardMedia - 33 Component(s) - 349 Line(s) of event code - 183 Unique line(s) of event code cardAlarm 40 Component(s) 392 Line(s) of event code 239 Unique line(s) of event code -pageStartup - 19 Component(s) - 157 Line(s) of event code - 117 Unique line(s) of event code Total 13 Page(s) - 423 Component(s) - 4858 Line(s) of event code - 1292 Unique line(s) of event code + 424 Component(s) + 4872 Line(s) of event code + 1304 Unique line(s) of event code diff --git a/HMI/US/portrait/n2t-out-visual/pageStartup.txt b/HMI/US/portrait/n2t-out-visual/pageStartup.txt index 451f5906..c1d829a8 100644 --- a/HMI/US/portrait/n2t-out-visual/pageStartup.txt +++ b/HMI/US/portrait/n2t-out-visual/pageStartup.txt @@ -402,7 +402,7 @@ Text tVersion Horizontal Alignment : center Vertical Alignment : center Input Type : character - Text : 36 + Text : 37 Max. Text Size : 10 Word wrap : disabled Horizontal Spacing : 0 diff --git a/HMI/US/portrait/n2t-out/cardMedia.txt b/HMI/US/portrait/n2t-out/cardMedia.txt index 030e57ad..78c331ce 100644 --- a/HMI/US/portrait/n2t-out/cardMedia.txt +++ b/HMI/US/portrait/n2t-out/cardMedia.txt @@ -45,6 +45,12 @@ Variable (int32) vaSpeakerPos Scope: local Value: 0 +Variable (string) vaMenu + Attributes + Scope : local + Text : + Max. Text Size: 50 + Text tSend Attributes Scope : local @@ -212,6 +218,24 @@ Text tIcon Text : Max. Text Size : 10 + Events + Touch Release Event + if(vaMenu.txt!="") + { + tSend.txt="event,buttonPress2,"+vaMenu.txt+",button" + //send calc crc + btlen tSend.txt,sys0 + crcrest 1,0xffff // reset CRC + crcputh 55 bb + crcputs sys0,2 + crcputs tSend.txt,0 + //send cmd + printh 55 bb + prints sys0,2 + prints tSend.txt,0 + prints crcval,2 + } + Text t1 Attributes Scope : local @@ -620,6 +644,8 @@ Timer tmSerial vis t5,1 covx tTmp.txt,t5.pco,0,0 } + //tIconBtnEntityName + spstr strCommand.txt,vaMenu.txt,"~",12 } if(tInstruction.txt=="time") { diff --git a/HMI/US/portrait/n2t-out/pageStartup.txt b/HMI/US/portrait/n2t-out/pageStartup.txt index 9a56e0bb..34d7a509 100644 --- a/HMI/US/portrait/n2t-out/pageStartup.txt +++ b/HMI/US/portrait/n2t-out/pageStartup.txt @@ -152,7 +152,7 @@ Text tVersion Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none - Text : 36 + Text : 37 Max. Text Size : 10 Picture p0 diff --git a/HMI/US/portrait/nspanel_US_P.HMI b/HMI/US/portrait/nspanel_US_P.HMI index 90b179a2..1915de7c 100644 Binary files a/HMI/US/portrait/nspanel_US_P.HMI and b/HMI/US/portrait/nspanel_US_P.HMI differ diff --git a/HMI/US/portrait/nspanel_US_P.tft b/HMI/US/portrait/nspanel_US_P.tft index a33f5fe1..04b15347 100644 Binary files a/HMI/US/portrait/nspanel_US_P.tft and b/HMI/US/portrait/nspanel_US_P.tft differ diff --git a/HMI/n2t-out-visual/nspanel_Stats.txt b/HMI/n2t-out-visual/nspanel_Stats.txt index 977e968f..5ce7d797 100644 --- a/HMI/n2t-out-visual/nspanel_Stats.txt +++ b/HMI/n2t-out-visual/nspanel_Stats.txt @@ -22,14 +22,14 @@ popupLight 27 Component(s) 352 Line(s) of event code 191 Unique line(s) of event code -cardMedia - 34 Component(s) - 363 Line(s) of event code - 195 Unique line(s) of event code pageStartup 19 Component(s) 157 Line(s) of event code 117 Unique line(s) of event code +cardMedia + 34 Component(s) + 363 Line(s) of event code + 195 Unique line(s) of event code popupShutter 25 Component(s) 330 Line(s) of event code diff --git a/HMI/n2t-out-visual/pageStartup.txt b/HMI/n2t-out-visual/pageStartup.txt index 68701029..1f9ade57 100644 --- a/HMI/n2t-out-visual/pageStartup.txt +++ b/HMI/n2t-out-visual/pageStartup.txt @@ -402,7 +402,7 @@ Text tVersion Horizontal Alignment : center Vertical Alignment : center Input Type : character - Text : 36 + Text : 37 Max. Text Size : 10 Word wrap : disabled Horizontal Spacing : 0 diff --git a/HMI/n2t-out/pageStartup.txt b/HMI/n2t-out/pageStartup.txt index ba2760d4..4652fa52 100644 --- a/HMI/n2t-out/pageStartup.txt +++ b/HMI/n2t-out/pageStartup.txt @@ -152,7 +152,7 @@ Text tVersion Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none - Text : 36 + Text : 37 Max. Text Size : 10 Picture p0 diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index 2664daf5..d25c4dae 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/HMI/nspanel.tft b/HMI/nspanel.tft index 5ca9246d..3d8f7a8b 100644 Binary files a/HMI/nspanel.tft and b/HMI/nspanel.tft differ diff --git a/README.md b/README.md index c3275e1f..f91b14eb 100644 --- a/README.md +++ b/README.md @@ -42,766 +42,6 @@ Some (not all) screenshots from the US Portrait Version: ![screens-us-p](doc-pics/screens-us-p.png) -## TLDR -1. Install Tasmota to NSPanel -2. Install Berry Driver in Tasmota and setup MQTT -3. Flash Nextion Firmware -4. Install AppDaemon, setup MQTT and install Backend Application +## Documentation -For more detailed Instructions see the following Sections: - -- [Requirements](#requirements) - -- [Installation - Home Automation Part (Home Assistant)](#installation---home-automation-part-home-assistant) - -- [Installation - Home Automation Part (IoBroker)](#installation---home-automation-part-iobroker) - -- [Installation - NSPanel Part (Firmware)](#installation---nspanel-part) - -- [Configuration](#configuration) - - [Configuring the MQTT integration in AppDaemon](#configuring-the-mqtt-integration-in-appdaemon) - - [Configure your NSPanel in AppDaemon](#configure-your-nspanel-in-appdaemon) -- [How to update](#how-to-update) -- [FAQ](#faq---frequently-asked-questions) - - -## Requirements - - - NSPanel - - USB to Serial TTL Adapter - - Running Instance of the Home Automation Platform of your Choise - - Running [Home Assistant Instance](https://www.home-assistant.io/installation/) - - with installed [MQTT Broker](https://www.home-assistant.io/docs/mqtt/broker) - - Running [ioBroker Instance](https://www.iobroker.net/#en/documentation) - - with installed MQTT Broker - -## Installation - Home Automation Part (Home Assistant) - -This section describes the Installation Steps for HomeAssistant, follow each step. - -
1. Installing HomeAssistant Add-Ons -

- -### Installing AppDaemon - - -The backend application for HomeAssistant is written in a python for [AppDaemon](https://github.com/AppDaemon/appdaemon). -This means it requires a working and running installation of AppDaemon. - -The easiest way to install it is through Home Assistant's Supervisor Add-on Store, it will be automaticly connected to your Home Assistant Instance. - -![hass-add-on-store](doc-pics/hass-add-on-store.png) - -#### Add babel package to AppDaemon Container (Optional) - -For localisation (date in your local language) you need to add the python package babel to your AppDaemon Installation. - -![appdaemon-babel](doc-pics/appdaemon-babel.png) - - -### Installing Studio Code Server (optional, recommended) - -You will need a way to edit the `apps.yaml` config file in the Appdaemon folder. -Install Studio Code Server from Home Assistant's Supervisor Add-on Store to easily edit configuration Files on your HomeAssistant Instance. - -

-
- -
2. Installing HomeAssistant Community Store -

- -### Installing HACS - -HACS is the Home Assistant Community Store and allows for community integrations and -automations to be updated cleanly and easily from the Home Assistant web user interface. -It's simple to install the AppDaemon app without HACS, but keeping up to date requires -manual steps that HACS will handle for you: you will be notified of updates, and they -can be installed by a click on a button. - -If you want to use HACS, you will have to follow [their documentation on how to install HACS](https://hacs.xyz/docs/setup/download). - -

-
- -
3. Installing Lovelace AppDaemon Backend Application -

- -### Installing AppDaemon Backend Application - -To install Lovelace UI Backend App with HACS, you will need to make sure that you enabled -AppDaemon automations in HACS, as these are not enabled by default: - -1. Click on `Configuration` on the left menu bar in Home Assistant Web UI -2. Select `Devices & Services` -3. Select `Integrations` -4. Find `HACS` and click on `Configure` -5. In the window that opens, make sure that `Enable AppDaemon apps discovery & tracking` - is checked, or check it and click `Submit` -6. If you just enabled this (or just installed HACS), you might have to wait a few minutes - as all repositories are being fetched; you might hit a GitHub rate limit, which might - then require you to wait a few hours for HACS to be fully configured. In this case, - you won't be able to proceed to the next steps until HACS is ready. - -Now, to install NSPanel Lovelace UI Backend with HACS, follow these steps: - -1. Click on `HACS` on the left menu bar in Home Assistant Web UI -2. Click on `Automations` in the right panel -3. Click on `Explore & download repositories` in the bottom right corner -4. Search for `NSPanel`, and click on `NSPanel Lovelace UI Backend` in the list that appears -5. In the bottom right corner of the panel that appears, click on - `Download this repository with HACS` -6. A confirmation panel will appear, click on `Download`, and wait for HACS to - proceed with the download -7. The Backend Application is now installed, and HACS will inform you when updates are available - -

-
- -## Installation - Home Automation Part (IoBroker) - -If you are looking for an ioBroker Integration instead of HomeAssistant take a look into the [Readme](ioBroker/README.md) of the iobroker folder. -Thanks to [britzelpuf](https://github.com/britzelpuf) for this integration. - - - - -## Installation - NSPanel Part - -This section describes how to free your nspanel from stock firmware and get it ready for Lovelace UI 🎉 - -You only need to do one **Tasmota** OR **ESPHome** - -
Installation Instructions for Tasmota (Recommended) -

- -### Flash Tasmota to your NSPanel - -You need to connect to your nspanel via serial and flash tasmtoa [tasmota32-nspanel.factory.bin](https://tasmota.github.io/install/firmware/development/tasmota32-nspanel.factory.bin) to your NSPanel. You can use the Tasmota Web Installer to do so. [Tasmota Web Installer](https://tasmota.github.io/install/) -Make sure to come back to this guide, before uploading the nspanel.be/autoexec.be files. -For more deatils see the [NSPanel Page of the Tasmota Template Repository](https://templates.blakadder.com/sonoff_NSPanel.html). - -### Configure Tasmota Template for NSPanel - -Configure the NSPanel template for Tasmota. (Go to Configuration and Configure Other and paste the template there, make sure to tick the activate checkbox) - -![tasmota-template-config](doc-pics/tasmota-template-config.png) - -You can use the following template or copy the one on the [Tasmota Template Repo Site](https://templates.blakadder.com/sonoff_NSPanel.html). - -`{"NAME":"NSPanel","GPIO":[0,0,0,0,3872,0,0,0,0,0,32,0,0,0,0,225,0,480,224,1,0,0,0,33,0,0,0,0,0,0,0,0,0,0,4736,0],"FLAG":0,"BASE":1,"CMND":"ADCParam 2,11200,10000,3950 | Sleep 0 | BuzzerPWM 1"}` - -After a reboot of tasmota your screen will light up with the stock display firmware. - -### Setup your MQTT Server in Tasmota - -Configure your MQTT Server in Tasmota. -See Tasmota [MQTT Documentation](https://tasmota.github.io/docs/MQTT/) for more details. - -![tasmota-mqtt-config](doc-pics/tasmota-mqtt-config.png) - -### Upload Berry Driver to Tasmota - -1. Download the autoexec.be from the repository: [Berry Driver](tasmota/autoexec.be) - -2. Go to `Consoles` > `Manage File System` in Tasmota and upload the previously downloaded file. - -3. Restart your NSPanel - -### Flash Firmware to Nextion Screen - -Note for ioBroker Users: Check the Release Notes, if the ioBroker Backend is not up to date with the current release there will be a note and you have to flash the latest compatible version from there. - -#### Use your own Webserver - -Upload the nspanel.tft from the lastest release to a Webserver (for example www folder of Home Assistant) and execute the following command in Tasmota Console. (Development Version: [tft file from HMI folder](HMI/nspanel.tft)) - -**Webserver must be HTTP, HTTPS is not supported, due to limitations of berry lang on tasmota** - -`FlashNextion http://ip-address-of-your-homeassistant:8123/local/nspanel.tft` - -#### Use my webserver - -Due the limitations of Berry, it's not possible to download the tft file directly from github, so I'm also renting a small server where you can download the file via HTTP. - -Use the one following commands to flash the latest release from this repository, just execute the following Command in Tasmota: - -EU Version: `FlashNextion http://nspanel.pky.eu/lui-release.tft` - -US Version Portrait: `FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft` - -US Version Landscape: `FlashNextion http://nspanel.pky.eu/lui-us-l-release.tft` - -

-
- -
Installation Instructions for ESPHome -

- -Support for ESPHome is WIP, see this third-party [ESPHome component](https://github.com/sairon/esphome-nspanel-lovelace-ui) which allows using ESPHome instead of Tasmota. - -

-
- - - -## Configuration - -Note this is the documentation of the current development version and might have changed since latest release, so see the documentation of the current release visit: - -https://github.com/joBr99/nspanel-lovelace-ui/tree/v2.9.3 - -### Configuring the MQTT integration in AppDaemon - -For the app to work you need a working MQTT Configuration in AppDaemon. Please add the configuration of your mqtt server, user and password to your existing `appdaemon.yaml` - -NOTE: This are not the options of the AppDaemon Addon in HomeAssistant. You will find this file under: `config/appdaemon/appdeamon.yaml` - -```yaml ---- -secrets: /config/secrets.yaml -appdaemon: - latitude: 52.0 - longitude: 4.0 - elevation: 2 - time_zone: Europe/Berlin - plugins: - HASS: - type: hass - MQTT: - type: mqtt - namespace: mqtt - client_id: "appdaemon" - client_host: 192.168.75.30 - client_port: 1883 - client_user: "mqttuser" - client_password: "mqttpassword" - client_topics: NONE -http: - url: http://127.0.0.1:5050 -admin: -api: -hadashboard: -``` -Please see [appdaemon.yaml](appdaemon/appdaemon.yaml) as an exmaple. - -### Configure your NSPanel in AppDaemon - -Confiure your NSPanel as you like, you need to edit the `apps.yaml` inside of your Appdaemon config folder. -You can have multiple nspanel sections. There are some more exmaples in the appdaemon folder of this repo. - -```yaml ---- -nspanel-1: - module: nspanel-lovelace-ui - class: NsPanelLovelaceUIManager - config: - panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT" - panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend" - updateMode: "auto-notify" - sleepTimeout: 20 - #sleepBrightness: 10 - sleepBrightness: - - time: "7:00:00" - value: 10 - - time: "23:00:00" - value: 0 - locale: "de_DE" # used for translations in translations.py and for localized date if babel python package is installed - screensaver: - entity: weather.k3ll3r - cards: - - type: cardEntities - entities: - - entity: switch.example_item - name: NameOverride - icon: mdi:lightbulb - - entity: light.example_item - - entity: cover.example_item - - entity: input_boolean.example_item - title: Example Entities 1 - - type: cardEntities - entities: - - entity: switch.example_item - - entity: delete - - entity: cover.example_item - - entity: input_boolean.example_item - title: Example Entities 2 - - type: cardEntities - entities: - - entity: binary_sensor.example_item - - entity: sensor.example_item - - entity: button.example_item - - entity: number.example_item - title: Example Entities 3 - - type: cardEntities - entities: - - entity: scenes.example_item - - entity: script.example_item - - entity: button.example_item - - entity: input_button.example_item - title: Example Entities 4 - - type: cardGrid - entities: - - entity: light.example_item - - entity: switch.example_item - - entity: delete - - entity: button.example_item - - entity: cover.example_item - - entity: delete # delete at the end is optional - title: Exmaple Gird - - type: cardThermo - entity: climate.example_item - - type: cardMedia - entity: media_player.example_item - - type: cardAlarm - entity: alarm_control_panel.alarmo - - type: cardQR - title: Guest Wifi - qrCode: "WIFI:S:test_ssid;T:WPA;P:test_pw;;" - entities: - - entity: iText.test_ssid - name: Name - icon: mdi:wifi - - entity: iText.test_pw - name: Password - icon: mdi:key -``` - -key | optional | type | default | description --- | -- | -- | -- | -- -`module` | False | string | | The module name of the app. -`class` | False | string | | The name of the Class. -`config` | False | complex | | Config/Mapping between Homeassistant and your NsPanel - - - -### Possible configuration values for config key - -key | optional | type | default | description --- | -- | -- | -- | -- -`panelRecvTopic` | False | string | `tele/tasmota_your_mqtt_topic/RESULT` | The mqtt topic used to receive messages. -`panelSendTopic` | False | string | `cmnd/tasmota_your_mqtt_topic/CustomSend` | The mqtt topic used to send messages. -`updateMode` | True | string | `auto-notify` | Update Mode; Possible values: "auto", "auto-notify", "manual" -`model` | True | string | `eu` | Model; Possible values: "eu", "us-l" and "us-p" -`sleepTimeout` | True | integer | `20` | Timeout for the screen to enter screensaver, to disable screensaver use 0 -`sleepBrightness` | True | integer/complex | `20` | Brightness for the screen on the screensaver, see example below for complex/scheduled config. -`screenBrightness` | True | integer/complex | `100` | Brightness for the screen during usage, config format is the same as sleepBrightness. -`sleepTracking` | True | string | None | Forces screensaver brightness to 0 in case entity state is not_home or off, can be a group, person or device_tracker entity. -`sleepOverride` | True | complex | None | Allows overriding of the sleepBrightness if entity state is on, true or home. Overrides sleepBrightness but sleepTracking takes precedence. -`locale` | True | string | `en_US` | Used by babel to determinante Date format on screensaver, also used for localization. -`dateFormatBabel` | True | string | `full` | formatting options on https://babel.pocoo.org/en/latest/dates.html?highlight=name%20of%20day#date-fields -`timeFormat` | True | string | `%H:%M` | Time Format on screensaver. Substring after `?` is displayed in a seperate smaller textbox. Useful for 12h time format with AM/PM
`"%I:%M   ?%p"`
-`dateAdditonalTemplate` | True | string | `""` | Addional Text dispayed after Date, can contain a Homeassistant Template Example `" - {{ states('sun.sun') }}"` -`timeAdditonalTemplate` | True | string | `""` | Addional Text dispayed below Time, can contain a Homeassistant Template -`dateFormat` | True | string | `%A, %d. %B %Y` | date format used if babel is not installed -`cards` | False | complex | | configuration for cards that are displayed on panel -`screensaver` | True | complex | | configuration for screensaver -`hiddenCards` | True | complex | | configuration for cards that can be accessed though navigate items - - - -
Possible languages for locale config key -

- - - `af_xx` - Afrikaans - - `ar_xx` - Arabic - - `bg_xx` - Bulgarian - - `ca_xx` - Catalan - - `cs_xx` - Czech - - `da_xx` - Danish - - `de_xx` - German - - `el_xx` - Greek - - `en_xx` - English - - `es_xx` - Spanish - - `et_xx` - Estonian - - `fa_xx` - Persian - - `fi_xx` - Finnish - - `fr_xx` - French - - `he_xx` - Hebrew - - `hr_xx` - Croatian - - `hu_xx` - Hungarian - - `hy_xx` - Armenian - - `id_xx` - Indonesian - - `is_xx` - Icelandic - - `it_xx` - Italian - - `lb_xx` - Luxembourgish - - `lt_xx` - Lithuanian - - `lv_xx` - Latvian - - `nb_xx` - Norwegian - - `nl_xx` - Dutch - - `nn_xx` - Norwegian - - `pl_xx` - Polish - - `pt_xx` - Portuguese - - `ro_xx` - Romanian - - `ru_xx` - Russian - - `sk_xx` - Slovak - - `sl_xx` - Slovenian - - `sv_xx` - Swedish - - `th_xx` - Thai - - `tr_xx` - Turkish - - `uk_xx` - Ukrainian - - `vi_xx` - Vietnamese - -

-
- -#### Possible configuration values for a card in card config - - -key | optional | type | default | description --- | -- | -- | -- | -- -`type` | False | string | `None` | Used by navigate items -`entities` | False | complex | `None` | contains entities of the card, only valid on cardEntities and cardGrid and cardQR -`title` | True | string | `None` | Title of the Page -`entity` | False | string | `None` | contains the entity of the current card, valid for cardThermo, cardAlarm and cardMedia -`key` | True | string | `None` | Used by navigate items -`mediaControl` | True | string | `None` | Only valid on cardMedia, contains the action executed on pressing the top left media icon. (useful to navigate to a hidden card or start a script) -`alarmControl` | True | complex | `None` | Only valid on cardAlarm, contains the action executed on pressing the left bottom icon, by default this button is used to show a list of open sensors on a failed attempt to arm. - -#### Possible configuration values for entities key - -key | optional | type | default | description --- | -- | -- | -- | -- -`entity` | False | string | `None` | name of ha entity -`name` | True | string | `None` | Used to override names -`icon` | True | string | `None` | Used to override icons -`color` | True | array | `None` | Overwrite color of entity `color: [255, 0, 0]` -`state` | True | string | `None` | Only displayed if Entity state is equal to this value -`state_not` | True | string | `None` | Only displayed if Entity state is unequal to this value -`status` | True | string | `None` | Only valid for navigate items, adds a entity to track state for the icon - -##### Override Icons or Names - -To overwrite Icons or Names of entities you can configure an icon and/or name in your configuration, please see the following example. -Only the icons listed in the [Icon Cheatsheet](https://htmlpreview.github.io/?https://github.com/joBr99/nspanel-lovelace-ui/blob/main/HMI/icon-cheatsheet.html) are useable. - -```yaml - entities: - - entity: light.test_item - name: NameOverride - icon: mdi:lightbulb -``` - -It is also possible to configure different icon overwrites per state: - -```yaml - icon: - "on": mdi:lightbulb - "off": mdi:lightbulb - -``` - - -#### Possible configuration values for screensaver config - -key | optional | type | default | description --- | -- | -- | -- | -- -`entity` | True | string | `weather.example` | weather entity from homeassistant -`weatherUnit` | True | string | `celsius` | unit for temperature, valid values are `celsius` or `fahrenheit` -`weatherOverrideForecast1` | True | complex | `None` | sensor entity from home assistant here to overwrite the first weather forecast item on the screensaver -`weatherOverrideForecast2` | True | complex | `None` | sensor entity from home assistant here to overwrite the second weather forecast item on the screensaver -`weatherOverrideForecast3` | True | complex | `None` | sensor entity from home assistant here to overwrite the third weather forecast item on the screensaver -`weatherOverrideForecast4` | True | complex | `None` | sensor entity from home assistant here to overwrite the forth weather forecast item on the screensaver -`statusIcon1` | True | complex | `None` | status icon left to the date string, config similar to weatherOverride -`statusIcon2` | True | complex | `None` | status icon right to the date string, config similar to weatherOverride -`doubleTapToUnlock` | True | boolean | `False` | requires to tap screensaver two times -`alternativeLayout` | True | boolean | `False` | alternative layout with humidity -`theme` | True | complex | | configuration for theme -`defaultCard` | True | string | `None` | default page after exiting screensaver; only works with top level cards defined in cards; needs to be a navigation item, see subpages (navigate.type_key) This config option will also be evaluated as a HomeAssistant Template. -`key` | True | string | `None` | Used by navigate items - -Example for the weatherOverride config options: - -```yaml - weatherOverrideForecast4: - entity: sensor.example_item - name: name - icon: mdi:lightbulb -``` -#### Possible configuration values for screensaver theme config - -key | option | type | default | description --- | -- | -- | -- | -- -`background` | True | list | Black | `[R, G, B]` -`time` | True | list | White | `[R, G, B]` -`timeAMPM` | True | list | White | `[R, G, B]` -`date` | True | list | White | `[R, G, B]` -`tMainIcon` | True | list | White | `[R, G, B]` -`tMainText` | True | list | White | `[R, G, B]` -`tForecast1` | True | list | White | `[R, G, B]` -`tForecast2` | True | list | White | `[R, G, B]` -`tForecast3` | True | list | White | `[R, G, B]` -`tForecast4` | True | list | White | `[R, G, B]` -`tF1Icon` | True | list | White | `[R, G, B]` -`tF2Icon` | True | list | White | `[R, G, B]` -`tF3Icon` | True | list | White | `[R, G, B]` -`tF4Icon` | True | list | White | `[R, G, B]` -`tForecast1Val` | True | list | White | `[R, G, B]` -`tForecast2Val` | True | list | White | `[R, G, B]` -`tForecast3Val` | True | list | White | `[R, G, B]` -`tForecast4Val` | True | list | White | `[R, G, B]` -`bar` | True | list | White | `[R, G, B]` -`tMainIconAlt` | True | list | White | `[R, G, B]` -`tMainTextAlt` | True | list | White | `[R, G, B]` -`tMRIcon` | True | list | White | `[R, G, B]` -`tMR` | True | list | White | `[R, G, B]` -`autoWeather` | True | boolean | false | Set to `true` to enable weather icons to change depending on state e.g. blue for rainy. Any custom colors in `tMainIcon` `tF1Icon` `tF2Icon` `tF3Icon` `tF4Icon` take precedence. - -If `autoWeather: true` is set. You may also overwrite the default color mapping for any valid weather state provided by homeassistant e.g. `rainy: [50, 50, 255]` or `sunny: [255, 255, 0]` - -Specify colours as red green and blue values from 0-255 e.g. `[255, 0, 0]` for red or `[0, 0, 255]` for blue. These are translated internally to RGB565 (note that this has lower color depth so the colours may not appear the same). Also note that the screen has a low contrast ratio, so colors look sigificantly different at full display brightness and lowest brightness. - -Example for the theme config: - -```yaml - screensaver: - theme: - autoWeather: true -``` - -For complex setups where you want to reuse the theme over multiple panels see the config exmaples in the appdaemon folder. - -#### Schedule sleep brightness - -It is possible to schedule a brightness change for the screen at specific times. - -```yaml - sleepBrightness: - - time: "7:00:00" - value: 10 - - time: "23:00:00" - value: 0 -``` - -```yaml - sleepBrightness: - - time: "sunrise" - value: 10 - - time: "sunset + 1:00:00" - value: 0 -``` - -`sleepTracking` overrides this setting and sets the brightness to 0 if the state of the configured Home Assistant entity is `off` or `not_home`. You may also use a [Home Assistant group](https://www.home-assistant.io/integrations/group) to track multiple entities. - -`sleepOverride` overrides sleepBrightness but does not take precedence over sleepTracking. This is useful if, for example, you want your NSPanel to be brighter than usual if your light is on or if you want to override a panel dimming if you are in the room. - -The following example configuration does nothing during the day but at night, if the bedroom light is on the NSPanel brightness will be 20 instead of 0. - -```yaml - sleepBrightness: - - time: "sunrise" - value: 20 - - time: "sunset" - value: 0 - sleepOverride: - entity: light.bedroomlight - brightness: 20 -``` - - -Also it is possible to configure a text or a character by using "text:" as a prefix instead of an icon. `icon: text:X` - -#### Fahrenheit on cardThermo -```yaml - - type: cardThermo - entity: climate.example_item - temperatureUnit: fahrenheit -``` -#### Subpages - -You can configure entities with with the prefix `navigate`, that are navigating to cards, in case it's hidden card, the navigation items will change and the arrow is bringing you back to the privious page. - -```yaml - - entity: navigate.cardGrid_testKey -``` - -will allow you to navigate to a cardGrid page with the configured key testKey - -```yaml - hiddenCards: - - type: cardGrid - title: Exmaple Grid - entities: - - entity: light.test_item - key: testKey -``` - -#### Change behaviour of hardware buttons - -##### Tasmota Rules - -You can configure the buttons to mimic an UI element on the screen by configuring tasmota rules. - -The following rule will change the behaviour of the two buttons to do page navigation. - -``` -Rule2 on Button1#state do Publish tele/%topic%/RESULT {"CustomRecv":"event,buttonPress2,hwbtn,bPrev"} endon on Button2#state do Publish tele/%topic%/RESULT {"CustomRecv":"event,buttonPress2,hwbtn,bNext"} endon - -Rule2 1 -``` - -##### Decouple buttons from controlling power outputs - -If you do not want your NSPanel physical buttons to trigger the relays and prefer to have them as software configurable buttons, open the Tasmota console of your NSPanel and enter the following: - -`SetOption73 1` - -Your relays will now appear as switches in HomeAssistant and you can control your buttons by using automations: - - ![image](https://user-images.githubusercontent.com/57167030/169677954-5b811d12-dab8-4415-89aa-e4196732765e.png) - -You may reverse this change by entering the following in the Tasmota console of your NSPanel: - -`SetOption73 0` - -Please note: Doing this will mean that if HomeAssistant is not working for any reason your buttons will not function correctly. - -#### Sending Notifications to the Panel - -There are two notification types, that can be triggered by sending a command over mqtt to the panel here are examples for homeassistant scripts: - -
-Seperate Page -
- - This is the notification used by the backend for updates, opening it requires to the following commands to the CustomSend Topic: - - `pageType popupNotify` - - `entityUpdateDetail~internalName~heading~headingColor~button1text~button1color~button2text~tB2Color~notificationText~textColor~sleepTimeout` - - It is possible to exit from the page by sending `exitPopup` - -Send Message to the Panel combined with a buzzer sound: - - ```yaml -nspanel_popup_notification: - alias: Popup Notification - sequence: - - service: mqtt.publish - data: - topic: cmnd/tasmota_NsPanelTerrasse/Backlog - payload: CustomSend pageType~popupNotify; CustomSend entityUpdateDetail~id~{{ - title }}~65535~~~~~{{ message }}~65535~{{ timeout }}; Buzzer 2,2,2 - mode: single - icon: mdi:message-badge - ``` - -Send Message to the Panel: - - ```yaml -nspanel_popup_notification: - alias: Popup Notification - sequence: - - service: mqtt.publish - data: - topic: cmnd/tasmota_NsPanelTerrasse/Backlog - payload: CustomSend pageType~popupNotify; CustomSend entityUpdateDetail~id~{{ - title }}~65535~~~~~{{ message }}~65535~{{ timeout }} - mode: single - icon: mdi:message-badge - ``` -
- - -
-Notification on screensaver -
- - The screensaver can display Notifications by sending this command to the CustomSend topic: `notify~heading~text` - - -Send Message to the Screensaver combined with a buzzer sound: - - ```yaml -nspanel_screensaver_notification: - alias: Screensaver Notification - sequence: - - service: mqtt.publish - data: - topic: cmnd/tasmota_NsPanelTerrasse/Backlog - payload: CustomSend notify~{{ heading }}~{{ message }}; Buzzer 2,2,2 - mode: single - icon: mdi:message-badge - ``` - -Send Message to the Screensaver: - - ```yaml -nspanel_screensaver_notification: - alias: Screensaver Notification - sequence: - - service: mqtt.publish - data: - topic: cmnd/tasmota_NsPanelTerrasse/Backlog - payload: CustomSend notify~{{ heading }}~{{ message }} - mode: single - icon: mdi:message-badge - ``` - -
- - -## How to update - -Updating involves mainly already descriped steps from installation, so this is a short summary. - -This project has three main parts, on a new release you usally need to update at least two of them, the AppDaemon Backend and the firmware of the display. -Sometimes there are also changes to the berry driver script on tasmota. - -*Note the commands in the following section will update to the current development version of this repository, use the command from release page if you want to use a release version* - -### Update AppDaemon Script - -HACS will show you that there is an update avalible and ask you to update. - -### Update Display Firmware - -Use the following command to update or use your own webserver. -If you are using a recent release you also should be able to update directly with a notification on the screen. - -EU Version: `FlashNextion http://nspanel.pky.eu/lui-release.tft` - -US Version Portrait: `FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft` - -US Version Landscape: `FlashNextion http://nspanel.pky.eu/lui-us-l-release.tft` - -### Update Tasmota Berry Driver - -Since release 1.1 you can update the berry driver directly from the Tasmota Console with the following command. - -`UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be` - - -## FAQ - Frequently Asked Questions - -### Waiting for content - This is taking longer than usual on the screen - -Please check your MQTT Topics in your apps.yaml and your mqtt configuration on tasmota. - -### How to upgrade from a release to the current development version - -1. Update App in HACS to main - -Click redownload in the menu of the app in HACS. - -Select main version. - -**!!! Wait for it to load, dropdown needs to be selectable again, otherwise it will download the latest release !!!** - -![hacs-main](doc-pics/hacs-main.png) - -**!!! Wait for it to load, dropdown needs to be selectable again, otherwise it will download the latest release !!!** - -Click download. - -2. Restart AppDaemon - -3. Flash current Development Firmware in Tasmota Console. DO NOT USE THIS URL (only if you are on main/dev) - -`FlashNextion http://nspanel.pky.eu/lui.tft` DO NOT USE THIS URL (only if you are on main/dev) - -Development happens in the EU version, so it is possible that the US Version isn't up to date with the current development version of the EU firmware, the lastet US versions are still downloadable with the following links: - -`FlashNextion http://nspanel.pky.eu/lui-us-l.tft` DO NOT USE THIS URL (only if you are on main/dev) - -`FlashNextion http://nspanel.pky.eu/lui-us-p.tft` DO NOT USE THIS URL (only if you are on main/dev) +Visit https://docs.nspanel.pky.eu/ for installation instructions and documentation of the configuration. \ No newline at end of file diff --git a/apps/nspanel-lovelace-ui/luibackend/config.py b/apps/nspanel-lovelace-ui/luibackend/config.py index 9ef9bfcd..62c1cb42 100644 --- a/apps/nspanel-lovelace-ui/luibackend/config.py +++ b/apps/nspanel-lovelace-ui/luibackend/config.py @@ -86,27 +86,24 @@ class LuiBackendConfig(object): 'cards': [{ 'type': 'cardEntities', 'entities': [{ - 'entity': 'switch.test_item', - 'name': 'Test Item' - }, { - 'entity': 'switch.test_item' - }], - 'title': 'Example Entities Page' - }, { - 'type': 'cardGrid', - 'entities': [{ - 'entity': 'switch.test_item' - }, { - 'entity': 'switch.test_item' - }, { - 'entity': 'switch.test_item' - } - ], - 'title': 'Example Grid Page' - }, { - 'type': 'climate', - 'entity': 'climate.test_item', - 'temperatureUnit': 'celsius' + 'entity': 'iText.', + 'name': 'MQTT Config successful', + 'icon': 'mdi:check', + 'color:': [0, 255, 0], + },{ + 'entity': 'iText.', + 'name': 'Continue adding', + 'icon': 'mdi:arrow-right-bold', + },{ + 'entity': 'iText.', + 'name': 'cards to your', + 'icon': 'mdi:card', + },{ + 'entity': 'iText.', + 'name': 'apps.yaml', + 'icon': 'mdi:cog', + }], + 'title': 'Setup successful' }], 'screensaver': { 'type': 'screensaver', diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 5e9d35cf..ac58edf2 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -298,6 +298,7 @@ class LuiPagesGen(object): heading = title if title != "unknown" else entity.attributes.friendly_name current_temp = get_attr_safe(entity, "current_temperature", "") dest_temp = get_attr_safe(entity, "temperature", None) + dest_temp2 = "" if dest_temp is None: dest_temp = get_attr_safe(entity, "target_temp_high", 0) dest_temp2 = int(get_attr_safe(entity, "target_temp_low", 0)*10) diff --git a/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py b/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py index 20268b01..24e991cd 100644 --- a/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py +++ b/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py @@ -24,8 +24,8 @@ class NsPanelLovelaceUIManager(hass.Hass): controller = LuiController(self, cfg, send_mqtt_msg) - desired_display_firmware_version = 36 - version = "v2.9.0" + desired_display_firmware_version = 37 + version = "v3.0.0" model = cfg.get("model") if model == "us-l": diff --git a/doc-pics/card-alarm.png b/doc-pics/card-alarm.png new file mode 100644 index 00000000..6420cbf5 Binary files /dev/null and b/doc-pics/card-alarm.png differ diff --git a/doc-pics/card-media.png b/doc-pics/card-media.png new file mode 100644 index 00000000..ea1cf435 Binary files /dev/null and b/doc-pics/card-media.png differ diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 00000000..4b49399d --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +docs.nspanel.pky.eu diff --git a/docs/_assets/user.css b/docs/_assets/user.css new file mode 100644 index 00000000..1106a6e9 --- /dev/null +++ b/docs/_assets/user.css @@ -0,0 +1,80 @@ +/*.md-header__button.md-logo img { + width: unset; +}*/ + +.md-main__inner { + margin-top: unset; +} + +.md-nav__title { + display: none; +} + +/*.md-header,*/ .md-footer { + background-color: #333333; +} + +.md-footer__inner.md-grid { + display: none; +} + +.md-sidebar { + padding-top: 0px; +} + +/*.md-sidebar.md-sidebar--primary { + position: unset; +}*/ + +.md-sidebar.md-sidebar--secondary { + padding-top: 10px; +} + +.md-sidebar.md-sidebar--primary .md-sidebar__scrollwrap { + /*overflow-y: unset;*/ + padding-right: 1px; + border-right: 1px solid #adadad; +} + +.md-sidebar.md-sidebar--primary .md-sidebar__inner { + /*border-right: 1px solid #adadad;*/ + padding-bottom: 30px; +} +.md-sidebar.md-sidebar--secondary .md-sidebar__inner { + border-left: 1px solid #adadad; +} + +.md-nav__item .md-nav__list { + padding-left: 10px; +} + +.md-content { + margin-top: 25px; + /*border-left: 1px solid #adadad; + border-right: 1px solid #adadad;*/ +} + +.md-top { + display: none; +} + +.md-typeset hr { + border-bottom: 1px solid #adadad; +} + +.md-typeset h1, +.md-typeset h2, +.md-typeset h3, +.md-typeset h4, +.md-typeset h5 { + font-weight: bold; +} + +.md-typeset table:not([class]) td:not(:last-child), +.md-typeset table:not([class]) th:not(:last-child) { + border-right: .05rem solid var(--md-typeset-table-color); +} + +ol li::marker { + font-weight: bold; +} \ No newline at end of file diff --git a/docs/card-alarm.md b/docs/card-alarm.md new file mode 100644 index 00000000..a8a8b2b8 --- /dev/null +++ b/docs/card-alarm.md @@ -0,0 +1,20 @@ +# Alarm Card + +![card-alarm](img/card-alarm.png) + +```yaml + cards: + - type: cardAlarm + title: Alarm Test 1 + entity: alarm_control_panel.alarmo +``` + +List of supported config keys of this card: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`type` | False | string | `None` | Used by navigate items +`title` | True | string | `None` | Title of the Page +`entity` | False | string | `None` | contains the entity of the current card +`key` | True | string | `None` | Used by navigate items +`alarmControl` | True | complex | `None` | overwrites the action executed on pressing the left bottom icon, by default this button is used to show a list of open sensors on a failed attempt to arm. \ No newline at end of file diff --git a/docs/card-climate.md b/docs/card-climate.md new file mode 100644 index 00000000..c4eba462 --- /dev/null +++ b/docs/card-climate.md @@ -0,0 +1,26 @@ +# Climate/Thermo Card + +![card-thermo](img/card-thermo.png) + +```yaml + cards: + - type: cardThermo + title: HeatPump + entity: climate.heatpump + - type: cardThermo + title: HvaC + entity: climate.hvac + - type: cardThermo + title: ecobee + entity: climate.ecobee +``` + +List of supported config keys of this card: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`type` | False | string | `None` | Type of the card +`entities` | False | complex | `None` | contains a list of entities of this card +`title` | True | string | `None` | Title of the Page +`temperatureUnit` | True | string | `celsius` | set this to fahrenheit to change the temperatureUnit on the page +`key` | True | string | `None` | Used by navigate items in combination with the type (cardEntities_key) \ No newline at end of file diff --git a/docs/card-entities.md b/docs/card-entities.md new file mode 100644 index 00000000..a5974e43 --- /dev/null +++ b/docs/card-entities.md @@ -0,0 +1,42 @@ +# Entities Page + +![card-entities](img/card-entities.png) + +```yaml + cards: + - type: cardEntities + title: Test Entities Card + entities: + - entity: light.bed_light + - entity: switch.decorative_lights + - entity: cover.hall_window + - entity: sensor.outside_temperature +``` + +List of supported config keys of this card: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`type` | False | string | `None` | Type of the card +`entities` | False | complex | `None` | contains a list of entities of this card +`title` | True | string | `None` | Title of the Page +`key` | True | string | `None` | Used by navigate items in combination with the type (cardEntities_key) + +List of supported entitiy types for this page: + +- cover +- switch +- input_boolean +- binary_sensor +- sensor +- button +- number +- scenes +- script +- input_button +- light +- input_text (read-only) +- lock +- fan +- automation +- iText \ No newline at end of file diff --git a/docs/card-grid.md b/docs/card-grid.md new file mode 100644 index 00000000..cddd4901 --- /dev/null +++ b/docs/card-grid.md @@ -0,0 +1,47 @@ +# Grid Page + +![card-grid](img/card-grid.png) + +```yaml + cards: + - type: cardGrid + title: Test Grid Card + entities: + - entity: light.bed_light + - entity: switch.decorative_lights + - entity: sensor.outside_temperature + name: Outside Temp + - entity: sensor.carbon_monoxide + - entity: light.entrance_color_white_lights + name: Entrance + - entity: light.office_rgbw_lights + name: Office RGBW + icon: mdi:office-building +``` + +List of supported config keys of this card: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`type` | False | string | `None` | Type of the card +`entities` | False | complex | `None` | contains a list of entities of this card +`title` | True | string | `None` | Title of the Page +`key` | True | string | `None` | Used by navigate items in combination with the type (cardEntities_key) + +List of supported entitiy types for this page: + +- cover +- switch +- input_boolean +- binary_sensor +- sensor +- button +- number +- scenes +- script +- input_button +- light +- input_text (read-only) +- lock +- automation +- iText \ No newline at end of file diff --git a/docs/card-media.md b/docs/card-media.md new file mode 100644 index 00000000..3fa930c2 --- /dev/null +++ b/docs/card-media.md @@ -0,0 +1,19 @@ +# Alarm Card + +![card-media](img/card-media.png) + +```yaml + cards: + - type: cardMedia + entity: media_player.spotify +``` + +List of supported config keys of this card: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`type` | False | string | `None` | Used by navigate items +`title` | True | string | `None` | Title of the Page +`entity` | False | string | `None` | contains the entity of the current card +`key` | True | string | `None` | Used by navigate items +`alarmControl` | True | complex | `None` | overwrites the action executed on pressing the left bottom icon, by default this button is used to show a list of open sensors on a failed attempt to arm. \ No newline at end of file diff --git a/docs/card-qr.md b/docs/card-qr.md new file mode 100644 index 00000000..b3195c85 --- /dev/null +++ b/docs/card-qr.md @@ -0,0 +1,46 @@ +# WiFi / QR Card + +![card-qr](img/card-qr.png) + +```yaml + cards: + - type: cardQR + title: Guest Wifi + qrCode: "WIFI:S:test_ssid;T:WPA;P:test_pw;;" + entities: + - entity: iText.test_ssid + name: Name + icon: mdi:wifi + - entity: iText.test_pw + name: Password + icon: mdi:key +``` + +List of supported config keys of this card: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`type` | False | string | `None` | Used by navigate items +`entities` | False | complex | `None` | contains entities of the card, only valid on cardEntities and cardGrid and cardQR +`title` | True | string | `None` | Title of the Page +`key` | True | string | `None` | Used by navigate items +`qrCode` | False | string | `None` | Value of the qrCode + +List of supported entitiy types for this page: + +- switch +- input_boolean +- binary_sensor +- sensor +- button +- scenes +- script +- input_button +- light +- input_text (read-only) +- lock +- automation + +The qrCode value is evaluated as a homeassistant Template, so it is possible to get values from HomeAssistant within the qrCode. + +`"WIFI:S:{{states('input_text.test_ssid')}};T:WPA;P:{{states('input_text.test_pw')}};;"` \ No newline at end of file diff --git a/docs/config-overview.md b/docs/config-overview.md new file mode 100644 index 00000000..cc82587d --- /dev/null +++ b/docs/config-overview.md @@ -0,0 +1,171 @@ +# Configuration + +To confiure your NSPanel to your needs, you need to edit the `apps.yaml` inside of your Appdaemon config folder and add card and entities you want to display on the screen. + +If you've sucessfully set up mqtt, you should already have a configuration looking like this: + +```yaml +--- +nspanel-1: + module: nspanel-lovelace-ui + class: NsPanelLovelaceUIManager + config: + panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT" + panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend" +``` + +You can continue from this point adding configuration for the weather forcecast on the screensaver, configuring a schedule for the brightness of the screensaver and your first cards. + +```yaml +--- +nspanel-1: + module: nspanel-lovelace-ui + class: NsPanelLovelaceUIManager + config: + panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT" + panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend" + sleepTimeout: 20 + sleepBrightness: + - time: "7:00:00" + value: 10 + - time: "23:00:00" + value: 0 + locale: "de_DE" + screensaver: + entity: weather.k3ll3r + cards: + - type: cardEntities + entities: + - entity: switch.example_item + - entity: light.example_item + title: Example 1 + - type: cardGrid + entities: + - entity: switch.example_item + - entity: light.example_item + title: Example 2 +``` + +This is the full list of configuration options supported for the config key: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`panelRecvTopic` | False | string | `tele/tasmota_your_mqtt_topic/RESULT` | The mqtt topic used to receive messages. +`panelSendTopic` | False | string | `cmnd/tasmota_your_mqtt_topic/CustomSend` | The mqtt topic used to send messages. +`updateMode` | True | string | `auto-notify` | Update Mode; Possible values: "auto", "auto-notify", "manual" +`model` | True | string | `eu` | Model; Possible values: "eu", "us-l" and "us-p" +`sleepTimeout` | True | integer | `20` | Timeout for the screen to enter screensaver, to disable screensaver use 0 +`sleepBrightness` | True | integer/complex | `20` | Brightness for the screen on the screensaver, see example below for complex/scheduled config. +`screenBrightness` | True | integer/complex | `100` | Brightness for the screen during usage, config format is the same as sleepBrightness. +`sleepTracking` | True | string | None | Forces screensaver brightness to 0 in case entity state is not_home or off, can be a group, person or device_tracker entity. +`sleepOverride` | True | complex | None | Allows overriding of the sleepBrightness if entity state is on, true or home. Overrides sleepBrightness but sleepTracking takes precedence. +`locale` | True | string | `en_US` | Used by babel to determinante Date format on screensaver, also used for localization. +`dateFormatBabel` | True | string | `full` | formatting options on https://babel.pocoo.org/en/latest/dates.html?highlight=name%20of%20day#date-fields +`timeFormat` | True | string | `%H:%M` | Time Format on screensaver. Substring after `?` is displayed in a seperate smaller textbox. Useful for 12h time format with AM/PM
`"%I:%M   ?%p"`
+`dateAdditonalTemplate` | True | string | `""` | Addional Text dispayed after Date, can contain a Homeassistant Template Example `" - {{ states('sun.sun') }}"` +`timeAdditonalTemplate` | True | string | `""` | Addional Text dispayed below Time, can contain a Homeassistant Template +`dateFormat` | True | string | `%A, %d. %B %Y` | date format used if babel is not installed +`cards` | False | complex | | configuration for cards that are displayed on panel; see docs for cards +`screensaver` | True | complex | | configuration for screensaver; see docs for screensaver +`hiddenCards` | True | complex | | configuration for cards that can be accessed though navigate items; see docs for cards + +
+Details on sleepBrightness/screenBrightness and other configs related to screen brightness +
+ +It is possible to schedule a brightness change for the screen at specific times. + +```yaml + sleepBrightness: + - time: "7:00:00" + value: 10 + - time: "23:00:00" + value: 0 +``` + +```yaml + sleepBrightness: + - time: "sunrise" + value: 10 + - time: "sunset + 1:00:00" + value: 0 +``` + +It is also possible to use a static value or an input_number/sensor with the range between 0 and 100 as value for sleepBrightness/screenBrightness: + +``` + sleepBrightness: input_number.brightness_nspanel +``` + +``` + sleepBrightness: 50 +``` + + +`sleepTracking` overrides this setting and sets the brightness to 0 if the state of the configured Home Assistant entity is `off` or `not_home`. You may also use a [Home Assistant group](https://www.home-assistant.io/integrations/group) to track multiple entities. + +`sleepOverride` overrides sleepBrightness but does not take precedence over sleepTracking. This is useful if, for example, you want your NSPanel to be brighter than usual if your light is on or if you want to override a panel dimming if you are in the room. + +The following example configuration is turning off the screen after sunset, but in case the bedroom light is on the NSPanel brightness will be 20 instead of 0. + +```yaml + sleepBrightness: + - time: "sunrise" + value: 20 + - time: "sunset" + value: 0 + sleepOverride: + entity: light.bedroomlight + brightness: 20 +``` + + +
+ +
+Supported keys for locale config +

+ + - `af_xx` - Afrikaans + - `ar_xx` - Arabic + - `bg_xx` - Bulgarian + - `ca_xx` - Catalan + - `cs_xx` - Czech + - `da_xx` - Danish + - `de_xx` - German + - `el_xx` - Greek + - `en_xx` - English + - `es_xx` - Spanish + - `et_xx` - Estonian + - `fa_xx` - Persian + - `fi_xx` - Finnish + - `fr_xx` - French + - `he_xx` - Hebrew + - `hr_xx` - Croatian + - `hu_xx` - Hungarian + - `hy_xx` - Armenian + - `id_xx` - Indonesian + - `is_xx` - Icelandic + - `it_xx` - Italian + - `lb_xx` - Luxembourgish + - `lt_xx` - Lithuanian + - `lv_xx` - Latvian + - `nb_xx` - Norwegian + - `nl_xx` - Dutch + - `nn_xx` - Norwegian + - `pl_xx` - Polish + - `pt_xx` - Portuguese + - `ro_xx` - Romanian + - `ru_xx` - Russian + - `sk_xx` - Slovak + - `sl_xx` - Slovenian + - `sv_xx` - Swedish + - `th_xx` - Thai + - `tr_xx` - Turkish + - `uk_xx` - Ukrainian + - `vi_xx` - Vietnamese + - `zh_CN` - Simplified Chinese + - `zh_TW` - Traditional Chinese + +

+
diff --git a/docs/config-screensaver.md b/docs/config-screensaver.md new file mode 100644 index 00000000..2c1cee52 --- /dev/null +++ b/docs/config-screensaver.md @@ -0,0 +1,163 @@ +#### Possible configuration values for screensaver config + +key | optional | type | default | description +-- | -- | -- | -- | -- +`entity` | True | string | `weather.example` | weather entity from homeassistant +`weatherUnit` | True | string | `celsius` | unit for temperature, valid values are `celsius` or `fahrenheit` +`weatherOverrideForecast1` | True | complex | `None` | sensor entity from home assistant here to overwrite the first weather forecast item on the screensaver +`weatherOverrideForecast2` | True | complex | `None` | sensor entity from home assistant here to overwrite the second weather forecast item on the screensaver +`weatherOverrideForecast3` | True | complex | `None` | sensor entity from home assistant here to overwrite the third weather forecast item on the screensaver +`weatherOverrideForecast4` | True | complex | `None` | sensor entity from home assistant here to overwrite the forth weather forecast item on the screensaver +`statusIcon1` | True | complex | `None` | status icon left to the date string, config similar to weatherOverride +`statusIcon2` | True | complex | `None` | status icon right to the date string, config similar to weatherOverride +`doubleTapToUnlock` | True | boolean | `False` | requires to tap screensaver two times +`alternativeLayout` | True | boolean | `False` | alternative layout with humidity +`theme` | True | complex | | configuration for theme +`defaultCard` | True | string | `None` | default page after exiting screensaver; only works with top level cards defined in cards; needs to be a navigation item, see subpages (navigate.type_key) This config option will also be evaluated as a HomeAssistant Template. +`key` | True | string | `None` | Used by navigate items + +Example for the weatherOverride config options: + +```yaml + weatherOverrideForecast4: + entity: sensor.example_item + name: name + icon: mdi:lightbulb +``` +#### Possible configuration values for screensaver theme config + +key | option | type | default | description +-- | -- | -- | -- | -- +`background` | True | list | Black | `[R, G, B]` +`time` | True | list | White | `[R, G, B]` +`timeAMPM` | True | list | White | `[R, G, B]` +`date` | True | list | White | `[R, G, B]` +`tMainIcon` | True | list | White | `[R, G, B]` +`tMainText` | True | list | White | `[R, G, B]` +`tForecast1` | True | list | White | `[R, G, B]` +`tForecast2` | True | list | White | `[R, G, B]` +`tForecast3` | True | list | White | `[R, G, B]` +`tForecast4` | True | list | White | `[R, G, B]` +`tF1Icon` | True | list | White | `[R, G, B]` +`tF2Icon` | True | list | White | `[R, G, B]` +`tF3Icon` | True | list | White | `[R, G, B]` +`tF4Icon` | True | list | White | `[R, G, B]` +`tForecast1Val` | True | list | White | `[R, G, B]` +`tForecast2Val` | True | list | White | `[R, G, B]` +`tForecast3Val` | True | list | White | `[R, G, B]` +`tForecast4Val` | True | list | White | `[R, G, B]` +`bar` | True | list | White | `[R, G, B]` +`tMainIconAlt` | True | list | White | `[R, G, B]` +`tMainTextAlt` | True | list | White | `[R, G, B]` +`tMRIcon` | True | list | White | `[R, G, B]` +`tMR` | True | list | White | `[R, G, B]` +`autoWeather` | True | boolean | false | Set to `true` to enable weather icons to change depending on state e.g. blue for rainy. Any custom colors in `tMainIcon` `tF1Icon` `tF2Icon` `tF3Icon` `tF4Icon` take precedence. + +If `autoWeather: true` is set. You may also overwrite the default color mapping for any valid weather state provided by homeassistant e.g. `rainy: [50, 50, 255]` or `sunny: [255, 255, 0]` + +Specify colours as red green and blue values from 0-255 e.g. `[255, 0, 0]` for red or `[0, 0, 255]` for blue. These are translated internally to RGB565 (note that this has lower color depth so the colours may not appear the same). Also note that the screen has a low contrast ratio, so colors look sigificantly different at full display brightness and lowest brightness. + +Example for the theme config: + +```yaml + screensaver: + theme: + autoWeather: true +``` + + +
+Config Example for configured weatherOverrides +
+``` + config: + screensaver: + entity: weather.k3ll3r + weatherOverrideForecast4: + entity: sensor.example_item + name: name + icon: lightbulb + alternativeLayout: True +``` +
+ +
+Config Example for configured statusIcons +
+``` + config: + screensaver: + entity: weather.k3ll3r + statusIcon1: + entity: switch.example_item + statusIcon2: + entity: binary_sensor.example_item +``` +
+ +
+Config Example for configured theme (colored weather icons) +
+``` + config: + screensaver: + entity: weather.k3ll3r + theme: + autoWeather: true +``` +
+ + +
+Config Example for configured theme (custom) +
+``` + config: + screensaver: + entity: weather.k3ll3r + screensaver: + entity: weather.k3ll3r + theme: + #time: [220, 0, 255] + #timeAMPM: [220, 0, 255] + #date: [220, 0, 255] + #tMainIcon: [220, 0, 255] + #tMainText: [220, 0, 255] + #tForecast1: [220, 0, 255] + #tForecast2: [220, 0, 255] + #tForecast3: [220, 0, 255] + #tForecast4: [220, 0, 255] + #tF1Icon: [220, 0, 255] + #tF2Icon: [220, 0, 255] + #tF3Icon: [220, 0, 255] + #tF4Icon: [220, 0, 255] + #tForecast1Val: [220, 0, 255] + #tForecast2Val: [220, 0, 255] + #tForecast3Val: [220, 0, 255] + #tForecast4Val: [220, 0, 255] + #bar: [220, 0, 255] + #tMRIcon: [220, 0, 255] + #tMR: [220, 0, 255] + + #autoWeather automatically colors the screensaver weather icons based upon weather. Uncomment the following line to enable. + #autoWeather: true + + #If you have enabled autoWeather, the following options allow you to customise the colors used for autoWeather. + + #clear-night: [150, 150, 100] + #cloudy: [75, 75, 75] + #exceptional: [255, 50, 50] + #fog: [150, 150, 150] + #hail: [200, 200, 200] + #lightning: [200, 200, 0] + #lightning-rainy: [200, 200, 150] + #partlycloudy: [150, 150, 150] + #pouring: [50, 50, 255] + #rainy: [100, 100, 255] + #snowy: [150, 150, 150] + #snowy-rainy: [150, 150, 255] + #sunny: [255, 255, 0] + #windy: [150, 150, 150] + #windy-variant: [255, 125, 125] +``` +
diff --git a/docs/configure_mqtt.md b/docs/configure_mqtt.md new file mode 100644 index 00000000..b26c9a08 --- /dev/null +++ b/docs/configure_mqtt.md @@ -0,0 +1,84 @@ +# Configure MQTT on Tasmota + +Configure your MQTT Server in Tasmota. +See Tasmota [MQTT Documentation](https://tasmota.github.io/docs/MQTT/) for more details. + +![tasmota-mqtt-config](img/tasmota-mqtt-config.png) + +Please leave the Full Topic as it is in default configuration (and on the screenshot). + +Change the topic to something unique for your panel, you will need this topic later in the configuration of your panel in appdaemon / apps.yaml + +# Configure MQTT Connection on AppDaemon + +For the app to work you need a working MQTT Configuration in AppDaemon. Please add the configuration of your mqtt server, user and password to your existing `appdaemon.yaml` + +NOTE: This are not the options of the AppDaemon Addon in Home Assistant. +You will find this file in the following location: `config/appdaemon/appdeamon.yaml` + +```yaml +--- +secrets: /config/secrets.yaml +appdaemon: + latitude: 52.0 + longitude: 4.0 + elevation: 2 + time_zone: Europe/Berlin + plugins: + HASS: + type: hass + MQTT: + type: mqtt + namespace: mqtt + client_id: "appdaemon" + client_host: 192.168.75.30 + client_port: 1883 + client_user: "mqttuser" + client_password: "mqttpassword" + client_topics: NONE +http: + url: http://127.0.0.1:5050 +admin: +api: +hadashboard: +``` + +# Configure NsPanel on AppDaemon + +Please add the following minimal configuration to your apps.yaml, which is located in `config/appdaemon/apps/apps.yaml` + +```yaml +--- +nspanel-1: + module: nspanel-lovelace-ui + class: NsPanelLovelaceUIManager + config: + panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT" + panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend" +``` + +Please adjust `tasmota_your_mqtt_topic` to the topic used in Tasmota MQTT Configuration. + +If your configuration is correct you should get the following screens on your panel: + +![hacs-main](img/mqtt-config-sucess.png) + +
+Note: You can add multiple panels to this configuration: +
+```yaml +--- +nspanel-1: + module: nspanel-lovelace-ui + class: NsPanelLovelaceUIManager + config: + panelRecvTopic: "tele/first-nspanel-topic/RESULT" + panelSendTopic: "cmnd/first-nspanel-topic/CustomSend" +nspanel-2: + module: nspanel-lovelace-ui + class: NsPanelLovelaceUIManager + config: + panelRecvTopic: "tele/second-nspanel-topic/RESULT" + panelSendTopic: "cmnd/second-nspanel-topic/CustomSend" +``` +
diff --git a/docs/entities.md b/docs/entities.md new file mode 100644 index 00000000..2844f02b --- /dev/null +++ b/docs/entities.md @@ -0,0 +1,54 @@ +# Entities + +Entities are mainly used on cardEntities, cardGrid and cardGrid. + +It is possible to overwrite and configure varrious things on Entities. + +## Possible configuration values for entities key: + +key | optional | type | default | description +-- | -- | -- | -- | -- +`entity` | False | string | `None` | name of ha entity +`name` | True | string | `None` | Used to override names +`icon` | True | string | `None` | Used to override icons +`color` | True | array | `None` | Overwrite color of entity `color: [255, 0, 0]` +`state` | True | string | `None` | Only displayed if Entity state is equal to this value +`state_not` | True | string | `None` | Only displayed if Entity state is unequal to this value +`status` | True | string | `None` | Only valid for navigate items, adds a entity to track state for the icon + +## Override Icons or Names + +To overwrite Icons or Names of entities you can configure an icon and/or name in your configuration, please see the following example. +Only the icons listed in the [Icon Cheatsheet](https://htmlpreview.github.io/?https://github.com/joBr99/nspanel-lovelace-ui/blob/main/HMI/icon-cheatsheet.html) are useable. + +```yaml + entities: + - entity: light.test_item + name: NameOverride + icon: mdi:lightbulb +``` + +It is also possible to configure different icon overwrites per state: + +```yaml + icon: + "on": mdi:lightbulb + "off": mdi:lightbulb +``` + +# Hide item based on state + +This sensor will only be shown on the card if it's state is equal to `off` + +```yaml + - entity: binary_sensor.sensor_bad_contact + state: "off" +``` + +This sensor will only be shown on the card if it's state is not equal to `on` + +```yaml + - entity: binary_sensor.sensor_kueche_contact + state_not: "on" +``` + diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 00000000..141bdfeb --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,58 @@ +# FAQ - Frequently Asked Questions + +## Waiting for content - This is taking longer than usual on the screen + +Please check your MQTT Topics in your apps.yaml and your mqtt configuration on tasmota. + +## How to update + +### Update AppDaemon Script + +HACS will show you that there is an update avalible and ask you to update. It is important to restart the AppDaemon Container afterwards. + +### Update Display Firmware + +You should get an notification on the screen, asking you to update the firmware. In case you want to update manually you can use the following commands. + +EU Version: `FlashNextion http://nspanel.pky.eu/lui-release.tft` + +US Version Portrait: `FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft` + +US Version Landscape: `FlashNextion http://nspanel.pky.eu/lui-us-l-release.tft` + +### Update Tasmota Berry Driver + +You should get an notification on the screen, asking you to update the driver, if an update is needed. + +You can update the berry driver directly from the Tasmota Console with the following command. + +`UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be` + + +## How to upgrade from a release to the current development version + +1. Update App in HACS to main + +Click redownload in the menu of the app in HACS. + +Select main version. + +**!!! Wait for it to load, dropdown needs to be selectable again, otherwise it will download the latest release !!!** + +![hacs-main](img/hacs-main.png) + +**!!! Wait for it to load, dropdown needs to be selectable again, otherwise it will download the latest release !!!** + +Click download. + +2. Restart AppDaemon + +3. Flash current Development Firmware in Tasmota Console. DO NOT USE THIS URL (only if you are on main/dev) + +`FlashNextion http://nspanel.pky.eu/lui.tft` DO NOT USE THIS URL (only if you are on main/dev) + +Development happens in the EU version, so it is possible that the US Version isn't up to date with the current development version of the EU firmware, the lastet US versions are still downloadable with the following links: + +`FlashNextion http://nspanel.pky.eu/lui-us-l.tft` DO NOT USE THIS URL (only if you are on main/dev) + +`FlashNextion http://nspanel.pky.eu/lui-us-p.tft` DO NOT USE THIS URL (only if you are on main/dev) diff --git a/docs/img/appdaemon-babel.png b/docs/img/appdaemon-babel.png new file mode 100644 index 00000000..b82f163d Binary files /dev/null and b/docs/img/appdaemon-babel.png differ diff --git a/docs/img/card-entities.png b/docs/img/card-entities.png new file mode 100644 index 00000000..bc8e8b7f Binary files /dev/null and b/docs/img/card-entities.png differ diff --git a/docs/img/card-grid.png b/docs/img/card-grid.png new file mode 100644 index 00000000..cd6f40d6 Binary files /dev/null and b/docs/img/card-grid.png differ diff --git a/docs/img/card-thermo.png b/docs/img/card-thermo.png new file mode 100644 index 00000000..b89aab8e Binary files /dev/null and b/docs/img/card-thermo.png differ diff --git a/docs/img/hacs-main.png b/docs/img/hacs-main.png new file mode 100644 index 00000000..d92d6928 Binary files /dev/null and b/docs/img/hacs-main.png differ diff --git a/docs/img/hass-add-on-store.png b/docs/img/hass-add-on-store.png new file mode 100644 index 00000000..0e9d5458 Binary files /dev/null and b/docs/img/hass-add-on-store.png differ diff --git a/docs/img/ioBroker/1653909565560-f184fc26-229d-4a75-84cc-74fda631c527-image.png b/docs/img/ioBroker/1653909565560-f184fc26-229d-4a75-84cc-74fda631c527-image.png new file mode 100644 index 00000000..d82c9da9 Binary files /dev/null and b/docs/img/ioBroker/1653909565560-f184fc26-229d-4a75-84cc-74fda631c527-image.png differ diff --git a/docs/img/ioBroker/1653909648857-8182d534-bbe0-42a3-89b6-864bc30f9a17-image.png b/docs/img/ioBroker/1653909648857-8182d534-bbe0-42a3-89b6-864bc30f9a17-image.png new file mode 100644 index 00000000..c706650e Binary files /dev/null and b/docs/img/ioBroker/1653909648857-8182d534-bbe0-42a3-89b6-864bc30f9a17-image.png differ diff --git a/docs/img/ioBroker/1653909770906-76749e7d-c630-406c-9d2b-a2424521fa96-image.png b/docs/img/ioBroker/1653909770906-76749e7d-c630-406c-9d2b-a2424521fa96-image.png new file mode 100644 index 00000000..2c1633fc Binary files /dev/null and b/docs/img/ioBroker/1653909770906-76749e7d-c630-406c-9d2b-a2424521fa96-image.png differ diff --git a/docs/img/ioBroker/1653910414137-0735190e-11c3-4bc2-bfd1-5899b8ee0eed-image.png b/docs/img/ioBroker/1653910414137-0735190e-11c3-4bc2-bfd1-5899b8ee0eed-image.png new file mode 100644 index 00000000..d9d98c3a Binary files /dev/null and b/docs/img/ioBroker/1653910414137-0735190e-11c3-4bc2-bfd1-5899b8ee0eed-image.png differ diff --git a/docs/img/ioBroker/1653910476255-a43e9656-891a-42ef-90cc-f9ed61850d4b-image.png b/docs/img/ioBroker/1653910476255-a43e9656-891a-42ef-90cc-f9ed61850d4b-image.png new file mode 100644 index 00000000..ba63c954 Binary files /dev/null and b/docs/img/ioBroker/1653910476255-a43e9656-891a-42ef-90cc-f9ed61850d4b-image.png differ diff --git a/docs/img/ioBroker/1653910570137-abd817a4-db10-45dc-9d5c-9adf6151dac5-image.png b/docs/img/ioBroker/1653910570137-abd817a4-db10-45dc-9d5c-9adf6151dac5-image.png new file mode 100644 index 00000000..f4869acf Binary files /dev/null and b/docs/img/ioBroker/1653910570137-abd817a4-db10-45dc-9d5c-9adf6151dac5-image.png differ diff --git a/docs/img/ioBroker/1653910838009-219c8bad-2af0-42e6-a041-b4ba319ca96d-image.png b/docs/img/ioBroker/1653910838009-219c8bad-2af0-42e6-a041-b4ba319ca96d-image.png new file mode 100644 index 00000000..a5eb6bfb Binary files /dev/null and b/docs/img/ioBroker/1653910838009-219c8bad-2af0-42e6-a041-b4ba319ca96d-image.png differ diff --git a/docs/img/ioBroker/1653911536657-bae0913f-fb3f-4856-90d1-eebb70b5a89a-image.png b/docs/img/ioBroker/1653911536657-bae0913f-fb3f-4856-90d1-eebb70b5a89a-image.png new file mode 100644 index 00000000..3251d4de Binary files /dev/null and b/docs/img/ioBroker/1653911536657-bae0913f-fb3f-4856-90d1-eebb70b5a89a-image.png differ diff --git a/docs/img/ioBroker/1653911602309-3ccd8404-afe3-4182-953c-2172ca1f0a09-image.png b/docs/img/ioBroker/1653911602309-3ccd8404-afe3-4182-953c-2172ca1f0a09-image.png new file mode 100644 index 00000000..f19d5336 Binary files /dev/null and b/docs/img/ioBroker/1653911602309-3ccd8404-afe3-4182-953c-2172ca1f0a09-image.png differ diff --git a/docs/img/ioBroker/1653911665919-1f0dbb8b-a057-4237-a5c7-df7728a255c6-image.png b/docs/img/ioBroker/1653911665919-1f0dbb8b-a057-4237-a5c7-df7728a255c6-image.png new file mode 100644 index 00000000..142d75de Binary files /dev/null and b/docs/img/ioBroker/1653911665919-1f0dbb8b-a057-4237-a5c7-df7728a255c6-image.png differ diff --git a/docs/img/ioBroker/1653912015692-56982014-6811-49cc-9be3-bed78436ef57-image.png b/docs/img/ioBroker/1653912015692-56982014-6811-49cc-9be3-bed78436ef57-image.png new file mode 100644 index 00000000..1ba0e6c3 Binary files /dev/null and b/docs/img/ioBroker/1653912015692-56982014-6811-49cc-9be3-bed78436ef57-image.png differ diff --git a/docs/img/ioBroker/1653912072019-a9814dc5-887b-4f8b-bb5b-742e104897b3-image.png b/docs/img/ioBroker/1653912072019-a9814dc5-887b-4f8b-bb5b-742e104897b3-image.png new file mode 100644 index 00000000..7db94d28 Binary files /dev/null and b/docs/img/ioBroker/1653912072019-a9814dc5-887b-4f8b-bb5b-742e104897b3-image.png differ diff --git a/docs/img/ioBroker/1653912124055-07fe0047-d38f-45c9-92f9-3811c80be0e8-image.png b/docs/img/ioBroker/1653912124055-07fe0047-d38f-45c9-92f9-3811c80be0e8-image.png new file mode 100644 index 00000000..0bc6d4dc Binary files /dev/null and b/docs/img/ioBroker/1653912124055-07fe0047-d38f-45c9-92f9-3811c80be0e8-image.png differ diff --git a/docs/img/ioBroker/1653912663013-e0c99373-2e72-4f18-827d-5050f8d41962-image.png b/docs/img/ioBroker/1653912663013-e0c99373-2e72-4f18-827d-5050f8d41962-image.png new file mode 100644 index 00000000..ef829e94 Binary files /dev/null and b/docs/img/ioBroker/1653912663013-e0c99373-2e72-4f18-827d-5050f8d41962-image.png differ diff --git a/docs/img/ioBroker/1653912758425-bbf8f99d-8f37-4903-9aa8-3b7decab2577-image.png b/docs/img/ioBroker/1653912758425-bbf8f99d-8f37-4903-9aa8-3b7decab2577-image.png new file mode 100644 index 00000000..7d8409b3 Binary files /dev/null and b/docs/img/ioBroker/1653912758425-bbf8f99d-8f37-4903-9aa8-3b7decab2577-image.png differ diff --git a/docs/img/ioBroker/1653912863870-d8fcfee4-3137-4bae-85ba-6b70106c77c1-image.png b/docs/img/ioBroker/1653912863870-d8fcfee4-3137-4bae-85ba-6b70106c77c1-image.png new file mode 100644 index 00000000..09f00169 Binary files /dev/null and b/docs/img/ioBroker/1653912863870-d8fcfee4-3137-4bae-85ba-6b70106c77c1-image.png differ diff --git a/docs/img/ioBroker/1653912902052-7f1f6db2-1d67-4b59-86c6-c06d4e8f4c2a-image.png b/docs/img/ioBroker/1653912902052-7f1f6db2-1d67-4b59-86c6-c06d4e8f4c2a-image.png new file mode 100644 index 00000000..974da5bd Binary files /dev/null and b/docs/img/ioBroker/1653912902052-7f1f6db2-1d67-4b59-86c6-c06d4e8f4c2a-image.png differ diff --git a/docs/img/ioBroker/1653912933681-da3057b5-db2c-4b61-8716-8b2114e09aee-image.png b/docs/img/ioBroker/1653912933681-da3057b5-db2c-4b61-8716-8b2114e09aee-image.png new file mode 100644 index 00000000..7012a7da Binary files /dev/null and b/docs/img/ioBroker/1653912933681-da3057b5-db2c-4b61-8716-8b2114e09aee-image.png differ diff --git a/docs/img/ioBroker/1653912960049-1ba6c1ff-d682-4368-b36a-4952aed4bcbe-image.png b/docs/img/ioBroker/1653912960049-1ba6c1ff-d682-4368-b36a-4952aed4bcbe-image.png new file mode 100644 index 00000000..277e29d7 Binary files /dev/null and b/docs/img/ioBroker/1653912960049-1ba6c1ff-d682-4368-b36a-4952aed4bcbe-image.png differ diff --git a/docs/img/ioBroker/1653912981365-9c36cfd7-b586-41db-8b4a-d68734dbbaae-image.png b/docs/img/ioBroker/1653912981365-9c36cfd7-b586-41db-8b4a-d68734dbbaae-image.png new file mode 100644 index 00000000..cc943bc8 Binary files /dev/null and b/docs/img/ioBroker/1653912981365-9c36cfd7-b586-41db-8b4a-d68734dbbaae-image.png differ diff --git a/docs/img/ioBroker/1653913018089-d874876a-a190-4fab-b2a2-5a0f0bb0f62a-image.png b/docs/img/ioBroker/1653913018089-d874876a-a190-4fab-b2a2-5a0f0bb0f62a-image.png new file mode 100644 index 00000000..df9ba4e3 Binary files /dev/null and b/docs/img/ioBroker/1653913018089-d874876a-a190-4fab-b2a2-5a0f0bb0f62a-image.png differ diff --git a/docs/img/ioBroker/1653913181184-9e702c46-e5d1-452b-a60b-e5068cb64750-image.png b/docs/img/ioBroker/1653913181184-9e702c46-e5d1-452b-a60b-e5068cb64750-image.png new file mode 100644 index 00000000..20294465 Binary files /dev/null and b/docs/img/ioBroker/1653913181184-9e702c46-e5d1-452b-a60b-e5068cb64750-image.png differ diff --git a/docs/img/ioBroker/1653913221457-8f8e9ecc-a4b2-48f1-b9b1-4fe68b4b2574-image.png b/docs/img/ioBroker/1653913221457-8f8e9ecc-a4b2-48f1-b9b1-4fe68b4b2574-image.png new file mode 100644 index 00000000..0b24e016 Binary files /dev/null and b/docs/img/ioBroker/1653913221457-8f8e9ecc-a4b2-48f1-b9b1-4fe68b4b2574-image.png differ diff --git a/docs/img/ioBroker/1653913242372-7b7c21e6-02aa-4a3e-bb25-c8127689d801-image.png b/docs/img/ioBroker/1653913242372-7b7c21e6-02aa-4a3e-bb25-c8127689d801-image.png new file mode 100644 index 00000000..8e131c16 Binary files /dev/null and b/docs/img/ioBroker/1653913242372-7b7c21e6-02aa-4a3e-bb25-c8127689d801-image.png differ diff --git a/docs/img/ioBroker/1653913274663-bd7783f7-9365-4333-b5bc-872ca92fd4b7-image.png b/docs/img/ioBroker/1653913274663-bd7783f7-9365-4333-b5bc-872ca92fd4b7-image.png new file mode 100644 index 00000000..23dbbcee Binary files /dev/null and b/docs/img/ioBroker/1653913274663-bd7783f7-9365-4333-b5bc-872ca92fd4b7-image.png differ diff --git a/docs/img/ioBroker/1653913546138-4f4f6005-7cfd-444d-9b9a-14703194781d-image.png b/docs/img/ioBroker/1653913546138-4f4f6005-7cfd-444d-9b9a-14703194781d-image.png new file mode 100644 index 00000000..35880881 Binary files /dev/null and b/docs/img/ioBroker/1653913546138-4f4f6005-7cfd-444d-9b9a-14703194781d-image.png differ diff --git a/docs/img/ioBroker/1653914178326-2dca9c22-df47-4c29-8e16-bc0323101cb1-image.png b/docs/img/ioBroker/1653914178326-2dca9c22-df47-4c29-8e16-bc0323101cb1-image.png new file mode 100644 index 00000000..78e290e8 Binary files /dev/null and b/docs/img/ioBroker/1653914178326-2dca9c22-df47-4c29-8e16-bc0323101cb1-image.png differ diff --git a/docs/img/ioBroker/1653916806795-3ca891dc-0892-4ed4-8c44-384899cbb460-image.png b/docs/img/ioBroker/1653916806795-3ca891dc-0892-4ed4-8c44-384899cbb460-image.png new file mode 100644 index 00000000..a87d8b5b Binary files /dev/null and b/docs/img/ioBroker/1653916806795-3ca891dc-0892-4ed4-8c44-384899cbb460-image.png differ diff --git a/docs/img/ioBroker/1653929221491-6b8c8b7a-331e-4fc1-867b-4ce69705fd0a-image.png b/docs/img/ioBroker/1653929221491-6b8c8b7a-331e-4fc1-867b-4ce69705fd0a-image.png new file mode 100644 index 00000000..17c4d2a7 Binary files /dev/null and b/docs/img/ioBroker/1653929221491-6b8c8b7a-331e-4fc1-867b-4ce69705fd0a-image.png differ diff --git a/docs/img/ioBroker/1653929268828-8a0ce26c-c49c-4bc3-b2ca-bc4897febd09-image.png b/docs/img/ioBroker/1653929268828-8a0ce26c-c49c-4bc3-b2ca-bc4897febd09-image.png new file mode 100644 index 00000000..22f822f8 Binary files /dev/null and b/docs/img/ioBroker/1653929268828-8a0ce26c-c49c-4bc3-b2ca-bc4897febd09-image.png differ diff --git a/docs/img/ioBroker/1653936380574-098059be-4996-403b-a7a7-653915f10204-image.png b/docs/img/ioBroker/1653936380574-098059be-4996-403b-a7a7-653915f10204-image.png new file mode 100644 index 00000000..879d8396 Binary files /dev/null and b/docs/img/ioBroker/1653936380574-098059be-4996-403b-a7a7-653915f10204-image.png differ diff --git a/docs/img/message-flow.png b/docs/img/message-flow.png new file mode 100644 index 00000000..a7d08c86 Binary files /dev/null and b/docs/img/message-flow.png differ diff --git a/docs/img/mqtt-config-sucess.png b/docs/img/mqtt-config-sucess.png new file mode 100644 index 00000000..055581ac Binary files /dev/null and b/docs/img/mqtt-config-sucess.png differ diff --git a/docs/img/nodered-remote-control.png b/docs/img/nodered-remote-control.png new file mode 100644 index 00000000..63a0ccbd Binary files /dev/null and b/docs/img/nodered-remote-control.png differ diff --git a/docs/img/nspanel-rl.png b/docs/img/nspanel-rl.png new file mode 100644 index 00000000..7660dea2 Binary files /dev/null and b/docs/img/nspanel-rl.png differ diff --git a/docs/img/screens-us-p.png b/docs/img/screens-us-p.png new file mode 100644 index 00000000..ecd6a7b0 Binary files /dev/null and b/docs/img/screens-us-p.png differ diff --git a/docs/img/screens.png b/docs/img/screens.png new file mode 100644 index 00000000..8889598e Binary files /dev/null and b/docs/img/screens.png differ diff --git a/docs/img/tasmota-mqtt-config.png b/docs/img/tasmota-mqtt-config.png new file mode 100644 index 00000000..95b24dd1 Binary files /dev/null and b/docs/img/tasmota-mqtt-config.png differ diff --git a/docs/img/tasmota-template-config.png b/docs/img/tasmota-template-config.png new file mode 100644 index 00000000..a33d19a9 Binary files /dev/null and b/docs/img/tasmota-template-config.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..5ba8c7ea --- /dev/null +++ b/docs/index.md @@ -0,0 +1,54 @@ +# Overview + +If you like this project consider buying me a pizza 🍕 + +[![hacs_badge](https://img.shields.io/badge/HACS-Default-41BDF5.svg)](https://github.com/hacs/integration) +![hacs validation](https://github.com/joBr99/nspanel-lovelace-ui/actions/workflows/hacs-validation.yaml/badge.svg) +[![Man Hours](https://img.shields.io/endpoint?url=https%3A%2F%2Fmh.jessemillar.com%2Fhours%3Frepo%3Dhttps%3A%2F%2Fgithub.com%2FjoBr99%2Fnspanel-lovelace-ui.git)](https://jessemillar.com/r/man-hours) + +NsPanel Lovelace UI is a Firmware for the nextion screen inside of NSPanel in the Design of [HomeAssistant](https://www.home-assistant.io/)'s Lovelace UI Design. + +**EU Model and US Model supported (in portrait and landscape orientation)** + +Content of the screen is controlled by a AppDaemon Python Script installed on your HomeAssistant Instance. + +Or an TypeScript on your ioBroker Instance in case you are an ioBroker User. + +NsPanel needs to be flashed with Tasmota (or upcoming with ESPHome) + +![nspanel-rl](img/nspanel-rl.png) + +## Features + +- Entities Page +- Grid Page +- Detail Pages for Lights (Brightness, Temperature and Color of the Light) and for Covers (Position) +- Thermostat Page +- Media Player Card +- Alarm Control Card +- Screensaver Page with Time, Date and Weather Information +- Card with QrCode to display WiFi Information +- Localization (currently 40 languages) + +- **Everything is dynamically configurable by a yaml config, no need to code or touch Nextion Editor** + +It works with [Tasmota](https://tasmota.github.io/docs/) and MQTT. +To control the panel and update it with content from HomeAssistant there is an [AppDaemon](https://github.com/AppDaemon/appdaemon) App. + +See the following picture to get an idea of the look of this firmware for NSPanel. + +![screens](img/screens.png) + +Some (not all) screenshots from the US Portrait Version: + +![screens-us-p](img/screens-us-p.png) + +## Requirements + + - NSPanel + - USB to Serial TTL Adapter + - Running Instance of the Home Automation Platform of your Choise + - Running [Home Assistant Instance](https://www.home-assistant.io/installation/) + - with installed [MQTT Broker](https://www.home-assistant.io/docs/mqtt/broker) + - Running [ioBroker Instance](https://www.iobroker.net/#en/documentation) + - with installed MQTT Broker diff --git a/docs/iobroker-install.md b/docs/iobroker-install.md new file mode 100644 index 00000000..512d6b0b --- /dev/null +++ b/docs/iobroker-install.md @@ -0,0 +1,255 @@ +# Installation - ioBroker +The Backend for ioBroker is maintained by [britzelpuf](https://github.com/britzelpuf) and [armilar](https://github.com/armilar) + +https://forum.iobroker.net/topic/50888/sonoff-nspanel/612?_=1654980976439 + +**Step fĂŒr Step - Anleitung zur Einrichtung eines Sonoff NSPanel mit Lovelace UI unter ioBroker** + +![219c8bad-2af0-42e6-a041-b4ba319ca96d-image.png](img/ioBroker/1653910838009-219c8bad-2af0-42e6-a041-b4ba319ca96d-image.png) +**1. Voraussetzungen fĂŒr den ioBroker** + +FĂŒr den Betrieb benötigst du „keinen“ ioBroker-lovelace-Adapter. Die komplette lovelace-Integration erfolgt ĂŒber die TFT-Firmware und die nachfolgenden ioBroker-Adapter. + +* **%(#666)[MQTT-Adapter]** +![3ccd8404-afe3-4182-953c-2172ca1f0a09-image.png](img/ioBroker/1653911602309-3ccd8404-afe3-4182-953c-2172ca1f0a09-image.png) +Die Kommunikation zwischen dem NSPanel und ioBroker erfolgt mittels MQTT ĂŒber Tasmota. Da der Datenpunkt „CustomSend“ erforderlich ist und dieser nicht im Sonoff-Adapter vorhanden ist und auch nicht durch das Skript angelegt werden kann, erfolgt die Kommunikation „nicht“ ĂŒber den Sonoff-Adapter --> spĂ€ter mehr 
 +* **%(#666)[Javascript-Adapter]** +Es werden zwei Type-Skripte (TS = das etwas mĂ€chtigere Javascript) benötigt. Zum Einen ein Icon-Skript, da alle verwendeten Icons nicht als „echte Grafiken“ im Panel hinterlegt sind, sondern als Schriftzeichen-Symbole. Des Weiteren ein TS-Skript mit dem eigentlichen Laufzeit-Code, welches fĂŒr jedes eingesetzte NSPanel vorhanden und konfiguriert sein sollte --> spĂ€ter mehr 
 +* **%(#666)[GerĂ€te verwalten“-Adapter]** +![bae0913f-fb3f-4856-90d1-eebb70b5a89a-image.png](img/ioBroker/1653911536657-bae0913f-fb3f-4856-90d1-eebb70b5a89a-image.png) +Über diesen Adapter sollten die Aliase spĂ€ter (mit Ausnahme des Media-Alias fĂŒr Alexa & Co.) erstellt werden --> spĂ€ter mehr 
 +* **%(#666)[Accu-Weather-Adapter]** +![1f0dbb8b-a057-4237-a5c7-df7728a255c6-image.png](img/ioBroker/1653911665919-1f0dbb8b-a057-4237-a5c7-df7728a255c6-image.png) +Spielt in erster Linie eine Rolle beim Screensaver-Wetter, da zum Ersten die Icons und die Temperatur-Informationen fĂŒr den Forecast ausgelesen werden (falls genutzt) und zum Zweiten das aktuelle Wettericon fĂŒr den Screensaver benötigt wird. Wer keine Wetterstation oder Außentemperatursensor hat, kann auch die Temperatur aus Accu-Weather importieren --> spĂ€ter mehr 
 +* **%(#666)[Alexa2-Adapter]** +Zur Visualisierung des Media-Player‘s sollte der Alexa2-Adapter installiert sein. Wenn du statt Alexa-Devices andere Hersteller wie z.B. Google-Home-GerĂ€te oder in erster Linie der Spotify-Premium-Adapter im Einsatz hast, so ist es auch möglich mit einem entsprechend, alternativen Media-Adapter den Media-Player zu betreiben --> spĂ€ter mehr 
 + +**2. Panel mit Tasmota flashen.** +Hierzu eignet sich fĂŒr den "Hardwareteil" die Anleitung von haus-automatisierung.com + +(**https://www.youtube.com/watch?v=uqPz08ZpFW8**). Video bis 11 Minuten und 30 Sekunden befolgen! + +Die Beschreibung, wie man das Panel mit Tasmota flashen kann, ohne einen Kurzschluss zu erzeugen, ist schon sehr gut erklĂ€rt. +Du installierst gleich einen „abweichenden“ Berry-Treiber (autoexec.be) als in der Video-Beschreibung genannt. Wenn du Tasmota und „noch nicht der Berry-Treiber“ installiert hast, bitte mit der Youtube-Video-Anleitung von Matthias ab Zeit=11:30 aufhören. Ich verwende in meinen Panels die Version „tasmota32-DE.bin“. Du kannst aber auch die „tasmota32-nspanel.bin“ verwenden. +Zur MQTT-Konfiguration kommen wir im Punkt 4 +An dieser Stelle solltest du aber bereits die grundsĂ€tzliche Tasmota Konfiguration vornehmen: + +a) Unter „Sonstige Einstellungen“ trĂ€gst du im Feld Vorlage +``` +{"NAME":"NSPanel","GPIO":[0,0,0,0,3872,0,0,0,0,0,32,0,0,0,0,225,0,480,224,1,0,0,0,33,0,0,0,0,0,0,0,0,0,0,4736,0],"FLAG":0,"BASE":1} +``` +ein, hakst Aktivieren "an" und klickst auf Speichern. Du kannst natĂŒrlich auch noch Device und Friendly Name vergeben +![3ca891dc-0892-4ed4-8c44-384899cbb460-image.png](img/ioBroker/1653916806795-3ca891dc-0892-4ed4-8c44-384899cbb460-image.png) +b) Unter Logging fĂŒgst du die IP von deinem ioBroker unter Sys-Log Host () ein und klickst auf Speichern. +c) Unter Konsolen/Konsole kannst du natĂŒrlich auch noch weitere Einstellungen vornehmen (ipaddress1 192.168.X.X fĂŒr statische IP’s, setOption’s, etc.) + + +**3. Berry-Treiber installieren** +Im Tasmota findest du unter „Konsolen“ den Button „Verwalte Dateisystem“. Wenn du diesen anklickst, siehst du einen weiteren Button „Datei erstellen und bearbeiten“. Du Ă€nderst den Dateinamen „neue-datei.txt“ in „autoexec.be“ und fĂŒgst den Inhalt aus dem folgenden Link ein: + +**https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be** + +![bbf8f99d-8f37-4903-9aa8-3b7decab2577-image.png](img/ioBroker/1653912758425-bbf8f99d-8f37-4903-9aa8-3b7decab2577-image.png) +Danach klickst du auf „Speichern“ und dann solltest du Tasmota rebooten. + +Wenn das Panel bereits unter einer anderen Variante (z.B. haus-automatisierung.com) installiert war, dann bitte alle Dateien (insbesondere autoexec.be und autoexec.bec) vorher ĂŒber das Flammensymbol hinter dem Dateinamen löschen. Und von vorne mit dem Punkt 3 beginnen +![e0c99373-2e72-4f18-827d-5050f8d41962-image.png](img/ioBroker/1653912663013-e0c99373-2e72-4f18-827d-5050f8d41962-image.png) + +**4. MQTT im Tasmota konfigurieren** + +Im Tasmota unter „Einstellungen/MQTT konfigurieren“: +a) Host deines ioBrokers vergeben +b) Den Port deiner ioBroker-MQTT-Adapter-Instanz eingeben (fĂŒr mqtt.0.). Wenn du noch keinen MQTT-Adapter installiert hast, dann verwende bitte nicht unbedingt den Standard-Port 1883. Dieser Port wird auch von anderen Pseudo-MQTT-Adaptern (Sonoff/Shelly/etc.) ebenfalls verwendet und fĂŒhrt im parallelen Betrieb mit anderen MQTT-Devices spĂ€ter unweigerlich zu Komplikationen. Ich verwende fĂŒr die MQTT-Instanzen gerne einen Port ab 1886 oder 1887 oder 1888 oder höher. Das Problem zeigt sich in der Regel ab dem Zeitpunkt, an dem der „CustomSend“ nicht von deiner mqtt.0.-Instanz abonniert wird. +c) Benutzer und Passwort aus der ioBroker-MQTT-Instanz eintragen +d) Bei Client und topic trage ich in der Regel „NSPanel_X“ ein. (X = 1, 2, 3 oder WZ fĂŒr Wohnzimmer, etc.) +e) FĂŒr den full topic verwende ich in der Regel „SmartHome/%topic%/%prefix%/“. +f) Speichern klicken und Einstellungen verlassen + +![76749e7d-c630-406c-9d2b-a2424521fa96-image.png](img/ioBroker/1653909770906-76749e7d-c630-406c-9d2b-a2424521fa96-image.png) + + +**5. TFT-Firmware auf das Panel flashen** +Tasmota „Konsolen/Konsole“ öffnen und in die Kommandozeile + +``` +FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v2.9.0.tft +``` + +eingeben, mit Enter bestĂ€tigen. Das Panel installiert jetzt die TFT-Firmware (Kann beim ersten Mal ein paar Minuten dauern – Fortschritt beobachten – am Ende erfolgt ein Reboot und das Panel wechselt in einen Screen – „Waiting for Content“ +![4f4f6005-7cfd-444d-9b9a-14703194781d-image.png](img/ioBroker/1653913546138-4f4f6005-7cfd-444d-9b9a-14703194781d-image.png) + +Das Panel wartet jetzt auf den Input von deinem ioBroker-Skript (Installierst du in einem der nĂ€chsten Punkte 
) + +**6. MQTT im ioBroker installieren und konfigurieren** +Wenn du bereits eine Instanz des MQTT-Adapters (z.B. mqtt.0.) nutzt, dann bitte den Port der MQTT-Adapter-Instanz auch im Tasmota-MQTT verwenden. Bitte auch hier den Hinweis aus Punkt 4b beachten und ggf. einen anderen Port fĂŒr die Kommunikation eintragen. +Ansonsten wĂ€hlst du im ioBroker-MenĂŒ unter „Adapter“ den mqtt-Adapter aus und erstellst wie gewohnt eine Instanz des Adapters. Du kannst dir natĂŒrlich auch eine zusĂ€tzliche Instanz (z.B. mqtt.1. oder mqtt.2. etc.) erstellen. + +Meine Einstellungen im Reiter Verbindung sind z.B.: +a) IP = Server/Broker +b) WebSockets benutzen (angehakt) +c) IP Adresse des ioBrokers (wahrscheinlich eth0 oder eth1) auswĂ€hlen +d) Port 1886 (analog Port aus Tasmota/MQTT) +e) Benutzer (analog Benutzer aus Tasmota/MQTT) +f) Kennwort + Kennwort wiederholen (analog Passwort aus Tasmota/MQTT) + +![8182d534-bbe0-42a3-89b6-864bc30f9a17-image.png](img/ioBroker/1653909648857-8182d534-bbe0-42a3-89b6-864bc30f9a17-image.png) + +Meine Einstellungen im Reiter MQTT-Einstellungen sind: +a) Maske zum Bekanntgeben eigener States: mqtt.0.* (Bei zusĂ€tzlicher Instanz entsprechend höher (mqtt.1.* etc.) +b) Eigene States beim Verbinden publizieren (angehakt) +c) States bei subscribe publizieren (angehakt) +d) Leere Session erzwingen: Client-Einstellungen verwenden + +![f184fc26-229d-4a75-84cc-74fda631c527-image.png](img/ioBroker/1653909565560-f184fc26-229d-4a75-84cc-74fda631c527-image.png) + +**7. CustomSend anlegen** +Der MQTT Datenpunkt wird benötigt und muss vom MQTT-Adapter angelegt werden. Ein manuelles Anlegen unter „Objekte“ oder „createState“ ist im ioBroker „nicht mehr“ möglich. Um den Datenpunkt zu erzeugen, öffnest du im Tasmota die Konsole und gibst ohne die AnfĂŒhrungszeichen +``` +„CustomSend time~12:00“ +``` +ein. Alternativ kann auch der MQTT-Explorer genutzt werden und ein payload unter .../cmnd abgesendet werden. Danach sollte im MQTT-Adapter unter Objekte ein Datenpunkt: „**SmartHome/NSPanel_X/cmnd/CustomSend**“ erscheinen. Falls nicht, solange wiederholen bis dieser Datenpunkt abonniert wurde, oder ggfs. Nochmals die MQTT-Einstellungen ĂŒberprĂŒfen. In den Vergangenen Fragen dieses Topics ging es hĂ€ufiger um diesen Punkt. + +**8. Icon „TypeScript“ unter „Skripte“ im Verzeichnis „global“ anlegen** +Wie bereits in der Einleitung erwĂ€hnt, werden zwei TypeScripts (TS) benötigt. Das erste ist das Icon-Skript. Das Icon-Skript dient zur Übersetzung von Schriftzeichensymbolen zwischen dem Skript und der TFT-Firmware. +Unter dem grĂŒnen Vezeichnisbaum „global“ im ioBroker-MenĂŒpunkt Skripte erzeugst du ein Skript mit dem Namen „IconsSelector“ vom Typ: TypeScript (TS). Dort fĂŒgst du den Inhalt der Datei: + +**https://github.com/Armilar/nspanel-lovelace-ui/blob/main/ioBroker/icon_mapping.ts** + +ein und startest das Skript. + +Nur zur Info: Du kannst die einzelnen Icon-Symbolnamen (aktuell 6896 unterschiedliche Icon-Symbole) auf + +**https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html** + +einsehen und spĂ€ter (kommen wir bei der Alias-Erstellung noch zu) auch jedes Icon in deinem Panel an entsprechender Stelle verwenden. FĂŒr die Einbindung sind die „Namen“ der Icons wichtig. + +**9. TypeScript „NSPanelTs.ts“ anlegen** +Unter dem regulĂ€ren Vezeichnisbaum „common“ im ioBroker-MenĂŒpunkt Skripte erzeugst du (gerne auch in weiteren Unterverzeichnissen) ein weiteres Skript (Aktuell in fĂŒr die TFT-Version 2.9.0) mit dem Inhalt: + +**https://github.com/jobr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts** + +FĂŒr jedes einzelne NSPanel das du konfigurieren möchtest, musst du dieses Skript anlegen und speziell fĂŒr dieses jeweilige NSPanel entsprechende Einstellungen vornehmen. FĂŒr den Skriptnamen verwende ich in der Regel eine Kombination aus Panel und Skriptversion, wie z.B.: NSPANEL_1_2.9.0 + +(Es kommen in regelmĂ€ĂŸigen AbstĂ€nden weitere NSPanel-Features und Bug-Fixes in das GitHub-Skript in denen dann nur noch der untere Teil (--- ab hier keine Konfiguration mehr ---) ausgetauscht werden muss und die NSPanel-Parameter erhalten bleiben) + +Die aktuelle Änderung von 2.8.0 auf 2.9.0 ist z.B.: + +* Steuerung von KlimagerĂ€ten/Klimaanlagen +![0735190e-11c3-4bc2-bfd1-5899b8ee0eed-image.png](img/ioBroker/1653910414137-0735190e-11c3-4bc2-bfd1-5899b8ee0eed-image.png) + +* QR-Code fĂŒr z.B. GĂ€ste WLAN +![a43e9656-891a-42ef-90cc-f9ed61850d4b-image.png](img/ioBroker/1653910476255-a43e9656-891a-42ef-90cc-f9ed61850d4b-image.png) + +* Neues Design fĂŒr Thermostate +![abd817a4-db10-45dc-9d5c-9adf6151dac5-image.png](img/ioBroker/1653910570137-abd817a4-db10-45dc-9d5c-9adf6151dac5-image.png) + +* etc. + +Im oberen Teil des Skripts sind die grundsĂ€tzlichen Teile der zu erstellenden Aliase, Konstanten und Variablen (auch Seiten) enthalten. An dieser Stelle ist zunĂ€chst wichtig, die Kommunikationsparameter fĂŒr die MQTT-Kommunikation zu parametrieren (ab ca. Zeile 400) beginnend mit +``` +„export const config: Config = { +``` + + +Hier musst du die beiden nachfolgenden Kommunikations-Datenpunkte aus dem MQTT-Adapter eintragen: +``` +panelRecvTopic: "mqtt.0.SmartHome.NSPanel_1.tele.RESULT", //bitte anpassen +panelSendTopic: "mqtt.0.SmartHome.NSPanel_1.cmnd.CustomSend", //bitte anpassen +``` + +Falls abweichend, dann am besten direkt unter Objekte herauskopieren + +Bitte starte das Skript. Alle weiteren Parameter stellen wir spĂ€ter ein. Ab jetzt sollte der Startup-Screen „Waiting for Connection“ in den Sreensaver wechseln und minĂŒtlich die Uhrzeit an den Screensaver ĂŒbertragen und das Datum aktualisiert werden. + +**10. TypeScript konfigurieren** +Im Punkt 9 haben wir zunĂ€chst die nur Kommunikation zwischen Panel und Skript ĂŒber MQTT hergestellt. Jetzt kommen wir zum Inhalt des Panels: + +**Der untere Bereich vom Screensaver:** + +**a) Die 4 kleineren Icons** +Hier kannst du dich entscheiden, ob du die Wettervorhersage oder eigene Werte visualisieren möchtest. Wenn du dich fĂŒr den Forecast entscheidest, dann muss die Variable +``` +var weatherForecast +``` +auf „true“ stehen. Ebenfalls sollte die Adapter-Instanz von Accu-Weather funktionsfĂ€hig eingerichtet sein. FĂŒr diese Werte ist kein Alias notwendig, da diese zur Laufzeit direkt aus dem Adapter ausgelesen werden. +Möchtest du an dieser Stelle eigene Werte visualisieren, dann muss die Variable +``` +var weatherForecast +``` +auf „false“ stehen. Jetzt kannst du im Block beginnend mit +``` +export const config: Config = { +``` +die Datenpunkte ***firstScreensaverEntity bis fourthScreensaverEntity*** mit eigenen Datenpunkten fĂŒllen. +Eine Ausnahme stellt das große Wetter-Icon und der Wert fĂŒr die aktuelle Temperatur im Screensaver dar. HierfĂŒr benötigen wir einen Alias (im nĂ€chsten Punkt) + +**b) Diverse Datenpunkte** +Beim ersten Start des Scripts erzeugt das Skript unter 0_userdata diverse Datenpunkte fĂŒr Screensaver Dimmode, interne Sensoren, Tasmota-Statuswerte, etc. +Der Pfad kann im Skript unter „NSPanel_Path“ angepasst werden. + +**c) Alexa** +Wenn du Alexa-Devices mit dem Media-Player nutzen möchtest, dann stelle noch das Standard-Alexa-Device (Seriennummer unter „var alexaDevice“) ein. +Ebenso kannst du unter alexaSpeakerList eine Liste mit vorhandenen Alexa-Devices (und/oder Gruppen) anlegen, die von diesem NSPanel-MediaPlayer aus bedient werden sollen. Bleibt diese Liste leer, werden automatisch alle Devices aus dem Alexa2-Adapter importiert. + +**11. Aliase Anlegen** +Jetzt kommt der eigentliche Teil der Seitengestaltung. Es werden keine Datenpunkte benötigt, sondern Aliase. +Ein Alias ist „kein“ Datenpunkt, sondern ein Objekt mit mehreren Datenpunkten. +Das Skript setzt entsprechende Trigger auf die Alias-Datenpunkte .SET, .GET, .ACTUAL usw. Deshalb werden deine Steuerelemente im Panel nicht greifen, wenn du mit einzelnen Datenpunkten aus den verschiedenen Adaptern arbeitest. +Ich habe im Verlauf diverse Aliase erzeugt und auch in den ChangeLogs der jeweiligen Skript-Version sind die möglichen Aliase aufgefĂŒhrt, daher gehe ich hier nicht (wĂŒrde die Anleitung auch sprengen) im Detail auf die Aliase ein. +Was brauche ich fĂŒr einen Alias: +a) ZunĂ€chst installierst du dir eine Instanz des Adapters „GerĂ€te verwalten“ +b) Dann erstellst du dir einen Alias (Beispiel Wetter-Icon und aktueller Wert der Außentemperatur) Dieser Alias muss nur einmalig angelegt werden und funktioniert somit auch in jedem weiteren Panel. +![56982014-6811-49cc-9be3-bed78436ef57-image.png](/assets/uploads/files/1653912015692-56982014-6811-49cc-9be3-bed78436ef57-image.png) +und etwas tiefer: +![a9814dc5-887b-4f8b-bb5b-742e104897b3-image.png](/assets/uploads/files/1653912072019-a9814dc5-887b-4f8b-bb5b-742e104897b3-image.png) +c) Wenn du einen Alias fĂŒr den Media-Player benötigst, dann erstelle die diesen Alias besser ĂŒber den Adapter „Alias-Manager“, +![07fe0047-d38f-45c9-92f9-3811c80be0e8-image.png](/assets/uploads/files/1653912124055-07fe0047-d38f-45c9-92f9-3811c80be0e8-image.png) +da der Adapter „GerĂ€te verwalten“ bei diesem Alias nicht ordentlich arbeitet. Jedoch ist der auch so Komplex, das es fĂŒr Alias-AnfĂ€nger schwer ist, einen Alias mit den korrekten Datenpunkten zu fĂŒllen. + +**12. Seitengestaltung** + +Am Besten benutzt ihr die Beispiele im Skript und legt entsprechende Aliase hierzu an, die auch in diesem ioBroker-Community-Topic innerhalb der letzten Wochen beschrieben wurden. + +Und noch ein paar Bilderchen: + +cardEntities mit Alias Lampe/Dimmer/Switch +![d8fcfee4-3137-4bae-85ba-6b70106c77c1-image.png](img/ioBroker/1653912863870-d8fcfee4-3137-4bae-85ba-6b70106c77c1-image.png) + +cardEntities mit RGB und HUE Aliasen (Color) +![7f1f6db2-1d67-4b59-86c6-c06d4e8f4c2a-image.png](img/ioBroker/1653912902052-7f1f6db2-1d67-4b59-86c6-c06d4e8f4c2a-image.png) + +popupLight mit Farbtemperatur und Brightness +![da3057b5-db2c-4b61-8716-8b2114e09aee-image.png](img/ioBroker/1653912933681-da3057b5-db2c-4b61-8716-8b2114e09aee-image.png) + +popupLight mit ColorWheel +![1ba6c1ff-d682-4368-b36a-4952aed4bcbe-image.png](img/ioBroker/1653912960049-1ba6c1ff-d682-4368-b36a-4952aed4bcbe-image.png) + +cardGrid mit Radiosendern/Playlists (Alias Taste) +![6b8c8b7a-331e-4fc1-867b-4ce69705fd0a-image.png](img/ioBroker/1653929221491-6b8c8b7a-331e-4fc1-867b-4ce69705fd0a-image.png) + +cardEntities mit Aliasen LautstĂ€rke und Info +![9c36cfd7-b586-41db-8b4a-d68734dbbaae-image.png](img/ioBroker/1653912981365-9c36cfd7-b586-41db-8b4a-d68734dbbaae-image.png) + +cardEntities mit Fenster, TĂŒr, Jalousie und Verschluss +![d874876a-a190-4fab-b2a2-5a0f0bb0f62a-image.png](img/ioBroker/1653913018089-d874876a-a190-4fab-b2a2-5a0f0bb0f62a-image.png) + +cardEntities mit Abfallkalender +![098059be-4996-403b-a7a7-653915f10204-image.png](img/ioBroker/1653936380574-098059be-4996-403b-a7a7-653915f10204-image.png) + +cardMedia +![9e702c46-e5d1-452b-a60b-e5068cb64750-image.png](img/ioBroker/1653913181184-9e702c46-e5d1-452b-a60b-e5068cb64750-image.png) + +cardAlarm +![8f8e9ecc-a4b2-48f1-b9b1-4fe68b4b2574-image.png](img/ioBroker/1653913221457-8f8e9ecc-a4b2-48f1-b9b1-4fe68b4b2574-image.png) + +cardGrid +![8a0ce26c-c49c-4bc3-b2ca-bc4897febd09-image.png](img/ioBroker/1653929268828-8a0ce26c-c49c-4bc3-b2ca-bc4897febd09-image.png) + +cardEntities +![7b7c21e6-02aa-4a3e-bb25-c8127689d801-image.png](img/ioBroker/1653913242372-7b7c21e6-02aa-4a3e-bb25-c8127689d801-image.png) + +cardEntities als Subpage unter cardEntities (verschachtelt) +![bd7783f7-9365-4333-b5bc-872ca92fd4b7-image.png](img/ioBroker/1653913274663-bd7783f7-9365-4333-b5bc-872ca92fd4b7-image.png) + +cardNotify +![2dca9c22-df47-4c29-8e16-bc0323101cb1-image.png](img/ioBroker/1653914178326-2dca9c22-df47-4c29-8e16-bc0323101cb1-image.png) diff --git a/docs/notifications.md b/docs/notifications.md new file mode 100644 index 00000000..e4eaf1c8 --- /dev/null +++ b/docs/notifications.md @@ -0,0 +1,85 @@ +# Sending Notifications to the Panel + +There are two notification types, that can be triggered by sending a command over mqtt to the panel here are examples for homeassistant scripts: + +
+Seperate Page +
+ + This is the notification used by the backend for updates, opening it requires to the following commands to the CustomSend Topic: + + `pageType popupNotify` + + `entityUpdateDetail~internalName~heading~headingColor~button1text~button1color~button2text~tB2Color~notificationText~textColor~sleepTimeout` + + It is possible to exit from the page by sending `exitPopup` + +Send Message to the Panel combined with a buzzer sound: + + ```yaml +nspanel_popup_notification: + alias: Popup Notification + sequence: + - service: mqtt.publish + data: + topic: cmnd/tasmota_NsPanelTerrasse/Backlog + payload: CustomSend pageType~popupNotify; CustomSend entityUpdateDetail~id~{{ + title }}~65535~~~~~{{ message }}~65535~{{ timeout }}; Buzzer 2,2,2 + mode: single + icon: mdi:message-badge + ``` + +Send Message to the Panel: + + ```yaml +nspanel_popup_notification: + alias: Popup Notification + sequence: + - service: mqtt.publish + data: + topic: cmnd/tasmota_NsPanelTerrasse/Backlog + payload: CustomSend pageType~popupNotify; CustomSend entityUpdateDetail~id~{{ + title }}~65535~~~~~{{ message }}~65535~{{ timeout }} + mode: single + icon: mdi:message-badge + ``` +
+ + +
+Notification on screensaver +
+ + The screensaver can display Notifications by sending this command to the CustomSend topic: `notify~heading~text` + + +Send Message to the Screensaver combined with a buzzer sound: + + ```yaml +nspanel_screensaver_notification: + alias: Screensaver Notification + sequence: + - service: mqtt.publish + data: + topic: cmnd/tasmota_NsPanelTerrasse/Backlog + payload: CustomSend notify~{{ heading }}~{{ message }}; Buzzer 2,2,2 + mode: single + icon: mdi:message-badge + ``` + +Send Message to the Screensaver: + + ```yaml +nspanel_screensaver_notification: + alias: Screensaver Notification + sequence: + - service: mqtt.publish + data: + topic: cmnd/tasmota_NsPanelTerrasse/Backlog + payload: CustomSend notify~{{ heading }}~{{ message }} + mode: single + icon: mdi:message-badge + ``` + +
+ diff --git a/docs/phys-btn.md b/docs/phys-btn.md new file mode 100644 index 00000000..3885321f --- /dev/null +++ b/docs/phys-btn.md @@ -0,0 +1,29 @@ +# Change behaviour of hardware buttons + +## Tasmota Rules + +You can configure the buttons to mimic an UI element on the screen by configuring tasmota rules. + +The following rule will change the behaviour of the two buttons to do page navigation. + +``` +Rule2 on Button1#state do Publish tele/%topic%/RESULT {"CustomRecv":"event,buttonPress2,hwbtn,bPrev"} endon on Button2#state do Publish tele/%topic%/RESULT {"CustomRecv":"event,buttonPress2,hwbtn,bNext"} endon + +Rule2 1 +``` + +## Decouple buttons from controlling power outputs + +If you do not want your NSPanel physical buttons to trigger the relays and prefer to have them as software configurable buttons, open the Tasmota console of your NSPanel and enter the following: + +`SetOption73 1` + +Your relays will now appear as switches in HomeAssistant and you can control your buttons by using automations: + + ![image](https://user-images.githubusercontent.com/57167030/169677954-5b811d12-dab8-4415-89aa-e4196732765e.png) + +You may reverse this change by entering the following in the Tasmota console of your NSPanel: + +`SetOption73 0` + +Please note: Doing this will mean that if HomeAssistant is not working for any reason your buttons will not function correctly. diff --git a/docs/prepare_ha.md b/docs/prepare_ha.md new file mode 100644 index 00000000..611957f8 --- /dev/null +++ b/docs/prepare_ha.md @@ -0,0 +1,57 @@ +# Setup Home Assistant + +## Installing AppDaemon + +The backend application for HomeAssistant is written in a python for [AppDaemon](https://github.com/AppDaemon/appdaemon). +This means it requires a working and running installation of AppDaemon. + +The easiest way to install it is through Home Assistant's Supervisor Add-on Store, it will be automaticly connected to your Home Assistant Instance. + +![hass-add-on-store](img/hass-add-on-store.png) + +### Add babel package to AppDaemon Container (Optional) + +For localisation (date in your local language) you need to add the python package babel to your AppDaemon Installation. + +![appdaemon-babel](img/appdaemon-babel.png) + + +## Installing Studio Code Server + +You will need a way to edit the `apps.yaml` config file in the Appdaemon folder. +Install Studio Code Server from Home Assistant's Supervisor Add-on Store to easily edit configuration Files on your HomeAssistant Instance. + + +## Installing HomeAssistant Community Store + +HACS is the Home Assistant Community Store and allows for community integrations and +automations to be updated easily from the Home Assistant web user interface. +You will be notified of updates, and they can be installed by a click on a button. + +## Installing Lovelace AppDaemon Backend Application + +To install Lovelace UI Backend App with HACS, you will need to make sure that you enabled +AppDaemon automations in HACS, as these are not enabled by default: + +1. Click on `Configuration` on the left menu bar in Home Assistant Web UI +2. Select `Devices & Services` +3. Select `Integrations` +4. Find `HACS` and click on `Configure` +5. In the window that opens, make sure that `Enable AppDaemon apps discovery & tracking` + is checked, or check it and click `Submit` +6. If you just enabled this (or just installed HACS), you might have to wait a few minutes + as all repositories are being fetched; you might hit a GitHub rate limit, which might + then require you to wait a few hours for HACS to be fully configured. In this case, + you won't be able to proceed to the next steps until HACS is ready. + +Now, to install NSPanel Lovelace UI Backend with HACS, follow these steps: + +1. Click on `HACS` on the left menu bar in Home Assistant Web UI +2. Click on `Automations` in the right panel +3. Click on `Explore & download repositories` in the bottom right corner +4. Search for `NSPanel`, and click on `NSPanel Lovelace UI Backend` in the list that appears +5. In the bottom right corner of the panel that appears, click on + `Download this repository with HACS` +6. A confirmation panel will appear, click on `Download`, and wait for HACS to + proceed with the download +7. The Backend Application is now installed, and HACS will inform you when updates are available \ No newline at end of file diff --git a/docs/prepare_nspanel.md b/docs/prepare_nspanel.md new file mode 100644 index 00000000..b9ed2fc8 --- /dev/null +++ b/docs/prepare_nspanel.md @@ -0,0 +1,51 @@ +# Flash Tasmota to your NSPanel + +You need to connect to your nspanel via serial and flash tasmtoa [tasmota32-nspanel.factory.bin](https://tasmota.github.io/install/firmware/development/tasmota32-nspanel.factory.bin) to your NSPanel. +You can use the Tasmota Web Installer to do so. [Tasmota Web Installer](https://tasmota.github.io/install/) + +Checkout Blakadders Template Repo for more information on flashing, do not use the autoexec.be from this page. +[NSPanel Page of the Tasmota Template Repository](https://templates.blakadder.com/sonoff_NSPanel.html) + +## Configure Tasmota Template for NSPanel + +Configure the NSPanel template for Tasmota. (Go to Configuration and Configure Other and paste the template there, make sure to tick the activate checkbox) + +![tasmota-template-config](img/tasmota-template-config.png) + +You can use the following template or copy the one on the [Tasmota Template Repo Site](https://templates.blakadder.com/sonoff_NSPanel.html). + +`{"NAME":"NSPanel","GPIO":[0,0,0,0,3872,0,0,0,0,0,32,0,0,0,0,225,0,480,224,1,0,0,0,33,0,0,0,0,0,0,0,0,0,0,4736,0],"FLAG":0,"BASE":1,"CMND":"ADCParam 2,11200,10000,3950 | Sleep 0 | BuzzerPWM 1"}` + +After a reboot of tasmota your screen will light up with the stock display firmware. + +## Upload Berry Driver to Tasmota + +1. Download the autoexec.be from the repository: [Berry Driver](https://github.com/joBr99/nspanel-lovelace-ui/blob/main/tasmota/autoexec.be) + +2. Go to `Consoles` > `Manage File System` in Tasmota and upload the previously downloaded file. + +3. Restart your NSPanel + +## Flash Firmware to Nextion Screen + +Due the limitations of Berry, it's not possible to download the tft file directly from github, so I'm also renting a small server where you can download the file via HTTP. + +Use the one following commands to flash the latest release from this repository, just execute the following Command in Tasmota: + +EU Version: `FlashNextion http://nspanel.pky.eu/lui-release.tft` + +US Version Portrait: `FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft` + +US Version Landscape: `FlashNextion http://nspanel.pky.eu/lui-us-l-release.tft` + +
+Alternatively you can use your own webserver or the one build into HomeAssistant: +
+Upload the nspanel.tft from the lastest release to a Webserver (for example www folder of Home Assistant) and execute the following command in Tasmota Console. (Development Version: [tft file from HMI folder](HMI/nspanel.tft)) + +**Webserver must be HTTP, HTTPS is not supported, due to limitations of berry lang on tasmota** + +`FlashNextion http://ip-address-of-your-homeassistant:8123/local/nspanel.tft` +
+ + diff --git a/docs/prepare_nspanel2.md b/docs/prepare_nspanel2.md new file mode 100644 index 00000000..b9ed2fc8 --- /dev/null +++ b/docs/prepare_nspanel2.md @@ -0,0 +1,51 @@ +# Flash Tasmota to your NSPanel + +You need to connect to your nspanel via serial and flash tasmtoa [tasmota32-nspanel.factory.bin](https://tasmota.github.io/install/firmware/development/tasmota32-nspanel.factory.bin) to your NSPanel. +You can use the Tasmota Web Installer to do so. [Tasmota Web Installer](https://tasmota.github.io/install/) + +Checkout Blakadders Template Repo for more information on flashing, do not use the autoexec.be from this page. +[NSPanel Page of the Tasmota Template Repository](https://templates.blakadder.com/sonoff_NSPanel.html) + +## Configure Tasmota Template for NSPanel + +Configure the NSPanel template for Tasmota. (Go to Configuration and Configure Other and paste the template there, make sure to tick the activate checkbox) + +![tasmota-template-config](img/tasmota-template-config.png) + +You can use the following template or copy the one on the [Tasmota Template Repo Site](https://templates.blakadder.com/sonoff_NSPanel.html). + +`{"NAME":"NSPanel","GPIO":[0,0,0,0,3872,0,0,0,0,0,32,0,0,0,0,225,0,480,224,1,0,0,0,33,0,0,0,0,0,0,0,0,0,0,4736,0],"FLAG":0,"BASE":1,"CMND":"ADCParam 2,11200,10000,3950 | Sleep 0 | BuzzerPWM 1"}` + +After a reboot of tasmota your screen will light up with the stock display firmware. + +## Upload Berry Driver to Tasmota + +1. Download the autoexec.be from the repository: [Berry Driver](https://github.com/joBr99/nspanel-lovelace-ui/blob/main/tasmota/autoexec.be) + +2. Go to `Consoles` > `Manage File System` in Tasmota and upload the previously downloaded file. + +3. Restart your NSPanel + +## Flash Firmware to Nextion Screen + +Due the limitations of Berry, it's not possible to download the tft file directly from github, so I'm also renting a small server where you can download the file via HTTP. + +Use the one following commands to flash the latest release from this repository, just execute the following Command in Tasmota: + +EU Version: `FlashNextion http://nspanel.pky.eu/lui-release.tft` + +US Version Portrait: `FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft` + +US Version Landscape: `FlashNextion http://nspanel.pky.eu/lui-us-l-release.tft` + +
+Alternatively you can use your own webserver or the one build into HomeAssistant: +
+Upload the nspanel.tft from the lastest release to a Webserver (for example www folder of Home Assistant) and execute the following command in Tasmota Console. (Development Version: [tft file from HMI folder](HMI/nspanel.tft)) + +**Webserver must be HTTP, HTTPS is not supported, due to limitations of berry lang on tasmota** + +`FlashNextion http://ip-address-of-your-homeassistant:8123/local/nspanel.tft` +
+ + diff --git a/docs/subpages.md b/docs/subpages.md new file mode 100644 index 00000000..f9a2865c --- /dev/null +++ b/docs/subpages.md @@ -0,0 +1,18 @@ +# Subpages + +You can configure entities with with the prefix `navigate`, that are navigating to cards, in case it's hidden card, the navigation items will change and the arrow is bringing you back to the privious page. + +```yaml + - entity: navigate.cardGrid_testKey +``` + +will allow you to navigate to a cardGrid page with the configured key testKey + +```yaml + hiddenCards: + - type: cardGrid + title: Exmaple Grid + entities: + - entity: light.test_item + key: testKey +``` \ No newline at end of file diff --git a/ignore-id.py b/ignore-id.py deleted file mode 100644 index 10c2646b..00000000 --- a/ignore-id.py +++ /dev/null @@ -1,7 +0,0 @@ -attributes = { - "id": { - "ignore": True, - "name": "ID", - "struct": "i", - } -} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..95cb7453 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,88 @@ +# https://squidfunk.github.io/mkdocs-material/getting-started +# https://squidfunk.github.io/mkdocs-material/reference/admonitions +# https://github.com/squidfunk/mkdocs-material/blob/master/mkdocs.yml + + +site_name: NsPanel Lovelace UI Docs +site_description: Custom Firmware for NsPanel with the design of HomeAssistant's lovelace UI in mind, works with Tasmota. +site_author: Johannes Braun +site_url: https://jobr99.github.io/nspanel-lovelace-ui + +repo_name: jobr99/nspanel-lovelace-ui +repo_url: https://github.com/jobr99/nspanel-lovelace-ui +edit_uri: "" + +copyright: "Copyright © 2022 Johannes Braun" + +docs_dir: docs + +theme: + #logo: _assets/logo.png + #favicon: _assets/favicon.ico + name: material + palette: + accent: blue + font: + text: "arial, sans-serif" + code: monospace + features: + - navigation.indexes + - navigation.sections + - navigation.top + - navigation.tracking + - navigation.expand + - search.highlight + - search.share + - search.suggest + +extra_css: + - _assets/user.css + +markdown_extensions: + - admonition + - def_list + - attr_list + - pymdownx.tilde + - pymdownx.details + - pymdownx.superfences + - pymdownx.magiclink + - toc: + permalink: true + - codehilite: + guess_lang: false + - markdown_include.include: + base_path: docs + +plugins: + - search: + lang: en + - mkdocs-video + +nav: + - "Overview": index.md + - "Getting started (HA)": + - "First steps": + - "Prepare NsPanel": prepare_nspanel.md + - "Prepare Home Assistant": prepare_ha.md + - "Configure MQTT": configure_mqtt.md + - "FAQ": faq.md + - "Configuration - apps.yaml (HA)": + - "Overview": config-overview.md + - "Screensaver": config-screensaver.md + - "Cards": + - "Entities Card": card-entities.md + - "Grid Card": card-grid.md + - "Climate/Thermo Card": card-climate.md + - "Media Card": card-media.md + - "Alarm Card": card-alarm.md + - "Wifi/QR Card": card-qr.md + - "Special Settings for Entities": entities.md + - "Subpages": subpages.md + - "Notifications": notifications.md + - "Physical Buttons": phys-btn.md + + + + - "Getting started (ioBroker)": + - "Prepare NsPanel": prepare_nspanel2.md + - "Prepare ioBroker": iobroker-install.md \ No newline at end of file diff --git a/out.txt b/out.txt deleted file mode 100644 index 061a9726..00000000 --- a/out.txt +++ /dev/null @@ -1,320 +0,0 @@ - -// data available -if(usize>1) -{ - bufferPos=0 - while(bufferPos