Compare commits

..

39 Commits

Author SHA1 Message Date
Armilar
33c6ddd250 v4.3.2.1 - Update NsPanelTs.ts
Add Release Nuber
2023-10-30 21:58:32 +01:00
Armilar
1bc042d126 v4.3.2.1 - Merge pull request #1004 from Armilar/Armilar-patch-1
v4.3.2.1 - Update NsPanelTs.ts
2023-10-30 20:02:18 +01:00
Armilar
31c2372520 v4.3.2.1 - Update
- Upgrade TFT 53 / 4.3.2
- Fix formatDate/Date.parse with moment.js
2023-10-30 13:03:29 +01:00
Armilar
f7f0349f39 Merge pull request #1 from Armilar/Armilar-patch-2
v4.3.2.1 - Update
2023-10-30 12:59:12 +01:00
Armilar
34181234e1 v4.3.2.1 - Update
- Upgrade TFT 53 / 4.3.2
- Fix formatDate/Date.parse with moment.js (Bugs in JS-Methodes)
2023-10-30 12:55:56 +01:00
Armilar
cded34fbd4 v4.3.2.1 - Update NsPanelTs.ts
- Upgrade TFT 53 / 4.3.2
- Fix formatDate/Date.parse with moment.js
2023-10-30 12:41:28 +01:00
Johannes
e2223ac7a6 fixed for HA 2023.11.0b1 2023-10-28 11:38:43 +02:00
Johannes
ffcd872f4a fixes #802 2023-10-25 21:16:34 +02:00
Marek
d34a835363 small update to sk.json for preset mode (#1000) 2023-10-24 20:12:02 +02:00
Armilar
40d17f9641 v 4.3.1.7 - Merge pull request #998 from tt-tom17/main
v 4.3.1.7
2023-10-22 16:29:03 +02:00
Thomas
9eb543467b v 4.3.1.7
Fix CreateEntity (navigate) role 'light' and 'socket' and 'temperature'
2023-10-22 15:24:47 +02:00
Armilar
86594de18d v4.3.1.6 - Update NsPanelTs.ts
- Add more Alias Device-Types to Navigation (createEntity) 
- Minor Fixes
2023-10-19 10:58:31 +02:00
joBr99
14efa10683 fixes #983 (add nextion2text) 2023-10-14 14:36:49 +00:00
joBr99
7f38c6b346 fixes #983 2023-10-14 16:32:37 +02:00
Armilar
17cf7d40c5 Merge pull request #989 from tt-tom17/main
v4.3.1.5
2023-10-12 15:40:09 +02:00
Thomas
9ff8506035 v4.3.1.5
Fix Datapoint for Role timetable -> Attention use new script from TT-Tom https://github.com/tt-tom17/MyScripts/blob/main/Sonoff_NSPanel/Fahrplan_to_NSPanel.ts
2023-10-12 15:22:25 +02:00
Johannes
757ffcd129 Update README.md 2023-10-06 21:56:02 +02:00
Armilar
ac96ff595a v4.3.1.4 - Move Examples 2 Wiki
https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Page-%E2%80%90-Typen_How-2_Beispiele
2023-10-03 13:48:01 +02:00
Armilar
7c1fe558f9 Delete ioBroker/NsPanelTs_without_Examples.ts 2023-10-03 13:26:49 +02:00
Armilar
98ec0aca45 v4.3.1.4 - Remove Examples
- Moving the examples from the NSPanelTs.ts --> https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Page-%E2%80%90-Typen_How-2_Beispiele
- Delete NsPanelTs_without_Examples.ts
2023-10-03 13:24:31 +02:00
Armilar
df105a2233 v4.3.1.3 - Update BerryDriver / Service Menu Fix
v4.3.1.2  Upgrade BerryDriver v9
v4.3.1.3  Fix - Change ServivceMenu from Fake-SSId to real Tasmota-SSIdParam
 
Todo:
v4.4.0    Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
2023-09-23 21:13:52 +02:00
Armilar
a33c58941c v4.3.1.3 - Update BerryDriver / Service Menu Fix
v4.3.1.2  Upgrade BerryDriver v9
v4.3.1.3  Fix - Change ServivceMenu from Fake-SSId to real Tasmota-SSIdParam
 
Todo:
v4.4.0    Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
2023-09-23 21:13:44 +02:00
Armilar
33c0c4402f v4.3.1.3 - Update BerryDriver / Service Menu Fix
v4.3.1.2  Upgrade BerryDriver v9
v4.3.1.3  Fix - Change ServivceMenu from Fake-SSId to real Tasmota-SSIdParam
 
Todo:
v4.4.0    Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
2023-09-23 21:09:03 +02:00
Armilar
1529115fb5 v4.3.1.3 - Update BerryDriver / Service Menu Fix
v4.3.1.2  Upgrade BerryDriver v9
v4.3.1.3  Fix - Change ServivceMenu from Fake-SSId to real Tasmota-SSIdParam
 
Todo:
v4.4.0    Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
2023-09-23 21:08:27 +02:00
Armilar
210b90ff8f v4.3.1.2 Upgrade BerryDriver v9
- 23.09.2023 - v4.3.1.2  Upgrade BerryDriver v9
2023-09-23 13:46:58 +02:00
Armilar
e9a69651d7 v4.3.1.2 Upgrade BerryDriver v9
- 23.09.2023 - v4.3.1.2  Upgrade BerryDriver v9
2023-09-23 13:46:52 +02:00
Johannes
e576af72b7 Update prepare_nspanel.md 2023-09-18 22:55:54 +02:00
joBr99
e5e88e3a5e Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2023-09-18 18:07:36 +02:00
joBr99
957cde8384 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2023-09-18 18:07:16 +02:00
joBr99
ddc8818aae Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2023-09-18 18:03:15 +02:00
joBr99
252339d36c update tasmota driver #972 2023-09-18 18:02:59 +02:00
Armilar
0803dd5214 v4.3.1.1
v4.2.1.6  Fix ServicePage Dimmode 'next' -> 'home'
v4.2.1.6  Fix Log '.USERICON' to Debug.log
v4.2.1.6  Fix Link PowerIcon to Alias (Thermocard)
v4.3.1    Upgrade TFT 53 / 4.3.1
v4.3.1.1  Add Parameter fontSize (0-4) to cardGrid (with useValue)
2023-09-17 13:36:34 +02:00
Armilar
586af0aac3 v4.3.1.1
v4.2.1.6  Fix ServicePage Dimmode 'next' -> 'home'
v4.2.1.6  Fix Log '.USERICON' to Debug.log
v4.2.1.6  Fix Link PowerIcon to Alias (Thermocard)
v4.3.1    Upgrade TFT 53 / 4.3.1
v4.3.1.1  Add Parameter fontSize (0-4) to cardGrid (with useValue)
2023-09-17 13:36:28 +02:00
Armilar
65032dc3a0 Merge branch 'main' into main 2023-09-17 13:25:26 +02:00
Armilar
a6c617fc44 Merge pull request #976 from tt-tom17/main
v4.2.1.6
2023-09-17 10:22:59 +02:00
Thomas
f0a3a04edb v4.2.1.6
- Fix ServicePage Dimmode 'next' -> 'home'
- Fix Log '.USERICON' to Debug.log
- Fix Link PowerIcon to Alias (Thermocard)
2023-09-15 19:20:53 +02:00
Armilar
df8e913831 Merge branch 'joBr99:main' into main 2023-09-14 23:35:36 +02:00
Armilar
d78a6c4ed7 Merge branch 'joBr99:main' into main 2023-08-27 21:35:48 +02:00
Armilar
cb542f1e77 v4.2.1.2 - New pageItem-Parameter fontSize (add nextion2text) 2023-08-25 12:36:47 +00:00
36 changed files with 397 additions and 8840 deletions

View File

@@ -1424,6 +1424,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1710,6 +1710,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1741,6 +1741,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -72,20 +72,20 @@ cardThermo
319 Unique line(s) of event code 319 Unique line(s) of event code
cardGrid cardGrid
44 Component(s) 44 Component(s)
579 Line(s) of event code 583 Line(s) of event code
330 Unique line(s) of event code 332 Unique line(s) of event code
cardMedia cardGrid2
59 Component(s) 52 Component(s)
699 Line(s) of event code 693 Line(s) of event code
354 Unique line(s) of event code 384 Unique line(s) of event code
popupLight popupLight
28 Component(s) 28 Component(s)
412 Line(s) of event code 412 Line(s) of event code
227 Unique line(s) of event code 227 Unique line(s) of event code
cardGrid2 cardMedia
52 Component(s) 59 Component(s)
689 Line(s) of event code 703 Line(s) of event code
382 Unique line(s) of event code 356 Unique line(s) of event code
cardEntities cardEntities
67 Component(s) 67 Component(s)
1194 Line(s) of event code 1194 Line(s) of event code
@@ -98,5 +98,5 @@ screensaver2
Total Total
23 Page(s) 23 Page(s)
875 Component(s) 875 Component(s)
10556 Line(s) of event code 10568 Line(s) of event code
2450 Unique line(s) of event code 2450 Unique line(s) of event code

View File

@@ -976,6 +976,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1174,6 +1174,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1253,6 +1253,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
+++ /dev/fd/62 2023-09-16 10:55:16.569411880 +0000 +++ /dev/fd/62 2023-10-14 14:36:40.102098093 +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 +12,11 @@ +1 +12,11 @@

View File

@@ -1424,6 +1424,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1853,6 +1853,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1741,6 +1741,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -38,10 +38,10 @@ cardChart
33 Component(s) 33 Component(s)
437 Line(s) of event code 437 Line(s) of event code
296 Unique line(s) of event code 296 Unique line(s) of event code
cardGrid cardGrid2
44 Component(s) 56 Component(s)
579 Line(s) of event code 748 Line(s) of event code
330 Unique line(s) of event code 410 Unique line(s) of event code
cardLChart cardLChart
33 Component(s) 33 Component(s)
402 Line(s) of event code 402 Line(s) of event code
@@ -62,14 +62,14 @@ popupInSel
34 Component(s) 34 Component(s)
621 Line(s) of event code 621 Line(s) of event code
297 Unique line(s) of event code 297 Unique line(s) of event code
cardGrid
44 Component(s)
583 Line(s) of event code
332 Unique line(s) of event code
cardAlarm cardAlarm
43 Component(s) 43 Component(s)
500 Line(s) of event code 500 Line(s) of event code
273 Unique line(s) of event code 273 Unique line(s) of event code
cardMedia
59 Component(s)
699 Line(s) of event code
354 Unique line(s) of event code
cardThermo cardThermo
57 Component(s) 57 Component(s)
540 Line(s) of event code 540 Line(s) of event code
@@ -90,13 +90,13 @@ cardEntities
91 Component(s) 91 Component(s)
1666 Line(s) of event code 1666 Line(s) of event code
711 Unique line(s) of event code 711 Unique line(s) of event code
cardGrid2 cardMedia
56 Component(s) 59 Component(s)
744 Line(s) of event code 703 Line(s) of event code
408 Unique line(s) of event code 356 Unique line(s) of event code
Total Total
23 Page(s) 23 Page(s)
890 Component(s) 890 Component(s)
11017 Line(s) of event code 11029 Line(s) of event code
2600 Unique line(s) of event code 2600 Unique line(s) of event code

View File

@@ -976,6 +976,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1273,6 +1273,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1253,6 +1253,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

Binary file not shown.

Binary file not shown.

View File

@@ -1424,6 +1424,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1710,6 +1710,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1741,6 +1741,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -36,8 +36,8 @@ popupNotify
172 Unique line(s) of event code 172 Unique line(s) of event code
cardGrid cardGrid
44 Component(s) 44 Component(s)
579 Line(s) of event code 583 Line(s) of event code
330 Unique line(s) of event code 332 Unique line(s) of event code
cardQR cardQR
34 Component(s) 34 Component(s)
410 Line(s) of event code 410 Line(s) of event code
@@ -62,14 +62,10 @@ cardThermo
57 Component(s) 57 Component(s)
540 Line(s) of event code 540 Line(s) of event code
319 Unique line(s) of event code 319 Unique line(s) of event code
cardGrid2
52 Component(s)
689 Line(s) of event code
382 Unique line(s) of event code
cardMedia cardMedia
59 Component(s) 59 Component(s)
699 Line(s) of event code 703 Line(s) of event code
354 Unique line(s) of event code 356 Unique line(s) of event code
popupInSel popupInSel
34 Component(s) 34 Component(s)
621 Line(s) of event code 621 Line(s) of event code
@@ -90,6 +86,10 @@ popupThermo
44 Component(s) 44 Component(s)
523 Line(s) of event code 523 Line(s) of event code
276 Unique line(s) of event code 276 Unique line(s) of event code
cardGrid2
52 Component(s)
693 Line(s) of event code
384 Unique line(s) of event code
cardEntities cardEntities
67 Component(s) 67 Component(s)
1194 Line(s) of event code 1194 Line(s) of event code
@@ -98,5 +98,5 @@ cardEntities
Total Total
23 Page(s) 23 Page(s)
878 Component(s) 878 Component(s)
10576 Line(s) of event code 10588 Line(s) of event code
2459 Unique line(s) of event code 2459 Unique line(s) of event code

View File

@@ -976,6 +976,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1174,6 +1174,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

View File

@@ -1253,6 +1253,10 @@ Timer tmSerial
{ {
page cardChart page cardChart
} }
if(tId.txt=="cardLChart")
{
page cardLChart
}
} }
if(tInstruction.txt=="time") if(tInstruction.txt=="time")
{ {

Binary file not shown.

Binary file not shown.

View File

@@ -64,3 +64,4 @@ SmartHomeNG: https://github.com/sisamiwe/shng-nspanel-plugin
OpenHAB: https://github.com/donoo/o2n2l OpenHAB: https://github.com/donoo/o2n2l
NodeRed: https://github.com/laluz742/node-red-contrib-nspanel-lui

View File

@@ -96,16 +96,17 @@ class LuiPagesGen(object):
if state == "sunny": if state == "sunny":
icon_color = 65504 #bright-yellow icon_color = 65504 #bright-yellow
if "rgb_color" in attr: if "rgb_color" in attr and attr.rgb_color:
color = attr.rgb_color color = attr.rgb_color
if "brightness" in attr: if "brightness" in attr and attr.brightness:
color = rgb_brightness(color, attr.brightness) color = rgb_brightness(color, attr.brightness)
icon_color = rgb_dec565(color) icon_color = rgb_dec565(color)
elif "brightness" in attr: elif "brightness" in attr and attr.brightness:
color = rgb_brightness([253, 216, 53], attr.brightness) color = rgb_brightness([253, 216, 53], attr.brightness)
icon_color = rgb_dec565(color) icon_color = rgb_dec565(color)
return icon_color return icon_color
def update_time(self, kwargs): def update_time(self, kwargs):
time = datetime.datetime.now().strftime(self._config.get("timeFormat")) time = datetime.datetime.now().strftime(self._config.get("timeFormat"))
addTemplate = self._config.get("timeAdditionalTemplate") addTemplate = self._config.get("timeAdditionalTemplate")
@@ -418,7 +419,7 @@ class LuiPagesGen(object):
font = 3 font = 3
elif isinstance(item.font, int): elif isinstance(item.font, int):
font = item.font font = item.font
icon_id += f'{icon_id}¬{font}' icon_id = f'{icon_id}¬{font}'
return f"~{entityTypePanel}~{entityId}~{icon_id}~{color}~{name}~{value}" return f"~{entityTypePanel}~{entityId}~{icon_id}~{color}~{name}~{value}"
def generate_entities_page(self, navigation, heading, items, cardType, tempUnit): def generate_entities_page(self, navigation, heading, items, cardType, tempUnit):
@@ -787,13 +788,13 @@ class LuiPagesGen(object):
if "onoff" not in entity.attributes.supported_color_modes: if "onoff" not in entity.attributes.supported_color_modes:
brightness = 0 brightness = 0
if entity.state == "on": if entity.state == "on":
if "brightness" in entity.attributes: if "brightness" in entity.attributes and entity.attributes.brightness:
# scale 0-255 brightness from ha to 0-100 # scale 0-255 brightness from ha to 0-100
brightness = int(scale(entity.attributes.brightness,(0,255),(0,100))) brightness = int(scale(entity.attributes.brightness,(0,255),(0,100)))
else: else:
brightness = "disable" brightness = "disable"
if "color_temp" in entity.attributes.supported_color_modes: if "color_temp" in entity.attributes.supported_color_modes and entity.attributes.supported_color_modes:
if "color_temp" in entity.attributes: if "color_temp" in entity.attributes and entity.attributes.color_temp:
# scale ha color temp range to 0-100 # scale ha color temp range to 0-100
color_temp = int(scale(entity.attributes.color_temp,(entity.attributes.min_mireds, entity.attributes.max_mireds),(0,100))) color_temp = int(scale(entity.attributes.color_temp,(entity.attributes.min_mireds, entity.attributes.max_mireds),(0,100)))
else: else:

View File

@@ -57,8 +57,8 @@
"comfort": "Komfort", "comfort": "Komfort",
"eco": "Eko", "eco": "Eko",
"home": "Doma", "home": "Doma",
"none": "Žiadny", "none": "Žiadna",
"sleep": "Pohotovostný režim" "sleep": "Spánok"
} }
}, },
"humidifier": { "humidifier": {

View File

@@ -27,11 +27,14 @@ After a reboot of tasmota your screen will light up with the stock display firmw
Go to `Consoles` > `Console` in Tasmota and execute the following command: Go to `Consoles` > `Console` in Tasmota and execute the following command:
``` ```
Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1 Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; SetOption151 0;Restart 1
``` ```
This will download the autoexec.be file from the repository and restart tasmota. This will download the autoexec.be file from the repository and restart tasmota.
Note: The command is also disabling matter to free up memory, as it's most likely not used by any homeassistant users anyway.
(Matter could cause memory issues during flashing of the Nextion Screen, but you can still enable it if you need to.)
## Flash Firmware to Nextion Screen ## 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. 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.

View File

@@ -1,11 +1,17 @@
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
TypeScript v4.2.1.5 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne TypeScript v4.3.2.1 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar / @TT-Tom / @Sternmiere / @Britzelpuf / @ravenS0ne
- abgestimmt auf TFT 52 / v4.2.1 / BerryDriver 8 / Tasmota 13.1.0 - abgestimmt auf TFT 53 / v4.3.2 / BerryDriver 9 / Tasmota 13.2.0
@joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker @joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker
NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts
icon_mapping.ts: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/icon_mapping.ts (TypeScript muss in global liegen) icon_mapping.ts: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/icon_mapping.ts (TypeScript muss in global liegen)
ioBroker-Unterstützung: https://forum.iobroker.net/topic/50888/sonoff-nspanel ioBroker-Unterstützung: https://forum.iobroker.net/topic/50888/sonoff-nspanel
WIKI zu diesem Projekt unter: https://github.com/joBr99/nspanel-lovelace-ui/wiki (siehe Sidebar) @Kuckuckmann: WIKI zu diesem Projekt unter: https://github.com/joBr99/nspanel-lovelace-ui/wiki (siehe Sidebar)
***************************************************************************************************************
Achtung: Keine Beispiele mehr im Script. Die Beispiele sind jetzt unter nachfolgendem Link zu finden:
- https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Page-%E2%80%90-Typen_How-2_Beispiele
***************************************************************************************************************
Icons unter: https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html Icons unter: https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html
************************************************************************************************ ************************************************************************************************
@@ -13,7 +19,7 @@ Achtung Änderung des Sonoff ESP-Temperatursensors
!!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!! !!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!!
************************************************************************************************ ************************************************************************************************
In bestimmten Situationen kommt es vor, dass sich das Panel mit FlashNextion In bestimmten Situationen kommt es vor, dass sich das Panel mit FlashNextion
unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Dowengrade unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Downgrade
durchführen und FlashNextion wiederholen. durchführen und FlashNextion wiederholen.
************************************************************************************************ ************************************************************************************************
Ab Tasmota > 13.0.0 ist für ein Upgrade ggfs. eine Umpartitionierung erforderlich Ab Tasmota > 13.0.0 ist für ein Upgrade ggfs. eine Umpartitionierung erforderlich
@@ -139,8 +145,8 @@ ReleaseNotes:
- 23.04.2023 - v4.0.5.10 Fixed error wrong icon index in GeneratePowerPage by fre4242 - 23.04.2023 - v4.0.5.10 Fixed error wrong icon index in GeneratePowerPage by fre4242
- 28.04.2023 - v4.0.5.11 light 'hue' and light 'rgb' have '.TEMPERATURE' optional - 28.04.2023 - v4.0.5.11 light 'hue' and light 'rgb' have '.TEMPERATURE' optional
- 02.05.2023 - v4.0.5.12 Add new Function Debug mode from script activatable via panel - 02.05.2023 - v4.0.5.12 Add new Function Debug mode from script activatable via panel
- 02.05.2023 - v4.0.5.13 Fix Problems with weather-instances-number !="0" #876 - 02.05.2023 - v4.0.5.13 Fix Problems with weather-instances-number !="0" #876
- 02.05.2023 - v4.0.5.14 Fix: Remove empty log statements #883 - 02.05.2023 - v4.0.5.14 Fix: Remove empty log statements #883
- 30.07.2023 - v4.0.5.15 Improved screensaverAdvanced icon handling: option to load from iobroker object #944 - 30.07.2023 - v4.0.5.15 Improved screensaverAdvanced icon handling: option to load from iobroker object #944
- 12.08.2023 - v4.1.4 Upgrade TFT 51 / 4.1.4 - 12.08.2023 - v4.1.4 Upgrade TFT 51 / 4.1.4
- 12.08.2023 - v4.1.4.1 Fix Label CANCEL for popupTimer - 12.08.2023 - v4.1.4.1 Fix Label CANCEL for popupTimer
@@ -149,23 +155,36 @@ ReleaseNotes:
- 12.08.2023 - v4.1.4.2 Add onStop function() to Schedules - 12.08.2023 - v4.1.4.2 Add onStop function() to Schedules
- 13.08.2023 - v4.1.4.3 Add InSel to popUpLight - 13.08.2023 - v4.1.4.3 Add InSel to popUpLight
- 13.08.2023 - v4.1.4.4 Add Parameter inSel_ChoiceState to InSel to show/hide Focus - 13.08.2023 - v4.1.4.4 Add Parameter inSel_ChoiceState to InSel to show/hide Focus
- 21.08.2023 - v4.2.0 Upgrade TFT 52 / 4.2.0 - 21.08.2023 - v4.2.0 Upgrade TFT 52 / 4.2.0
- 21.08.2023 - v4.2.0 Add new alias state for iconcolor and buttontext for icon for subpages - 21.08.2023 - v4.2.0 Add new alias state for iconcolor and buttontext for icon for subpages
- 22.08.2023 - v4.2.0.1 Add iconArray to Alias "Klimaanlage" (airCondition) - 22.08.2023 - v4.2.0.1 Add iconArray to Alias "Klimaanlage" (airCondition)
- 23.08.2023 - v4.2.0.2 Add CardGrid2 with maxItems = 8 - 23.08.2023 - v4.2.0.2 Add CardGrid2 with maxItems = 8
- 23.08.2023 - v4.2.1 Upgrade TFT 52 / 4.2.1 - 23.08.2023 - v4.2.1 Upgrade TFT 52 / 4.2.1
- 23.08.2023 - v4.2.1.1 Add WINDOWOPEN to cardThermo (Thermostat) - 23.08.2023 - v4.2.1.1 Add WINDOWOPEN to cardThermo (Thermostat)
- 25.08.2023 - v4.2.1.2 Add Parameter fontSize for v4.3.0 - 25.08.2023 - v4.2.1.2 Add Parameter fontSize for v4.3.0
- 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check (use with exec) --> function CheckMQTTPorts() - 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check (use with exec) --> function CheckMQTTPorts()
- 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check for ServiceMenu - 27.08.2023 - v4.2.1.3 Add MQTT-Port-Check for ServiceMenu
- 01.09.2023 - v4.2.1.4 Fix iconId2 in Alias door/window - 01.09.2023 - v4.2.1.4 Fix iconId2 in Alias door/window
- 02.09.2023 - v4.2.1.4 Add dynamically USERICON to Alias info - 02.09.2023 - v4.2.1.4 Add dynamically USERICON to Alias info
- 04.09.2023 - v4.2.1.5 Fix Debug with 0_userdata.0... - 04.09.2023 - v4.2.1.5 Fix Debug with 0_userdata.0...
- 04.09.2023 - v4.2.1.5 Add minValue/maxValue to Blinds - 04.09.2023 - v4.2.1.5 Add minValue/maxValue to Blinds
- 15.09.2023 - v4.2.1.6 Fix ServicePage Dimmode 'next' -> 'home'
Next Release with TFT DEV (always implemented) - 15.09.2023 - v4.2.1.6 Fix Log '.USERICON' to Debug.log
- 25.08.2023 - v4.3.0 Add Parameter fontSize (0-4) to cardGrid (with useValue) - 15.09.2023 - v4.2.1.6 Fix Link PowerIcon to Alias (Thermocard)
- 17.09.2023 - v4.3.1 Upgrade TFT 53 / 4.3.1
- 17.09.2023 - v4.3.1.1 Add Parameter fontSize (0-4) to cardGrid (with useValue)
- 23.09.2023 - v4.3.1.2 Upgrade BerryDriver v9
- 23.09.2023 - v4.3.1.3 Fix - Change ServivceMenu from Fake-SSId to real Tasmota-SSIdParam
- 03.10.2023 - v4.3.1.4 Removing the examples from the NSPanelTs.ts --> https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Page-%E2%80%90-Typen_How-2_Beispiele
- 03.10.2023 - v4.3.1.4 Delete NsPanelTs_without_Examples.ts
- 12.10.2023 - v4.3.1.5 Fix Datapoint for Role timetable -> Attention use new script from TT-Tom https://github.com/tt-tom17/MyScripts/blob/main/Sonoff_NSPanel/Fahrplan_to_NSPanel.ts
- 19.10.2023 - v4.3.1.6 Add more Alias Device-Types to Navigation / Minor Fixes
- 22.10.2023 - v4.3.1.7 Fix CreateEntity (navigate) role 'light' and 'socket' and 'temperature'
- 30.10.2023 - v4.3.2 Upgrade TFT 53 / 4.3.2
- 30.10.2023 - v4.3.2.1 Fix formatDate/Date.parse with moment.js (Bugs in JS-Methodes)
Todo:
- XX.XX.XXXX - v4.4.0 Change the bottomScreensaverEntity (rolling) if more than 6 entries are defined
*********************************************************************************************************** ***********************************************************************************************************
* Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObect" gesetzt sein! * * Für die Erstellung der Aliase durch das Skript, muss in der JavaScript Instanz "setObect" gesetzt sein! *
@@ -247,16 +266,15 @@ Tasmota-Status0 - (zyklische Ausführung)
Erforderliche Adapter: Erforderliche Adapter:
AccuWeather: - Bei Nutzung der Wetterfunktionen (und zur Icon-Konvertierung) im Screensaver AccuWeather oder DasWetter: - Bei Nutzung der Wetterfunktionen (und zur Icon-Konvertierung) im Screensaver
Alexa2: - Bei Nutzung der dynamischen SpeakerList in der cardMedia Alexa2: - Bei Nutzung der dynamischen SpeakerList in der cardMedia
Geräte verwalten - Für Erstellung der Aliase Geräte verwalten - Für Erstellung der Aliase
Alias-Manager - !!! ausschließlich für MEDIA-Alias MQTT-Adapter - Für Kommunikation zwischen Skript und Tasmota
MQTT-Adapter - Für Kommunikation zwischen Skript und Tasmota
JavaScript-Adapter JavaScript-Adapter
Upgrades in Konsole: Upgrades in Konsole:
Tasmota BerryDriver : Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1 Tasmota BerryDriver : Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v4.2.1.tft TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v4.3.2.tft
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
*/ */
@@ -369,406 +387,10 @@ const swSnowyRainy: RGB = { red: 150, green: 150, blue: 255};
const swSunny: RGB = { red: 255, green: 255, blue: 0}; const swSunny: RGB = { red: 255, green: 255, blue: 0};
const swWindy: RGB = { red: 150, green: 150, blue: 150}; const swWindy: RGB = { red: 150, green: 150, blue: 150};
//-- Anfang der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich ---------------- //-- Anfang der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich -----------------------
//-- siehe https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Page-%E2%80%90-Typen_How-2_Beispiele
let Test_Licht1 = <PageEntities> //-- ENDE der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich -------------------------
{
'type': 'cardEntities',
'heading': 'Color Aliase 1',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.TestRGBLichteinzeln', name: 'RGB-Licht Hex-Color', interpolateColor: true},
<PageItem>{ id: 'alias.0.NSPanel_1.TestRGBLicht', name: 'RGB-Licht', minValueBrightness: 0, maxValueBrightness: 100, interpolateColor: true},
<PageItem>{ id: 'alias.0.NSPanel_1.TestCTmitHUE', name: 'HUE-Licht-CT', minValueBrightness: 0, maxValueBrightness: 70, minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true},
<PageItem>{ id: 'alias.0.NSPanel_1.TestHUELicht', name: 'HUE-Licht-Color', minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true}
]
};
let CardChartExample = <PageChart>
{
'type': 'cardChart',
'heading': 'Stromzähler L1+L2+L3',
'useColor': true,
'items': [<PageItem>{
id: 'alias.0.NSPanel_1.cardChart',
yAxis: 'Leistung [kW]',
yAxisTicks: [2,4,6,8,10,2,4,6,8,20,2],
onColor: Yellow
}]
};
//Only DEV --> Test
let CardLChartExample = <PageChart>
{
'type': 'cardLChart',
'heading': 'Büro Temperatur',
'useColor': true,
'items': [<PageItem>{
id: 'alias.0.Haus.Erdgeschoss.Buero.Charts.Temperatur',
yAxis: 'Temperatur [°C]',
yAxisTicks: [-250, -200, -150, -100,-50, 0, 50, 100, 150, 200, 250, 300],
onColor: Yellow
}]
};
let CardPowerExample = <PagePower>
{
'type': 'cardPower',
'heading': 'cardPower Emulator',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.Power.PowerCard' },
// <PageItem>{ } // aktivieren für Demomodus der PowerCard, dafür ersten PageItem auskommentieren
]
};
let Test_Licht2 = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Color Aliase 2',
'useColor': true,
'items': [
//Beispiel für RGB Light mit neuem PageItem-Parameter colormode: "xy" alternativ colormode: "rgb" oder weglassen
//Steuert im z.B. DeConz Adapter unter Lampen die Farben per CIE (XY)
<PageItem>{ id: "alias.0.NSPanel_2.WZ_E14_Fenster_rechts", name: 'Fensterbank rechts', minValueBrightness: 0, maxValueBrightness: 100, minValueColorTemp: 500, maxValueColorTemp: 150, interpolateColor: true, colormode: 'xy'},
<PageItem>{ id: "alias.0.NSPanel_1.TestFarbtemperatur", name: 'Farbtemperatur', interpolateColor: true},
<PageItem>{ id: "alias.0.NSPanel_1.TestFarbtemperatur", prefixName: 'Büro: ', name: "getState('0_userdata.0.Test.Wiki_Router').val", suffixName: '%', interpolateColor: true},
]
};
let Test_Funktionen = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Sonstige Aliase',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.TestLautstärke', offColor: MSRed, onColor: MSGreen, name: 'Echo Spot Büro', minValue: 0, maxValue: 100 },
<PageItem>{ id: 'alias.0.NSPanel_1.TestTemperatur',name: 'Temperatur außen', icon: 'thermometer', onColor: White , colorScale: {'val_min': -20, 'val_max': 40, 'val_best': 20} },
<PageItem>{ id: 'alias.0.NSPanel_1.TestFeuchtigkeit', name: 'Luftfeuchte außen', icon: 'water-percent', unit: '%H', onColor: White, colorScale: {'val_min': 0, 'val_max': 100, 'val_best': 65} },
//<PageItem>{ id: 'alias.0.NSPanel_1.TestInfo', name: 'Windstärke', icon: 'wind-power-outline', offColor: MSRed, onColor: MSGreen, unit: 'bft', minValue: 0, maxValue: 12, interpolateColor: true, useColor: true },
<PageItem>{ id: 'alias.0.NSPanel_1.Ventilator.Fan_1',name: 'Ventilator', icon: 'fan', onColor: On, offColor: HMIOff, modeList: ['Low', 'Medium', 'High', 'Move', 'Sleep', 'Auto', 'Manual']},
]
};
let Buero_Seite_1 = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Büro',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.Schreibtischlampe', interpolateColor: true},
<PageItem>{ id: 'alias.0.NSPanel_1.Deckenbeleuchtung', interpolateColor: true},
<PageItem>{ id: 'alias.0.NSPanel_1.Testlampe2', name: 'Filamentlampe', minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true},
<PageItem>{ id: 'alias.0.NSPanel_1.Luftreiniger', icon: 'power', icon2: 'power',offColor: MSRed, onColor: MSGreen}
]
};
let Fenster_1 = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Fenster und Türen',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.TestFenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'},
<PageItem>{ id: 'alias.0.NSPanel_1.Haustuer', offColor: MSRed, onColor: MSGreen, name: 'Haustür'},
<PageItem>{ id: 'alias.0.NSPanel_1.TestBlind', icon: "blinds-horizontal", offColor: White, onColor: Yellow, name: 'Büro', secondRow: 'Hier Text für 2. Zeile'},
<PageItem>{ id: 'alias.0.NSPanel_1.TestDoorlock', offColor: MSRed, onColor: MSGreen, name: 'Türschloss'},
]
};
let Button_1 = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Button Aliase',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.TestTastensensor', name: 'Tastensensor (FFN)'},
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.NDR2', icon: 'radio', name: 'Taste (NDR2)', onColor: colorRadio, buttonText: 'starten'},
<PageItem>{ id: 'alias.0.NSPanel_1.TestVentil1', icon: 'valve-open', icon2: 'valve-closed',offColor: MSRed, onColor: MSGreen, name: 'Test-Ventil 1'},
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.NDR2', icon: 'alarm-light', name: 'Alert mit Zielseite', offColor: MSGreen, onColor: MSRed, targetPage: 'Abfall', buttonText: 'Popup'},
]
};
let Subpages_1 = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Test Subpages',
'useColor': true,
'items': [
<PageItem>{ navigate: true, id: 'alias.0.NSPanel_1.Abfall.event1', targetPage: 'Abfall', name: 'Abfallkalender'},
<PageItem>{ navigate: true, id: null, targetPage: 'WLAN', onColor: White, name: 'Gäste WLAN'},
]
};
//Subpage 1 von Subpages_1
let Abfall = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Abfallkalender',
'useColor': true,
'subPage': true,
'parent': Subpages_1,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.Abfall.event1',icon: 'trash-can'},
<PageItem>{ id: 'alias.0.NSPanel_1.Abfall.event2',icon: 'trash-can'},
<PageItem>{ id: 'alias.0.NSPanel_1.Abfall.event3',icon: 'trash-can'},
<PageItem>{ id: 'alias.0.NSPanel_1.Abfall.event4',icon: 'trash-can'}
]
};
//Subpage 2 von Subpages_1
let WLAN = <PageQR>
{
'type': 'cardQR',
'heading': 'Gäste WLAN',
'useColor': true,
'subPage': true,
'parent': Subpages_1,
'items': [<PageItem>{ id: 'alias.0.NSPanel_1.Guest_Wifi', hidePassword: false }]
};
let Buero_Seite_2 = <PageGrid2>
{
'type': 'cardGrid2',
'heading': 'Büro 2',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.Schreibtischlampe', name: 'Schreibtisch'},
<PageItem>{ id: 'alias.0.NSPanel_1.Deckenbeleuchtung', name: 'Deckenlampe'},
<PageItem>{ id: 'alias.0.NSPanel_1.TestFenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'},
<PageItem>{ id: 'alias.0.NSPanel_1.Luftreiniger', icon: 'power', offColor: MSRed, onColor: MSGreen},
<PageItem>{ id: 'alias.0.NSPanel_1.TestBlind', icon: 'projector-screen', onColor: White, name: 'Beamer', secondRow: 'auch Text'},
<PageItem>{ id: 'alias.0.NSPanel_1.Kippfenster', useValue: true },
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.Bob', icon: 'play', onColor: White, name: 'TuneIn'}
]
};
let Radiosender = <PageGrid>
{
'type': 'cardGrid',
'heading': 'Büro 2',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.Bob', icon: 'radio', name: 'Radio BOB', onColor: colorRadio},
<PageItem>{ id: 'alias.0.NSPanel_1.Countdown', icon: 'timer-outline', name: 'Timer', onColor: White}
]
};
let WLED = <PageGrid>
{
'type': 'cardGrid',
'heading': 'WLED Stripes WZ',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.WLED.Example.On', name: 'Power', icon: 'power', onColor: HMIOn, offColor: HMIOff},
<PageItem>{ id: 'alias.0.NSPanel_1.WLED.Example.Sync', name: 'Sync', icon: 'sync', onColor: HMIOn, offColor: White},
<PageItem>{ id: 'alias.0.NSPanel_1.WLED.Example.Presets', icon: 'heart-outline', name: 'Presets', onColor: White, modeList: ['Preset 0', 'Add Preset']},
<PageItem>{ id: 'alias.0.NSPanel_1.WLED.Example.Colors', icon: 'palette', name: 'Colors', onColor: White,
modeList: ['Default', '* Color 1', '* Color Gradient', '* Colors 1&2', '* Colors Only', '* Random Cycle', 'Analogus','April Night', 'Aqua Flash', 'Atlantica', 'Aurora',
'Beach', 'Beech', 'Blink Red', 'Breeze', 'C9', 'C9 New', 'Candy', 'Candy2', 'Cloud',
'Cyane', 'Departure', 'Drywet', 'Fairy Reaf', 'Fire', 'Forest', 'etc'
]},
<PageItem>{ id: 'alias.0.NSPanel_1.WLED.Example.Effects', icon: 'emoticon-outline', name: 'Effects', onColor: White,
modeList: ['Solid', 'Android', 'Aurora', 'Blends', 'Blink', 'Blink Rainbow', 'Bouncing Balls','Bpm', 'Breathe', 'Candle', 'Candle Multi',
'Candy Cane', 'Chase', 'Chase 1', 'Chase 2', 'Chase 3', 'Chase Flash', 'Chase Flash Rnd', 'Chase Rainbow', 'Chase Random',
'Chunchun', 'Colorful', 'Colorloop', 'Colortwinkles', 'Colorwaves', 'Dancing Shadows', 'etc'
]},
<PageItem>{ id: 'alias.0.NSPanel_1.WLED.Example.Segments', icon: 'layers', name: 'Segments', onColor: White, modeList: ['Segment 0', 'Add Segment']},
]
};
let SensorGrid = <PageGrid>
{
'type': 'cardGrid',
'heading': 'Sensor Werte',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.TestTemperatur', name: 'Außentemp. °C', offColor: MSRed, onColor: MSGreen, useValue: true, colorScale: {'val_min': -20, 'val_max': 40, 'val_best': 20} },
<PageItem>{ id: 'alias.0.NSPanel_1.TestFeuchtigkeit', name: 'Luftfeuchte %', offColor: MSYellow, onColor: MSYellow , useValue: true, colorScale: {'val_min': 0, 'val_max': 100, 'val_best': 65} },
<PageItem>{ id: 'alias.0.NSPanel_1.Taupunkt', name: 'Taupunkt °C', offColor: MSRed, onColor: MSGreen, useValue: true, colorScale: {'val_min': -20, 'val_max': 40, 'val_best': 20} },
<PageItem>{ id: 'alias.0.NSPanel_1.UV_Index', name: 'UV Index', offColor: White , onColor: White, useValue: true, colorScale: {'val_min': 0, 'val_max': 12} },
<PageItem>{ id: 'alias.0.NSPanel_1.Windstaerke', name: 'Windstärke bft', offColor: White , onColor: White, useValue: true, colorScale: {'val_min': 0, 'val_max': 9} },
<PageItem>{ id: 'alias.0.NSPanel_1.Luftdruck', name: 'Luftdruck hPa', offColor: White , onColor: White, useValue: true, colorScale: {'val_min': 950, 'val_max': 1050, 'val_best': 1013} },
]
};
// NEW: Neue Definition von Medien-Aliasen
// adapterPlayerInstance = alexa2.0. or spotify-premium.0. or sonos.0. or chromecast.0.
let Alexa = <PageMedia>
{
'type': 'cardMedia',
'heading': 'Alexa',
'useColor': true,
'items': [<PageItem>{
id: AliasPath + 'Media.PlayerAlexa',
adapterPlayerInstance: 'alexa2.0.',
mediaDevice: 'G0XXXXXXXXXXXXXX',
speakerList: ['Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche','Echo Spot Buero'],
//analog alexa2 Music-Provider
playList: ['Spotify-Playlist.PartyPlaylist',
'Amazon-Music-Playlist.Mein Discovery Mix',
'My-Library-Playlist.2020',
'My-Library-Playlist.2021',
'TuneIn.Radio Bob Rock',
'TuneIn.NDR2',
'Spotify-Playlist.Sabaton Radio',
'Spotify-Playlist.Rock Party',
'Spotify-Playlist.This Is Nightwish',
'Spotify-Playlist.Metal Christmas'],
equalizerList: ['Bassboost','Klassik','Dance', 'Deep', 'Electronic', 'Flat', 'Hip-Hop', 'Rock',
'Metal', 'Jazz', 'Latin', 'Tonstärke', 'Lounge', 'Piano'],
colorMediaIcon: colorAlexa,
colorMediaArtist: Yellow,
colorMediaTitle: Yellow,
autoCreateALias : true
}]
};
let Sonos = <PageMedia>
{
'type': 'cardMedia',
'heading': 'Sonos',
'useColor': true,
'items': [<PageItem>{
id: AliasPath + 'Media.PlayerSonos',
adapterPlayerInstance: 'sonos.0.',
mediaDevice: '192_168_1_212',
speakerList: ['Terrasse'],
colorMediaIcon: colorSpotify,
colorMediaArtist: Yellow,
colorMediaTitle: Yellow,
autoCreateALias : true
}]
};
let SpotifyPremium = <PageMedia>
{
'type': 'cardMedia',
'heading': 'Spotify-Premium',
'useColor': true,
'items': [<PageItem>{
id: AliasPath + 'Media.PlayerSpotifyPremium',
adapterPlayerInstance: "spotify-premium.0.",
speakerList: ['LENOVO-W11-01', 'Terrasse','Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche',
'Echo Spot Buero'],
playList: ['PartyPlaylist','Sabaton Radio','Rock Party','This Is Nightwish','Metal Christmas'],
repeatList: ['off','context','track'],
equalizerList: ['Bassboost','Klassik','Dance', 'Deep', 'Electronic', 'Flat', 'Hip-Hop', 'Rock',
'Metal', 'Jazz', 'Latin', 'Tonstärke', 'Lounge', 'Piano'],
colorMediaIcon: colorSpotify,
colorMediaArtist: Yellow,
colorMediaTitle: Yellow,
autoCreateALias : true
}]
};
let SqueezeboxRPC = <PageMedia>
{
'type': 'cardMedia',
'heading': 'SqueezeboxRPC',
'useColor': true,
'items': [<PageItem>{
id: 'alias.0.Media.LMS',
adapterPlayerInstance: 'squeezeboxrpc.0',
speakerList: ['SqueezePlay'],
mediaDevice: 'SqueezePlay',
playList: ['Playlist'],
autoCreateALias : true
}]
};
let Buero_Themostat = <PageThermo>
{
'type': 'cardThermo',
'heading': 'Test Thermostat',
'useColor': true,
'items': [<PageItem>{
id: 'alias.0.NSPanel_1.Thermostat_Buero',
minValue: 50,
maxValue: 300,
stepValue: 5
}]
};
let Buero_Klimaanlage = <PageThermo>
{
'type': 'cardThermo',
'heading': 'Test Klimaanlage',
'useColor': true,
'items': [<PageItem>{
id: 'alias.0.NSPanel_1.TestKlimaanlage',
minValue: 50,
maxValue: 250,
stepValue: 5,
iconArray: ['power-standby','air-conditioner','snowflake','fire','alpha-e-circle-outline','fan','water-percent','swap-vertical-bold'],
popupThermoMode1: ['Auto','0','1','2','3'],
popupThermoMode2: ['Auto','0','1','2','3','4','5'],
popupThermoMode3: ['Auto','Manual','Boost',],
popUpThermoName: ['Schwenk-Modus', 'Speed', 'Temperatur'],
icon: 'fan',
setThermoAlias: ['MODE1','MODE2','MODE3'],
//setThermoDestTemp2: 'ACTUAL2'
}]
};
let Pool_Waermepumpe = <PageThermo>
{
'type': 'cardThermo',
'heading': 'Pool Wärmepumpe',
'useColor': true,
'items': [<PageItem>{
id: 'alias.0.NSPanel_1.Pool_Waermepumpe',
minValue: 100,
maxValue: 300,
stepValue: 5,
iconArray: ['power-standby','alpha-a-circle-outline','snowflake','fire'],
//iconArray: ['power-standby','air-conditioner','snowflake','fire','alpha-e-circle-outline','fan','water-percent','swap-vertical-bold'],
}]
};
let Buero_Alarm = <PageAlarm>
{
'type': 'cardAlarm',
'heading': 'Alarmanlage',
'useColor': true,
'items': [<PageItem>{ id: 'alias.0.Alarm' }]
};
let Unlock_Service = <PageUnlock>
{
'type': 'cardUnlock',
'heading': 'Service Pages',
'useColor': true,
'items': [<PageItem>{ id: 'alias.0.Unlock', targetPage: 'NSPanel_Service' }]
};
let button1Page = <PageGrid>
{
'type': 'cardGrid',
'heading': 'Radio',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.FFN', icon: 'radio', name: 'FFN', onColor: colorRadio},
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.Antenne' , icon: 'radio', name: 'Antenne Nds.', onColor: colorRadio},
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.NDR2', icon: 'radio', name: 'NDR2', onColor: colorRadio},
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.Bob', icon: 'radio', name: 'Radio BOB', onColor: colorRadio},
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.Spotify', icon: 'spotify', name: 'Party Playlist', onColor: colorSpotify},
<PageItem>{ id: 'alias.0.NSPanel_1.Radio.Alexa', icon: 'playlist-music', name: 'Playlist 2021', onColor: colorAlexa}
]
};
let button2Page = <PageEntities>
{
'type': 'cardEntities',
'heading': 'Büro',
'useColor': true,
'items': [
<PageItem>{ id: 'alias.0.NSPanel_1.Schreibtischlampe'},
<PageItem>{ id: 'alias.0.NSPanel_1.Deckenbeleuchtung'}
]
};
//-- ENDE der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich ------------------
/*********************************************************************************************** /***********************************************************************************************
@@ -829,7 +451,7 @@ let NSPanel_Service = <PageEntities>
'prev': 'NSPanel_Wifi_Info_1', 'prev': 'NSPanel_Wifi_Info_1',
'home': 'NSPanel_Service', 'home': 'NSPanel_Service',
'items': [ 'items': [
<PageItem>{ id: 'alias.0.Test.Wiki_SSID', name: 'SSId', icon: 'signal-distance-variant', offColor: Menu, onColor: Menu }, <PageItem>{ id: AliasPath + 'Tasmota.Wifi.SSId', name: 'SSId', icon: 'signal-distance-variant', offColor: Menu, onColor: Menu },
<PageItem>{ id: AliasPath + 'Tasmota.Wifi.Mode', name: 'Modus', icon: 'signal-distance-variant', offColor: Menu, onColor: Menu }, <PageItem>{ id: AliasPath + 'Tasmota.Wifi.Mode', name: 'Modus', icon: 'signal-distance-variant', offColor: Menu, onColor: Menu },
<PageItem>{ id: AliasPath + 'Tasmota.Wifi.Channel', name: 'Kanal', icon: 'timeline-clock-outline', offColor: Menu, onColor: Menu }, <PageItem>{ id: AliasPath + 'Tasmota.Wifi.Channel', name: 'Kanal', icon: 'timeline-clock-outline', offColor: Menu, onColor: Menu },
<PageItem>{ id: AliasPath + 'Tasmota.Wifi.AP', name: 'AP', icon: 'router-wireless-settings', offColor: Menu, onColor: Menu }, <PageItem>{ id: AliasPath + 'Tasmota.Wifi.AP', name: 'AP', icon: 'router-wireless-settings', offColor: Menu, onColor: Menu },
@@ -913,11 +535,11 @@ let NSPanel_Service = <PageEntities>
let NSPanel_ScreensaverDimmode = <PageEntities> let NSPanel_ScreensaverDimmode = <PageEntities>
{ {
'type': 'cardEntities', 'type': 'cardEntities',
'heading': 'Dimmode (1)', 'heading': 'Dimmode',
'useColor': true, 'useColor': true,
'subPage': true, 'subPage': true,
'parent': NSPanel_Screensaver, 'parent': NSPanel_Screensaver,
'next': 'NSPanel_ScreensaverOther', 'home': 'NSPanel_Service',
'items': [ 'items': [
<PageItem>{ id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: Menu, onColor: Menu, minValue: 5, maxValue: 10}, <PageItem>{ id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: Menu, onColor: Menu, minValue: 5, maxValue: 10},
<PageItem>{ id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: Menu, onColor: Menu, minValue: 0, maxValue: 4}, <PageItem>{ id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: Menu, onColor: Menu, minValue: 0, maxValue: 4},
@@ -1113,39 +735,7 @@ export const config = <Config> {
leftScreensaverEntity: leftScreensaverEntity:
[ [
// leftScreensaverEntity 1 (only Advanced Screensaver) // Examples for Advanced-Screensaver: https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker-Config-Screensaver#entity-status-icons-ab-v400
{
ScreensaverEntity: NSPanel_Path + 'Sensor.ANALOG.Temperature',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 1,
ScreensaverEntityIconOn: 'thermometer',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'Temperatur',
ScreensaverEntityUnitText: '°C',
ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 35, 'val_best': 22}
},
// leftScreensaverEntity 2 (only Advanced Screensaver)
{
ScreensaverEntity: 'sonoff.0.DZG_DWSB20_2H.DZG_Leistung_Aktuell',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'counter',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'L1-L3',
ScreensaverEntityUnitText: ' W',
ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 5000}
},
// leftScreensaverEntity 3 (only Advanced Screensaver)
{
ScreensaverEntity: '0_userdata.0.Abfallkalender.1.date',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'trash-can',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'Abfall',
ScreensaverEntityUnitText: '',
ScreensaverEntityIconColor: '0_userdata.0.Abfallkalender.1.color'
},
], ],
bottomScreensaverEntity : bottomScreensaverEntity :
@@ -1155,7 +745,7 @@ export const config = <Config> {
ScreensaverEntity: 'accuweather.0.Daily.Day1.Sunrise', ScreensaverEntity: 'accuweather.0.Daily.Day1.Sunrise',
ScreensaverEntityFactor: 1, ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0, ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityDateFormat: 'hh:mm', // like DD.MM or DD.MM.YY or YYYY/MM/DD or hh:mm ScreensaverEntityDateFormat: { hour: '2-digit', minute: '2-digit' }, // Description at Wiki-Pages
ScreensaverEntityIconOn: 'weather-sunset-up', ScreensaverEntityIconOn: 'weather-sunset-up',
ScreensaverEntityIconOff: null, ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'Sonne', ScreensaverEntityText: 'Sonne',
@@ -1187,7 +777,7 @@ export const config = <Config> {
// bottomScreensaverEntity 4 // bottomScreensaverEntity 4
{ {
ScreensaverEntity: 'accuweather.0.Current.WindDirection', ScreensaverEntity: 'accuweather.0.Current.WindDirection',
ScreensaverEntityFactor: 0, ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0, ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'windsock', ScreensaverEntityIconOn: 'windsock',
ScreensaverEntityIconOff: null, ScreensaverEntityIconOff: null,
@@ -1206,76 +796,12 @@ export const config = <Config> {
ScreensaverEntityUnitText: '%', ScreensaverEntityUnitText: '%',
ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 100, 'val_best': 65} ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 100, 'val_best': 65}
}, },
// bottomScreensaverEntity 6 (only Advanced Screensaver) // Examples for Advanced-Screensaver: https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker-Config-Screensaver#entity-status-icons-ab-v400
{
ScreensaverEntity: 'accuweather.0.Current.UVIndex',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'solar-power',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'UV',
ScreensaverEntityUnitText: '',
ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 9}
}
], ],
indicatorScreensaverEntity: indicatorScreensaverEntity:
[ [
// indicatorScreensaverEntity 1 (only Advanced Screensaver) // Examples for Advanced-Screensaver: https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker-Config-Screensaver#entity-status-icons-ab-v400
{
ScreensaverEntity: '0_userdata.0.NSPanel.Indicators.Haus',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'window-closed-variant',
ScreensaverEntityIconOff: 'window-open-variant',
ScreensaverEntityText: 'Fenster',
ScreensaverEntityUnitText: '%',
ScreensaverEntityIconColor: { 'val_min': 0, 'val_max': 1 }
},
// indicatorScreensaverEntity 2 (only Advanced Screensaver)
{
ScreensaverEntity: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Bewegung.ACTUAL',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'motion-sensor',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'Bewegung',
ScreensaverEntityUnitText: '',
ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 1}
},
// indicatorScreensaverEntity 3 (only Advanced Screensaver)
{
ScreensaverEntity: '0_userdata.0.NSPanel.Indicators.Garage',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'garage-variant-lock',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'Garage',
ScreensaverEntityUnitText: '',
ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 1}
},
// indicatorScreensaverEntity 4 (only Advanced Screensaver)
{
ScreensaverEntity: 'worx.0.202130267302000866BF.mower.state',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 0,
ScreensaverEntityIconOn: 'robot-mower-outline',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'Mäher',
ScreensaverEntityUnitText: '%',
ScreensaverEntityIconColor: { 'val_min': 0, 'val_max': 1 }
},
// indicatorScreensaverEntity 5 (only Advanced Screensaver)
{
ScreensaverEntity: '0_userdata.0.Wasserstand.KNOCK.Wert',
ScreensaverEntityFactor: 1,
ScreensaverEntityDecimalPlaces: 1,
ScreensaverEntityIconOn: 'waves-arrow-up',
ScreensaverEntityIconOff: null,
ScreensaverEntityText: 'Feuchte',
ScreensaverEntityUnitText: '%',
ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 985, 'val_best': 500}
}
], ],
mrIcon1ScreensaverEntity: mrIcon1ScreensaverEntity:
@@ -1291,14 +817,14 @@ export const config = <Config> {
}, },
mrIcon2ScreensaverEntity: mrIcon2ScreensaverEntity:
{ {
ScreensaverEntity: 'deconz.0.Sensors.5.open', ScreensaverEntity: NSPanel_Path + 'Relay.2',
ScreensaverEntityIconOn: 'heat-wave', ScreensaverEntityIconOn: 'lightbulb',
ScreensaverEntityIconOff: null, ScreensaverEntityIconOff: null,
ScreensaverEntityValue: 'deconz.0.Sensors.65.temperature', ScreensaverEntityValue: null,
ScreensaverEntityValueDecimalPlace : 1, ScreensaverEntityValueDecimalPlace : 0,
ScreensaverEntityValueUnit: '°', ScreensaverEntityValueUnit: null,
ScreensaverEntityOnColor: MSRed, ScreensaverEntityOnColor: On,
ScreensaverEntityOffColor: Yellow ScreensaverEntityOffColor: HMIOff
}, },
weatherEntity: 'alias.0.Wetter', // Dieser Alias wird automatisch für den gewählten Wetter erstellt und kann entsprechend angepasst werden weatherEntity: 'alias.0.Wetter', // Dieser Alias wird automatisch für den gewählten Wetter erstellt und kann entsprechend angepasst werden
@@ -1307,33 +833,10 @@ export const config = <Config> {
defaultColor: Off, defaultColor: Off,
defaultBackgroundColor: HMIDark, // Default-Hintergrundfarbe HMIDark oder Black defaultBackgroundColor: HMIDark, // Default-Hintergrundfarbe HMIDark oder Black
pages: [ pages: [
Buero_Seite_1, //Beispiel-Seite
WLED, //Beispiel-Seite NSPanel_Service //Auto-Alias Service Page
Radiosender, //Beispiel-Seite
SensorGrid, //Beispiel-Seite
CardLChartExample, //Beispiel-Seite
CardChartExample, //Beispiel-Seite
CardPowerExample, //Beispiel-Seite
//SqueezeboxRPC, //Beispiel-Seite
Sonos, //Beispiel-Seite
SpotifyPremium, //Beispiel-Seite
Alexa, //Beispiel-Seite
Buero_Seite_2, //Beispiel-Seite
Buero_Klimaanlage, //Beispiel-Seite
Button_1, //Beispiel-Seite
Test_Licht1, //Beispiel-Seite
Test_Licht2, //Beispiel-Seite
Test_Funktionen, //Beispiel-Seite
Fenster_1, //Beispiel-Seite
Subpages_1, //Beispiel-Seite
Buero_Themostat, //Beispiel-Seite
Buero_Alarm, //Beispiel-Seite
//Unlock_Service,
NSPanel_Service //Auto-Alias Service Page
], ],
subPages: [ subPages: [
Abfall, //Beispiel-Unterseite
WLAN, //Beispiel-Unterseite
NSPanel_Infos, //Auto-Alias Service Page NSPanel_Infos, //Auto-Alias Service Page
NSPanel_Wifi_Info_1, //Auto-Alias Service Page NSPanel_Wifi_Info_1, //Auto-Alias Service Page
@@ -1372,11 +875,14 @@ export const config = <Config> {
// _________________________________ Ab hier keine Konfiguration mehr _____________________________________ // _________________________________ Ab hier keine Konfiguration mehr _____________________________________
const request = require('request'); const request = require('request');
const moment = require('moment');
const parseFormat = require('moment-parseformat');
moment.locale(getState(NSPanel_Path + 'Config.locale').val);
//Desired Firmware //Desired Firmware
const tft_version: string = 'v4.2.1'; const tft_version: string = 'v4.3.2';
const desired_display_firmware_version = 52; const desired_display_firmware_version = 53;
const berry_driver_version = 8; const berry_driver_version = 9;
const tasmotaOtaUrl: string = 'http://ota.tasmota.com/tasmota32/release/'; const tasmotaOtaUrl: string = 'http://ota.tasmota.com/tasmota32/release/';
let useMediaEvents: boolean = false; let useMediaEvents: boolean = false;
@@ -1412,7 +918,7 @@ async function CheckDebugMode() {
console.log('Debugmodus aktiviert'); console.log('Debugmodus aktiviert');
}else{ }else{
Debug = false; Debug = false;
console.log('Debugmodus deaktiviert') console.log('Debugmodus deaktiviert');
} }
} catch (err) { } catch (err) {
@@ -1472,8 +978,8 @@ async function CheckMQTTPorts() {
CheckMQTTPorts(); CheckMQTTPorts();
async function Init_Release() { async function Init_Release() {
const FWVersion = [41,42,43,44,45,46,47,48,49,50,51,52,53] const FWVersion = [41,42,43,44,45,46,47,48,49,50,51,52,53,54,55];
const FWRelease = ['3.3.1','3.4.0','3.5.0','3.5.X','3.6.0','3.7.3','3.8.0','3.8.3','3.9.4','4.0.5','4.1.4','4.2.1','4.3.0'] const FWRelease = ['3.3.1','3.4.0','3.5.0','3.5.X','3.6.0','3.7.3','3.8.0','3.8.3','3.9.4','4.0.5','4.1.4','4.2.1','4.3.2','4.4.0','4.5.0'];
try { try {
if (existsObject(NSPanel_Path + 'Display_Firmware.desiredVersion') == false) { if (existsObject(NSPanel_Path + 'Display_Firmware.desiredVersion') == false) {
await createStateAsync(NSPanel_Path + 'Display_Firmware.desiredVersion', desired_display_firmware_version, { type: 'number' }); await createStateAsync(NSPanel_Path + 'Display_Firmware.desiredVersion', desired_display_firmware_version, { type: 'number' });
@@ -3457,9 +2963,9 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
iconColor = getState(pageItem.id + '.COLORDEC').val; iconColor = getState(pageItem.id + '.COLORDEC').val;
} else { } else {
if (val === true || val === 'true') { if (val === true || val === 'true') {
iconColor = GetIconColor(pageItem, false, useColors);
} else {
iconColor = GetIconColor(pageItem, true, useColors); iconColor = GetIconColor(pageItem, true, useColors);
} else {
iconColor = GetIconColor(pageItem, false, useColors);
} }
} }
if (val === true || val === 'true') { iconId = iconId2 }; if (val === true || val === 'true') { iconId = iconId2 };
@@ -3506,6 +3012,77 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
if (val === true || val === 'true') { iconId = iconId2 }; if (val === true || val === 'true') { iconId = iconId2 };
break; break;
case 'humidity':
case 'temperature':
case 'value.temperature':
case 'value.humidity':
case 'sensor.door':
case 'sensor.window':
case 'thermostat':
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == 'temperature' || o.common.role == 'value.temperature' || o.common.role == 'thermostat' ? Icons.GetIcon('thermometer') : Icons.GetIcon('information-outline');
let unit = '';
optVal = '0';
if (existsState(pageItem.id + '.ON_ACTUAL')) {
optVal = getState(pageItem.id + '.ON_ACTUAL').val;
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + '.ON_ACTUAL');
} else if (existsState(pageItem.id + '.ACTUAL')) {
optVal = getState(pageItem.id + '.ACTUAL').val;
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + '.ACTUAL');
}
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
if (pageItem.colorScale != undefined) {
let iconvalmin = (pageItem.colorScale.val_min != undefined) ? pageItem.colorScale.val_min : 0 ;
let iconvalmax = (pageItem.colorScale.val_max != undefined) ? pageItem.colorScale.val_max : 100 ;
let iconvalbest = (pageItem.colorScale.val_best != undefined) ? pageItem.colorScale.val_best : iconvalmin ;
let valueScale = val;
if (iconvalmin == 0 && iconvalmax == 1) {
iconColor = (getState(pageItem.id).val == 1) ? rgb_dec565(colorScale0) : rgb_dec565(colorScale10);
} else {
if (iconvalbest == iconvalmin) {
valueScale = scale(valueScale,iconvalmin, iconvalmax, 10, 0);
} else {
if (valueScale < iconvalbest) {
valueScale = scale(valueScale,iconvalmin, iconvalbest, 0, 10);
} else if (valueScale > iconvalbest || iconvalbest != iconvalmin) {
valueScale = scale(valueScale,iconvalbest, iconvalmax, 10, 0);
} else {
valueScale = scale(valueScale,iconvalmin, iconvalmax, 10, 0);
}
}
let valueScaletemp = (Math.round(valueScale)).toFixed();
iconColor = HandleColorScale(valueScaletemp);
}
}
if (existsState(pageItem.id + '.USERICON')) {
iconId = Icons.GetIcon(getState(pageItem.id + '.USERICON').val);
if (Debug) console.log('iconid von ' + pageItem.id + '.USERICON: ' + getState(pageItem.id + '.USERICON').val);
RegisterEntityWatcher(pageItem.id + '.USERICON');
}
if (pageItem.useValue) {
if (pageItem.fontSize != undefined) {
iconId = optVal + '¬' + pageItem.fontSize;
} else {
iconId = optVal;
}
}
buttonText = pageItem.buttonText !== undefined ? pageItem.buttonText : existsState(pageItem.id + '.BUTTONTEXT') ? getState(pageItem.id + '.BUTTONTEXT').val : 'PRESS';
break;
case 'warning': case 'warning':
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('gesture-tap-button'); iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('gesture-tap-button');
iconColor = pageItem.onColor !== undefined ? GetIconColor(pageItem, true, useColors) : getState(pageItem.id + '.LEVEL').val; iconColor = pageItem.onColor !== undefined ? GetIconColor(pageItem, true, useColors) : getState(pageItem.id + '.LEVEL').val;
@@ -3771,7 +3348,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
case 'thermostat': case 'thermostat':
type = 'text'; type = 'text';
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == 'value.temperature' || o.common.role == 'thermostat' ? Icons.GetIcon('thermometer') : Icons.GetIcon('information-outline'); iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == 'temperature' || o.common.role == 'value.temperature' || o.common.role == 'thermostat' ? Icons.GetIcon('thermometer') : Icons.GetIcon('information-outline');
let unit = ''; let unit = '';
optVal = '0'; optVal = '0';
@@ -3784,10 +3361,6 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + '.ACTUAL'); unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + '.ACTUAL');
} }
if (o.common.role == 'value.temperature') {
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('thermometer');
}
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors); iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
if (pageItem.colorScale != undefined) { if (pageItem.colorScale != undefined) {
@@ -3817,7 +3390,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
if (existsState(pageItem.id + '.USERICON')) { if (existsState(pageItem.id + '.USERICON')) {
iconId = Icons.GetIcon(getState(pageItem.id + '.USERICON').val); iconId = Icons.GetIcon(getState(pageItem.id + '.USERICON').val);
console.log(iconId); if (Debug) console.log('iconid von ' + pageItem.id + '.USERICON: ' + getState(pageItem.id + '.USERICON').val);
RegisterEntityWatcher(pageItem.id + '.USERICON'); RegisterEntityWatcher(pageItem.id + '.USERICON');
} }
@@ -3959,10 +3532,10 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
case 'timeTable': case 'timeTable':
type = 'text'; type = 'text';
let itemFahrzeug:string = getState(pageItem.id + '.Fahrzeug').val; let itemFahrzeug:string = getState(pageItem.id + '.VEHICLE').val;
let itemUhrzeit:string = getState(pageItem.id + '.ACTUAL').val; let itemUhrzeit:string = getState(pageItem.id + '.ACTUAL').val;
let itemRichtung:string = getState(pageItem.id + '.Richtung').val; let itemRichtung:string = getState(pageItem.id + '.DIRECTION').val;
let itemVerspätung:boolean = getState(pageItem.id + '.Verspätung').val; let itemVerspaetung:boolean = getState(pageItem.id + '.DELAY').val;
if (Icons.GetIcon(itemFahrzeug) != "") { if (Icons.GetIcon(itemFahrzeug) != "") {
iconId = Icons.GetIcon(itemFahrzeug) iconId = Icons.GetIcon(itemFahrzeug)
@@ -3970,7 +3543,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
iconId='' iconId=''
}; };
iconColor = (!itemVerspätung) ? rgb_dec565(colorScale0) : rgb_dec565(colorScale10); iconColor = (!itemVerspaetung) ? rgb_dec565(colorScale0) : rgb_dec565(colorScale10);
if (Debug) console.log('CreateEntity Icon role timeTable ~' + type + '~' + itemRichtung + '~' + iconId + '~' + iconColor + '~' + itemRichtung + '~' + itemUhrzeit); if (Debug) console.log('CreateEntity Icon role timeTable ~' + type + '~' + itemRichtung + '~' + iconId + '~' + iconColor + '~' + itemRichtung + '~' + itemUhrzeit);
return '~' + type + '~' + itemRichtung + '~' + iconId + '~' + iconColor + '~' + itemRichtung + '~' + itemUhrzeit; return '~' + type + '~' + itemRichtung + '~' + iconId + '~' + iconColor + '~' + itemRichtung + '~' + itemUhrzeit;
@@ -3979,7 +3552,6 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
if (Debug) console.log('CreateEntity Icon keine passende Rolle gefunden'); if (Debug) console.log('CreateEntity Icon keine passende Rolle gefunden');
return '~delete~~~~~'; return '~delete~~~~~';
} }
} }
if (Debug) console.log('CreateEntity return ~delete~~~~~'); if (Debug) console.log('CreateEntity return ~delete~~~~~');
return '~delete~~~~~'; return '~delete~~~~~';
@@ -4255,9 +3827,9 @@ function GenerateThermoPage(page: PageThermo): Payload[] {
case 'POWER': case 'POWER':
if (existsState(id + '.POWER') && getState(id + '.POWER').val != null) { if (existsState(id + '.POWER') && getState(id + '.POWER').val != null) {
if (getState(id + '.POWER').val) { if (getState(id + '.POWER').val) {
bt[i - 1] = Icons.GetIcon('power-standby') + '~2016~1~' + 'POW' + '~'; bt[i - 1] = Icons.GetIcon('power-standby') + '~2016~1~' + 'POWER' + '~';
} else { } else {
bt[i - 1] = Icons.GetIcon('power-standby') + '~33840~1~' + 'POW' + '~'; bt[i - 1] = Icons.GetIcon('power-standby') + '~33840~1~' + 'POWER' + '~';
} }
} else i--; } else i--;
break; break;
@@ -7352,8 +6924,15 @@ function HandleScreensaverUpdate(): void {
} }
else if (typeof(val) == 'string') { else if (typeof(val) == 'string') {
iconColor = GetScreenSaverEntityColor(config.leftScreensaverEntity[i]); iconColor = GetScreenSaverEntityColor(config.leftScreensaverEntity[i]);
if (!isNaN(Date.parse(val))) { let pformat = parseFormat(val);
val = formatDate(getDateObject(val), config.leftScreensaverEntity[i].ScreensaverEntityDateFormat); if (Debug) console.log('moments.js --> Datum ' + val + ' valid?: ' + moment(val, pformat, true).isValid());
if (moment(val, pformat, true).isValid()) {
let DatumZeit = moment(val, pformat).unix(); // Umwandlung in Unix Time-Stamp
if (config.leftScreensaverEntity[i].ScreensaverEntityDateFormat !== undefined) {
val = new Date(DatumZeit * 1000).toLocaleString(getState(NSPanel_Path + 'Config.locale').val, config.leftScreensaverEntity[i].ScreensaverEntityDateFormat);
} else {
val = new Date(DatumZeit * 1000).toLocaleString(getState(NSPanel_Path + 'Config.locale').val);
}
} }
} }
@@ -7486,10 +7065,15 @@ function HandleScreensaverUpdate(): void {
} }
else if (typeof(val) == 'string') { else if (typeof(val) == 'string') {
iconColor = GetScreenSaverEntityColor(config.bottomScreensaverEntity[4]); iconColor = GetScreenSaverEntityColor(config.bottomScreensaverEntity[4]);
if (!isNaN(Date.parse(getState(config.bottomScreensaverEntity[4].ScreensaverEntity).val))) { let pformat = parseFormat(val);
val = formatDate(getDateObject(getState(config.bottomScreensaverEntity[4].ScreensaverEntity).val), config.bottomScreensaverEntity[4].ScreensaverEntityDateFormat); if (Debug) console.log('moments.js --> Datum ' + val + ' valid?: ' + moment(val, pformat, true).isValid());
} else { if (moment(val, pformat, true).isValid()) {
val = getState(config.bottomScreensaverEntity[4].ScreensaverEntity).val; let DatumZeit = moment(val, pformat).unix(); // Umwandlung in Unix Time-Stamp
if (config.bottomScreensaverEntity[4].ScreensaverEntityDateFormat !== undefined) {
val = new Date(DatumZeit * 1000).toLocaleString(getState(NSPanel_Path + 'Config.locale').val, config.bottomScreensaverEntity[4].ScreensaverEntityDateFormat);
} else {
val = new Date(DatumZeit * 1000).toLocaleString(getState(NSPanel_Path + 'Config.locale').val);
}
} }
} }
if (existsObject(config.bottomScreensaverEntity[4].ScreensaverEntityIconColor)) { if (existsObject(config.bottomScreensaverEntity[4].ScreensaverEntityIconColor)) {
@@ -7535,10 +7119,18 @@ function HandleScreensaverUpdate(): void {
} }
else if (typeof(val) == 'string') { else if (typeof(val) == 'string') {
iconColor = GetScreenSaverEntityColor(config.bottomScreensaverEntity[i]); iconColor = GetScreenSaverEntityColor(config.bottomScreensaverEntity[i]);
if (!isNaN(Date.parse(val))) { let pformat = parseFormat(val);
val = formatDate(getDateObject(val), config.bottomScreensaverEntity[i].ScreensaverEntityDateFormat); if (Debug) console.log('moments.js --> Datum ' + val + ' valid?: ' + moment(val, pformat, true).isValid());
if (moment(val, pformat, true).isValid()) {
let DatumZeit = moment(val, pformat).unix(); // Umwandlung in Unix Time-Stamp
if (config.bottomScreensaverEntity[i].ScreensaverEntityDateFormat !== undefined) {
val = new Date(DatumZeit * 1000).toLocaleString(getState(NSPanel_Path + 'Config.locale').val, config.bottomScreensaverEntity[i].ScreensaverEntityDateFormat);
} else {
val = new Date(DatumZeit * 1000).toLocaleString(getState(NSPanel_Path + 'Config.locale').val);
}
} }
} }
if (existsObject(config.bottomScreensaverEntity[i].ScreensaverEntityIconColor)) { if (existsObject(config.bottomScreensaverEntity[i].ScreensaverEntityIconColor)) {
iconColor = getState(config.bottomScreensaverEntity[i].ScreensaverEntityIconColor).val; iconColor = getState(config.bottomScreensaverEntity[i].ScreensaverEntityIconColor).val;
} }
@@ -8607,7 +8199,7 @@ type ScreenSaverElement = {
ScreensaverEntity: string | null, ScreensaverEntity: string | null,
ScreensaverEntityFactor: number | 1, ScreensaverEntityFactor: number | 1,
ScreensaverEntityDecimalPlaces: number | 0, ScreensaverEntityDecimalPlaces: number | 0,
ScreensaverEntityDateFormat: string | null, ScreensaverEntityDateFormat: any | null,
ScreensaverEntityIconOn: string | null, ScreensaverEntityIconOn: string | null,
ScreensaverEntityIconOff: string | null, ScreensaverEntityIconOff: string | null,
ScreensaverEntityText: string | null, ScreensaverEntityText: string | null,

File diff suppressed because it is too large Load Diff

View File

@@ -109,7 +109,7 @@ class Nextion : Driver
log("FLH: Read block",3) log("FLH: Read block",3)
while size(self.flash_buff)<self.flash_block_size && self.tcp.connected() while size(self.flash_buff)<self.flash_block_size && self.tcp.connected()
if self.tcp.available()>0 if self.tcp.available()>0
self.flash_buff += self.tcp.readbytes() self.flash_buff += self.tcp.readbytes(4096)
else else
tasmota.delay(50) tasmota.delay(50)
log("FLH: Wait for available...",3) log("FLH: Wait for available...",3)
@@ -321,7 +321,7 @@ tasmota.add_driver(nextion)
def get_current_version(cmd, idx, payload, payload_json) def get_current_version(cmd, idx, payload, payload_json)
import string import string
var version_of_this_script = 8 var version_of_this_script = 9
var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script) var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script)
tasmota.publish_result(jm, "RESULT") tasmota.publish_result(jm, "RESULT")
end end

Binary file not shown.