mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 15:04:24 +01:00
Compare commits
90 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac832e5f6e | ||
|
|
0808074e85 | ||
|
|
c7f4d4ed78 | ||
|
|
92f172c4bc | ||
|
|
3b3810cf0d | ||
|
|
5b72676c11 | ||
|
|
559e0bfa9f | ||
|
|
7581f4fc47 | ||
|
|
979e52d1f5 | ||
|
|
ba2abef465 | ||
|
|
58da8efc0c | ||
|
|
ed77f897b4 | ||
|
|
4cd5fa9d6d | ||
|
|
cc40d38c41 | ||
|
|
d215029319 | ||
|
|
38a615f7a0 | ||
|
|
ab18effc7b | ||
|
|
e5d1afe5e1 | ||
|
|
c9f305c1ed | ||
|
|
d3f6a8d6ad | ||
|
|
dc96fea0f2 | ||
|
|
e59dcae711 | ||
|
|
1a74a99347 | ||
|
|
5b62ef0d27 | ||
|
|
533db201a8 | ||
|
|
e86e1f6fb4 | ||
|
|
78b3da8843 | ||
|
|
e79a0634ca | ||
|
|
bac8e96932 | ||
|
|
188323a5cc | ||
|
|
fa4417d913 | ||
|
|
95757691bd | ||
|
|
80208e42ed | ||
|
|
b7e4cf647c | ||
|
|
263889737d | ||
|
|
756e212d34 | ||
|
|
c923f7058b | ||
|
|
f9e8f6513c | ||
|
|
211db1ddf4 | ||
|
|
562ce8ce48 | ||
|
|
da1da082e9 | ||
|
|
f8ff39fe67 | ||
|
|
8283c0939c | ||
|
|
0c13622d76 | ||
|
|
01b4aac715 | ||
|
|
5693ec21a8 | ||
|
|
9903b394fe | ||
|
|
c5dc53fd84 | ||
|
|
7649537c62 | ||
|
|
cca8477b36 | ||
|
|
b7a965f3ef | ||
|
|
da0376c8f0 | ||
|
|
125ebee23b | ||
|
|
72314db002 | ||
|
|
73abbd8ea4 | ||
|
|
6b82d5715b | ||
|
|
ad31b90128 | ||
|
|
d31ff9dde5 | ||
|
|
50328fc386 | ||
|
|
147e08aa5f | ||
|
|
9da519dce9 | ||
|
|
ff569829fc | ||
|
|
e2fabe9eb4 | ||
|
|
1097a9c6bb | ||
|
|
2f7189eca5 | ||
|
|
51cb0956a6 | ||
|
|
cca413a761 | ||
|
|
fc9520f2d6 | ||
|
|
49f483c5c6 | ||
|
|
3fa99fbc72 | ||
|
|
f3f7de9210 | ||
|
|
66afb2d5a4 | ||
|
|
19c512b5ea | ||
|
|
62e4333024 | ||
|
|
e53407caaa | ||
|
|
66f69cf21f | ||
|
|
1a0e9c6357 | ||
|
|
06894b21ec | ||
|
|
0a7dd91860 | ||
|
|
a7c9184561 | ||
|
|
4567d7e63c | ||
|
|
92383695df | ||
|
|
ab70eb52fc | ||
|
|
a8ea56e461 | ||
|
|
9b928832cc | ||
|
|
4710b3733d | ||
|
|
fcaa4faae7 | ||
|
|
9436514c71 | ||
|
|
3c418d4c98 | ||
|
|
cd1c03fbb6 |
2
.github/CODEOWNERS
vendored
Normal file
2
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
* @joBr99
|
||||
/ioBroker @britzelpuf
|
||||
6
.github/auto_assign.yml
vendored
Normal file
6
.github/auto_assign.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
addReviewers: true
|
||||
addAssignees: true
|
||||
|
||||
# A list of keywords to be skipped the process that add reviewers if pull requests include it
|
||||
skipKeywords:
|
||||
- wip
|
||||
6
.github/workflows/nextion2text.yml
vendored
6
.github/workflows/nextion2text.yml
vendored
@@ -58,6 +58,11 @@ jobs:
|
||||
python Nextion2Text.py -c ignore-id.py -p font -d -i HMI/US/portrait/nspanel_US_P.HMI -o HMI/US/portrait/n2t-out
|
||||
diff -bur HMI/n2t-out HMI/US/portrait/n2t-out > HMI/US/portrait/diff-eu-version.txt
|
||||
|
||||
- name: Run n2t US P DIFF DIFF
|
||||
continue-on-error: true
|
||||
run: |
|
||||
diff -u HMI/US/portrait/diff-eu-version-known-good.txt HMI/US/portrait/diff-eu-version.txt | grep -E "^\+" > HMI/US/portrait/diff-filtered.txt
|
||||
|
||||
- name: Run n2t US L DIFF
|
||||
continue-on-error: true
|
||||
run: |
|
||||
@@ -65,6 +70,7 @@ jobs:
|
||||
python Nextion2Text.py -c ignore-id.py -p font -d -i HMI/US/landscape/nspanel_US_L.HMI -o HMI/US/landscape/n2t-out
|
||||
diff -bur HMI/n2t-out HMI/US/landscape/n2t-out > HMI/US/landscape/diff-eu-version.txt
|
||||
|
||||
|
||||
- name: Display txt files
|
||||
continue-on-error: true
|
||||
run: |
|
||||
|
||||
@@ -77,6 +77,8 @@ change the page type:
|
||||
|
||||
`weatherUpdate~tMainIcon~tMainText~tForecast1~tF1Icon~tForecast1Val~tForecast2~tF2Icon~tForecast2Val~tForecast3~tF3Icon~tForecast3Val~tForecast4~tF4Icon~tForecast4Val~optionalLayoutIcon~optionalLayoutText`
|
||||
|
||||
`color~background~time~timeAMPM~date~tMainIcon~tMainText~tForecast1~tForecast2~tForecast3~tForecast4~tF1Icon~tF2Icon~tF3Icon~tF4Icon~tForecast1Val~tForecast2Val~tForecast3Val~tForecast4Val~bar~tMainIconAlt~tMainTextAlt~tMRIcon~tMR`
|
||||
|
||||
### cardEntities Page
|
||||
|
||||
The following message can be used to update the content on the cardEntities Page
|
||||
|
||||
@@ -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-04-08 20:30:53.290164509 +0000
|
||||
+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-04-08 20:30:54.170202708 +0000
|
||||
--- HMI/n2t-out/Program.s.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-04-13 20:21:35.478242275 +0000
|
||||
@@ -11,6 +11,6 @@
|
||||
// dim value
|
||||
int dimValue=40
|
||||
@@ -11,8 +11,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-04-08 20:30:53.290164509 +0000
|
||||
+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-04-08 20:30:54.174202881 +0000
|
||||
--- HMI/n2t-out/pageStartup.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-04-13 20:21:35.478242275 +0000
|
||||
@@ -177,7 +177,7 @@
|
||||
recmod=1
|
||||
bauds=115200
|
||||
@@ -22,3 +22,105 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
diff -bur HMI/n2t-out/popupLight.txt HMI/US/landscape/n2t-out/popupLight.txt
|
||||
--- HMI/n2t-out/popupLight.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
+++ HMI/US/landscape/n2t-out/popupLight.txt 2022-04-13 20:21:35.478242275 +0000
|
||||
@@ -570,43 +570,25 @@
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
- if(tId.txt=="pageStartup")
|
||||
- {
|
||||
- page pageStartup
|
||||
- }
|
||||
- if(tId.txt=="screensaver")
|
||||
- {
|
||||
- page screensaver
|
||||
- }
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
- if(tId.txt=="cardGrid")
|
||||
- {
|
||||
- page cardGrid
|
||||
- }
|
||||
- if(tId.txt=="popupLight")
|
||||
+ if(tId.txt=="cardMedia")
|
||||
{
|
||||
- pageIcons.tTmp1.txt=tTmp.txt
|
||||
- page popupLight
|
||||
+ page cardMedia
|
||||
}
|
||||
- if(tId.txt=="popupShutter")
|
||||
+ if(tId.txt=="pageStartup")
|
||||
{
|
||||
- pageIcons.tTmp1.txt=tTmp.txt
|
||||
- page popupShutter
|
||||
+ page pageStartup
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
- if(tId.txt=="cardThermo")
|
||||
- {
|
||||
- page cardThermo
|
||||
- }
|
||||
- if(tId.txt=="cardMedia")
|
||||
+ if(tId.txt=="cardGrid")
|
||||
{
|
||||
- page cardMedia
|
||||
+ page cardGrid
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
diff -bur HMI/n2t-out/screensaver.txt HMI/US/landscape/n2t-out/screensaver.txt
|
||||
--- HMI/n2t-out/screensaver.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
+++ HMI/US/landscape/n2t-out/screensaver.txt 2022-04-13 20:21:35.478242275 +0000
|
||||
@@ -48,18 +48,6 @@
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
-Variable (string) tInstruction
|
||||
- Attributes
|
||||
- Scope : local
|
||||
- Text :
|
||||
- Max. Text Size: 50
|
||||
-
|
||||
-Variable (string) tTmp
|
||||
- Attributes
|
||||
- Scope : local
|
||||
- Text :
|
||||
- Max. Text Size: 50
|
||||
-
|
||||
Text tTime
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -290,6 +278,26 @@
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
+Text tTmp
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text :
|
||||
+ Max. Text Size : 50
|
||||
+
|
||||
+Text tInstruction
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text :
|
||||
+ Max. Text Size : 50
|
||||
+
|
||||
Picture p0
|
||||
Attributes
|
||||
Scope : local
|
||||
|
||||
@@ -1073,7 +1073,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//text arm1
|
||||
|
||||
@@ -2096,7 +2096,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -1036,7 +1036,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -956,7 +956,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -1224,7 +1224,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -10,49 +10,49 @@ pageTest
|
||||
13 Component(s)
|
||||
13 Line(s) of event code
|
||||
13 Unique line(s) of event code
|
||||
screensaver
|
||||
33 Component(s)
|
||||
195 Line(s) of event code
|
||||
152 Unique line(s) of event code
|
||||
cardAlarm
|
||||
35 Component(s)
|
||||
343 Line(s) of event code
|
||||
213 Unique line(s) of event code
|
||||
cardMedia
|
||||
30 Component(s)
|
||||
329 Line(s) of event code
|
||||
169 Unique line(s) of event code
|
||||
popupNotify
|
||||
17 Component(s)
|
||||
178 Line(s) of event code
|
||||
117 Unique line(s) of event code
|
||||
196 Line(s) of event code
|
||||
123 Unique line(s) of event code
|
||||
pageStartup
|
||||
19 Component(s)
|
||||
150 Line(s) of event code
|
||||
113 Unique line(s) of event code
|
||||
cardAlarm
|
||||
35 Component(s)
|
||||
343 Line(s) of event code
|
||||
214 Unique line(s) of event code
|
||||
popupShutter
|
||||
19 Component(s)
|
||||
178 Line(s) of event code
|
||||
101 Unique line(s) of event code
|
||||
cardMedia
|
||||
30 Component(s)
|
||||
329 Line(s) of event code
|
||||
168 Unique line(s) of event code
|
||||
191 Line(s) of event code
|
||||
107 Unique line(s) of event code
|
||||
cardGrid
|
||||
39 Component(s)
|
||||
418 Line(s) of event code
|
||||
244 Unique line(s) of event code
|
||||
cardThermo
|
||||
41 Component(s)
|
||||
442 Line(s) of event code
|
||||
247 Unique line(s) of event code
|
||||
cardEntities
|
||||
62 Component(s)
|
||||
964 Line(s) of event code
|
||||
410 Unique line(s) of event code
|
||||
popupLight
|
||||
27 Component(s)
|
||||
320 Line(s) of event code
|
||||
173 Unique line(s) of event code
|
||||
cardGrid
|
||||
39 Component(s)
|
||||
418 Line(s) of event code
|
||||
243 Unique line(s) of event code
|
||||
cardThermo
|
||||
41 Component(s)
|
||||
442 Line(s) of event code
|
||||
246 Unique line(s) of event code
|
||||
cardEntities
|
||||
62 Component(s)
|
||||
964 Line(s) of event code
|
||||
409 Unique line(s) of event code
|
||||
screensaver
|
||||
33 Component(s)
|
||||
266 Line(s) of event code
|
||||
218 Unique line(s) of event code
|
||||
|
||||
Total
|
||||
12 Page(s)
|
||||
341 Component(s)
|
||||
3540 Line(s) of event code
|
||||
946 Unique line(s) of event code
|
||||
3642 Line(s) of event code
|
||||
1001 Unique line(s) of event code
|
||||
|
||||
@@ -402,7 +402,7 @@ Text tVersion
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text : 30
|
||||
Text : 31
|
||||
Max. Text Size : 10
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
|
||||
@@ -548,25 +548,43 @@ Timer tmSerial
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardGrid
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -631,30 +631,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="popupLight")
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -980,6 +980,77 @@ Timer tmSerial
|
||||
//tMR
|
||||
spstr strCommand.txt,tMR.txt,"~",16
|
||||
}
|
||||
if(tInstruction.txt=="color")
|
||||
{
|
||||
spstr strCommand.txt,tTmp.txt,"~",1
|
||||
covx tTmp.txt,tTime.bco,0,0
|
||||
screensaver.bco=tTime.bco
|
||||
tAMPM.bco=tTime.bco
|
||||
tDate.bco=tTime.bco
|
||||
tMainIcon.bco=tTime.bco
|
||||
tMainText.bco=tTime.bco
|
||||
tMainIconAlt.bco=tTime.bco
|
||||
tMainTextAlt.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tMR.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tForecast1.bco=tTime.bco
|
||||
tForecast1Val.bco=tTime.bco
|
||||
tF1Icon.bco=tTime.bco
|
||||
tForecast2.bco=tTime.bco
|
||||
tForecast2Val.bco=tTime.bco
|
||||
tF2Icon.bco=tTime.bco
|
||||
tForecast3.bco=tTime.bco
|
||||
tForecast3Val.bco=tTime.bco
|
||||
tF3Icon.bco=tTime.bco
|
||||
tForecast4.bco=tTime.bco
|
||||
tForecast4Val.bco=tTime.bco
|
||||
tF4Icon.bco=tTime.bco
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,tTime.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,tAMPM.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
covx tTmp.txt,tDate.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
covx tTmp.txt,tMainIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
covx tTmp.txt,tMainText.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,tForecast1.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",8
|
||||
covx tTmp.txt,tForecast2.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,tForecast3.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",10
|
||||
covx tTmp.txt,tForecast4.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",11
|
||||
covx tTmp.txt,tF1Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",12
|
||||
covx tTmp.txt,tF2Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,tF3Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",14
|
||||
covx tTmp.txt,tF4Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,tForecast1Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",16
|
||||
covx tTmp.txt,tForecast2Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",17
|
||||
covx tTmp.txt,tForecast3Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",18
|
||||
covx tTmp.txt,tForecast4Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",19
|
||||
covx tTmp.txt,t10.bco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",20
|
||||
covx tTmp.txt,tMainIconAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
covx tTmp.txt,tMainTextAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",22
|
||||
covx tTmp.txt,tMRIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",23
|
||||
covx tTmp.txt,tMR.pco,0,0
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
dim=100
|
||||
|
||||
@@ -543,7 +543,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//text arm1
|
||||
|
||||
@@ -1151,7 +1151,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -599,7 +599,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -534,7 +534,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -671,7 +671,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -152,7 +152,7 @@ Text tVersion
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text : 30
|
||||
Text : 31
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture p0
|
||||
|
||||
@@ -339,25 +339,43 @@ Timer tmSerial
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardGrid
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -366,30 +366,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="popupLight")
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -458,6 +458,77 @@ Timer tmSerial
|
||||
//tMR
|
||||
spstr strCommand.txt,tMR.txt,"~",16
|
||||
}
|
||||
if(tInstruction.txt=="color")
|
||||
{
|
||||
spstr strCommand.txt,tTmp.txt,"~",1
|
||||
covx tTmp.txt,tTime.bco,0,0
|
||||
screensaver.bco=tTime.bco
|
||||
tAMPM.bco=tTime.bco
|
||||
tDate.bco=tTime.bco
|
||||
tMainIcon.bco=tTime.bco
|
||||
tMainText.bco=tTime.bco
|
||||
tMainIconAlt.bco=tTime.bco
|
||||
tMainTextAlt.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tMR.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tForecast1.bco=tTime.bco
|
||||
tForecast1Val.bco=tTime.bco
|
||||
tF1Icon.bco=tTime.bco
|
||||
tForecast2.bco=tTime.bco
|
||||
tForecast2Val.bco=tTime.bco
|
||||
tF2Icon.bco=tTime.bco
|
||||
tForecast3.bco=tTime.bco
|
||||
tForecast3Val.bco=tTime.bco
|
||||
tF3Icon.bco=tTime.bco
|
||||
tForecast4.bco=tTime.bco
|
||||
tForecast4Val.bco=tTime.bco
|
||||
tF4Icon.bco=tTime.bco
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,tTime.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,tAMPM.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
covx tTmp.txt,tDate.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
covx tTmp.txt,tMainIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
covx tTmp.txt,tMainText.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,tForecast1.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",8
|
||||
covx tTmp.txt,tForecast2.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,tForecast3.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",10
|
||||
covx tTmp.txt,tForecast4.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",11
|
||||
covx tTmp.txt,tF1Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",12
|
||||
covx tTmp.txt,tF2Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,tF3Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",14
|
||||
covx tTmp.txt,tF4Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,tForecast1Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",16
|
||||
covx tTmp.txt,tForecast2Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",17
|
||||
covx tTmp.txt,tForecast3Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",18
|
||||
covx tTmp.txt,tForecast4Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",19
|
||||
covx tTmp.txt,t10.bco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",20
|
||||
covx tTmp.txt,tMainIconAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
covx tTmp.txt,tMainTextAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",22
|
||||
covx tTmp.txt,tMRIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",23
|
||||
covx tTmp.txt,tMR.pco,0,0
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
dim=100
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -27,16 +27,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ vis bText5,0
|
||||
+ vis hSlider5,0
|
||||
+ vis nNum5,0
|
||||
+ //ui e6
|
||||
+ vis btOnOff6,0
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis tIcon6,0
|
||||
+ vis tEntity6,0
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
@@ -50,23 +41,12 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ Text :
|
||||
+ Max. Text Size: 70
|
||||
+
|
||||
+Variable (string) entn6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 70
|
||||
+
|
||||
+Variable (string) type5
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 10
|
||||
+
|
||||
+Variable (string) type6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 10
|
||||
+
|
||||
Number nNum1
|
||||
Attributes
|
||||
@@ -84,15 +64,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ Associated Keyboard : none
|
||||
+ Value : 0
|
||||
+
|
||||
+Number nNum6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Value : 0
|
||||
+
|
||||
|
||||
Text tHeading
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -120,26 +92,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ Text : î°
|
||||
+ Max. Text Size : 5
|
||||
+
|
||||
+Text tEntity6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text : tEntity6
|
||||
+ Max. Text Size : 30
|
||||
+
|
||||
+Text tIcon6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text : î°
|
||||
+ Max. Text Size : 5
|
||||
+
|
||||
|
||||
Picture p0
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -175,34 +128,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Slider hSlider6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Position : 50
|
||||
+ Upper range limit : 100
|
||||
+ Lower range limit : 0
|
||||
+
|
||||
+ Events
|
||||
+ Touch Release Event
|
||||
+ nNum6.val=hSlider6.val
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",number-set,"
|
||||
+ covx nNum6.val,tTmp.txt,0,0
|
||||
+ tSend.txt+=tTmp.txt
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
|
||||
Button bDown1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -310,106 +236,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bStop6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : î
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",stop"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bDown6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : î
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",down"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bUp6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : î
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",up"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bText6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : newtxt
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",button"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
|
||||
Dual-state Button btOnOff1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -444,33 +271,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Dual-state Button btOnOff6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text :
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",OnOff,"
|
||||
+ covx btOnOff6.val,tTmp.txt,0,0
|
||||
+ tSend.txt+=tTmp.txt
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
|
||||
Hotspot mSpecial
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -500,39 +301,18 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ page popupLight
|
||||
+ }
|
||||
+
|
||||
+Hotspot m5
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ pageIcons.tTmp1.txt=tEntity6.txt
|
||||
+ pageIcons.tTmp2.txt=entn6.txt
|
||||
+ if(type6.txt=="shutter")
|
||||
+ {
|
||||
+ //popupShutter.tHeading.txt=tEntity6.txt
|
||||
+ page popupShutter
|
||||
+ }
|
||||
+ if(type6.txt=="light")
|
||||
+ {
|
||||
+ //popupLight.tEntity.txt=tEntity6.txt
|
||||
+ page popupLight
|
||||
+ }
|
||||
+
|
||||
|
||||
Timer tmSerial
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1648,6 +2104,254 @@
|
||||
@@ -1642,6 +2098,250 @@
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hSlider4.maxval=sys0
|
||||
}
|
||||
+ // get Type
|
||||
+ spstr strCommand.txt,type5.txt,",",27
|
||||
+ spstr strCommand.txt,type5.txt,"~",27
|
||||
+ // get internal name
|
||||
+ spstr strCommand.txt,entn5.txt,",",28
|
||||
+ spstr strCommand.txt,entn5.txt,"~",28
|
||||
+ if(type5.txt=="delete"||type5.txt=="")
|
||||
+ {
|
||||
+ vis bUp5,0
|
||||
@@ -547,16 +327,14 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ }else
|
||||
+ {
|
||||
+ // change icon
|
||||
+ spstr strCommand.txt,tTmp.txt,",",29
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ substr pageIcons.tIcons.txt,tIcon5.txt,sys0,1
|
||||
+ spstr strCommand.txt,tIcon5.txt,"~",29
|
||||
+ vis tIcon5,1
|
||||
+ // change icon color
|
||||
+ spstr strCommand.txt,tTmp.txt,",",30
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",30
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ tIcon5.pco=sys0
|
||||
+ // set name
|
||||
+ spstr strCommand.txt,tEntity5.txt,",",31
|
||||
+ spstr strCommand.txt,tEntity5.txt,"~",31
|
||||
+ vis tEntity5,1
|
||||
+ }
|
||||
+ if(type5.txt=="shutter")
|
||||
@@ -579,7 +357,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ vis hSlider5,0
|
||||
+ vis nNum5,0
|
||||
+ // get Button State (optional Value)
|
||||
+ spstr strCommand.txt,tTmp.txt,",",32
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",32
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ btOnOff5.val=sys0
|
||||
+ }
|
||||
@@ -593,7 +371,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ vis hSlider5,0
|
||||
+ vis nNum5,0
|
||||
+ // get Button State (optional Value)
|
||||
+ spstr strCommand.txt,tTmp.txt,",",32
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",32
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ btOnOff5.val=sys0
|
||||
+ }
|
||||
@@ -610,7 +388,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ bText5.pco=65535
|
||||
+ bText5.pco2=65535
|
||||
+ // get Text (optional Value)
|
||||
+ spstr strCommand.txt,bText5.txt,",",32
|
||||
+ spstr strCommand.txt,bText5.txt,"~",32
|
||||
+ }
|
||||
+ if(type5.txt=="button")
|
||||
+ {
|
||||
@@ -625,7 +403,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ bText5.pco=1374
|
||||
+ bText5.pco2=1374
|
||||
+ // get Text (optional Value)
|
||||
+ spstr strCommand.txt,bText5.txt,",",32
|
||||
+ spstr strCommand.txt,bText5.txt,"~",32
|
||||
+ }
|
||||
+ if(type5.txt=="number")
|
||||
+ {
|
||||
@@ -638,7 +416,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ vis hSlider5,1
|
||||
+ vis nNum5,1
|
||||
+ // get config (optional Value) (use bText as variable)
|
||||
+ spstr strCommand.txt,bText5.txt,",",32
|
||||
+ spstr strCommand.txt,bText5.txt,"~",32
|
||||
+ //first value is current value
|
||||
+ spstr bText5.txt,tTmp.txt,"|",0
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
@@ -653,133 +431,7 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider5.maxval=sys0
|
||||
+ }
|
||||
+ // get Type
|
||||
+ spstr strCommand.txt,type6.txt,",",33
|
||||
+ // get internal name
|
||||
+ spstr strCommand.txt,entn6.txt,",",34
|
||||
+ if(type6.txt=="delete"||type6.txt=="")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis tEntity6,0
|
||||
+ vis tIcon6,0
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ }else
|
||||
+ {
|
||||
+ // change icon
|
||||
+ spstr strCommand.txt,tTmp.txt,",",35
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ substr pageIcons.tIcons.txt,tIcon6.txt,sys0,1
|
||||
+ vis tIcon6,1
|
||||
+ // change icon color
|
||||
+ spstr strCommand.txt,tTmp.txt,",",36
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ tIcon6.pco=sys0
|
||||
+ // set name
|
||||
+ spstr strCommand.txt,tEntity6.txt,",",37
|
||||
+ vis tEntity6,1
|
||||
+ }
|
||||
+ if(type6.txt=="shutter")
|
||||
+ {
|
||||
+ vis bUp6,1
|
||||
+ vis bStop6,1
|
||||
+ vis bDown6,1
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ }
|
||||
+ if(type6.txt=="light")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,1
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ // get Button State (optional Value)
|
||||
+ spstr strCommand.txt,tTmp.txt,",",38
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ btOnOff6.val=sys0
|
||||
+ }
|
||||
+ if(type6.txt=="switch")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,1
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ // get Button State (optional Value)
|
||||
+ spstr strCommand.txt,tTmp.txt,",",38
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ btOnOff6.val=sys0
|
||||
+ }
|
||||
+ if(type6.txt=="text")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,1
|
||||
+ tsw bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ bText6.pco=65535
|
||||
+ bText6.pco2=65535
|
||||
+ // get Text (optional Value)
|
||||
+ spstr strCommand.txt,bText6.txt,",",38
|
||||
+ }
|
||||
+ if(type6.txt=="button")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,1
|
||||
+ tsw bText6,1
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ bText6.pco=1374
|
||||
+ bText6.pco2=1374
|
||||
+ // get Text (optional Value)
|
||||
+ spstr strCommand.txt,bText6.txt,",",38
|
||||
+ }
|
||||
+ if(type6.txt=="number")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,0
|
||||
+ tsw bText6,0
|
||||
+ vis hSlider6,1
|
||||
+ vis nNum6,1
|
||||
+ // get config (optional Value) (use bText as variable)
|
||||
+ spstr strCommand.txt,bText6.txt,",",38
|
||||
+ //first value is current value
|
||||
+ spstr bText6.txt,tTmp.txt,"|",0
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider6.val=sys0
|
||||
+ nNum6.val=sys0
|
||||
+ //second value is min value
|
||||
+ spstr bText6.txt,tTmp.txt,"|",1
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider6.minval=sys0
|
||||
+ //third value is max value
|
||||
+ spstr bText6.txt,tTmp.txt,"|",2
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider6.maxval=sys0
|
||||
+ }
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
|
||||
diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
|
||||
--- HMI/n2t-out/pageStartup.txt 2022-04-01 04:54:12.884151859 +0000
|
||||
+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-04-01 04:54:13.372185922 +0000
|
||||
|
||||
@@ -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-04-08 20:30:53.290164509 +0000
|
||||
+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-04-08 20:30:53.734183782 +0000
|
||||
--- HMI/n2t-out/Program.s.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-04-13 20:21:35.070233972 +0000
|
||||
@@ -11,6 +11,6 @@
|
||||
// dim value
|
||||
int dimValue=40
|
||||
@@ -11,9 +11,9 @@ 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-04-08 20:30:53.290164509 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-04-08 20:30:53.738183956 +0000
|
||||
@@ -62,6 +62,26 @@
|
||||
--- HMI/n2t-out/cardEntities.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-04-13 20:21:35.070233972 +0000
|
||||
@@ -62,6 +62,16 @@
|
||||
vis bText4,0
|
||||
vis hSlider4,0
|
||||
vis nNum4,0
|
||||
@@ -27,20 +27,10 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ vis bText5,0
|
||||
+ vis hSlider5,0
|
||||
+ vis nNum5,0
|
||||
+ //ui e6
|
||||
+ vis btOnOff6,0
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis tIcon6,0
|
||||
+ vis tEntity6,0
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
@@ -117,6 +137,30 @@
|
||||
@@ -117,6 +127,18 @@
|
||||
Text :
|
||||
Max. Text Size: 70
|
||||
|
||||
@@ -50,28 +40,16 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ Text :
|
||||
+ Max. Text Size: 70
|
||||
+
|
||||
+Variable (string) entn6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 70
|
||||
+
|
||||
+Variable (string) type5
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 10
|
||||
+
|
||||
+Variable (string) type6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 10
|
||||
+
|
||||
Number nNum1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -153,6 +197,24 @@
|
||||
@@ -153,6 +175,15 @@
|
||||
Associated Keyboard : none
|
||||
Value : 0
|
||||
|
||||
@@ -83,20 +61,11 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Value : 0
|
||||
+
|
||||
+Number nNum6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Value : 0
|
||||
+
|
||||
Text tHeading
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -283,6 +345,46 @@
|
||||
@@ -283,6 +314,26 @@
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
@@ -119,31 +88,11 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ Associated Keyboard : none
|
||||
+ Text : î°
|
||||
+ Max. Text Size : 5
|
||||
+
|
||||
+Text tEntity6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text : tEntity6
|
||||
+ Max. Text Size : 30
|
||||
+
|
||||
+Text tIcon6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text : î°
|
||||
+ Max. Text Size : 5
|
||||
+
|
||||
Picture p0
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -402,6 +504,62 @@
|
||||
@@ -402,6 +453,34 @@
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
@@ -174,39 +123,11 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Slider hSlider6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Position : 50
|
||||
+ Upper range limit : 100
|
||||
+ Lower range limit : 0
|
||||
+
|
||||
+ Events
|
||||
+ Touch Release Event
|
||||
+ nNum6.val=hSlider6.val
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",number-set,"
|
||||
+ covx nNum6.val,tTmp.txt,0,0
|
||||
+ tSend.txt+=tTmp.txt
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
Button bDown1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -859,6 +1017,206 @@
|
||||
@@ -859,6 +938,106 @@
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
@@ -309,111 +230,11 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bStop6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : î
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",stop"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bDown6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : î
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",down"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bUp6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : î
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",up"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Button bText6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text : newtxt
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",button"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
Dual-state Button btOnOff1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -967,6 +1325,60 @@
|
||||
@@ -967,6 +1146,33 @@
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
@@ -443,38 +264,11 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Dual-state Button btOnOff6
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ State : unpressed
|
||||
+ Text :
|
||||
+ Max. Text Size : 10
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn6.txt+",OnOff,"
|
||||
+ covx btOnOff6.val,tTmp.txt,0,0
|
||||
+ tSend.txt+=tTmp.txt
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,1
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
Hotspot mSpecial
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1072,6 +1484,50 @@
|
||||
@@ -1072,6 +1278,28 @@
|
||||
page popupLight
|
||||
}
|
||||
|
||||
@@ -499,33 +293,11 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ //popupLight.tEntity.txt=tEntity5.txt
|
||||
+ page popupLight
|
||||
+ }
|
||||
+
|
||||
+Hotspot m5
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+
|
||||
+ Events
|
||||
+ Touch Press Event
|
||||
+ pageIcons.tTmp1.txt=tEntity6.txt
|
||||
+ pageIcons.tTmp2.txt=entn6.txt
|
||||
+ if(type6.txt=="shutter")
|
||||
+ {
|
||||
+ //popupShutter.tHeading.txt=tEntity6.txt
|
||||
+ page popupShutter
|
||||
+ }
|
||||
+ if(type6.txt=="light")
|
||||
+ {
|
||||
+ //popupLight.tEntity.txt=tEntity6.txt
|
||||
+ page popupLight
|
||||
+ }
|
||||
+
|
||||
Timer tmSerial
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1642,6 +2098,250 @@
|
||||
@@ -1642,6 +1870,128 @@
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hSlider4.maxval=sys0
|
||||
}
|
||||
@@ -650,135 +422,13 @@ diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
+ spstr bText5.txt,tTmp.txt,"|",2
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider5.maxval=sys0
|
||||
+ }
|
||||
+ // get Type
|
||||
+ spstr strCommand.txt,type6.txt,"~",33
|
||||
+ // get internal name
|
||||
+ spstr strCommand.txt,entn6.txt,"~",34
|
||||
+ if(type6.txt=="delete"||type6.txt=="")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis tEntity6,0
|
||||
+ vis tIcon6,0
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ }else
|
||||
+ {
|
||||
+ // change icon
|
||||
+ spstr strCommand.txt,tIcon6.txt,"~",35
|
||||
+ vis tIcon6,1
|
||||
+ // change icon color
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",36
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ tIcon6.pco=sys0
|
||||
+ // set name
|
||||
+ spstr strCommand.txt,tEntity6.txt,"~",37
|
||||
+ vis tEntity6,1
|
||||
+ }
|
||||
+ if(type6.txt=="shutter")
|
||||
+ {
|
||||
+ vis bUp6,1
|
||||
+ vis bStop6,1
|
||||
+ vis bDown6,1
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ }
|
||||
+ if(type6.txt=="light")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,1
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ // get Button State (optional Value)
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",38
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ btOnOff6.val=sys0
|
||||
+ }
|
||||
+ if(type6.txt=="switch")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,1
|
||||
+ vis bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ // get Button State (optional Value)
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",38
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ btOnOff6.val=sys0
|
||||
+ }
|
||||
+ if(type6.txt=="text")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,1
|
||||
+ tsw bText6,0
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ bText6.pco=65535
|
||||
+ bText6.pco2=65535
|
||||
+ // get Text (optional Value)
|
||||
+ spstr strCommand.txt,bText6.txt,"~",38
|
||||
+ }
|
||||
+ if(type6.txt=="button")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,1
|
||||
+ tsw bText6,1
|
||||
+ vis hSlider6,0
|
||||
+ vis nNum6,0
|
||||
+ bText6.pco=1374
|
||||
+ bText6.pco2=1374
|
||||
+ // get Text (optional Value)
|
||||
+ spstr strCommand.txt,bText6.txt,"~",38
|
||||
+ }
|
||||
+ if(type6.txt=="number")
|
||||
+ {
|
||||
+ vis bUp6,0
|
||||
+ vis bStop6,0
|
||||
+ vis bDown6,0
|
||||
+ vis btOnOff6,0
|
||||
+ vis bText6,0
|
||||
+ tsw bText6,0
|
||||
+ vis hSlider6,1
|
||||
+ vis nNum6,1
|
||||
+ // get config (optional Value) (use bText as variable)
|
||||
+ spstr strCommand.txt,bText6.txt,"~",38
|
||||
+ //first value is current value
|
||||
+ spstr bText6.txt,tTmp.txt,"|",0
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider6.val=sys0
|
||||
+ nNum6.val=sys0
|
||||
+ //second value is min value
|
||||
+ spstr bText6.txt,tTmp.txt,"|",1
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider6.minval=sys0
|
||||
+ //third value is max value
|
||||
+ spstr bText6.txt,tTmp.txt,"|",2
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider6.maxval=sys0
|
||||
+ }
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
|
||||
--- HMI/n2t-out/pageStartup.txt 2022-04-08 20:30:53.290164509 +0000
|
||||
+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-04-08 20:30:53.734183782 +0000
|
||||
--- HMI/n2t-out/pageStartup.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-04-13 20:21:35.070233972 +0000
|
||||
@@ -142,7 +142,7 @@
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
@@ -797,60 +447,3 @@ diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
diff -bur HMI/n2t-out/screensaver.txt HMI/US/portrait/n2t-out/screensaver.txt
|
||||
--- HMI/n2t-out/screensaver.txt 2022-04-08 20:30:53.290164509 +0000
|
||||
+++ HMI/US/portrait/n2t-out/screensaver.txt 2022-04-08 20:30:53.738183956 +0000
|
||||
@@ -48,6 +48,26 @@
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
+Text tInstruction
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text :
|
||||
+ Max. Text Size : 50
|
||||
+
|
||||
+Text tTmp
|
||||
+ Attributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Disable release event after dragging: 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard : none
|
||||
+ Text :
|
||||
+ Max. Text Size : 50
|
||||
+
|
||||
Text tTime
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -278,26 +298,6 @@
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
-Text tTmp
|
||||
- Attributes
|
||||
- Scope : local
|
||||
- Dragging : 0
|
||||
- Disable release event after dragging: 0
|
||||
- Send Component ID : disabled
|
||||
- Associated Keyboard : none
|
||||
- Text :
|
||||
- Max. Text Size : 50
|
||||
-
|
||||
-Text tInstruction
|
||||
- Attributes
|
||||
- Scope : local
|
||||
- Dragging : 0
|
||||
- Disable release event after dragging: 0
|
||||
- Send Component ID : disabled
|
||||
- Associated Keyboard : none
|
||||
- Text :
|
||||
- Max. Text Size : 50
|
||||
-
|
||||
Picture p0
|
||||
Attributes
|
||||
Scope : local
|
||||
|
||||
19
HMI/US/portrait/diff-filtered.txt
Normal file
19
HMI/US/portrait/diff-filtered.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
+++ HMI/US/portrait/diff-eu-version.txt 2022-04-13 20:21:35.094234461 +0000
|
||||
+--- HMI/n2t-out/Program.s.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
++++ HMI/US/portrait/n2t-out/Program.s.txt 2022-04-13 20:21:35.070233972 +0000
|
||||
+--- HMI/n2t-out/cardEntities.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
++++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-04-13 20:21:35.070233972 +0000
|
||||
+@@ -62,6 +62,16 @@
|
||||
+@@ -117,6 +127,18 @@
|
||||
+@@ -153,6 +175,15 @@
|
||||
+@@ -283,6 +314,26 @@
|
||||
+@@ -402,6 +453,34 @@
|
||||
+@@ -859,6 +938,106 @@
|
||||
+@@ -967,6 +1146,33 @@
|
||||
+@@ -1072,6 +1278,28 @@
|
||||
+@@ -1642,6 +1870,128 @@
|
||||
+ }
|
||||
+ if(tInstruction.txt=="pageType")
|
||||
+ {
|
||||
+--- HMI/n2t-out/pageStartup.txt 2022-04-13 20:21:34.698226402 +0000
|
||||
++++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-04-13 20:21:35.070233972 +0000
|
||||
@@ -1073,7 +1073,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//text arm1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1036,7 +1036,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -956,7 +956,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -1224,7 +1224,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -10,49 +10,49 @@ pageIcons
|
||||
6 Component(s)
|
||||
0 Line(s) of event code
|
||||
0 Unique line(s) of event code
|
||||
popupNotify
|
||||
17 Component(s)
|
||||
196 Line(s) of event code
|
||||
123 Unique line(s) of event code
|
||||
popupShutter
|
||||
19 Component(s)
|
||||
191 Line(s) of event code
|
||||
107 Unique line(s) of event code
|
||||
pageStartup
|
||||
19 Component(s)
|
||||
150 Line(s) of event code
|
||||
113 Unique line(s) of event code
|
||||
popupNotify
|
||||
17 Component(s)
|
||||
178 Line(s) of event code
|
||||
117 Unique line(s) of event code
|
||||
popupLight
|
||||
27 Component(s)
|
||||
338 Line(s) of event code
|
||||
182 Unique line(s) of event code
|
||||
screensaver
|
||||
33 Component(s)
|
||||
195 Line(s) of event code
|
||||
152 Unique line(s) of event code
|
||||
cardEntities
|
||||
86 Component(s)
|
||||
1350 Line(s) of event code
|
||||
547 Unique line(s) of event code
|
||||
266 Line(s) of event code
|
||||
218 Unique line(s) of event code
|
||||
cardMedia
|
||||
30 Component(s)
|
||||
329 Line(s) of event code
|
||||
168 Unique line(s) of event code
|
||||
169 Unique line(s) of event code
|
||||
cardAlarm
|
||||
35 Component(s)
|
||||
343 Line(s) of event code
|
||||
213 Unique line(s) of event code
|
||||
214 Unique line(s) of event code
|
||||
cardGrid
|
||||
39 Component(s)
|
||||
418 Line(s) of event code
|
||||
243 Unique line(s) of event code
|
||||
244 Unique line(s) of event code
|
||||
cardThermo
|
||||
41 Component(s)
|
||||
442 Line(s) of event code
|
||||
246 Unique line(s) of event code
|
||||
popupShutter
|
||||
19 Component(s)
|
||||
178 Line(s) of event code
|
||||
101 Unique line(s) of event code
|
||||
popupLight
|
||||
27 Component(s)
|
||||
320 Line(s) of event code
|
||||
173 Unique line(s) of event code
|
||||
247 Unique line(s) of event code
|
||||
cardEntities
|
||||
74 Component(s)
|
||||
1157 Line(s) of event code
|
||||
479 Unique line(s) of event code
|
||||
|
||||
Total
|
||||
12 Page(s)
|
||||
365 Component(s)
|
||||
3926 Line(s) of event code
|
||||
1059 Unique line(s) of event code
|
||||
353 Component(s)
|
||||
3853 Line(s) of event code
|
||||
1057 Unique line(s) of event code
|
||||
|
||||
@@ -402,7 +402,7 @@ Text tVersion
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text : 30
|
||||
Text : 31
|
||||
Max. Text Size : 10
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
|
||||
@@ -916,25 +916,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -548,25 +548,43 @@ Timer tmSerial
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardGrid
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -631,30 +631,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="popupLight")
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -48,80 +48,34 @@ Variable (string) strCommand
|
||||
|
||||
Variable (string) tId
|
||||
Attributes
|
||||
ID : 19
|
||||
ID : 17
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 25
|
||||
|
||||
Variable (int32) vaTap
|
||||
Attributes
|
||||
ID : 27
|
||||
ID : 25
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text tInstruction
|
||||
Variable (string) tInstruction
|
||||
Attributes
|
||||
ID : 5
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 260
|
||||
y coordinate : 446
|
||||
Width : 26
|
||||
Height : 30
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
Fill : solid color
|
||||
Style : flat
|
||||
Associated Keyboard : none
|
||||
Font ID : 0
|
||||
Back. Color : 65535
|
||||
Font Color : 0
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
Max. Text Size: 50
|
||||
|
||||
Text tTmp
|
||||
Variable (string) tTmp
|
||||
Attributes
|
||||
ID : 6
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 293
|
||||
y coordinate : 447
|
||||
Width : 25
|
||||
Height : 30
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
Fill : solid color
|
||||
Style : flat
|
||||
Associated Keyboard : none
|
||||
Font ID : 0
|
||||
Back. Color : 65535
|
||||
Font Color : 0
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
Max. Text Size: 50
|
||||
|
||||
Text tTime
|
||||
Attributes
|
||||
ID : 7
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -151,7 +105,7 @@ Text tTime
|
||||
|
||||
Text tDate
|
||||
Attributes
|
||||
ID : 8
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -181,7 +135,7 @@ Text tDate
|
||||
|
||||
Text tSend
|
||||
Attributes
|
||||
ID : 9
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -211,7 +165,7 @@ Text tSend
|
||||
|
||||
Text tMainIcon
|
||||
Attributes
|
||||
ID : 10
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -241,7 +195,7 @@ Text tMainIcon
|
||||
|
||||
Text tMainText
|
||||
Attributes
|
||||
ID : 11
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -271,7 +225,7 @@ Text tMainText
|
||||
|
||||
Text tForecast1
|
||||
Attributes
|
||||
ID : 12
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -301,7 +255,7 @@ Text tForecast1
|
||||
|
||||
Text tForecast1Val
|
||||
Attributes
|
||||
ID : 13
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -331,7 +285,7 @@ Text tForecast1Val
|
||||
|
||||
Text tF1Icon
|
||||
Attributes
|
||||
ID : 14
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -361,7 +315,7 @@ Text tF1Icon
|
||||
|
||||
Text tForecast2
|
||||
Attributes
|
||||
ID : 15
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -391,7 +345,7 @@ Text tForecast2
|
||||
|
||||
Text tF2Icon
|
||||
Attributes
|
||||
ID : 16
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -421,7 +375,7 @@ Text tF2Icon
|
||||
|
||||
Text tForecast2Val
|
||||
Attributes
|
||||
ID : 17
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -451,7 +405,7 @@ Text tForecast2Val
|
||||
|
||||
Text t10
|
||||
Attributes
|
||||
ID : 18
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -481,7 +435,7 @@ Text t10
|
||||
|
||||
Text tAMPM
|
||||
Attributes
|
||||
ID : 20
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -511,7 +465,7 @@ Text tAMPM
|
||||
|
||||
Text tForecast3Val
|
||||
Attributes
|
||||
ID : 21
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -541,7 +495,7 @@ Text tForecast3Val
|
||||
|
||||
Text tF3Icon
|
||||
Attributes
|
||||
ID : 22
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -571,7 +525,7 @@ Text tF3Icon
|
||||
|
||||
Text tForecast3
|
||||
Attributes
|
||||
ID : 23
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -601,7 +555,7 @@ Text tForecast3
|
||||
|
||||
Text tForecast4
|
||||
Attributes
|
||||
ID : 24
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -631,7 +585,7 @@ Text tForecast4
|
||||
|
||||
Text tF4Icon
|
||||
Attributes
|
||||
ID : 25
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -661,7 +615,7 @@ Text tF4Icon
|
||||
|
||||
Text tForecast4Val
|
||||
Attributes
|
||||
ID : 26
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -691,7 +645,7 @@ Text tForecast4Val
|
||||
|
||||
Text tMainTextAlt
|
||||
Attributes
|
||||
ID : 29
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -721,7 +675,7 @@ Text tMainTextAlt
|
||||
|
||||
Text tMainIconAlt
|
||||
Attributes
|
||||
ID : 30
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -751,7 +705,7 @@ Text tMainIconAlt
|
||||
|
||||
Text tMRIcon
|
||||
Attributes
|
||||
ID : 31
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -781,7 +735,7 @@ Text tMRIcon
|
||||
|
||||
Text tMR
|
||||
Attributes
|
||||
ID : 32
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
@@ -980,6 +934,77 @@ Timer tmSerial
|
||||
//tMR
|
||||
spstr strCommand.txt,tMR.txt,"~",16
|
||||
}
|
||||
if(tInstruction.txt=="color")
|
||||
{
|
||||
spstr strCommand.txt,tTmp.txt,"~",1
|
||||
covx tTmp.txt,tTime.bco,0,0
|
||||
screensaver.bco=tTime.bco
|
||||
tAMPM.bco=tTime.bco
|
||||
tDate.bco=tTime.bco
|
||||
tMainIcon.bco=tTime.bco
|
||||
tMainText.bco=tTime.bco
|
||||
tMainIconAlt.bco=tTime.bco
|
||||
tMainTextAlt.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tMR.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tForecast1.bco=tTime.bco
|
||||
tForecast1Val.bco=tTime.bco
|
||||
tF1Icon.bco=tTime.bco
|
||||
tForecast2.bco=tTime.bco
|
||||
tForecast2Val.bco=tTime.bco
|
||||
tF2Icon.bco=tTime.bco
|
||||
tForecast3.bco=tTime.bco
|
||||
tForecast3Val.bco=tTime.bco
|
||||
tF3Icon.bco=tTime.bco
|
||||
tForecast4.bco=tTime.bco
|
||||
tForecast4Val.bco=tTime.bco
|
||||
tF4Icon.bco=tTime.bco
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,tTime.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,tAMPM.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
covx tTmp.txt,tDate.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
covx tTmp.txt,tMainIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
covx tTmp.txt,tMainText.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,tForecast1.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",8
|
||||
covx tTmp.txt,tForecast2.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,tForecast3.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",10
|
||||
covx tTmp.txt,tForecast4.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",11
|
||||
covx tTmp.txt,tF1Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",12
|
||||
covx tTmp.txt,tF2Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,tF3Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",14
|
||||
covx tTmp.txt,tF4Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,tForecast1Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",16
|
||||
covx tTmp.txt,tForecast2Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",17
|
||||
covx tTmp.txt,tForecast3Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",18
|
||||
covx tTmp.txt,tForecast4Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",19
|
||||
covx tTmp.txt,t10.bco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",20
|
||||
covx tTmp.txt,tMainIconAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
covx tTmp.txt,tMainTextAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",22
|
||||
covx tTmp.txt,tMRIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",23
|
||||
covx tTmp.txt,tMR.pco,0,0
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
dim=100
|
||||
@@ -1045,7 +1070,7 @@ Timer tmSerial
|
||||
|
||||
Timer tmSleep
|
||||
Attributes
|
||||
ID : 28
|
||||
ID : 26
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : yes
|
||||
|
||||
@@ -543,7 +543,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//text arm1
|
||||
|
||||
@@ -72,16 +72,6 @@ Page cardEntities
|
||||
vis bText5,0
|
||||
vis hSlider5,0
|
||||
vis nNum5,0
|
||||
//ui e6
|
||||
vis btOnOff6,0
|
||||
vis bUp6,0
|
||||
vis bStop6,0
|
||||
vis bDown6,0
|
||||
vis tIcon6,0
|
||||
vis tEntity6,0
|
||||
vis bText6,0
|
||||
vis hSlider6,0
|
||||
vis nNum6,0
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
@@ -143,24 +133,12 @@ Variable (string) entn5
|
||||
Text :
|
||||
Max. Text Size: 70
|
||||
|
||||
Variable (string) entn6
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 70
|
||||
|
||||
Variable (string) type5
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) type6
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Number nNum1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -206,15 +184,6 @@ Number nNum5
|
||||
Associated Keyboard : none
|
||||
Value : 0
|
||||
|
||||
Number nNum6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Value : 0
|
||||
|
||||
Text tHeading
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -365,26 +334,6 @@ Text tIcon5
|
||||
Text : î°
|
||||
Max. Text Size : 5
|
||||
|
||||
Text tEntity6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text : tEntity6
|
||||
Max. Text Size : 30
|
||||
|
||||
Text tIcon6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text : î°
|
||||
Max. Text Size : 5
|
||||
|
||||
Picture p0
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -532,34 +481,6 @@ Slider hSlider5
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Slider hSlider6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Position : 50
|
||||
Upper range limit : 100
|
||||
Lower range limit : 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
nNum6.val=hSlider6.val
|
||||
tSend.txt="event,buttonPress2,"+entn6.txt+",number-set,"
|
||||
covx nNum6.val,tTmp.txt,0,0
|
||||
tSend.txt+=tTmp.txt
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,1
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Button bDown1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1117,106 +1038,6 @@ Button bText5
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Button bStop6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
State : unpressed
|
||||
Text : î
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn6.txt+",stop"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,1
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Button bDown6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
State : unpressed
|
||||
Text : î
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn6.txt+",down"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,1
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Button bUp6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
State : unpressed
|
||||
Text : î
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn6.txt+",up"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,1
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Button bText6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
State : unpressed
|
||||
Text : newtxt
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn6.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,1
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Dual-state Button btOnOff1
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1352,33 +1173,6 @@ Dual-state Button btOnOff5
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Dual-state Button btOnOff6
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn6.txt+",OnOff,"
|
||||
covx btOnOff6.val,tTmp.txt,0,0
|
||||
tSend.txt+=tTmp.txt
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,1
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Hotspot mSpecial
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1506,28 +1300,6 @@ Hotspot m4
|
||||
page popupLight
|
||||
}
|
||||
|
||||
Hotspot m5
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
pageIcons.tTmp1.txt=tEntity6.txt
|
||||
pageIcons.tTmp2.txt=entn6.txt
|
||||
if(type6.txt=="shutter")
|
||||
{
|
||||
//popupShutter.tHeading.txt=tEntity6.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(type6.txt=="light")
|
||||
{
|
||||
//popupLight.tEntity.txt=tEntity6.txt
|
||||
page popupLight
|
||||
}
|
||||
|
||||
Timer tmSerial
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -1607,7 +1379,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
@@ -2220,128 +1992,6 @@ Timer tmSerial
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hSlider5.maxval=sys0
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type6.txt,"~",33
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn6.txt,"~",34
|
||||
if(type6.txt=="delete"||type6.txt=="")
|
||||
{
|
||||
vis bUp6,0
|
||||
vis bStop6,0
|
||||
vis bDown6,0
|
||||
vis btOnOff6,0
|
||||
vis tEntity6,0
|
||||
vis tIcon6,0
|
||||
vis bText6,0
|
||||
vis hSlider6,0
|
||||
vis nNum6,0
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,tIcon6.txt,"~",35
|
||||
vis tIcon6,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",36
|
||||
covx tTmp.txt,sys0,0,0
|
||||
tIcon6.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity6.txt,"~",37
|
||||
vis tEntity6,1
|
||||
}
|
||||
if(type6.txt=="shutter")
|
||||
{
|
||||
vis bUp6,1
|
||||
vis bStop6,1
|
||||
vis bDown6,1
|
||||
vis btOnOff6,0
|
||||
vis bText6,0
|
||||
vis hSlider6,0
|
||||
vis nNum6,0
|
||||
}
|
||||
if(type6.txt=="light")
|
||||
{
|
||||
vis bUp6,0
|
||||
vis bStop6,0
|
||||
vis bDown6,0
|
||||
vis btOnOff6,1
|
||||
vis bText6,0
|
||||
vis hSlider6,0
|
||||
vis nNum6,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",38
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff6.val=sys0
|
||||
}
|
||||
if(type6.txt=="switch")
|
||||
{
|
||||
vis bUp6,0
|
||||
vis bStop6,0
|
||||
vis bDown6,0
|
||||
vis btOnOff6,1
|
||||
vis bText6,0
|
||||
vis hSlider6,0
|
||||
vis nNum6,0
|
||||
// get Button State (optional Value)
|
||||
spstr strCommand.txt,tTmp.txt,"~",38
|
||||
covx tTmp.txt,sys0,0,0
|
||||
btOnOff6.val=sys0
|
||||
}
|
||||
if(type6.txt=="text")
|
||||
{
|
||||
vis bUp6,0
|
||||
vis bStop6,0
|
||||
vis bDown6,0
|
||||
vis btOnOff6,0
|
||||
vis bText6,1
|
||||
tsw bText6,0
|
||||
vis hSlider6,0
|
||||
vis nNum6,0
|
||||
bText6.pco=65535
|
||||
bText6.pco2=65535
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText6.txt,"~",38
|
||||
}
|
||||
if(type6.txt=="button")
|
||||
{
|
||||
vis bUp6,0
|
||||
vis bStop6,0
|
||||
vis bDown6,0
|
||||
vis btOnOff6,0
|
||||
vis bText6,1
|
||||
tsw bText6,1
|
||||
vis hSlider6,0
|
||||
vis nNum6,0
|
||||
bText6.pco=1374
|
||||
bText6.pco2=1374
|
||||
// get Text (optional Value)
|
||||
spstr strCommand.txt,bText6.txt,"~",38
|
||||
}
|
||||
if(type6.txt=="number")
|
||||
{
|
||||
vis bUp6,0
|
||||
vis bStop6,0
|
||||
vis bDown6,0
|
||||
vis btOnOff6,0
|
||||
vis bText6,0
|
||||
tsw bText6,0
|
||||
vis hSlider6,1
|
||||
vis nNum6,1
|
||||
// get config (optional Value) (use bText as variable)
|
||||
spstr strCommand.txt,bText6.txt,"~",38
|
||||
//first value is current value
|
||||
spstr bText6.txt,tTmp.txt,"|",0
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hSlider6.val=sys0
|
||||
nNum6.val=sys0
|
||||
//second value is min value
|
||||
spstr bText6.txt,tTmp.txt,"|",1
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hSlider6.minval=sys0
|
||||
//third value is max value
|
||||
spstr bText6.txt,tTmp.txt,"|",2
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hSlider6.maxval=sys0
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
|
||||
@@ -599,7 +599,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -534,7 +534,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -671,7 +671,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -152,7 +152,7 @@ Text tVersion
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text : 30
|
||||
Text : 31
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture p0
|
||||
|
||||
@@ -570,25 +570,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -339,25 +339,43 @@ Timer tmSerial
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardGrid
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -366,30 +366,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="popupLight")
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -48,25 +48,17 @@ Variable (int32) vaTap
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text tInstruction
|
||||
Variable (string) tInstruction
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
Max. Text Size: 50
|
||||
|
||||
Text tTmp
|
||||
Variable (string) tTmp
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
Max. Text Size: 50
|
||||
|
||||
Text tTime
|
||||
Attributes
|
||||
@@ -458,6 +450,77 @@ Timer tmSerial
|
||||
//tMR
|
||||
spstr strCommand.txt,tMR.txt,"~",16
|
||||
}
|
||||
if(tInstruction.txt=="color")
|
||||
{
|
||||
spstr strCommand.txt,tTmp.txt,"~",1
|
||||
covx tTmp.txt,tTime.bco,0,0
|
||||
screensaver.bco=tTime.bco
|
||||
tAMPM.bco=tTime.bco
|
||||
tDate.bco=tTime.bco
|
||||
tMainIcon.bco=tTime.bco
|
||||
tMainText.bco=tTime.bco
|
||||
tMainIconAlt.bco=tTime.bco
|
||||
tMainTextAlt.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tMR.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tForecast1.bco=tTime.bco
|
||||
tForecast1Val.bco=tTime.bco
|
||||
tF1Icon.bco=tTime.bco
|
||||
tForecast2.bco=tTime.bco
|
||||
tForecast2Val.bco=tTime.bco
|
||||
tF2Icon.bco=tTime.bco
|
||||
tForecast3.bco=tTime.bco
|
||||
tForecast3Val.bco=tTime.bco
|
||||
tF3Icon.bco=tTime.bco
|
||||
tForecast4.bco=tTime.bco
|
||||
tForecast4Val.bco=tTime.bco
|
||||
tF4Icon.bco=tTime.bco
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,tTime.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,tAMPM.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
covx tTmp.txt,tDate.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
covx tTmp.txt,tMainIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
covx tTmp.txt,tMainText.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,tForecast1.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",8
|
||||
covx tTmp.txt,tForecast2.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,tForecast3.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",10
|
||||
covx tTmp.txt,tForecast4.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",11
|
||||
covx tTmp.txt,tF1Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",12
|
||||
covx tTmp.txt,tF2Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,tF3Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",14
|
||||
covx tTmp.txt,tF4Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,tForecast1Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",16
|
||||
covx tTmp.txt,tForecast2Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",17
|
||||
covx tTmp.txt,tForecast3Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",18
|
||||
covx tTmp.txt,tForecast4Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",19
|
||||
covx tTmp.txt,t10.bco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",20
|
||||
covx tTmp.txt,tMainIconAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
covx tTmp.txt,tMainTextAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",22
|
||||
covx tTmp.txt,tMRIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",23
|
||||
covx tTmp.txt,tMR.pco,0,0
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
dim=100
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -28,19 +28,24 @@ def get_icon_id(ma_name):
|
||||
|
||||
# write mapping lib for typescript
|
||||
with open(os.path.join(__location__, "../../../iobroker", "icon_mapping.ts"), 'w') as f:
|
||||
f.write("let iconMap = new Map<string, string>([\n")
|
||||
f.write("""
|
||||
export class IconsSelector {
|
||||
iconMap = new Map<string, string>([
|
||||
""")
|
||||
for icon in icon_metadata:
|
||||
iconchar = chr(int(icon['hex'], 16))
|
||||
name = icon["name"]
|
||||
f.write(f" [\"{name}\", \"{iconchar}\"],\n")
|
||||
f.write("]);\n")
|
||||
f.write("""
|
||||
function get_icon(ma_name:string):string{
|
||||
if(iconMap.has(ma_name)){
|
||||
return iconMap.get(ma_name);
|
||||
GetIcon(ma_name:string):string{
|
||||
if(this.iconMap.has(ma_name)){
|
||||
return this.iconMap.get(ma_name)!;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
return iconMap.get("alert-circle-outline");
|
||||
}
|
||||
|
||||
""");
|
||||
|
||||
# write documentation file
|
||||
|
||||
@@ -7,7 +7,7 @@ head = sharedhead + """
|
||||
""" + navigation
|
||||
print(head)
|
||||
start = 3
|
||||
for i in range(1,7):
|
||||
for i in range(1,6):
|
||||
idxstart = start + (i-1)*6
|
||||
item = f"""
|
||||
// get Type
|
||||
|
||||
@@ -160,7 +160,7 @@ navigation = """
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt=""
|
||||
}
|
||||
"""
|
||||
@@ -1073,7 +1073,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//text arm1
|
||||
|
||||
@@ -2096,7 +2096,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -1036,7 +1036,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -956,7 +956,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -1224,7 +1224,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -10,49 +10,49 @@ pageTest
|
||||
13 Component(s)
|
||||
13 Line(s) of event code
|
||||
13 Unique line(s) of event code
|
||||
popupNotify
|
||||
17 Component(s)
|
||||
178 Line(s) of event code
|
||||
117 Unique line(s) of event code
|
||||
pageStartup
|
||||
19 Component(s)
|
||||
150 Line(s) of event code
|
||||
113 Unique line(s) of event code
|
||||
cardGrid
|
||||
39 Component(s)
|
||||
418 Line(s) of event code
|
||||
243 Unique line(s) of event code
|
||||
popupLight
|
||||
27 Component(s)
|
||||
320 Line(s) of event code
|
||||
173 Unique line(s) of event code
|
||||
338 Line(s) of event code
|
||||
182 Unique line(s) of event code
|
||||
popupShutter
|
||||
19 Component(s)
|
||||
178 Line(s) of event code
|
||||
101 Unique line(s) of event code
|
||||
191 Line(s) of event code
|
||||
107 Unique line(s) of event code
|
||||
popupNotify
|
||||
17 Component(s)
|
||||
196 Line(s) of event code
|
||||
123 Unique line(s) of event code
|
||||
cardMedia
|
||||
30 Component(s)
|
||||
329 Line(s) of event code
|
||||
168 Unique line(s) of event code
|
||||
cardAlarm
|
||||
35 Component(s)
|
||||
343 Line(s) of event code
|
||||
213 Unique line(s) of event code
|
||||
169 Unique line(s) of event code
|
||||
cardThermo
|
||||
41 Component(s)
|
||||
442 Line(s) of event code
|
||||
246 Unique line(s) of event code
|
||||
247 Unique line(s) of event code
|
||||
cardGrid
|
||||
39 Component(s)
|
||||
418 Line(s) of event code
|
||||
244 Unique line(s) of event code
|
||||
screensaver
|
||||
33 Component(s)
|
||||
195 Line(s) of event code
|
||||
152 Unique line(s) of event code
|
||||
266 Line(s) of event code
|
||||
218 Unique line(s) of event code
|
||||
cardAlarm
|
||||
35 Component(s)
|
||||
343 Line(s) of event code
|
||||
214 Unique line(s) of event code
|
||||
cardEntities
|
||||
62 Component(s)
|
||||
964 Line(s) of event code
|
||||
409 Unique line(s) of event code
|
||||
410 Unique line(s) of event code
|
||||
|
||||
Total
|
||||
12 Page(s)
|
||||
341 Component(s)
|
||||
3541 Line(s) of event code
|
||||
947 Unique line(s) of event code
|
||||
3661 Line(s) of event code
|
||||
1002 Unique line(s) of event code
|
||||
|
||||
@@ -402,7 +402,7 @@ Text tVersion
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text : 30
|
||||
Text : 31
|
||||
Max. Text Size : 10
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
|
||||
@@ -916,25 +916,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -548,25 +548,43 @@ Timer tmSerial
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardGrid
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -631,30 +631,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="popupLight")
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -59,6 +59,20 @@ Variable (int32) vaTap
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) tInstruction
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
|
||||
Variable (string) tTmp
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
|
||||
Text tTime
|
||||
Attributes
|
||||
ID : 5
|
||||
@@ -749,66 +763,6 @@ Text tMR
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Text tTmp
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 368
|
||||
y coordinate : 0
|
||||
Width : 25
|
||||
Height : 30
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
Fill : solid color
|
||||
Style : flat
|
||||
Associated Keyboard : none
|
||||
Font ID : 0
|
||||
Back. Color : 65535
|
||||
Font Color : 0
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Text tInstruction
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 335
|
||||
y coordinate : 0
|
||||
Width : 27
|
||||
Height : 30
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
Fill : solid color
|
||||
Style : flat
|
||||
Associated Keyboard : none
|
||||
Font ID : 0
|
||||
Back. Color : 65535
|
||||
Font Color : 0
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
Input Type : character
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Picture p0
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -980,6 +934,77 @@ Timer tmSerial
|
||||
//tMR
|
||||
spstr strCommand.txt,tMR.txt,"~",16
|
||||
}
|
||||
if(tInstruction.txt=="color")
|
||||
{
|
||||
spstr strCommand.txt,tTmp.txt,"~",1
|
||||
covx tTmp.txt,tTime.bco,0,0
|
||||
screensaver.bco=tTime.bco
|
||||
tAMPM.bco=tTime.bco
|
||||
tDate.bco=tTime.bco
|
||||
tMainIcon.bco=tTime.bco
|
||||
tMainText.bco=tTime.bco
|
||||
tMainIconAlt.bco=tTime.bco
|
||||
tMainTextAlt.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tMR.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tForecast1.bco=tTime.bco
|
||||
tForecast1Val.bco=tTime.bco
|
||||
tF1Icon.bco=tTime.bco
|
||||
tForecast2.bco=tTime.bco
|
||||
tForecast2Val.bco=tTime.bco
|
||||
tF2Icon.bco=tTime.bco
|
||||
tForecast3.bco=tTime.bco
|
||||
tForecast3Val.bco=tTime.bco
|
||||
tF3Icon.bco=tTime.bco
|
||||
tForecast4.bco=tTime.bco
|
||||
tForecast4Val.bco=tTime.bco
|
||||
tF4Icon.bco=tTime.bco
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,tTime.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,tAMPM.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
covx tTmp.txt,tDate.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
covx tTmp.txt,tMainIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
covx tTmp.txt,tMainText.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,tForecast1.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",8
|
||||
covx tTmp.txt,tForecast2.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,tForecast3.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",10
|
||||
covx tTmp.txt,tForecast4.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",11
|
||||
covx tTmp.txt,tF1Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",12
|
||||
covx tTmp.txt,tF2Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,tF3Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",14
|
||||
covx tTmp.txt,tF4Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,tForecast1Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",16
|
||||
covx tTmp.txt,tForecast2Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",17
|
||||
covx tTmp.txt,tForecast3Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",18
|
||||
covx tTmp.txt,tForecast4Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",19
|
||||
covx tTmp.txt,t10.bco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",20
|
||||
covx tTmp.txt,tMainIconAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
covx tTmp.txt,tMainTextAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",22
|
||||
covx tTmp.txt,tMRIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",23
|
||||
covx tTmp.txt,tMR.pco,0,0
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
dim=100
|
||||
|
||||
@@ -543,7 +543,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//text arm1
|
||||
|
||||
@@ -1151,7 +1151,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -599,7 +599,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
// get Type
|
||||
|
||||
@@ -534,7 +534,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -671,7 +671,7 @@ Timer tmSerial
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
{
|
||||
vis bPrev,1
|
||||
vis bNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
//entity name
|
||||
|
||||
@@ -152,7 +152,7 @@ Text tVersion
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text : 30
|
||||
Text : 31
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture p0
|
||||
|
||||
@@ -570,25 +570,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -339,25 +339,43 @@ Timer tmSerial
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardGrid
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -366,30 +366,43 @@ Timer tmSerial
|
||||
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
|
||||
udelete payloadLength-1
|
||||
bufferPos=0
|
||||
if(tId.txt=="popupLight")
|
||||
if(tId.txt=="pageStartup")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
page pageStartup
|
||||
}
|
||||
if(tId.txt=="screensaver")
|
||||
{
|
||||
page screensaver
|
||||
}
|
||||
if(tId.txt=="cardEntities")
|
||||
{
|
||||
page cardEntities
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
if(tId.txt=="cardGrid")
|
||||
{
|
||||
page cardMedia
|
||||
page cardGrid
|
||||
}
|
||||
if(tId.txt=="pageStartup")
|
||||
if(tId.txt=="popupLight")
|
||||
{
|
||||
page pageStartup
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupLight
|
||||
}
|
||||
if(tId.txt=="popupShutter")
|
||||
{
|
||||
pageIcons.tTmp1.txt=tTmp.txt
|
||||
page popupShutter
|
||||
}
|
||||
if(tId.txt=="popupNotify")
|
||||
{
|
||||
page popupNotify
|
||||
}
|
||||
if(tId.txt=="cardGrid")
|
||||
if(tId.txt=="cardThermo")
|
||||
{
|
||||
page cardGrid
|
||||
page cardThermo
|
||||
}
|
||||
if(tId.txt=="cardMedia")
|
||||
{
|
||||
page cardMedia
|
||||
}
|
||||
if(tId.txt=="cardAlarm")
|
||||
{
|
||||
|
||||
@@ -48,6 +48,18 @@ Variable (int32) vaTap
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) tInstruction
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
|
||||
Variable (string) tTmp
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
|
||||
Text tTime
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -278,26 +290,6 @@ Text tMR
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text tTmp
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Text tInstruction
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Disable release event after dragging: 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard : none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Picture p0
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -458,6 +450,77 @@ Timer tmSerial
|
||||
//tMR
|
||||
spstr strCommand.txt,tMR.txt,"~",16
|
||||
}
|
||||
if(tInstruction.txt=="color")
|
||||
{
|
||||
spstr strCommand.txt,tTmp.txt,"~",1
|
||||
covx tTmp.txt,tTime.bco,0,0
|
||||
screensaver.bco=tTime.bco
|
||||
tAMPM.bco=tTime.bco
|
||||
tDate.bco=tTime.bco
|
||||
tMainIcon.bco=tTime.bco
|
||||
tMainText.bco=tTime.bco
|
||||
tMainIconAlt.bco=tTime.bco
|
||||
tMainTextAlt.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tMR.bco=tTime.bco
|
||||
tMRIcon.bco=tTime.bco
|
||||
tForecast1.bco=tTime.bco
|
||||
tForecast1Val.bco=tTime.bco
|
||||
tF1Icon.bco=tTime.bco
|
||||
tForecast2.bco=tTime.bco
|
||||
tForecast2Val.bco=tTime.bco
|
||||
tF2Icon.bco=tTime.bco
|
||||
tForecast3.bco=tTime.bco
|
||||
tForecast3Val.bco=tTime.bco
|
||||
tF3Icon.bco=tTime.bco
|
||||
tForecast4.bco=tTime.bco
|
||||
tForecast4Val.bco=tTime.bco
|
||||
tF4Icon.bco=tTime.bco
|
||||
spstr strCommand.txt,tTmp.txt,"~",2
|
||||
covx tTmp.txt,tTime.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",3
|
||||
covx tTmp.txt,tAMPM.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",4
|
||||
covx tTmp.txt,tDate.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
covx tTmp.txt,tMainIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",6
|
||||
covx tTmp.txt,tMainText.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
covx tTmp.txt,tForecast1.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",8
|
||||
covx tTmp.txt,tForecast2.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",9
|
||||
covx tTmp.txt,tForecast3.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",10
|
||||
covx tTmp.txt,tForecast4.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",11
|
||||
covx tTmp.txt,tF1Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",12
|
||||
covx tTmp.txt,tF2Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",13
|
||||
covx tTmp.txt,tF3Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",14
|
||||
covx tTmp.txt,tF4Icon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
covx tTmp.txt,tForecast1Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",16
|
||||
covx tTmp.txt,tForecast2Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",17
|
||||
covx tTmp.txt,tForecast3Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",18
|
||||
covx tTmp.txt,tForecast4Val.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",19
|
||||
covx tTmp.txt,t10.bco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",20
|
||||
covx tTmp.txt,tMainIconAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
covx tTmp.txt,tMainTextAlt.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",22
|
||||
covx tTmp.txt,tMRIcon.pco,0,0
|
||||
spstr strCommand.txt,tTmp.txt,"~",23
|
||||
covx tTmp.txt,tMR.pco,0,0
|
||||
}
|
||||
if(tInstruction.txt=="pageType")
|
||||
{
|
||||
dim=100
|
||||
|
||||
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -398,7 +398,7 @@ It is possible to schedule a brightness change for the screen at specific times.
|
||||
#### Override Icons or Names
|
||||
|
||||
To override 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 Cheetsheet](https://htmlpreview.github.io/?https://github.com/joBr99/nspanel-lovelace-ui/blob/main/HMI/icon-cheatsheet.html) are useable.
|
||||
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:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from helper import dict_recursive_update
|
||||
import logging
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
@@ -41,6 +42,12 @@ class Card(object):
|
||||
else:
|
||||
for e in self.entities:
|
||||
entityIds.append(e.entityId)
|
||||
# additional keys to check
|
||||
add_ent_keys = ['weatherOverrideForecast1', 'weatherOverrideForecast2', 'weatherOverrideForecast3', 'weatherOverrideForecast4']
|
||||
for ent_key in add_ent_keys:
|
||||
val = self.raw_config.get(ent_key)
|
||||
if val is not None:
|
||||
entityIds.append(val.get("entity"))
|
||||
return entityIds
|
||||
|
||||
class LuiBackendConfig(object):
|
||||
@@ -91,7 +98,8 @@ class LuiBackendConfig(object):
|
||||
'weatherOverrideForecast4': None,
|
||||
'doubleTapToUnlock': False,
|
||||
'alternativeLayout': False,
|
||||
'defaultCard': None
|
||||
'defaultCard': None,
|
||||
'key': 'screensaver'
|
||||
},
|
||||
'hiddenCards': []
|
||||
}
|
||||
@@ -106,10 +114,8 @@ class LuiBackendConfig(object):
|
||||
|
||||
self.load(config_in)
|
||||
|
||||
def load(self, args):
|
||||
for k, v in args.items():
|
||||
if k in self._DEFAULT_CONFIG:
|
||||
self._config[k] = v
|
||||
def load(self, inconfig):
|
||||
self._config = dict_recursive_update(inconfig, self._DEFAULT_CONFIG)
|
||||
LOGGER.info(f"Loaded config: {self._config}")
|
||||
|
||||
# parse cards displayed on panel
|
||||
@@ -145,6 +151,7 @@ class LuiBackendConfig(object):
|
||||
entities.extend(card.get_entity_list())
|
||||
for card in self._config_hidden_cards:
|
||||
entities.extend(card.get_entity_list())
|
||||
entities.extend(self._config_screensaver.get_entity_list())
|
||||
return entities
|
||||
|
||||
def getCard(self, pos):
|
||||
|
||||
@@ -13,9 +13,10 @@ class LuiController(object):
|
||||
self._config = config
|
||||
self._send_mqtt_msg = send_mqtt_msg
|
||||
|
||||
# first card (default, after startup)
|
||||
self._current_card = self._config.getCard(0)
|
||||
self._current_card = self._config._config_screensaver
|
||||
self._previous_cards = []
|
||||
# first card (default, after startup)
|
||||
self._previous_cards.append(self._config.getCard(0))
|
||||
|
||||
self._pages_gen = LuiPagesGen(ha_api, config, send_mqtt_msg)
|
||||
|
||||
@@ -29,10 +30,6 @@ class LuiController(object):
|
||||
# Setup date callback
|
||||
ha_api.run_daily(self._pages_gen.update_date, time)
|
||||
|
||||
# weather callback
|
||||
weather_interval = 15 * 60 # 15 minutes
|
||||
ha_api.run_every(self.weather_update, "now", weather_interval)
|
||||
|
||||
# register callbacks
|
||||
self.register_callbacks()
|
||||
|
||||
@@ -62,8 +59,8 @@ class LuiController(object):
|
||||
self.update_screensaver_brightness(kwargs={"value": self.current_screensaver_brightness})
|
||||
|
||||
# send panel to screensaver
|
||||
self._pages_gen.page_type("screensaver")
|
||||
self.weather_update("")
|
||||
self._pages_gen.render_card(self._current_card)
|
||||
|
||||
|
||||
def update_screensaver_brightness_state_callback(self, entity, attribute, old, new, kwargs):
|
||||
self.update_screensaver_brightness(kwargs={"value": self.current_screensaver_brightness})
|
||||
@@ -78,9 +75,6 @@ class LuiController(object):
|
||||
brightness = kwargs['value']
|
||||
self._send_mqtt_msg(f"dimmode~{brightness}")
|
||||
|
||||
def weather_update(self, kwargs):
|
||||
self._pages_gen.update_screensaver_weather()
|
||||
|
||||
def calc_current_screensaver_brightness(self):
|
||||
current_screensaver_brightness = 20
|
||||
# set brightness of screensaver
|
||||
@@ -104,7 +98,7 @@ class LuiController(object):
|
||||
|
||||
def register_callbacks(self):
|
||||
items = self._config.get_all_entity_names()
|
||||
LOGGER.debug(f"Registering callbacks for the following items: {items}")
|
||||
LOGGER.info(f"Registering callbacks for the following items: {items}")
|
||||
for item in items:
|
||||
if self._ha_api.entity_exists(item):
|
||||
self._ha_api.listen_state(self.state_change_callback, entity_id=item, attribute="all")
|
||||
@@ -138,16 +132,20 @@ class LuiController(object):
|
||||
dstCard = self._config.searchCard(self._config.get("screensaver.defaultCard"))
|
||||
if dstCard is not None:
|
||||
self._previous_cards = []
|
||||
self._current_card = dstCard
|
||||
self._previous_cards.append(dstCard)
|
||||
# check for double tap if configured and render current page
|
||||
if self._config.get("screensaver.doubleTapToUnlock") and int(value) >= 2:
|
||||
self._current_card = self._previous_cards.pop()
|
||||
self._pages_gen.render_card(self._current_card)
|
||||
elif not self._config.get("screensaver.doubleTapToUnlock"):
|
||||
self._current_card = self._previous_cards.pop()
|
||||
self._pages_gen.render_card(self._current_card)
|
||||
return
|
||||
|
||||
if button_type == "sleepReached":
|
||||
self._pages_gen.generate_screensaver_page()
|
||||
self._previous_cards.append(self._current_card)
|
||||
self._current_card = self._config._config_screensaver
|
||||
self._pages_gen.render_card(self._current_card)
|
||||
return
|
||||
|
||||
if button_type == "bExit":
|
||||
|
||||
@@ -55,3 +55,11 @@ def get_attr_safe(entity, attr, default):
|
||||
if res is None:
|
||||
res = default
|
||||
return res
|
||||
|
||||
def dict_recursive_update(source: dict, target: dict) -> dict:
|
||||
for sk, sv in source.items():
|
||||
if sk in target and isinstance(target[sk], dict):
|
||||
target[sk] = dict_recursive_update(sv, target[sk])
|
||||
else:
|
||||
target[sk] = sv
|
||||
return target
|
||||
@@ -31,6 +31,7 @@ class LuiMqttListener(object):
|
||||
# run action based on received command
|
||||
if msg[0] == "event":
|
||||
if msg[1] == "startup":
|
||||
self._updater.request_berry_driver_version()
|
||||
display_firmware_version = int(msg[2])
|
||||
model = None
|
||||
if display_firmware_version >= 23:
|
||||
@@ -54,6 +55,8 @@ class LuiMqttListener(object):
|
||||
|
||||
if entity_id == "updateDisplayNoYes" and value == "yes":
|
||||
self._updater.update_panel_driver()
|
||||
if entity_id == "updateBerryNoYes" and value == "yes":
|
||||
self._updater.update_berry_driver()
|
||||
|
||||
self._controller.button_press(entity_id, btype, value)
|
||||
if msg[1] == "pageOpenDetail":
|
||||
|
||||
@@ -56,10 +56,6 @@ class LuiPagesGen(object):
|
||||
def page_type(self, target_page):
|
||||
self._send_mqtt_msg(f"pageType~{target_page}")
|
||||
|
||||
def generate_screensaver_page(self):
|
||||
self.page_type("screensaver")
|
||||
self.update_screensaver_weather()
|
||||
|
||||
def update_screensaver_weather(self):
|
||||
global babel_spec
|
||||
we_name = self._config._config_screensaver.entity.entityId
|
||||
@@ -340,6 +336,7 @@ class LuiPagesGen(object):
|
||||
# Switch to page
|
||||
if send_page_type:
|
||||
self.page_type(card.cardType)
|
||||
|
||||
if card.cardType in ["cardEntities", "cardGrid"]:
|
||||
self.generate_entities_page(navigation, card.title, card.entities)
|
||||
return
|
||||
@@ -349,9 +346,8 @@ class LuiPagesGen(object):
|
||||
self.generate_media_page(navigation, card.entity)
|
||||
if card.cardType == "cardAlarm":
|
||||
self.generate_alarm_page(navigation, card.entity)
|
||||
|
||||
if card.cardType == "screensaver":
|
||||
self.generate_screensaver_page()
|
||||
self.update_screensaver_weather()
|
||||
|
||||
|
||||
def generate_light_detail_page(self, entity):
|
||||
|
||||
@@ -53,7 +53,7 @@ class Updater:
|
||||
return False
|
||||
# send notification about the update
|
||||
if self.mode == "auto-notify":
|
||||
update_msg = "There's an update available for the Tasmota Berry driver, do you want to start the update now? If you encounter issues after the update or this message appears frequently, please check the manual and repeat the installation steps for the Tasmota Berry driver. "
|
||||
update_msg = "There's an update available for the Tasmota Berry driver, do you want to start the update now? If you encounter issues after the update or this message appears frequently, please checkthe manual and repeat the installation steps for the Tasmota Berry driver. "
|
||||
self.send_message_page("updateBerryNoYes", "Driver Update available!", update_msg, "Dismiss", "Yes")
|
||||
return True
|
||||
return False
|
||||
@@ -82,12 +82,13 @@ class Updater:
|
||||
return False
|
||||
|
||||
def request_berry_driver_version(self):
|
||||
self.current_tasmota_driver_version = None
|
||||
topic = self.topic_send.replace("CustomSend", "GetDriverVersion")
|
||||
self._send_mqtt_msg("X", topic=topic)
|
||||
|
||||
def update_berry_driver(self):
|
||||
topic = self.topic_send.replace("CustomSend", "UpdateDriverVersion")
|
||||
self._send_mqtt_msg(self.desired_tasmota_driver_url, topic=topic)
|
||||
topic = self.topic_send.replace("CustomSend", "Backlog")
|
||||
self._send_mqtt_msg(f"UpdateDriverVersion {self.desired_tasmota_driver_url}; Restart 1", topic=topic)
|
||||
def update_panel_driver(self):
|
||||
topic = self.topic_send.replace("CustomSend", "FlashNextion")
|
||||
self._send_mqtt_msg(self.desired_display_firmware_url, topic=topic)
|
||||
|
||||
@@ -63,8 +63,8 @@ class NsPanelLovelaceUIManager(hass.Hass):
|
||||
|
||||
controller = LuiController(self, cfg, send_mqtt_msg)
|
||||
|
||||
desired_display_firmware_version = 30
|
||||
version = "v2.6.0"
|
||||
desired_display_firmware_version = 32
|
||||
version = "v2.7.2"
|
||||
|
||||
model = cfg.get("model")
|
||||
if model == "us-l":
|
||||
@@ -77,7 +77,7 @@ class NsPanelLovelaceUIManager(hass.Hass):
|
||||
# eu version
|
||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
|
||||
|
||||
desired_tasmota_driver_version = 3
|
||||
desired_tasmota_driver_version = 4
|
||||
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"
|
||||
|
||||
mode = cfg.get("updateMode")
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
var Icons = new IconsSelector();
|
||||
|
||||
const Months = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"];
|
||||
const Days = ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"];
|
||||
const Red: RGB = { red: 255, green: 0, blue: 0 };
|
||||
const White: RGB = { red: 255, green: 255, blue: 255 };
|
||||
const Yellow: RGB = { red: 253, green: 216, blue: 53 };
|
||||
const Green: RGB = { red: 96, green: 176, blue: 62 }
|
||||
const Brown: RGB = { red: 120, green: 80, blue: 59 }
|
||||
const Gray: RGB = { red: 69, green: 69, blue: 69 }
|
||||
const Off: RGB = { red: 68, green: 115, blue: 158 };
|
||||
const On: RGB = { red: 253, green: 216, blue: 53 };
|
||||
const BatteryFull: RGB = { red: 96, green: 176, blue: 62 }
|
||||
@@ -14,7 +19,7 @@ var Wohnen: PageEntities =
|
||||
"heading": "Haus",
|
||||
"useColor": true,
|
||||
"items": [
|
||||
<PageItem>{ id: "alias.0.Stern"},
|
||||
<PageItem>{ id: "alias.0.Stern", name: "Sternsteckdose"},
|
||||
<PageItem>{ id: "alias.0.Erker"},
|
||||
<PageItem>{ id: "alias.0.Küche", interpolateColor: true },
|
||||
<PageItem>{ id: "alias.0.Wand" }
|
||||
@@ -27,10 +32,23 @@ var Strom: PageEntities =
|
||||
"heading": "Strom",
|
||||
"useColor": true,
|
||||
"items": [
|
||||
<PageItem>{ id: "alias.0.Netz", icon: 4, interpolateColor: true, offColor: BatteryFull, onColor: Red , minValue: -1000, maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Hausverbrauch", icon: 4, interpolateColor: true, offColor: BatteryFull, onColor: Red , maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Pv", icon: 4, interpolateColor: true, offColor: Off, onColor: BatteryFull , maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Batterie", icon: 34, interpolateColor: true, offColor: BatteryEmpty, onColor: BatteryFull }
|
||||
<PageItem>{ id: "alias.0.Netz", icon: "flash", interpolateColor: true, offColor: BatteryFull, onColor: Red, minValue: -1000, maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Hausverbrauch", icon: "flash", interpolateColor: true, offColor: BatteryFull, onColor: Red, maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Pv", icon: "solar-power", interpolateColor: true, offColor: Off, onColor: BatteryFull, maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Batterie", icon: "battery-medium", interpolateColor: true, offColor: BatteryEmpty, onColor: BatteryFull }
|
||||
]
|
||||
};
|
||||
|
||||
var Müll: PageEntities =
|
||||
{
|
||||
"type": "cardEntities",
|
||||
"heading": "Müllkalender",
|
||||
"useColor": true,
|
||||
"items": [
|
||||
<PageItem>{ id: "alias.0.WzNsPanel.Müll.Bio_Tonne" ,unit:"Tage", icon: "trash-can",onColor: Brown},
|
||||
<PageItem>{ id: "alias.0.WzNsPanel.Müll.Graue_Tonne" ,unit:"Tage",icon: "trash-can",onColor: Gray},
|
||||
<PageItem>{ id: "alias.0.WzNsPanel.Müll.Grüne_Tonne" ,unit:"Tage",icon: "trash-can",onColor: Green},
|
||||
<PageItem>{ id: "alias.0.WzNsPanel.Müll.Gelbe_Tonne" ,unit:"Tage",icon: "trash-can",onColor: Yellow}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -62,10 +80,10 @@ var button2Page: PageEntities =
|
||||
export const config: Config = {
|
||||
panelRecvTopic: "mqtt.0.tele.WzDisplay.RESULT",
|
||||
panelSendTopic: "mqtt.0.cmnd.WzDisplay.CustomSend",
|
||||
firstScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.HUMIDITY", ScreensaverEntityIcon: 26, ScreensaverEntityText: "Luft", ScreensaverEntityUnitText: "%" },
|
||||
secondScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.PRECIPITATION_CHANCE", ScreensaverEntityIcon: 19, ScreensaverEntityText: "Regen", ScreensaverEntityUnitText: "%" },
|
||||
thirdScreensaverEntity: { ScreensaverEntity: "alias.0.Batterie.ACTUAL", ScreensaverEntityIcon: 34, ScreensaverEntityText: "Batterie", ScreensaverEntityUnitText: "%" },
|
||||
fourthScreensaverEntity: { ScreensaverEntity: "alias.0.Pv.ACTUAL", ScreensaverEntityIcon: 32, ScreensaverEntityText: "PV", ScreensaverEntityUnitText: "W" },
|
||||
firstScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.HUMIDITY", ScreensaverEntityIcon: "water-percent", ScreensaverEntityText: "Luft", ScreensaverEntityUnitText: "%" },
|
||||
secondScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.PRECIPITATION_CHANCE", ScreensaverEntityIcon: "weather-pouring", ScreensaverEntityText: "Regen", ScreensaverEntityUnitText: "%" },
|
||||
thirdScreensaverEntity: { ScreensaverEntity: "alias.0.Batterie.ACTUAL", ScreensaverEntityIcon: "battery-medium", ScreensaverEntityText: "Batterie", ScreensaverEntityUnitText: "%" },
|
||||
fourthScreensaverEntity: { ScreensaverEntity: "alias.0.Pv.ACTUAL", ScreensaverEntityIcon: "solar-power", ScreensaverEntityText: "PV", ScreensaverEntityUnitText: "W" },
|
||||
timeoutScreensaver: 15,
|
||||
dimmode: 8,
|
||||
screenSaverDoubleClick: false,
|
||||
@@ -77,12 +95,12 @@ export const config: Config = {
|
||||
defaultOnColor: On,
|
||||
defaultColor: Off,
|
||||
temperatureUnit: "°C",
|
||||
pages: [Wohnen, Strom,
|
||||
pages: [Wohnen, Strom, Müll,
|
||||
{
|
||||
"type": "cardThermo",
|
||||
"heading": "Thermostat",
|
||||
"useColor": true,
|
||||
"items": [<PageItem>{ id: "alias.0.WzNsPanel" }]
|
||||
"items": [<PageItem>{ id: "alias.0.WzNsPanel", name: "Wohnzimmer" }]
|
||||
}
|
||||
],
|
||||
button1Page: button1Page,
|
||||
@@ -90,7 +108,7 @@ export const config: Config = {
|
||||
};
|
||||
|
||||
var subscriptions: any = {};
|
||||
|
||||
var screensaverEnabled : boolean = false;
|
||||
var pageId = 0;
|
||||
|
||||
schedule("* * * * *", function () {
|
||||
@@ -144,24 +162,31 @@ function HandleMessage(typ: string, method: string, page: number, words: Array<s
|
||||
if (typ == "event") {
|
||||
switch (method) {
|
||||
case "startup":
|
||||
screensaverEnabled = false;
|
||||
UnsubscribeWatcher();
|
||||
HandleStartupProcess();
|
||||
pageId = 0;
|
||||
GeneratePage(config.pages[0]);
|
||||
break;
|
||||
case "sleepReached":
|
||||
screensaverEnabled = true;
|
||||
if(pageId < 0)
|
||||
pageId = 0;
|
||||
HandleScreensaver();
|
||||
break;
|
||||
case "pageOpenDetail":
|
||||
screensaverEnabled = false;
|
||||
UnsubscribeWatcher();
|
||||
let pageItem = config.pages[pageId].items.find(e => e.id === words[3]);
|
||||
if (pageItem !== undefined)
|
||||
SendToPanel(GenerateDetailPage(words[2], pageItem));
|
||||
case "buttonPress2":
|
||||
screensaverEnabled = false;
|
||||
HandleButtonEvent(words);
|
||||
break;
|
||||
case "screensaverOpen":
|
||||
HandleScreensaver();
|
||||
break;
|
||||
case "button1":
|
||||
case "button2":
|
||||
screensaverEnabled = false;
|
||||
HandleHardwareButton(method);
|
||||
default:
|
||||
break;
|
||||
@@ -187,9 +212,11 @@ function HandleHardwareButton(method: string): void {
|
||||
let page: (PageThermo | PageEntities | PageGrid);
|
||||
if (config.button1Page !== null && method == "button1") {
|
||||
page = config.button1Page;
|
||||
pageId = -1;
|
||||
}
|
||||
else if (config.button2Page !== null && method == "button2") {
|
||||
page = config.button2Page;
|
||||
pageId = -2;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
@@ -200,8 +227,8 @@ function HandleHardwareButton(method: string): void {
|
||||
function HandleStartupProcess(): void {
|
||||
SendDate();
|
||||
SendTime();
|
||||
SendToPanel({ payload: "timeout," + config.timeoutScreensaver });
|
||||
SendToPanel({ payload: "dimmode," + config.dimmode });
|
||||
SendToPanel({ payload: "timeout~" + config.timeoutScreensaver });
|
||||
SendToPanel({ payload: "dimmode~" + config.dimmode });
|
||||
}
|
||||
|
||||
function SendDate(): void {
|
||||
@@ -210,7 +237,7 @@ function SendDate(): void {
|
||||
var date = d.getDate();
|
||||
var month = Months[d.getMonth()];
|
||||
var year = d.getFullYear();
|
||||
var _sendDate = "date,?" + day + " " + date + " " + month + " " + year;
|
||||
var _sendDate = "date~" + day + " " + date + " " + month + " " + year;
|
||||
SendToPanel(<Payload>{ payload: _sendDate });
|
||||
}
|
||||
|
||||
@@ -225,28 +252,40 @@ function SendTime(): void {
|
||||
if (d.getMinutes() < 10) {
|
||||
min = "0" + d.getMinutes().toString();
|
||||
}
|
||||
SendToPanel(<Payload>{ payload: "time," + hr + ":" + min });
|
||||
SendToPanel(<Payload>{ payload: "time~" + hr + ":" + min });
|
||||
}
|
||||
|
||||
function GenerateEntitiesPage(page: PageEntities): Payload[] {
|
||||
var out_msgs: Array<Payload> = [];
|
||||
out_msgs = [{ payload: "pageType,cardEntities" }, { payload: "entityUpdHeading," + page.heading }]
|
||||
out_msgs.push({ payload: GeneratePageElements(page.items, 4, page.useColor) });
|
||||
out_msgs = [{ payload: "pageType~cardEntities" }]
|
||||
out_msgs.push({ payload: GeneratePageElements(page) });
|
||||
return out_msgs
|
||||
}
|
||||
|
||||
function GenerateGridPage(page: PageGrid): Payload[] {
|
||||
var out_msgs: Array<Payload> = [];
|
||||
out_msgs = [{ payload: "pageType,cardGrid" }, { payload: "entityUpdHeading," + page.heading }]
|
||||
out_msgs.push({ payload: GeneratePageElements(page.items, 6, page.useColor) });
|
||||
out_msgs = [{ payload: "pageType~cardGrid" }]
|
||||
out_msgs.push({ payload: GeneratePageElements(page) });
|
||||
return out_msgs
|
||||
}
|
||||
|
||||
function GeneratePageElements(pageItems: PageItem[], maxItems: number, useColors: boolean = false): string {
|
||||
let pageData = "entityUpd";
|
||||
function GeneratePageElements(page: Page): string {
|
||||
let maxItems = 0;
|
||||
switch (page.type) {
|
||||
case "cardThermo":
|
||||
maxItems = 1;
|
||||
break;
|
||||
case "cardEntities":
|
||||
maxItems = 4;
|
||||
break;
|
||||
case "cardGrid":
|
||||
maxItems = 6;
|
||||
break;
|
||||
}
|
||||
let pageData = "entityUpd~" + page.heading + "~" + GetNavigationString(pageId)
|
||||
for (let index = 0; index < maxItems; index++) {
|
||||
if (pageItems[index] !== undefined) {
|
||||
pageData += CreateEntity(pageItems[index], index + 1, useColors);
|
||||
if (page.items[index] !== undefined) {
|
||||
pageData += CreateEntity(page.items[index], index + 1, page.useColor);
|
||||
}
|
||||
else {
|
||||
pageData += CreateEntity(<PageItem>{ id: "delete" }, index + 1);
|
||||
@@ -256,9 +295,9 @@ function GeneratePageElements(pageItems: PageItem[], maxItems: number, useColors
|
||||
}
|
||||
|
||||
function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = false): string {
|
||||
var iconId = 0
|
||||
var iconId = "0"
|
||||
if (pageItem.id == "delete") {
|
||||
return ",delete,,,,,"
|
||||
return "~delete~~~~~"
|
||||
}
|
||||
var name: string;
|
||||
var type: string;
|
||||
@@ -266,7 +305,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
if (existsObject(pageItem.id)) {
|
||||
let o = getObject(pageItem.id)
|
||||
var val = null;
|
||||
name = o.common.name.de
|
||||
name = pageItem.name !== undefined ? pageItem.name : o.common.name.de
|
||||
|
||||
if (existsState(pageItem.id + ".GET")) {
|
||||
val = getState(pageItem.id + ".GET").val;
|
||||
@@ -279,9 +318,10 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
var iconColor = rgb_dec565(config.defaultColor);
|
||||
|
||||
switch (o.common.role) {
|
||||
case "socket":
|
||||
case "light":
|
||||
type = "light"
|
||||
iconId = pageItem.icon !== undefined ? pageItem.icon : 1;
|
||||
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == "socket" ? Icons.GetIcon("power-socket-de") : Icons.GetIcon("lightbulb");
|
||||
var optVal = "0"
|
||||
|
||||
if (val === true || val === "true") {
|
||||
@@ -289,11 +329,11 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
iconColor = GetIconColor(pageItem, true, useColors);
|
||||
}
|
||||
|
||||
return "," + type + "," + pageItem.id + "," + iconId + "," + iconColor + "," + name + "," + optVal;
|
||||
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal;
|
||||
|
||||
case "dimmer":
|
||||
type = "light"
|
||||
iconId = pageItem.icon !== undefined ? pageItem.icon : 1;
|
||||
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon("lightbulb");
|
||||
var optVal = "0"
|
||||
if (existsState(pageItem.id + ".ON_ACTUAL")) {
|
||||
val = getState(pageItem.id + ".ON_ACTUAL").val;
|
||||
@@ -308,53 +348,53 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
|
||||
iconColor = GetIconColor(pageItem, existsState(pageItem.id + ".ACTUAL") ? getState(pageItem.id + ".ACTUAL").val : true, useColors);
|
||||
}
|
||||
|
||||
return "," + type + "," + pageItem.id + "," + iconId + "," + iconColor + "," + name + "," + optVal;
|
||||
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal;
|
||||
|
||||
case "blind":
|
||||
type = "shutter"
|
||||
iconId = pageItem.icon !== undefined ? pageItem.icon : 11;
|
||||
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon("window-open");
|
||||
iconColor = GetIconColor(pageItem, existsState(pageItem.id + ".ACTUAL") ? getState(pageItem.id + ".ACTUAL").val : true, useColors);
|
||||
return "," + type + "," + pageItem.id + "," + iconId + "," + iconColor + "," + name + ","
|
||||
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~"
|
||||
|
||||
case "info":
|
||||
case "value.temperature":
|
||||
case "thermostat":
|
||||
type = "text";
|
||||
iconId = pageItem.icon !== undefined ? pageItem.icon : o.common.role == "value.temperature" || o.common.role == "thermostat" ? 2 : 0;
|
||||
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : o.common.role == "value.temperature" || o.common.role == "thermostat" ? Icons.GetIcon("thermometer") : Icons.GetIcon("information-outline");
|
||||
let unit = "";
|
||||
var optVal = "0"
|
||||
if (existsState(pageItem.id + ".ON_ACTUAL")) {
|
||||
optVal = getState(pageItem.id + ".ON_ACTUAL").val;
|
||||
unit = GetUnitOfMeasurement(pageItem.id + ".ON_ACTUAL");
|
||||
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + ".ON_ACTUAL");
|
||||
RegisterEntityWatcher(pageItem.id + ".ON_ACTUAL");
|
||||
}
|
||||
else if (existsState(pageItem.id + ".ACTUAL")) {
|
||||
optVal = getState(pageItem.id + ".ACTUAL").val;
|
||||
unit = GetUnitOfMeasurement(pageItem.id + ".ACTUAL");
|
||||
unit = pageItem.unit !== undefined ? pageItem.unit : GetUnitOfMeasurement(pageItem.id + ".ACTUAL");
|
||||
RegisterEntityWatcher(pageItem.id + ".ACTUAL");
|
||||
}
|
||||
|
||||
if (o.common.role == "value.temperature") {
|
||||
iconId = pageItem.icon !== undefined ? pageItem.icon : 2;
|
||||
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon("thermometer");
|
||||
}
|
||||
|
||||
iconColor = GetIconColor(pageItem, parseInt(optVal), useColors);
|
||||
|
||||
return "," + type + "," + pageItem.id + "," + iconId + "," + iconColor + "," + name + "," + optVal + " " + unit;
|
||||
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal + " " + unit;
|
||||
|
||||
case "button":
|
||||
type = "button";
|
||||
iconId = pageItem.icon !== undefined ? pageItem.icon : 3;
|
||||
let buttonText = pageItem.buttonText !== undefined ? pageItem.buttonText : "PRESS";
|
||||
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon("gesture-tap-button");
|
||||
let buttonText = pageItem.name !== undefined ? pageItem.name : "PRESS";
|
||||
iconColor = GetIconColor(pageItem, true, useColors);
|
||||
return "," + type + "," + pageItem.id + "," + iconId + "," + + iconColor + "," + name + "," + buttonText;
|
||||
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + + iconColor + "~" + name + "~" + buttonText;
|
||||
|
||||
default:
|
||||
return ",delete,,,,";
|
||||
return "~delete~~~~~";
|
||||
}
|
||||
}
|
||||
|
||||
return ",delete,,,,,"
|
||||
return "~delete~~~~~"
|
||||
}
|
||||
|
||||
function GetIconColor(pageItem: PageItem, value: (boolean | number), useColors: boolean): number {
|
||||
@@ -384,8 +424,12 @@ function RegisterEntityWatcher(id: string): void {
|
||||
return;
|
||||
}
|
||||
subscriptions[id] = (on({ id: id, change: 'any' }, function (data) {
|
||||
log("RegisterEntityWatcher PageId:" + pageId.toString())
|
||||
GeneratePage(config.pages[pageId]);
|
||||
if(pageId >= 0)
|
||||
SendToPanel({ payload: GeneratePageElements(config.pages[pageId]) });
|
||||
if(pageId == -1 && config.button1Page != undefined)
|
||||
SendToPanel({ payload: GeneratePageElements(config.button1Page) });
|
||||
if(pageId == -2 && config.button2Page != undefined)
|
||||
SendToPanel({ payload: GeneratePageElements(config.button2Page) });
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -417,15 +461,15 @@ function GetUnitOfMeasurement(id: string): string {
|
||||
function GenerateThermoPage(page: PageThermo): Payload[] {
|
||||
var id = page.items[0].id
|
||||
var out_msgs: Array<Payload> = [];
|
||||
out_msgs.push({ payload: "pageType,cardThermo" });
|
||||
out_msgs.push({ payload: "pageType~cardThermo" });
|
||||
|
||||
// ioBroker
|
||||
if (existsObject(id)) {
|
||||
let o = getObject(id)
|
||||
let name = o.common.name.de
|
||||
let name = page.items[0].name !== undefined ? page.items[0].name : o.common.name.de
|
||||
let currentTemp = 0;
|
||||
if (existsState(id + ".ACTUAL"))
|
||||
currentTemp = parseInt(getState(id + ".ACTUAL").val) * 10;
|
||||
currentTemp = (Math.round(parseFloat(getState(id + ".ACTUAL").val) * 10)/10)*10;
|
||||
|
||||
let destTemp = 0;
|
||||
if (existsState(id + ".SET")) {
|
||||
@@ -441,7 +485,7 @@ function GenerateThermoPage(page: PageThermo): Payload[] {
|
||||
let maxTemp = 300
|
||||
let stepTemp = 5
|
||||
|
||||
out_msgs.push({ payload: "entityUpd," + id + "," + name + "," + currentTemp + "," + destTemp + "," + status + "," + minTemp + "," + maxTemp + "," + stepTemp })
|
||||
out_msgs.push({ payload: "entityUpd~" + name + "~" + GetNavigationString(pageId) + "~" + id + "~" + currentTemp + "~" + destTemp + "~" + status + "~" + minTemp + "~" + maxTemp + "~" + stepTemp })
|
||||
}
|
||||
|
||||
return out_msgs
|
||||
@@ -537,6 +581,19 @@ function HandleButtonEvent(words): void {
|
||||
break;
|
||||
}
|
||||
}
|
||||
function GetNavigationString(pageId: number): string {
|
||||
switch (pageId) {
|
||||
case 0:
|
||||
return "0|1";
|
||||
case config.pages.length - 1:
|
||||
return "1|0";
|
||||
case -1:
|
||||
return "0|0";
|
||||
default:
|
||||
return "1|1";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function GenerateDetailPage(type: string, pageItem: PageItem): Payload[] {
|
||||
|
||||
@@ -545,7 +602,7 @@ function GenerateDetailPage(type: string, pageItem: PageItem): Payload[] {
|
||||
if (existsObject(id)) {
|
||||
var o = getObject(id)
|
||||
var val: (boolean | number) = 0;
|
||||
let icon = 1;
|
||||
let icon = Icons.GetIcon("lightbulb");
|
||||
var iconColor = rgb_dec565(config.defaultColor);
|
||||
if (type == "popupLight") {
|
||||
let switchVal = "0"
|
||||
@@ -564,7 +621,7 @@ function GenerateDetailPage(type: string, pageItem: PageItem): Payload[] {
|
||||
iconColor = GetIconColor(pageItem, true, false);
|
||||
}
|
||||
|
||||
out_msgs.push({ payload: "entityUpdateDetail," + icon + "," + + iconColor + "," + switchVal + ",disable,disable,disable" })
|
||||
out_msgs.push({ payload: "entityUpdateDetail~" + icon + "~" + + iconColor + "~" + switchVal + ",disable,disable,disable" })
|
||||
}
|
||||
|
||||
if (o.common.role == "dimmer") {
|
||||
@@ -594,7 +651,7 @@ function GenerateDetailPage(type: string, pageItem: PageItem): Payload[] {
|
||||
//if (attr_support_color.includes("color_temp"))
|
||||
// colortemp = Math.trunc(scale(attr.color_temp, attr.min_mireds, attr.max_mireds, 0, 100))
|
||||
|
||||
out_msgs.push({ payload: "entityUpdateDetail," + icon + "," + iconColor + "," + switchVal + "," + brightness + "," + colorTemp + "," + colorMode })
|
||||
out_msgs.push({ payload: "entityUpdateDetail~" + icon + "~" + iconColor + "~" + switchVal + "~" + brightness + "~" + colorTemp + "~" + colorMode })
|
||||
}
|
||||
|
||||
}
|
||||
@@ -622,12 +679,13 @@ function UnsubscribeWatcher(): void {
|
||||
}
|
||||
|
||||
function HandleScreensaver(): void {
|
||||
SendToPanel({ payload: "pageType~screensaver"})
|
||||
UnsubscribeWatcher();
|
||||
HandleScreensaverUpdate();
|
||||
}
|
||||
|
||||
function HandleScreensaverUpdate(): void {
|
||||
if (config.weatherEntity != null && existsObject(config.weatherEntity)) {
|
||||
if (screensaverEnabled && config.weatherEntity != null && existsObject(config.weatherEntity)) {
|
||||
var icon = getState(config.weatherEntity + ".ICON").val;
|
||||
|
||||
let temperature: string =
|
||||
@@ -635,8 +693,8 @@ function HandleScreensaverUpdate(): void {
|
||||
existsState(config.weatherEntity + ".TEMP") ? getState(config.weatherEntity + ".TEMP").val : "null";
|
||||
|
||||
let payloadString =
|
||||
"weatherUpdate,?" + GetAccuWeatherIcon(parseInt(icon)) + "?"
|
||||
+ temperature + " " + config.temperatureUnit + "?"
|
||||
"weatherUpdate~" + Icons.GetIcon(GetAccuWeatherIcon(parseInt(icon))) + "~"
|
||||
+ temperature + " " + config.temperatureUnit + "~"
|
||||
|
||||
payloadString += GetScreenSaverEntityString(config.firstScreensaverEntity);
|
||||
payloadString += GetScreenSaverEntityString(config.secondScreensaverEntity);
|
||||
@@ -650,54 +708,54 @@ function HandleScreensaverUpdate(): void {
|
||||
function GetScreenSaverEntityString(configElement: ScreenSaverElement | null): string {
|
||||
if (configElement != null && configElement.ScreensaverEntity != null && existsState(configElement.ScreensaverEntity)) {
|
||||
let u1 = getState(configElement.ScreensaverEntity).val;
|
||||
return configElement.ScreensaverEntityText + "?" + configElement.ScreensaverEntityIcon + "?" + u1 + " " + configElement.ScreensaverEntityUnitText + "?";
|
||||
return configElement.ScreensaverEntityText + "~" + Icons.GetIcon(configElement.ScreensaverEntityIcon) + "~" + u1 + " " + configElement.ScreensaverEntityUnitText + "~";
|
||||
}
|
||||
else {
|
||||
return "???";
|
||||
return "~~~";
|
||||
}
|
||||
}
|
||||
|
||||
function GetAccuWeatherIcon(icon: number): number {
|
||||
function GetAccuWeatherIcon(icon: number): string {
|
||||
switch (icon) {
|
||||
case 24: // Ice
|
||||
case 30: // Hot
|
||||
case 31: // Cold
|
||||
return 11; // exceptional
|
||||
return "window-open"; // exceptional
|
||||
|
||||
case 7: // Cloudy
|
||||
case 8: // Dreary (Overcast)
|
||||
case 38: // Mostly Cloudy
|
||||
return 12; // cloudy
|
||||
return "weather-cloudy"; // cloudy
|
||||
|
||||
case 11: // fog
|
||||
return 13; // fog
|
||||
return "weather-fog"; // fog
|
||||
|
||||
case 25: // Sleet
|
||||
return 14; // Hail
|
||||
return "weather-hail"; // Hail
|
||||
|
||||
case 15: // T-Storms
|
||||
return 15; // lightning
|
||||
return "weather-lightning"; // lightning
|
||||
|
||||
case 16: // Mostly Cloudy w/ T-Storms
|
||||
case 17: // Partly Sunny w/ T-Storms
|
||||
case 41: // Partly Cloudy w/ T-Storms
|
||||
case 42: // Mostly Cloudy w/ T-Storms
|
||||
return 16; // lightning-rainy
|
||||
return "weather-lightning-rainy"; // lightning-rainy
|
||||
|
||||
case 33: // Clear
|
||||
case 34: // Mostly Clear
|
||||
case 37: // Hazy Moonlight
|
||||
return 17;
|
||||
return "weather-night";
|
||||
|
||||
case 3: // Partly Sunny
|
||||
case 4: // Intermittent Clouds
|
||||
case 6: // Mostly Cloudy
|
||||
case 35: // Partly Cloudy
|
||||
case 36: // Intermittent Clouds
|
||||
return 18; // partlycloudy
|
||||
return "weather-partly-cloudy"; // partlycloudy
|
||||
|
||||
case 18: // pouring
|
||||
return 19; // pouring
|
||||
return "weather-pouring"; // pouring
|
||||
|
||||
case 12: // Showers
|
||||
case 13: // Mostly Cloudy w/ Showers
|
||||
@@ -705,7 +763,7 @@ function GetAccuWeatherIcon(icon: number): number {
|
||||
case 26: // Freezing Rain
|
||||
case 39: // Partly Cloudy w/ Showers
|
||||
case 40: // Mostly Cloudy w/ Showers
|
||||
return 20; // rainy
|
||||
return "weather-rainy"; // rainy
|
||||
|
||||
case 19: // Flurries
|
||||
case 20: // Mostly Cloudy w/ Flurries
|
||||
@@ -714,21 +772,21 @@ function GetAccuWeatherIcon(icon: number): number {
|
||||
case 23: // Mostly Cloudy w/ Snow
|
||||
case 43: // Mostly Cloudy w/ Flurries
|
||||
case 44: // Mostly Cloudy w/ Snow
|
||||
return 21; // snowy
|
||||
return "weather-snowy"; // snowy
|
||||
|
||||
case 29: // Rain and Snow
|
||||
return 22; // snowy-rainy
|
||||
return "weather-snowy-rainy"; // snowy-rainy
|
||||
|
||||
case 1: // Sunny
|
||||
case 2: // Mostly Sunny
|
||||
case 5: // Hazy Sunshine
|
||||
return 23; // sunny
|
||||
return "weather-sunny"; // sunny
|
||||
|
||||
case 32: // windy
|
||||
return 24; // windy
|
||||
return "weather-windy"; // windy
|
||||
|
||||
default:
|
||||
return 1;
|
||||
return "alert-circle-outline";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,14 +845,15 @@ interface PageThermo extends Page {
|
||||
|
||||
type PageItem = {
|
||||
id: string,
|
||||
icon: (number | undefined),
|
||||
icon: (string | undefined),
|
||||
onColor: (RGB | undefined),
|
||||
offColor: (RGB | undefined),
|
||||
useColor: (boolean | undefined),
|
||||
interpolateColor: (boolean | undefined),
|
||||
minValue: (number | undefined),
|
||||
maxValue: (number | undefined),
|
||||
buttonText: (string | undefined)
|
||||
name: (string | undefined),
|
||||
unit: (string | undefined)
|
||||
}
|
||||
|
||||
type Config = {
|
||||
@@ -823,7 +882,7 @@ type Config = {
|
||||
|
||||
type ScreenSaverElement = {
|
||||
ScreensaverEntity: string | null,
|
||||
ScreensaverEntityIcon: number | null,
|
||||
ScreensaverEntityIcon: string | null,
|
||||
ScreensaverEntityText: string | null,
|
||||
ScreensaverEntityUnitText: string | null,
|
||||
}
|
||||
@@ -32,18 +32,8 @@ You can find this in the device raw settings.
|
||||
- Create a state with a mqtt client or create one per hand. The mqtt adapter will not create the state CustomSend
|
||||
- you only need to send a dummy message to cmnd/<yourPanel>/CustomSend
|
||||
- then the state will be created
|
||||
- Put the file icon_mapping.ts in the global folder
|
||||
|
||||
## Update the screensaver string
|
||||
The screensaver string which is send to the display looks something like this:
|
||||
weatherUpdate,?23?11 °C?26?54%?Batterie?4?12 %?PV?23?123W
|
||||
All fields are seperated by a question mark. In detail the fields are:
|
||||
weatherUpdate,?Icon?Text?Icon (default humidity)?Text next to the last icon?Text for the left icon on the right side?Icon?Text under the icon?Text for the right icon on the left side?Icon?Text under the icon
|
||||
|
||||
See the icons currently usable in the following table:
|
||||
|
||||
[Icon Table](../HMI#icons-ids)
|
||||
|
||||
You can change the string and devices in the config object.
|
||||
|
||||
## Hardware buttons
|
||||
If you like you can add special pages for the buttons.
|
||||
@@ -66,11 +56,11 @@ const BatteryEmpty: RGB = { red: 179, green: 45, blue: 25 }
|
||||
var config: Config = {
|
||||
panelRecvTopic: "mqtt.0.tele.WzDisplay.RESULT", // This is the object where the panel send the data to.
|
||||
panelSendTopic: "mqtt.0.cmnd.WzDisplay.CustomSend", // This is the object where data is send to the panel.
|
||||
firstScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.HUMIDITY", ScreensaverEntityIcon: 26, ScreensaverEntityText: "Luft", ScreensaverEntityUnitText: "%" },
|
||||
firstScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.HUMIDITY", ScreensaverEntityIcon: "water-percent", ScreensaverEntityText: "Luft", ScreensaverEntityUnitText: "%" },
|
||||
// Items which should be presented on the screensaver page
|
||||
secondScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.PRECIPITATION_CHANCE", ScreensaverEntityIcon: 19, ScreensaverEntityText: "Regen", ScreensaverEntityUnitText: "%" },
|
||||
thirdScreensaverEntity: { ScreensaverEntity: "alias.0.Batterie.ACTUAL", ScreensaverEntityIcon: 34, ScreensaverEntityText: "Batterie", ScreensaverEntityUnitText: "%" },
|
||||
fourthScreensaverEntity: { ScreensaverEntity: "alias.0.Pv.ACTUAL", ScreensaverEntityIcon: 32, ScreensaverEntityText: "PV", ScreensaverEntityUnitText: "W" },
|
||||
secondScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.PRECIPITATION_CHANCE", ScreensaverEntityIcon: "weather-pouring", ScreensaverEntityText: "Regen", ScreensaverEntityUnitText: "%" },
|
||||
thirdScreensaverEntity: { ScreensaverEntity: "alias.0.Batterie.ACTUAL", ScreensaverEntityIcon: "battery-medium", ScreensaverEntityText: "Batterie", ScreensaverEntityUnitText: "%" },
|
||||
fourthScreensaverEntity: { ScreensaverEntity: "alias.0.Pv.ACTUAL", ScreensaverEntityIcon: "solar-power", ScreensaverEntityText: "PV", ScreensaverEntityUnitText: "W" },
|
||||
screenSaverDoubleClick: false, // Doubletouch needed for leaving screensaver.
|
||||
timeoutScreensaver: 15, // Timeout for screensaver
|
||||
dimmode: 8, // Display dim
|
||||
@@ -82,45 +72,12 @@ var config: Config = {
|
||||
defaultOnColor: RGB, // Default on state color for items
|
||||
defaultOffColor: RGB, // Default off state color for page
|
||||
temperatureUnit: "°C", // Unit to append on temperature sensors
|
||||
<<<<<<< HEAD
|
||||
pages: [Wohnen, Strom,
|
||||
{
|
||||
"type": "cardThermo",
|
||||
"heading": "Thermostat",
|
||||
"useColor": true,
|
||||
"items": [<PageItem>{ id: "alias.0.WzNsPanel" }]
|
||||
=======
|
||||
pages: [
|
||||
{
|
||||
"type": "cardEntities", // card type (cardEntities, cardThermo)
|
||||
"heading": "Testseite", // heading
|
||||
"useColor": false, // should colors be enabled on this page, can be overridden in PageItem
|
||||
"items": [ // items array (up to 4 on cardEntities, 1 for cardThermo)
|
||||
<PageItem>{ id: "alias.0.Rolladen_Eltern" }, // device which must be configured in the device panel. Use only the folder for the device, not the set, get states ...
|
||||
<PageItem>{ id: "alias.0.Erker" },
|
||||
<PageItem>{ id: "alias.0.Küche", useColor: true },
|
||||
<PageItem>{ id: "alias.0.Wand", useColor: true }
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "cardEntities",
|
||||
"heading": "Strom",
|
||||
"useColor": true, // should colors be enabled on this page, can be overridden in PageItem
|
||||
"items": [
|
||||
<PageItem>{ id: "alias.0.Netz" },
|
||||
<PageItem>{ id: "alias.0.Hausverbrauch", icon: 4, interpolateColor: true, offColor: BatteryFull, onColor: Red , maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Pv" },
|
||||
<PageItem>{ id: "alias.0.Batterie", icon: 34, interpolateColor: true, offColor: BatteryEmpty, onColor: BatteryFull }
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "cardThermo",
|
||||
"heading": "Thermostat",
|
||||
"useColor": false, // should colors be enabled on this page, can be overridden in PageItem
|
||||
"item": "alias.0.WzNsPanel" // Needs to be a thermostat in the device panel
|
||||
>>>>>>> 8a48ff35d408a7712a3052ee3cf8fc84e8b699c7
|
||||
}
|
||||
],
|
||||
button1Page: button1Page, // A cardEntities, cardThermo or nothing. This will be opened when pressing button1
|
||||
@@ -139,7 +96,8 @@ type PageItem = {
|
||||
interpolateColor: (boolean | undefined),// fade between color on and off, useColor on Page or PageItem must be enabled
|
||||
minValue: (number | undefined), // the minimum value for the fade calculation, if smaller the minimum value will be used
|
||||
maxValue: (number | undefined), // the maximum value for the fade calculation, if larger the maximum value will be used
|
||||
buttonText: (string | undefined) // the Button Text, default is "Press"
|
||||
name: (string | undefined), // the Name which should be displayed, default is the name of the object itself
|
||||
unit: (string | undefined) // the unit which should be displayed, default is the unit of the object itself
|
||||
}
|
||||
```
|
||||
|
||||
@@ -170,10 +128,10 @@ pages: [
|
||||
"heading": "Strom",
|
||||
"useColor": true, // should colors be enabled on this page, can be overridden in PageItem
|
||||
"items": [
|
||||
<PageItem>{ id: "alias.0.Netz" },
|
||||
<PageItem>{ id: "alias.0.Hausverbrauch" },
|
||||
<PageItem>{ id: "alias.0.Pv" },
|
||||
<PageItem>{ id: "alias.0.Batterie" }
|
||||
<PageItem>{ id: "alias.0.Netz", icon: "flash", interpolateColor: true, offColor: BatteryFull, onColor: Red, minValue: -1000, maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Hausverbrauch", icon: "flash", interpolateColor: true, offColor: BatteryFull, onColor: Red, maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Pv", name: "Solar" ,icon: "solar-power", interpolateColor: true, offColor: Off, onColor: BatteryFull, maxValue: 1000 },
|
||||
<PageItem>{ id: "alias.0.Batterie", icon: "battery-medium", interpolateColor: true, offColor: BatteryEmpty, onColor: BatteryFull }
|
||||
]
|
||||
}]
|
||||
```
|
||||
|
||||
5131
ioBroker/icon_mapping.ts
Normal file
5131
ioBroker/icon_mapping.ts
Normal file
File diff suppressed because it is too large
Load Diff
388
tasmota/autoexec-oldstable.be
Normal file
388
tasmota/autoexec-oldstable.be
Normal file
@@ -0,0 +1,388 @@
|
||||
# Sonoff NSPanel Tasmota Lovelace UI Berry Driver | code by joBr99
|
||||
# based on;
|
||||
# Sonoff NSPanel Tasmota (Nextion with Flashing) driver | code by peepshow-21
|
||||
# based on;
|
||||
# Sonoff NSPanel Tasmota driver v0.47 | code by blakadder and s-hadinger
|
||||
|
||||
# Example Flash
|
||||
# FlashNextion http://ip-address-of-your-homeassistant:8123/local/nspanel.tft
|
||||
# FlashNextion http://nspanel.pky.eu/lui.tft
|
||||
|
||||
class Nextion : Driver
|
||||
|
||||
static VERSION = "1.1.3"
|
||||
static header = bytes('55BB')
|
||||
|
||||
static flash_block_size = 4096
|
||||
|
||||
var flash_mode
|
||||
var flash_size
|
||||
var flash_written
|
||||
var flash_buff
|
||||
var flash_offset
|
||||
var awaiting_offset
|
||||
var tcp
|
||||
var ser
|
||||
var last_per
|
||||
|
||||
def split_55(b)
|
||||
var ret = []
|
||||
var s = size(b)
|
||||
var i = s-2 # start from last-1
|
||||
while i > 0
|
||||
if b[i] == 0x55 && b[i+1] == 0xBB
|
||||
ret.push(b[i..s-1]) # push last msg to list
|
||||
b = b[(0..i-1)] # write the rest back to b
|
||||
end
|
||||
i -= 1
|
||||
end
|
||||
ret.push(b)
|
||||
return ret
|
||||
end
|
||||
|
||||
def crc16(data, poly)
|
||||
if !poly poly = 0xA001 end
|
||||
# CRC-16 MODBUS HASHING ALGORITHM
|
||||
var crc = 0xFFFF
|
||||
for i:0..size(data)-1
|
||||
crc = crc ^ data[i]
|
||||
for j:0..7
|
||||
if crc & 1
|
||||
crc = (crc >> 1) ^ poly
|
||||
else
|
||||
crc = crc >> 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return crc
|
||||
end
|
||||
|
||||
# encode using custom protocol 55 BB [payload length] [payload length] [payload] [crc] [crc]
|
||||
def encode(payload)
|
||||
var b = bytes()
|
||||
b += self.header
|
||||
b.add(size(payload), 2) # add size as 2 bytes, little endian
|
||||
b += bytes().fromstring(payload)
|
||||
var msg_crc = self.crc16(b)
|
||||
b.add(msg_crc, 2) # crc 2 bytes, little endian
|
||||
return b
|
||||
end
|
||||
|
||||
def encodenx(payload)
|
||||
var b = bytes().fromstring(payload)
|
||||
b += bytes('FFFFFF')
|
||||
return b
|
||||
end
|
||||
|
||||
def sendnx(payload)
|
||||
import string
|
||||
var payload_bin = self.encodenx(payload)
|
||||
self.ser.write(payload_bin)
|
||||
log(string.format("NXP: Nextion command sent = %s",str(payload_bin)), 3)
|
||||
end
|
||||
|
||||
def send(payload)
|
||||
var payload_bin = self.encode(payload)
|
||||
if self.flash_mode==1
|
||||
log("NXP: skipped command becuase still flashing", 3)
|
||||
else
|
||||
self.ser.write(payload_bin)
|
||||
log("NXP: payload sent = " + str(payload_bin), 3)
|
||||
end
|
||||
end
|
||||
|
||||
def write_to_nextion(b)
|
||||
self.ser.write(b)
|
||||
end
|
||||
|
||||
def screeninit()
|
||||
log("NXP: Screen Initialized")
|
||||
self.sendnx("recmod=1")
|
||||
end
|
||||
|
||||
def write_block()
|
||||
|
||||
import string
|
||||
log("FLH: Read block",3)
|
||||
while size(self.flash_buff)<self.flash_block_size && self.tcp.connected()
|
||||
if self.tcp.available()>0
|
||||
self.flash_buff += self.tcp.readbytes()
|
||||
else
|
||||
tasmota.delay(50)
|
||||
log("FLH: Wait for available...",3)
|
||||
end
|
||||
end
|
||||
log("FLH: Buff size "+str(size(self.flash_buff)),3)
|
||||
var to_write
|
||||
if size(self.flash_buff)>self.flash_block_size
|
||||
to_write = self.flash_buff[0..self.flash_block_size-1]
|
||||
self.flash_buff = self.flash_buff[self.flash_block_size..]
|
||||
else
|
||||
to_write = self.flash_buff
|
||||
self.flash_buff = bytes()
|
||||
end
|
||||
log("FLH: Writing "+str(size(to_write)),3)
|
||||
var per = (self.flash_written*100)/self.flash_size
|
||||
if (self.last_per!=per)
|
||||
self.last_per = per
|
||||
tasmota.publish_result(string.format("{\"Flashing\":{\"complete\": %d}}",per), "RESULT")
|
||||
end
|
||||
if size(to_write)>0
|
||||
self.flash_written += size(to_write)
|
||||
if self.flash_offset==0 || self.flash_written>self.flash_offset
|
||||
self.ser.write(to_write)
|
||||
self.flash_offset = 0
|
||||
else
|
||||
tasmota.set_timer(10,/->self.write_block())
|
||||
end
|
||||
end
|
||||
log("FLH: Total "+str(self.flash_written),3)
|
||||
if (self.flash_written==self.flash_size)
|
||||
log("FLH: Flashing complete")
|
||||
self.flash_mode = 0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def every_100ms()
|
||||
import string
|
||||
if self.ser.available() > 0
|
||||
var msg = self.ser.read()
|
||||
if size(msg) > 0
|
||||
log(string.format("NXP: Received Raw = %s",str(msg)), 3)
|
||||
if (self.flash_mode==1)
|
||||
var strv = msg[0..-4].asstring()
|
||||
if string.find(strv,"comok 2")>=0
|
||||
log("FLH: Send (High Speed) flash start")
|
||||
self.sendnx(string.format("whmi-wris %d,115200,res0",self.flash_size))
|
||||
elif size(msg)==1 && msg[0]==0x08
|
||||
log("FLH: Waiting offset...",3)
|
||||
self.awaiting_offset = 1
|
||||
elif size(msg)==4 && self.awaiting_offset==1
|
||||
self.awaiting_offset = 0
|
||||
self.flash_offset = msg.get(0,4)
|
||||
log("FLH: Flash offset marker "+str(self.flash_offset),3)
|
||||
self.write_block()
|
||||
elif size(msg)==1 && msg[0]==0x05
|
||||
self.write_block()
|
||||
else
|
||||
log("FLH: Something has gone wrong flashing display firmware ["+str(msg)+"]",2)
|
||||
end
|
||||
else
|
||||
var msg_list = self.split_55(msg)
|
||||
for i:0..size(msg_list)-1
|
||||
msg = msg_list[i]
|
||||
if size(msg) > 0
|
||||
if msg == bytes('000000FFFFFF88FFFFFF')
|
||||
self.screeninit()
|
||||
elif size(msg)>=2 && msg[0]==0x55 && msg[1]==0xBB
|
||||
var jm = string.format("{\"CustomRecv\":\"%s\"}",msg[4..-3].asstring())
|
||||
tasmota.publish_result(jm, "RESULT")
|
||||
elif msg[0]==0x07 && size(msg)==1 # BELL/Buzzer
|
||||
tasmota.cmd("buzzer 1,1")
|
||||
else
|
||||
var jm = string.format("{\"nextion\":\"%s\"}",str(msg[0..-4]))
|
||||
tasmota.publish_result(jm, "RESULT")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def begin_nextion_flash()
|
||||
self.flash_written = 0
|
||||
self.awaiting_offset = 0
|
||||
self.flash_offset = 0
|
||||
self.sendnx('DRAKJHSUYDGBNCJHGJKSHBDN')
|
||||
self.sendnx('recmod=0')
|
||||
self.sendnx('recmod=0')
|
||||
self.flash_mode = 1
|
||||
self.sendnx("connect")
|
||||
end
|
||||
|
||||
def open_url(url)
|
||||
|
||||
import string
|
||||
var host
|
||||
var port
|
||||
var s1 = string.split(url,7)[1]
|
||||
var i = string.find(s1,":")
|
||||
var sa
|
||||
if i<0
|
||||
port = 80
|
||||
i = string.find(s1,"/")
|
||||
sa = string.split(s1,i)
|
||||
host = sa[0]
|
||||
else
|
||||
sa = string.split(s1,i)
|
||||
host = sa[0]
|
||||
s1 = string.split(sa[1],1)[1]
|
||||
i = string.find(s1,"/")
|
||||
sa = string.split(s1,i)
|
||||
port = int(sa[0])
|
||||
end
|
||||
var get = sa[1]
|
||||
log(string.format("FLH: host: %s, port: %s, get: %s",host,port,get))
|
||||
self.tcp = tcpclient()
|
||||
self.tcp.connect(host,port)
|
||||
log("FLH: Connected:"+str(self.tcp.connected()),3)
|
||||
var get_req = "GET "+get+" HTTP/1.0\r\n"
|
||||
get_req += string.format("HOST: %s:%s\r\n\r\n",host,port)
|
||||
self.tcp.write(get_req)
|
||||
var a = self.tcp.available()
|
||||
i = 1
|
||||
while a==0 && i<5
|
||||
tasmota.delay(100*i)
|
||||
tasmota.yield()
|
||||
i += 1
|
||||
log("FLH: Retry "+str(i),3)
|
||||
a = self.tcp.available()
|
||||
end
|
||||
if a==0
|
||||
log("FLH: Nothing available to read!",3)
|
||||
return
|
||||
end
|
||||
var b = self.tcp.readbytes()
|
||||
i = 0
|
||||
var end_headers = false;
|
||||
var headers
|
||||
while i<size(b) && headers==nil
|
||||
if b[i..(i+3)]==bytes().fromstring("\r\n\r\n")
|
||||
headers = b[0..(i+3)].asstring()
|
||||
self.flash_buff = b[(i+4)..]
|
||||
else
|
||||
i += 1
|
||||
end
|
||||
end
|
||||
#print(headers)
|
||||
# check http respose for code 200
|
||||
var tag = "200 OK"
|
||||
i = string.find(headers,tag)
|
||||
if (i>0)
|
||||
log("FLH: HTTP Respose is 200 OK",3)
|
||||
else
|
||||
log("FLH: HTTP Respose is not 200 OK",3)
|
||||
print(headers)
|
||||
return
|
||||
end
|
||||
# check http respose for content-length
|
||||
tag = "Content-Length: "
|
||||
i = string.find(headers,tag)
|
||||
if (i>0)
|
||||
var i2 = string.find(headers,"\r\n",i)
|
||||
var s = headers[i+size(tag)..i2-1]
|
||||
self.flash_size=int(s)
|
||||
end
|
||||
if self.flash_size==0
|
||||
log("FLH: No size header, counting ...",3)
|
||||
self.flash_size = size(self.flash_buff)
|
||||
#print("counting start ...")
|
||||
while self.tcp.connected()
|
||||
while self.tcp.available()>0
|
||||
self.flash_size += size(self.tcp.readbytes())
|
||||
end
|
||||
tasmota.delay(50)
|
||||
end
|
||||
#print("counting end ...",self.flash_size)
|
||||
self.tcp.close()
|
||||
self.open_url(url)
|
||||
else
|
||||
log("FLH: Size found in header, skip count",3)
|
||||
end
|
||||
log("FLH: Flash file size: "+str(self.flash_size),3)
|
||||
|
||||
end
|
||||
|
||||
def flash_nextion(url)
|
||||
|
||||
self.flash_size = 0
|
||||
self.open_url(url)
|
||||
self.begin_nextion_flash()
|
||||
|
||||
end
|
||||
|
||||
def version_number(str)
|
||||
import string
|
||||
var i1 = string.find(str,".",0)
|
||||
var i2 = string.find(str,".",i1+1)
|
||||
var num = int(str[0..i1-1])*10000+int(str[i1+1..i2-1])*100+int(str[i2+1..])
|
||||
return num
|
||||
end
|
||||
|
||||
def init()
|
||||
log("NXP: Initializing Driver")
|
||||
self.ser = serial(17, 16, 115200, serial.SERIAL_8N1)
|
||||
self.flash_mode = 0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
var nextion = Nextion()
|
||||
|
||||
tasmota.add_driver(nextion)
|
||||
|
||||
def get_current_version(cmd, idx, payload, payload_json)
|
||||
import string
|
||||
var version_of_this_script = 3
|
||||
var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script)
|
||||
tasmota.publish_result(jm, "RESULT")
|
||||
end
|
||||
|
||||
tasmota.add_cmd('GetDriverVersion', get_current_version)
|
||||
|
||||
def update_berry_driver(cmd, idx, payload, payload_json)
|
||||
def task()
|
||||
import string
|
||||
var cl = webclient()
|
||||
cl.begin(payload)
|
||||
var r = cl.GET()
|
||||
if r == 200
|
||||
print("Sucessfully downloaded nspanel-lovelace-ui berry driver")
|
||||
else
|
||||
print("Error while downloading nspanel-lovelace-ui berry driver")
|
||||
end
|
||||
r = cl.write_file("autoexec.be")
|
||||
if r < 0
|
||||
print("Error while writeing nspanel-lovelace-ui berry driver")
|
||||
else
|
||||
print("Sucessfully written nspanel-lovelace-ui berry driver")
|
||||
var s = load('autoexec.be')
|
||||
if s == true
|
||||
var jm = string.format("{\"nlui_driver_update\":\"%s\"}", "succeeded")
|
||||
tasmota.publish_result(jm, "RESULT")
|
||||
else
|
||||
var jm = string.format("{\"nlui_driver_update\":\"%s\"}", "failed")
|
||||
tasmota.publish_result(jm, "RESULT")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
tasmota.set_timer(0,task)
|
||||
tasmota.resp_cmnd_done()
|
||||
end
|
||||
|
||||
tasmota.add_cmd('UpdateDriverVersion', update_berry_driver)
|
||||
|
||||
def flash_nextion(cmd, idx, payload, payload_json)
|
||||
def task()
|
||||
nextion.flash_nextion(payload)
|
||||
end
|
||||
tasmota.set_timer(0,task)
|
||||
tasmota.resp_cmnd_done()
|
||||
end
|
||||
|
||||
def send_cmd(cmd, idx, payload, payload_json)
|
||||
nextion.sendnx(payload)
|
||||
tasmota.resp_cmnd_done()
|
||||
end
|
||||
|
||||
def send_cmd2(cmd, idx, payload, payload_json)
|
||||
nextion.send(payload)
|
||||
tasmota.resp_cmnd_done()
|
||||
end
|
||||
|
||||
tasmota.add_cmd('Nextion', send_cmd)
|
||||
tasmota.add_cmd('CustomSend', send_cmd2)
|
||||
tasmota.add_cmd('FlashNextion', flash_nextion)
|
||||
@@ -10,12 +10,12 @@
|
||||
|
||||
class Nextion : Driver
|
||||
|
||||
static VERSION = "1.1.3"
|
||||
static header = bytes('55BB')
|
||||
|
||||
static flash_block_size = 4096
|
||||
|
||||
var flash_mode
|
||||
var flash_start_millis
|
||||
var flash_size
|
||||
var flash_written
|
||||
var flash_buff
|
||||
@@ -24,6 +24,7 @@ class Nextion : Driver
|
||||
var tcp
|
||||
var ser
|
||||
var last_per
|
||||
var url
|
||||
|
||||
def split_55(b)
|
||||
var ret = []
|
||||
@@ -125,21 +126,19 @@ class Nextion : Driver
|
||||
var per = (self.flash_written*100)/self.flash_size
|
||||
if (self.last_per!=per)
|
||||
self.last_per = per
|
||||
tasmota.publish_result(string.format("{\"Flashing\":{\"complete\": %d}}",per), "RESULT")
|
||||
tasmota.publish_result(string.format("{\"Flashing\":{\"complete\": %d, \"time_elapsed\": %d}}",per , (tasmota.millis()-self.flash_start_millis)/1000), "RESULT")
|
||||
end
|
||||
if size(to_write)>0
|
||||
self.flash_written += size(to_write)
|
||||
if self.flash_offset==0 || self.flash_written>self.flash_offset
|
||||
self.ser.write(to_write)
|
||||
self.flash_offset = 0
|
||||
else
|
||||
tasmota.set_timer(10,/->self.write_block())
|
||||
end
|
||||
end
|
||||
log("FLH: Total "+str(self.flash_written),3)
|
||||
if (self.flash_written==self.flash_size)
|
||||
log("FLH: Flashing complete")
|
||||
log("FLH: Flashing complete - Time elapsed: %d", (tasmota.millis()-self.flash_start_millis)/1000)
|
||||
self.flash_mode = 0
|
||||
self.ser = nil
|
||||
tasmota.gc()
|
||||
self.ser = serial(17, 16, 115200, serial.SERIAL_8N1)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -154,7 +153,10 @@ class Nextion : Driver
|
||||
var strv = msg[0..-4].asstring()
|
||||
if string.find(strv,"comok 2")>=0
|
||||
log("FLH: Send (High Speed) flash start")
|
||||
self.sendnx(string.format("whmi-wris %d,115200,res0",self.flash_size))
|
||||
self.flash_start_millis = tasmota.millis()
|
||||
#self.sendnx(string.format("whmi-wris %d,115200,res0",self.flash_size))
|
||||
self.sendnx(string.format("whmi-wris %d,921600,res0",self.flash_size))
|
||||
self.ser = serial(17, 16, 921600, serial.SERIAL_8N1)
|
||||
elif size(msg)==1 && msg[0]==0x08
|
||||
log("FLH: Waiting offset...",3)
|
||||
self.awaiting_offset = 1
|
||||
@@ -162,6 +164,10 @@ class Nextion : Driver
|
||||
self.awaiting_offset = 0
|
||||
self.flash_offset = msg.get(0,4)
|
||||
log("FLH: Flash offset marker "+str(self.flash_offset),3)
|
||||
if self.flash_offset != 0
|
||||
self.open_url_at(self.url, self.flash_offset)
|
||||
self.flash_written = self.flash_offset
|
||||
end
|
||||
self.write_block()
|
||||
elif size(msg)==1 && msg[0]==0x05
|
||||
self.write_block()
|
||||
@@ -202,8 +208,8 @@ class Nextion : Driver
|
||||
self.sendnx("connect")
|
||||
end
|
||||
|
||||
def open_url(url)
|
||||
|
||||
def open_url_at(url, pos)
|
||||
self.url = url
|
||||
import string
|
||||
var host
|
||||
var port
|
||||
@@ -229,6 +235,7 @@ class Nextion : Driver
|
||||
self.tcp.connect(host,port)
|
||||
log("FLH: Connected:"+str(self.tcp.connected()),3)
|
||||
var get_req = "GET "+get+" HTTP/1.0\r\n"
|
||||
get_req += string.format("Range: bytes=%d-\r\n", pos)
|
||||
get_req += string.format("HOST: %s:%s\r\n\r\n",host,port)
|
||||
self.tcp.write(get_req)
|
||||
var a = self.tcp.available()
|
||||
@@ -257,58 +264,35 @@ class Nextion : Driver
|
||||
end
|
||||
end
|
||||
#print(headers)
|
||||
# check http respose for code 200
|
||||
var tag = "200 OK"
|
||||
i = string.find(headers,tag)
|
||||
if (i>0)
|
||||
log("FLH: HTTP Respose is 200 OK",3)
|
||||
# check http respose for code 200/206
|
||||
if string.find(headers,"200 OK")>0 || string.find(headers,"206 Partial Content")>0
|
||||
log("FLH: HTTP Respose is 200 OK or 206 Partial Content",3)
|
||||
else
|
||||
log("FLH: HTTP Respose is not 200 OK",3)
|
||||
log("FLH: HTTP Respose is not 200 OK or 206 Partial Content",3)
|
||||
print(headers)
|
||||
return
|
||||
return -1
|
||||
end
|
||||
# only set flash size if pos is zero
|
||||
if pos == 0
|
||||
# check http respose for content-length
|
||||
tag = "Content-Length: "
|
||||
var tag = "Content-Length: "
|
||||
i = string.find(headers,tag)
|
||||
if (i>0)
|
||||
var i2 = string.find(headers,"\r\n",i)
|
||||
var s = headers[i+size(tag)..i2-1]
|
||||
self.flash_size=int(s)
|
||||
end
|
||||
if self.flash_size==0
|
||||
log("FLH: No size header, counting ...",3)
|
||||
self.flash_size = size(self.flash_buff)
|
||||
#print("counting start ...")
|
||||
while self.tcp.connected()
|
||||
while self.tcp.available()>0
|
||||
self.flash_size += size(self.tcp.readbytes())
|
||||
end
|
||||
tasmota.delay(50)
|
||||
end
|
||||
#print("counting end ...",self.flash_size)
|
||||
self.tcp.close()
|
||||
self.open_url(url)
|
||||
else
|
||||
log("FLH: Size found in header, skip count",3)
|
||||
end
|
||||
log("FLH: Flash file size: "+str(self.flash_size),3)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def flash_nextion(url)
|
||||
|
||||
self.flash_size = 0
|
||||
self.open_url(url)
|
||||
var res = self.open_url_at(url, 0)
|
||||
if res != -1
|
||||
self.begin_nextion_flash()
|
||||
|
||||
end
|
||||
|
||||
def version_number(str)
|
||||
import string
|
||||
var i1 = string.find(str,".",0)
|
||||
var i2 = string.find(str,".",i1+1)
|
||||
var num = int(str[0..i1-1])*10000+int(str[i1+1..i2-1])*100+int(str[i2+1..])
|
||||
return num
|
||||
end
|
||||
|
||||
def init()
|
||||
@@ -325,7 +309,7 @@ tasmota.add_driver(nextion)
|
||||
|
||||
def get_current_version(cmd, idx, payload, payload_json)
|
||||
import string
|
||||
var version_of_this_script = 3
|
||||
var version_of_this_script = 4
|
||||
var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script)
|
||||
tasmota.publish_result(jm, "RESULT")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user