Compare commits

..

10 Commits

Author SHA1 Message Date
Johannes
e8cc170c0c Update pages.py 2023-05-21 13:45:10 +02:00
Johannes
94d0d176e5 Update controller.py 2023-05-21 13:43:49 +02:00
Johannes
c9222a9484 Update controller.py
fixes #900
2023-05-21 09:56:15 +02:00
joBr99
5d02de6b6d update us-l tft files (add nextion2text) 2023-05-21 07:42:50 +00:00
joBr99
0c3bcf07c3 update us-l tft files 2023-05-21 09:37:44 +02:00
Johannes
9ed8bfc702 fixed #899 2023-05-21 01:18:58 +02:00
Johannes
b3d9883b19 Update README.md 2023-05-20 18:00:29 +02:00
Johannes
a0af621e7d Update README.md 2023-05-20 17:54:49 +02:00
Gerrit
2812dd302c Update README.md (#866)
Added Table of Contents
2023-05-20 17:52:12 +02:00
joBr99
b2b945c6ed update pics 2023-05-20 17:19:39 +02:00
12 changed files with 31 additions and 13 deletions

View File

@@ -6,6 +6,24 @@ Messages to the Panel can be send through the Command `CustomSend`, which is imp
You can issue this command through MQTT by sending messages to the `cmnd/XXX/CustomSend` Topic. You can issue this command through MQTT by sending messages to the `cmnd/XXX/CustomSend` Topic.
Messages from the Panel are send to the `tele/XXX/RESULT` Topic, encoded in json `{"CustomRecv":"message_from_screen"}` Messages from the Panel are send to the `tele/XXX/RESULT` Topic, encoded in json `{"CustomRecv":"message_from_screen"}`
# Table of contents
- [Startup](#startup)
- [Some preperation before we are acually navigating away:](#some-preperation-before-we-are-acually-navigating-away)
- [Navigate from the startup page to the screensaver, by sending this command to the CustomSend Topic.](#navigate-from-the-startup-page-to-the-screensaver-by-sending-this-command-to-the-customsend-topic)
- [Exit Screensaver](#exit-screensaver)
- [Messages to Nextion Display](#messages-to-nextion-display)
- [General Commands, implemented on all pages](#general-commands-implemented-on-all-pages)
- [screensaver page](#screensaver-page)
- [cardEntities Page](#cardentities-page)
- [cardGrid Page](#cardgrid-page)
- [cardMedia](#cardmedia)
- [cardThermo](#cardthermo)
- [cardAlarm](#cardalarm)
- [cardQR](#cardqr)
- [cardPower](#cardpower)
## Startup ## Startup
On startup the panel will send `{"CustomRecv":"event,startup,39,eu"}` every few seconds. On startup the panel will send `{"CustomRecv":"event,startup,39,eu"}` every few seconds.
@@ -94,9 +112,6 @@ change the page type:
### screensaver page ### screensaver page
Example default layout: `weatherUpdate~~~A~21130~~-0.7C~~~B~63469~Sat~3.6C~~~C~35957~Sun~3.9C~~~D~31728~Mon~4.3C~~~E~35957~Tue~3.6C`
Example alternative layout: `weatherUpdate~~~A~21130~~-0.7C~~~B~63469~Sat~3.6C~~~C~35957~Sun~3.9C~~~D~31728~Mon~4.3C~~~E~35957~Tue~3.6C~~~F~21130~~23.6C`
<table> <table>
<thead> <thead>
<tr> <tr>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
+++ /dev/fd/62 2023-05-20 14:50:34.059646337 +0000 +++ /dev/fd/62 2023-05-21 07:42:40.316901599 +0000
+I/n2t-out/Program.s.txt +I/n2t-out/Program.s.txt
++ HMI/US/portrait/n2t-out/Program.s.txt ++ HMI/US/portrait/n2t-out/Program.s.txt
+1 +10,11 @@ +1 +10,11 @@

View File

@@ -26,8 +26,8 @@ NsPanel needs to be flashed with Tasmota (or through a 3rd-party Component with
## Features ## Features
- Entities Page with support for cover, switch, input_boolean, binary_sensor, sensor, button, number, scenes, script, input_button and light, input_text (read-only), lock, fan and automation - Entities Page with support for cover, switch, input_boolean, binary_sensor, sensor, button, number, scenes, script, input_button and light, input_text (read-only), lock, fan, timer and automation
- Grid Page with support for cover, switch, input_boolean, button, scenes, light, lock and automation - Grid Page with support for cover, switch, input_boolean, button, scenes, light, lock, timer and automation
- Detail Pages for Lights (Brightness, Temperature and Color of the Light) and Covers (Position) - Detail Pages for Lights (Brightness, Temperature and Color of the Light) and Covers (Position)
- Thermostat Page - Thermostat Page
- Media Player Card - Media Player Card
@@ -42,11 +42,11 @@ To control the panel and update it with content from HomeAssistant, there is an
See the following picture to get an idea of the look of this firmware for NSPanel. See the following picture to get an idea of the look of this firmware for NSPanel.
![screens](doc-pics/screens.png) ![screens](docs/img/screens.png)
Some (not all) screenshots from the US Portrait Version: Some (not all) screenshots from the US Portrait Version:
![screens-us-p](doc-pics/screens-us-p.png) ![screens-us-p](docs/img/screens-us-p.png)
## Documentation ## Documentation

View File

@@ -145,8 +145,8 @@ class LuiController(object):
items = self._config.get_all_entity_names() items = self._config.get_all_entity_names()
apis.ha_api.log(f"gtest123: {items}") apis.ha_api.log(f"gtest123: {items}")
prefixes = ("navigate.") prefixes = ("navigate.", "delete", "iText")
items = [x for x in items if not x.startswith(prefixes)] items = [x for x in items if not (x is None or x.startswith(prefixes))]
apis.ha_api.log(f"Registering callbacks for the following items: {items}") apis.ha_api.log(f"Registering callbacks for the following items: {items}")
for item in items: for item in items:
if apis.ha_api.entity_exists(item): if apis.ha_api.entity_exists(item):

View File

@@ -178,7 +178,10 @@ class LuiPagesGen(object):
name = apis.ha_api.render_template(item.nameOverride) name = apis.ha_api.render_template(item.nameOverride)
# type of the item is the string before the "." in the entityId # type of the item is the string before the "." in the entityId
if entityId is not None:
entityType = entityId.split(".")[0] entityType = entityId.split(".")[0]
else
entityType = "delete"
apis.ha_api.log(f"Generating item for {entityId} with type {entityType}", level="DEBUG") apis.ha_api.log(f"Generating item for {entityId} with type {entityType}", level="DEBUG")

View File

@@ -34,7 +34,7 @@ class NsPanelLovelaceUIManager(hass.Hass):
if model == "us-l": if model == "us-l":
desired_display_firmware_url = cfg._config.get("displayURL-US-L", f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-l-{version}.tft") desired_display_firmware_url = cfg._config.get("displayURL-US-L", f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-l-{version}.tft")
elif model == "us-p": elif model == "us-p":
desired_display_firmware_url = cfg._config.get("displayURL-US-L", f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-p-{version}.tft") desired_display_firmware_url = cfg._config.get("displayURL-US-P", f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-p-{version}.tft")
else: else:
desired_display_firmware_url = cfg._config.get("displayURL-EU", f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft") desired_display_firmware_url = cfg._config.get("displayURL-EU", f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft")
desired_tasmota_driver_url = cfg._config.get("berryURL", "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be") desired_tasmota_driver_url = cfg._config.get("berryURL", "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be")

BIN
docs/img/popupLight.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 346 KiB

View File

@@ -2,4 +2,4 @@
Checkout [README](https://github.com/joBr99/nspanel-lovelace-ui/blob/main/README.md) for detailed Instructions. Checkout [README](https://github.com/joBr99/nspanel-lovelace-ui/blob/main/README.md) for detailed Instructions.
![screens](doc-pics/screens.png) ![screens](docs/img/screens.png)