mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-18 19:06:58 +01:00
Compare commits
190 Commits
Armilar-pa
...
c19ffc371c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c19ffc371c | ||
|
|
0b01c0d236 | ||
|
|
3107b73430 | ||
|
|
5d421ae525 | ||
|
|
56a8495787 | ||
|
|
a12bc03dd7 | ||
|
|
6b1a65f8f4 | ||
|
|
9d94155480 | ||
|
|
3b46759134 | ||
|
|
8d21c653ae | ||
|
|
d983c44db7 | ||
|
|
467a1d92bb | ||
|
|
157d3e3e66 | ||
|
|
51bb320dce | ||
|
|
12c99c6857 | ||
|
|
62e905f336 | ||
|
|
9b5964a758 | ||
|
|
9c49a9c67d | ||
|
|
0a2461f4a5 | ||
|
|
49577ddbb6 | ||
|
|
6172b0c35f | ||
|
|
e7cc10692b | ||
|
|
221d2c717d | ||
|
|
2b54f742c5 | ||
|
|
f02eddcebe | ||
|
|
c25a5cef67 | ||
|
|
0f69ee951c | ||
|
|
fd6650db50 | ||
|
|
f2ad80665a | ||
|
|
cff9c94c27 | ||
|
|
b6fdc12820 | ||
|
|
01265faef9 | ||
|
|
a2feae891e | ||
|
|
bd24d4bcd1 | ||
|
|
0efbd9e23c | ||
|
|
4aab72fb10 | ||
|
|
aa266da5ac | ||
|
|
49987d55ce | ||
|
|
c6939efd70 | ||
|
|
f7f853f05e | ||
|
|
1faa540a70 | ||
|
|
1746c876bd | ||
|
|
cd0c015fea | ||
|
|
760b25b7a2 | ||
|
|
eccfad5615 | ||
|
|
27034e4bae | ||
|
|
99376c8fc2 | ||
|
|
17e7ba1ef2 | ||
|
|
38526890cc | ||
|
|
ae9b33d5f0 | ||
|
|
ff96812d26 | ||
|
|
0359a4b3dc | ||
|
|
f75dd3a800 | ||
|
|
a992dc56c5 | ||
|
|
576176e1cc | ||
|
|
1d3914ce86 | ||
|
|
b2f338cad8 | ||
|
|
74a329ca29 | ||
|
|
29ae1b4034 | ||
|
|
ae5cab9830 | ||
|
|
a986e588b5 | ||
|
|
8c84c1050f | ||
|
|
c3ded4d817 | ||
|
|
db32de68e3 | ||
|
|
f76f2ca393 | ||
|
|
8449257628 | ||
|
|
2bd3d0d290 | ||
|
|
117798a3f5 | ||
|
|
01392bcbf8 | ||
|
|
5a3478d916 | ||
|
|
f3b545fd90 | ||
|
|
e7a6a05a1b | ||
|
|
f65ff57a95 | ||
|
|
9a8f53e890 | ||
|
|
e94c711f12 | ||
|
|
4cc8455fff | ||
|
|
943bb93398 | ||
|
|
0a1eb8c2e5 | ||
|
|
b7fd06413d | ||
|
|
a2b805f4e1 | ||
|
|
bc69af7b6b | ||
|
|
c36202878f | ||
|
|
60f31595d4 | ||
|
|
7194d7f613 | ||
|
|
af02a70600 | ||
|
|
77d8e0607d | ||
|
|
d6d12bc93c | ||
|
|
127671047f | ||
|
|
ead1def4bb | ||
|
|
14e944885f | ||
|
|
a075e0cba8 | ||
|
|
dd14e66f10 | ||
|
|
ce0892b986 | ||
|
|
71b84cc8d3 | ||
|
|
fd3ce243a6 | ||
|
|
aa3e90ef98 | ||
|
|
2621b22ffd | ||
|
|
6460f5f4ff | ||
|
|
e45560c27f | ||
|
|
0c6cd158dd | ||
|
|
f11de05eb3 | ||
|
|
ef47efb9aa | ||
|
|
54422eccaa | ||
|
|
02004f4b6d | ||
|
|
58278c5388 | ||
|
|
ff7d2020f7 | ||
|
|
160420fe82 | ||
|
|
56703ec458 | ||
|
|
9947664ae8 | ||
|
|
4d3f54439e | ||
|
|
6254f369f4 | ||
|
|
9b98cac4c8 | ||
|
|
71f3b75ab2 | ||
|
|
1a5cf8a2f7 | ||
|
|
33712b198d | ||
|
|
1fd5784a54 | ||
|
|
3904ca2343 | ||
|
|
8ebd0f5193 | ||
|
|
8c9bca3f25 | ||
|
|
6908744669 | ||
|
|
d0e463de98 | ||
|
|
f4c7287dfd | ||
|
|
a33df14761 | ||
|
|
3afc41269c | ||
|
|
11add2bfcc | ||
|
|
dd84fa16e5 | ||
|
|
e823c0f1ec | ||
|
|
56c104a5bc | ||
|
|
bfb2c2eaab | ||
|
|
7d57205ac2 | ||
|
|
4b81b1794d | ||
|
|
f5019b494f | ||
|
|
5102b8b955 | ||
|
|
089e553944 | ||
|
|
dfc07a6d76 | ||
|
|
b7687e006c | ||
|
|
10cf15bebd | ||
|
|
fc3d4adc72 | ||
|
|
bc330d5aaf | ||
|
|
c8a8feace2 | ||
|
|
9afdaa4cbc | ||
|
|
18c7f2eb9c | ||
|
|
de237171ef | ||
|
|
a4b90944e8 | ||
|
|
cb44fcc8c9 | ||
|
|
03bae9e9bd | ||
|
|
1ec463f6c7 | ||
|
|
5420abcfaa | ||
|
|
e2530cdf62 | ||
|
|
b14687cb30 | ||
|
|
360fb881f1 | ||
|
|
90d35a8574 | ||
|
|
73a0ba468e | ||
|
|
4e7119768b | ||
|
|
8bfa6deb76 | ||
|
|
e87febc54a | ||
|
|
43df10e823 | ||
|
|
e2acb70a1c | ||
|
|
f8774af675 | ||
|
|
9ddb6c7834 | ||
|
|
330e5fecdf | ||
|
|
6cc41bf510 | ||
|
|
956bd23a56 | ||
|
|
f1ce806ded | ||
|
|
7748c22292 | ||
|
|
131aa491b9 | ||
|
|
dbc5ff7ccd | ||
|
|
5c3f366e53 | ||
|
|
b1b679701e | ||
|
|
c489f07c0a | ||
|
|
14bc7dedec | ||
|
|
d4067c5ddb | ||
|
|
50209418d7 | ||
|
|
8f3c74165d | ||
|
|
b7b8f389eb | ||
|
|
9082ed20f3 | ||
|
|
f807406a97 | ||
|
|
93aafe259b | ||
|
|
b96fc6e6bd | ||
|
|
1996b29c60 | ||
|
|
c8eb476ca8 | ||
|
|
aeaa995a0a | ||
|
|
b35122868f | ||
|
|
1cb974494f | ||
|
|
723ecde4cd | ||
|
|
f29e5c4978 | ||
|
|
46ffff7eea | ||
|
|
774c920591 | ||
|
|
f27eb07827 | ||
|
|
da8362d81d |
2
.github/workflows/builder.yaml
vendored
2
.github/workflows/builder.yaml
vendored
@@ -100,7 +100,7 @@ jobs:
|
||||
|
||||
- name: Build ${{ matrix.addon }} add-on
|
||||
if: steps.check.outputs.build_arch == 'true'
|
||||
uses: home-assistant/builder@2023.12.0
|
||||
uses: home-assistant/builder@2024.01.0
|
||||
with:
|
||||
args: |
|
||||
${{ env.BUILD_ARGS }} \
|
||||
|
||||
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -72,4 +72,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
--- HMI/n2t-out
|
||||
+++ HMI/US/landscape/n2t-out
|
||||
├── file list
|
||||
│ @@ -1,10 +1,9 @@
|
||||
│ Program.s.txt
|
||||
│ cardAlarm.txt
|
||||
│ -cardBurnRec.txt
|
||||
│ cardChart.txt
|
||||
│ cardEntities.txt
|
||||
│ cardGrid.txt
|
||||
│ cardGrid2.txt
|
||||
│ cardLChart.txt
|
||||
│ cardMedia.txt
|
||||
│ cardPower.txt
|
||||
│ --- HMI/n2t-out/Program.s.txt
|
||||
├── +++ HMI/US/landscape/n2t-out/Program.s.txt
|
||||
│ @@ -13,10 +13,10 @@
|
||||
@@ -114,6 +102,27 @@
|
||||
│ crcputs sys0,2
|
||||
│ crcputs tSend.txt,0
|
||||
│ //send cmd
|
||||
│ --- HMI/n2t-out/popupNotify.txt
|
||||
├── +++ HMI/US/landscape/n2t-out/popupNotify.txt
|
||||
│ @@ -439,18 +439,14 @@
|
||||
│ {
|
||||
│ page cardPower
|
||||
│ }
|
||||
│ if(tId.txt=="cardChart")
|
||||
│ {
|
||||
│ page cardChart
|
||||
│ }
|
||||
│ - if(tId.txt=="cardLChart")
|
||||
│ - {
|
||||
│ - page cardLChart
|
||||
│ - }
|
||||
│ }
|
||||
│ // end of user code
|
||||
│ udelete payloadLength-1
|
||||
│ bufferPos=0
|
||||
│ }
|
||||
│ }
|
||||
│ }
|
||||
│ --- HMI/n2t-out/screensaver.txt
|
||||
├── +++ HMI/US/landscape/n2t-out/screensaver.txt
|
||||
│ @@ -19,15 +19,14 @@
|
||||
@@ -221,7 +230,7 @@
|
||||
│ vis p0,0
|
||||
│ vis tNotifyHead,0
|
||||
│ vis tNotifyText,0
|
||||
│ @@ -41,17 +40,14 @@
|
||||
│ @@ -41,52 +40,19 @@
|
||||
│ }
|
||||
│ tDate.txt=pageIcons.vaDate.txt
|
||||
│ dim=dimValue
|
||||
@@ -232,14 +241,80 @@
|
||||
│ - Postinitialize Event
|
||||
│ - click m0,1
|
||||
│ -
|
||||
│ -Variable (string) entn1
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn2
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn3
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn4
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn5
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ Variable (string) strCommand
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 1979
|
||||
│ - Max. Text Size: 1935
|
||||
│ + Max. Text Size: 1979
|
||||
│
|
||||
│ Variable (string) strTmp
|
||||
│ @@ -376,34 +372,14 @@
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 2
|
||||
│
|
||||
│ @@ -96,27 +62,27 @@
|
||||
│ Text :
|
||||
│ Max. Text Size: 25
|
||||
│
|
||||
│ Variable (string) tInstruction
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ - Max. Text Size: 15
|
||||
│ + Max. Text Size: 50
|
||||
│
|
||||
│ Variable (string) tSend
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 50
|
||||
│
|
||||
│ Variable (string) tTmp
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ - Max. Text Size: 30
|
||||
│ + Max. Text Size: 50
|
||||
│
|
||||
│ Variable (int32) vaTap
|
||||
│ Attributes
|
||||
│ Scope: local
|
||||
│ Value: 0
|
||||
│
|
||||
│ Variable (int32) xc1
|
||||
│ @@ -370,145 +336,50 @@
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
@@ -247,6 +322,117 @@
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn1.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f2Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn2.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f3Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn3.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f4Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn4.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f5Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn5.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ -Text m0
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
@@ -274,7 +460,7 @@
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text : PM
|
||||
│ @@ -585,15 +561,14 @@
|
||||
│ @@ -690,15 +561,14 @@
|
||||
│ if(tTmp.txt!="")
|
||||
│ {
|
||||
│ covx tTmp.txt,defaultFontColor,0,0
|
||||
@@ -290,3 +476,67 @@
|
||||
│ if(tAMPM.txt=="")
|
||||
│ {
|
||||
│ vis tAMPM,0
|
||||
│ @@ -819,44 +689,34 @@
|
||||
│ //e6Val
|
||||
│ spstr strCommand.txt,e6Val.txt,"~",60
|
||||
│ //f1Icon
|
||||
│ spstr strCommand.txt,f1Icon.txt,"~",63
|
||||
│ //f1Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",64
|
||||
│ covx tTmp.txt,f1Icon.pco,0,0
|
||||
│ - //f1Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn1.txt,"~",62
|
||||
│ //f2Icon
|
||||
│ spstr strCommand.txt,f2Icon.txt,"~",69
|
||||
│ //f2Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",70
|
||||
│ covx tTmp.txt,f2Icon.pco,0,0
|
||||
│ - //f2Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn2.txt,"~",68
|
||||
│ //f3Icon
|
||||
│ spstr strCommand.txt,f3Icon.txt,"~",75
|
||||
│ //f3Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",76
|
||||
│ covx tTmp.txt,f3Icon.pco,0,0
|
||||
│ - //f3Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn3.txt,"~",74
|
||||
│ //f4Icon
|
||||
│ spstr strCommand.txt,f4Icon.txt,"~",81
|
||||
│ //f4Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",82
|
||||
│ covx tTmp.txt,f4Icon.pco,0,0
|
||||
│ - //f4Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn4.txt,"~",80
|
||||
│ //f5Icon
|
||||
│ spstr strCommand.txt,f5Icon.txt,"~",87
|
||||
│ //f5Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",88
|
||||
│ covx tTmp.txt,f5Icon.pco,0,0
|
||||
│ - //f5Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn5.txt,"~",86
|
||||
│ }
|
||||
│ if(tInstruction.txt=="notify")
|
||||
│ {
|
||||
│ spstr strCommand.txt,tNotifyHead.txt,"~",1
|
||||
│ spstr strCommand.txt,tNotifyText.txt,"~",2
|
||||
│ if(tNotifyHead.txt!=""||tNotifyText.txt!="")
|
||||
│ {
|
||||
│ @@ -952,14 +812,18 @@
|
||||
│ {
|
||||
│ page cardPower
|
||||
│ }
|
||||
│ if(tId.txt=="cardChart")
|
||||
│ {
|
||||
│ page cardChart
|
||||
│ }
|
||||
│ + if(tId.txt=="cardLChart")
|
||||
│ + {
|
||||
│ + page cardLChart
|
||||
│ + }
|
||||
│ }
|
||||
│ if(tInstruction.txt=="timeout")
|
||||
│ {
|
||||
│ //set timeout to global var
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",1
|
||||
│ covx tTmp.txt,sleepTimeout,0,0
|
||||
│ }
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
--- HMI/n2t-out
|
||||
+++ HMI/US/portrait/n2t-out
|
||||
├── file list
|
||||
│ @@ -1,10 +1,9 @@
|
||||
│ Program.s.txt
|
||||
│ cardAlarm.txt
|
||||
│ -cardBurnRec.txt
|
||||
│ cardChart.txt
|
||||
│ cardEntities.txt
|
||||
│ cardGrid.txt
|
||||
│ cardGrid2.txt
|
||||
│ cardLChart.txt
|
||||
│ cardMedia.txt
|
||||
│ cardPower.txt
|
||||
│ --- HMI/n2t-out/Program.s.txt
|
||||
├── +++ HMI/US/portrait/n2t-out/Program.s.txt
|
||||
│ @@ -12,11 +12,11 @@
|
||||
@@ -2016,6 +2004,25 @@
|
||||
│ }
|
||||
│ if(tInstruction.txt=="exitPopup")
|
||||
│ {
|
||||
│ @@ -439,18 +439,14 @@
|
||||
│ {
|
||||
│ page cardPower
|
||||
│ }
|
||||
│ if(tId.txt=="cardChart")
|
||||
│ {
|
||||
│ page cardChart
|
||||
│ }
|
||||
│ - if(tId.txt=="cardLChart")
|
||||
│ - {
|
||||
│ - page cardLChart
|
||||
│ - }
|
||||
│ }
|
||||
│ // end of user code
|
||||
│ udelete payloadLength-1
|
||||
│ bufferPos=0
|
||||
│ }
|
||||
│ }
|
||||
│ }
|
||||
│ --- HMI/n2t-out/screensaver.txt
|
||||
├── +++ HMI/US/portrait/n2t-out/screensaver.txt
|
||||
│ @@ -7,27 +7,14 @@
|
||||
@@ -2168,7 +2175,7 @@
|
||||
│ vis p0,0
|
||||
│ vis tNotifyHead,0
|
||||
│ vis tNotifyText,0
|
||||
│ @@ -41,17 +28,14 @@
|
||||
│ @@ -41,52 +28,19 @@
|
||||
│ }
|
||||
│ tDate.txt=pageIcons.vaDate.txt
|
||||
│ dim=dimValue
|
||||
@@ -2179,14 +2186,80 @@
|
||||
│ - Postinitialize Event
|
||||
│ - click m0,1
|
||||
│ -
|
||||
│ -Variable (string) entn1
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn2
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn3
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn4
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ -Variable (string) entn5
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
│ - Text :
|
||||
│ - Max. Text Size: 14
|
||||
│ -
|
||||
│ Variable (string) strCommand
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 1979
|
||||
│ - Max. Text Size: 1935
|
||||
│ + Max. Text Size: 1979
|
||||
│
|
||||
│ Variable (string) strTmp
|
||||
│ @@ -376,34 +360,14 @@
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 2
|
||||
│
|
||||
│ @@ -96,27 +50,27 @@
|
||||
│ Text :
|
||||
│ Max. Text Size: 25
|
||||
│
|
||||
│ Variable (string) tInstruction
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ - Max. Text Size: 15
|
||||
│ + Max. Text Size: 50
|
||||
│
|
||||
│ Variable (string) tSend
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 50
|
||||
│
|
||||
│ Variable (string) tTmp
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ - Max. Text Size: 30
|
||||
│ + Max. Text Size: 50
|
||||
│
|
||||
│ Variable (int32) vaTap
|
||||
│ Attributes
|
||||
│ Scope: local
|
||||
│ Value: 0
|
||||
│
|
||||
│ Variable (int32) xc1
|
||||
│ @@ -370,145 +324,50 @@
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
@@ -2194,6 +2267,117 @@
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn1.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f2Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn2.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f3Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn3.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f4Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn4.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ Text f5Icon
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Dragging : 0
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text :
|
||||
│ Max. Text Size : 4
|
||||
│
|
||||
│ - Events
|
||||
│ - Touch Press Event
|
||||
│ - tSend.txt="event,buttonPress2,"+entn5.txt+",button"
|
||||
│ - //send calc crc
|
||||
│ - btlen tSend.txt,sys0
|
||||
│ - crcrest 1,0xffff // reset CRC
|
||||
│ - crcputh 55 bb
|
||||
│ - crcputs sys0,2
|
||||
│ - crcputs tSend.txt,0
|
||||
│ - //send cmd
|
||||
│ - printh 55 bb
|
||||
│ - prints sys0,2
|
||||
│ - prints tSend.txt,0
|
||||
│ - prints crcval,2
|
||||
│ -
|
||||
│ -Text m0
|
||||
│ - Attributes
|
||||
│ - Scope : local
|
||||
@@ -2221,7 +2405,7 @@
|
||||
│ Send Component ID : disabled
|
||||
│ Associated Keyboard: none
|
||||
│ Text : PM
|
||||
│ @@ -585,15 +549,14 @@
|
||||
│ @@ -690,15 +549,14 @@
|
||||
│ if(tTmp.txt!="")
|
||||
│ {
|
||||
│ covx tTmp.txt,defaultFontColor,0,0
|
||||
@@ -2237,3 +2421,67 @@
|
||||
│ if(tAMPM.txt=="")
|
||||
│ {
|
||||
│ vis tAMPM,0
|
||||
│ @@ -819,44 +677,34 @@
|
||||
│ //e6Val
|
||||
│ spstr strCommand.txt,e6Val.txt,"~",60
|
||||
│ //f1Icon
|
||||
│ spstr strCommand.txt,f1Icon.txt,"~",63
|
||||
│ //f1Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",64
|
||||
│ covx tTmp.txt,f1Icon.pco,0,0
|
||||
│ - //f1Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn1.txt,"~",62
|
||||
│ //f2Icon
|
||||
│ spstr strCommand.txt,f2Icon.txt,"~",69
|
||||
│ //f2Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",70
|
||||
│ covx tTmp.txt,f2Icon.pco,0,0
|
||||
│ - //f2Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn2.txt,"~",68
|
||||
│ //f3Icon
|
||||
│ spstr strCommand.txt,f3Icon.txt,"~",75
|
||||
│ //f3Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",76
|
||||
│ covx tTmp.txt,f3Icon.pco,0,0
|
||||
│ - //f3Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn3.txt,"~",74
|
||||
│ //f4Icon
|
||||
│ spstr strCommand.txt,f4Icon.txt,"~",81
|
||||
│ //f4Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",82
|
||||
│ covx tTmp.txt,f4Icon.pco,0,0
|
||||
│ - //f4Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn4.txt,"~",80
|
||||
│ //f5Icon
|
||||
│ spstr strCommand.txt,f5Icon.txt,"~",87
|
||||
│ //f5Icon Color
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",88
|
||||
│ covx tTmp.txt,f5Icon.pco,0,0
|
||||
│ - //f5Icon intNameEntity
|
||||
│ - spstr strCommand.txt,entn5.txt,"~",86
|
||||
│ }
|
||||
│ if(tInstruction.txt=="notify")
|
||||
│ {
|
||||
│ spstr strCommand.txt,tNotifyHead.txt,"~",1
|
||||
│ spstr strCommand.txt,tNotifyText.txt,"~",2
|
||||
│ if(tNotifyHead.txt!=""||tNotifyText.txt!="")
|
||||
│ {
|
||||
│ @@ -952,14 +800,18 @@
|
||||
│ {
|
||||
│ page cardPower
|
||||
│ }
|
||||
│ if(tId.txt=="cardChart")
|
||||
│ {
|
||||
│ page cardChart
|
||||
│ }
|
||||
│ + if(tId.txt=="cardLChart")
|
||||
│ + {
|
||||
│ + page cardLChart
|
||||
│ + }
|
||||
│ }
|
||||
│ if(tInstruction.txt=="timeout")
|
||||
│ {
|
||||
│ //set timeout to global var
|
||||
│ spstr strCommand.txt,tTmp.txt,"~",1
|
||||
│ covx tTmp.txt,sleepTimeout,0,0
|
||||
│ }
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
+++ /dev/fd/62 2023-11-27 23:28:52.512823638 +0000
|
||||
+le list
|
||||
+ +1,9 @@
|
||||
+.s.txt
|
||||
+rm.txt
|
||||
+nRec.txt
|
||||
+rt.txt
|
||||
+ities.txt
|
||||
+d.txt
|
||||
+d2.txt
|
||||
+art.txt
|
||||
+ia.txt
|
||||
+er.txt
|
||||
+++ /dev/fd/62 2024-01-20 23:31:31.560618969 +0000
|
||||
+I/n2t-out/Program.s.txt
|
||||
++ HMI/US/portrait/n2t-out/Program.s.txt
|
||||
+1 +12,11 @@
|
||||
@@ -698,13 +686,6 @@
|
||||
+ covx tTmp.txt,sys0,0,0
|
||||
+ hSlider6.maxval=sys0
|
||||
+ }
|
||||
+ }
|
||||
+ if(tInstruction.txt=="pageType")
|
||||
+ {
|
||||
+ sleepValue=0
|
||||
+ //command format pageType,specialPageName
|
||||
+ //write name of speical page to tId
|
||||
+ spstr strCommand.txt,tId.txt,"~",1
|
||||
+I/n2t-out/cardGrid.txt
|
||||
++ HMI/US/portrait/n2t-out/cardGrid.txt
|
||||
+ +7,14 @@
|
||||
@@ -958,6 +939,13 @@
|
||||
+ spstr strCommand.txt,tEntity9.txt,"~",66
|
||||
+ vis tEntity9,1
|
||||
+ }
|
||||
+ }
|
||||
+ if(tInstruction.txt=="pageType")
|
||||
+ {
|
||||
+ sleepValue=0
|
||||
+ //command format pageType,specialPageName
|
||||
+ //write name of speical page to tId
|
||||
+ spstr strCommand.txt,tId.txt,"~",1
|
||||
+I/n2t-out/cardLChart.txt
|
||||
++ HMI/US/portrait/n2t-out/cardLChart.txt
|
||||
+ +7,14 @@
|
||||
@@ -1558,6 +1546,25 @@
|
||||
+ }
|
||||
+ if(tInstruction.txt=="exitPopup")
|
||||
+ {
|
||||
+18 +439,14 @@
|
||||
+ {
|
||||
+ page cardPower
|
||||
+ }
|
||||
+ if(tId.txt=="cardChart")
|
||||
+ {
|
||||
+ page cardChart
|
||||
+ }
|
||||
+ if(tId.txt=="cardLChart")
|
||||
+ {
|
||||
+ page cardLChart
|
||||
+ }
|
||||
+ }
|
||||
+ // end of user code
|
||||
+ udelete payloadLength-1
|
||||
+ bufferPos=0
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+I/n2t-out/screensaver.txt
|
||||
++ HMI/US/portrait/n2t-out/screensaver.txt
|
||||
+ +7,14 @@
|
||||
@@ -1710,7 +1717,7 @@
|
||||
+ vis p0,0
|
||||
+ vis tNotifyHead,0
|
||||
+ vis tNotifyText,0
|
||||
+7 +28,14 @@
|
||||
+2 +28,19 @@
|
||||
+ }
|
||||
+ tDate.txt=pageIcons.vaDate.txt
|
||||
+ dim=dimValue
|
||||
@@ -1721,14 +1728,80 @@
|
||||
+ Postinitialize Event
|
||||
+ click m0,1
|
||||
+
|
||||
+e (string) entn1
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 14
|
||||
+
|
||||
+e (string) entn2
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 14
|
||||
+
|
||||
+e (string) entn3
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 14
|
||||
+
|
||||
+e (string) entn4
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 14
|
||||
+
|
||||
+e (string) entn5
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 14
|
||||
+
|
||||
+e (string) strCommand
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 1935
|
||||
+ Max. Text Size: 1979
|
||||
+
|
||||
+e (string) strTmp
|
||||
+34 +360,14 @@
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 2
|
||||
+
|
||||
+7 +50,27 @@
|
||||
+ Text :
|
||||
+ Max. Text Size: 25
|
||||
+
|
||||
+e (string) tInstruction
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 15
|
||||
+ Max. Text Size: 50
|
||||
+
|
||||
+e (string) tSend
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 50
|
||||
+
|
||||
+e (string) tTmp
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Text :
|
||||
+ Max. Text Size: 30
|
||||
+ Max. Text Size: 50
|
||||
+
|
||||
+e (int32) vaTap
|
||||
+ributes
|
||||
+ Scope: local
|
||||
+ Value: 0
|
||||
+
|
||||
+e (int32) xc1
|
||||
+145 +324,50 @@
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Send Component ID : disabled
|
||||
@@ -1736,6 +1809,117 @@
|
||||
+ Text :
|
||||
+ Max. Text Size : 4
|
||||
+
|
||||
+nts
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn1.txt+",button"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,2
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Icon
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard: none
|
||||
+ Text :
|
||||
+ Max. Text Size : 4
|
||||
+
|
||||
+nts
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn2.txt+",button"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,2
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Icon
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard: none
|
||||
+ Text :
|
||||
+ Max. Text Size : 4
|
||||
+
|
||||
+nts
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn3.txt+",button"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,2
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Icon
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard: none
|
||||
+ Text :
|
||||
+ Max. Text Size : 4
|
||||
+
|
||||
+nts
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn4.txt+",button"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,2
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+Icon
|
||||
+ributes
|
||||
+ Scope : local
|
||||
+ Dragging : 0
|
||||
+ Send Component ID : disabled
|
||||
+ Associated Keyboard: none
|
||||
+ Text :
|
||||
+ Max. Text Size : 4
|
||||
+
|
||||
+nts
|
||||
+ Touch Press Event
|
||||
+ tSend.txt="event,buttonPress2,"+entn5.txt+",button"
|
||||
+ //send calc crc
|
||||
+ btlen tSend.txt,sys0
|
||||
+ crcrest 1,0xffff // reset CRC
|
||||
+ crcputh 55 bb
|
||||
+ crcputs sys0,2
|
||||
+ crcputs tSend.txt,0
|
||||
+ //send cmd
|
||||
+ printh 55 bb
|
||||
+ prints sys0,2
|
||||
+ prints tSend.txt,0
|
||||
+ prints crcval,2
|
||||
+
|
||||
+
|
||||
+ributes
|
||||
+ Scope : local
|
||||
@@ -1779,3 +1963,67 @@
|
||||
+ if(tAMPM.txt=="")
|
||||
+ {
|
||||
+ vis tAMPM,0
|
||||
+44 +677,34 @@
|
||||
+ //e6Val
|
||||
+ spstr strCommand.txt,e6Val.txt,"~",60
|
||||
+ //f1Icon
|
||||
+ spstr strCommand.txt,f1Icon.txt,"~",63
|
||||
+ //f1Icon Color
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",64
|
||||
+ covx tTmp.txt,f1Icon.pco,0,0
|
||||
+ //f1Icon intNameEntity
|
||||
+ spstr strCommand.txt,entn1.txt,"~",62
|
||||
+ //f2Icon
|
||||
+ spstr strCommand.txt,f2Icon.txt,"~",69
|
||||
+ //f2Icon Color
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",70
|
||||
+ covx tTmp.txt,f2Icon.pco,0,0
|
||||
+ //f2Icon intNameEntity
|
||||
+ spstr strCommand.txt,entn2.txt,"~",68
|
||||
+ //f3Icon
|
||||
+ spstr strCommand.txt,f3Icon.txt,"~",75
|
||||
+ //f3Icon Color
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",76
|
||||
+ covx tTmp.txt,f3Icon.pco,0,0
|
||||
+ //f3Icon intNameEntity
|
||||
+ spstr strCommand.txt,entn3.txt,"~",74
|
||||
+ //f4Icon
|
||||
+ spstr strCommand.txt,f4Icon.txt,"~",81
|
||||
+ //f4Icon Color
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",82
|
||||
+ covx tTmp.txt,f4Icon.pco,0,0
|
||||
+ //f4Icon intNameEntity
|
||||
+ spstr strCommand.txt,entn4.txt,"~",80
|
||||
+ //f5Icon
|
||||
+ spstr strCommand.txt,f5Icon.txt,"~",87
|
||||
+ //f5Icon Color
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",88
|
||||
+ covx tTmp.txt,f5Icon.pco,0,0
|
||||
+ //f5Icon intNameEntity
|
||||
+ spstr strCommand.txt,entn5.txt,"~",86
|
||||
+ }
|
||||
+ if(tInstruction.txt=="notify")
|
||||
+ {
|
||||
+ spstr strCommand.txt,tNotifyHead.txt,"~",1
|
||||
+ spstr strCommand.txt,tNotifyText.txt,"~",2
|
||||
+ if(tNotifyHead.txt!=""||tNotifyText.txt!="")
|
||||
+ {
|
||||
+14 +800,18 @@
|
||||
+ {
|
||||
+ page cardPower
|
||||
+ }
|
||||
+ if(tId.txt=="cardChart")
|
||||
+ {
|
||||
+ page cardChart
|
||||
+ }
|
||||
+ if(tId.txt=="cardLChart")
|
||||
+ {
|
||||
+ page cardLChart
|
||||
+ }
|
||||
+ }
|
||||
+ if(tInstruction.txt=="timeout")
|
||||
+ {
|
||||
+ //set timeout to global var
|
||||
+ spstr strCommand.txt,tTmp.txt,"~",1
|
||||
+ covx tTmp.txt,sleepTimeout,0,0
|
||||
+ }
|
||||
|
||||
@@ -121,6 +121,8 @@ for i in range(1,6):
|
||||
//f{i}Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",{idxstart+3}
|
||||
covx tTmp.txt,f{i}Icon.pco,0,0
|
||||
//f{i}Icon intNameEntity
|
||||
spstr strCommand.txt,entn{i}.txt,"~",{idxstart+1}
|
||||
"""
|
||||
head = head + item
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
Page cardBurnRec
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
Width : 480
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
Fill : solid color
|
||||
Back. Color : 65535
|
||||
|
||||
Timer tm0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Period (ms): 1001
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
dim=100
|
||||
sys0=0
|
||||
sys1=0
|
||||
if(sys2==WHITE)
|
||||
{
|
||||
sys2=BLACK
|
||||
}else
|
||||
{
|
||||
sys2=WHITE
|
||||
}
|
||||
sya1=sys2
|
||||
while(sys0<8)
|
||||
{
|
||||
sya0=sys0%2
|
||||
if(sya1==WHITE)
|
||||
{
|
||||
sya1=BLACK
|
||||
}else
|
||||
{
|
||||
sya1=WHITE
|
||||
}
|
||||
fill 0,40*sys0,480,40,sya1
|
||||
sys0++
|
||||
}
|
||||
|
||||
TouchCap tc0
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page pageStartup
|
||||
|
||||
@@ -6,10 +6,14 @@ pageIcons
|
||||
7 Component(s)
|
||||
0 Line(s) of event code
|
||||
0 Unique line(s) of event code
|
||||
cardBurnRec
|
||||
3 Component(s)
|
||||
25 Line(s) of event code
|
||||
21 Unique line(s) of event code
|
||||
pageTest
|
||||
25 Component(s)
|
||||
68 Line(s) of event code
|
||||
66 Unique line(s) of event code
|
||||
popupNotify
|
||||
19 Component(s)
|
||||
271 Line(s) of event code
|
||||
174 Unique line(s) of event code
|
||||
popupFan
|
||||
27 Component(s)
|
||||
355 Line(s) of event code
|
||||
@@ -26,14 +30,6 @@ popupLightNew
|
||||
23 Component(s)
|
||||
412 Line(s) of event code
|
||||
209 Unique line(s) of event code
|
||||
popupNotify
|
||||
19 Component(s)
|
||||
267 Line(s) of event code
|
||||
172 Unique line(s) of event code
|
||||
pageTest
|
||||
26 Component(s)
|
||||
69 Line(s) of event code
|
||||
67 Unique line(s) of event code
|
||||
cardGrid2
|
||||
52 Component(s)
|
||||
703 Line(s) of event code
|
||||
@@ -46,6 +42,10 @@ cardChart
|
||||
33 Component(s)
|
||||
447 Line(s) of event code
|
||||
297 Unique line(s) of event code
|
||||
cardGrid
|
||||
44 Component(s)
|
||||
593 Line(s) of event code
|
||||
333 Unique line(s) of event code
|
||||
cardQR
|
||||
34 Component(s)
|
||||
420 Line(s) of event code
|
||||
@@ -66,10 +66,10 @@ cardThermo
|
||||
57 Component(s)
|
||||
550 Line(s) of event code
|
||||
320 Unique line(s) of event code
|
||||
cardGrid
|
||||
44 Component(s)
|
||||
593 Line(s) of event code
|
||||
333 Unique line(s) of event code
|
||||
screensaver2
|
||||
64 Component(s)
|
||||
424 Line(s) of event code
|
||||
264 Unique line(s) of event code
|
||||
popupInSel
|
||||
34 Component(s)
|
||||
621 Line(s) of event code
|
||||
@@ -90,17 +90,13 @@ popupThermo
|
||||
44 Component(s)
|
||||
523 Line(s) of event code
|
||||
276 Unique line(s) of event code
|
||||
screensaver2
|
||||
59 Component(s)
|
||||
373 Line(s) of event code
|
||||
256 Unique line(s) of event code
|
||||
cardEntities
|
||||
67 Component(s)
|
||||
1205 Line(s) of event code
|
||||
536 Unique line(s) of event code
|
||||
|
||||
Total
|
||||
24 Page(s)
|
||||
880 Component(s)
|
||||
10740 Line(s) of event code
|
||||
2475 Unique line(s) of event code
|
||||
23 Page(s)
|
||||
881 Component(s)
|
||||
10769 Line(s) of event code
|
||||
2466 Unique line(s) of event code
|
||||
|
||||
@@ -335,41 +335,6 @@ Button b13
|
||||
Touch Press Event
|
||||
showqq
|
||||
|
||||
Button b14
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Opacity : 127
|
||||
x coordinate : 229
|
||||
y coordinate : 188
|
||||
Width : 106
|
||||
Height : 40
|
||||
Effect : load
|
||||
Effect Priority : 0
|
||||
Effect Time : 300
|
||||
Fill : solid color
|
||||
Style : 3D auto
|
||||
Font ID : 1
|
||||
Back. Color : 50712
|
||||
Back. Picture ID (Pressed): 65535
|
||||
Back. Color (Pressed) : 1024
|
||||
Font Color (Unpressed) : 0
|
||||
Font Color (Pressed) : 65535
|
||||
Horizontal Alignment : center
|
||||
Vertical Alignment : center
|
||||
State : unpressed
|
||||
Text : burntest
|
||||
Max. Text Size : 10
|
||||
Word wrap : disabled
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page cardBurnRec
|
||||
|
||||
Button b15
|
||||
Attributes
|
||||
ID : 21
|
||||
|
||||
@@ -672,6 +672,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardChart
|
||||
}
|
||||
if(tId.txt=="cardLChart")
|
||||
{
|
||||
page cardLChart
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -56,12 +56,47 @@ Page screensaver2
|
||||
Postinitialize Event
|
||||
click m0,1
|
||||
|
||||
Variable (string) entn1
|
||||
Attributes
|
||||
ID : 59
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn2
|
||||
Attributes
|
||||
ID : 60
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn3
|
||||
Attributes
|
||||
ID : 61
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn4
|
||||
Attributes
|
||||
ID : 62
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn5
|
||||
Attributes
|
||||
ID : 63
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 1979
|
||||
Max. Text Size: 1935
|
||||
|
||||
Variable (string) strTmp
|
||||
Attributes
|
||||
@@ -82,7 +117,7 @@ Variable (string) tInstruction
|
||||
ID : 18
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) tSend
|
||||
Attributes
|
||||
@@ -96,7 +131,7 @@ Variable (string) tTmp
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
Max. Text Size: 30
|
||||
|
||||
Variable (int32) vaTap
|
||||
Attributes
|
||||
@@ -865,6 +900,21 @@ Text f1Icon
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn1.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f2Icon
|
||||
Attributes
|
||||
ID : 54
|
||||
@@ -894,6 +944,21 @@ Text f2Icon
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn2.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f3Icon
|
||||
Attributes
|
||||
ID : 55
|
||||
@@ -923,6 +988,21 @@ Text f3Icon
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn3.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f4Icon
|
||||
Attributes
|
||||
ID : 53
|
||||
@@ -952,6 +1032,21 @@ Text f4Icon
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn4.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f5Icon
|
||||
Attributes
|
||||
ID : 52
|
||||
@@ -981,6 +1076,21 @@ Text f5Icon
|
||||
Horizontal Spacing : 0
|
||||
Vertical Spacing : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn5.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text m0
|
||||
Attributes
|
||||
ID : 32
|
||||
@@ -1551,26 +1661,36 @@ Timer tmSerial
|
||||
//f1Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",64
|
||||
covx tTmp.txt,f1Icon.pco,0,0
|
||||
//f1Icon intNameEntity
|
||||
spstr strCommand.txt,entn1.txt,"~",62
|
||||
//f2Icon
|
||||
spstr strCommand.txt,f2Icon.txt,"~",69
|
||||
//f2Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",70
|
||||
covx tTmp.txt,f2Icon.pco,0,0
|
||||
//f2Icon intNameEntity
|
||||
spstr strCommand.txt,entn2.txt,"~",68
|
||||
//f3Icon
|
||||
spstr strCommand.txt,f3Icon.txt,"~",75
|
||||
//f3Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",76
|
||||
covx tTmp.txt,f3Icon.pco,0,0
|
||||
//f3Icon intNameEntity
|
||||
spstr strCommand.txt,entn3.txt,"~",74
|
||||
//f4Icon
|
||||
spstr strCommand.txt,f4Icon.txt,"~",81
|
||||
//f4Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",82
|
||||
covx tTmp.txt,f4Icon.pco,0,0
|
||||
//f4Icon intNameEntity
|
||||
spstr strCommand.txt,entn4.txt,"~",80
|
||||
//f5Icon
|
||||
spstr strCommand.txt,f5Icon.txt,"~",87
|
||||
//f5Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",88
|
||||
covx tTmp.txt,f5Icon.pco,0,0
|
||||
//f5Icon intNameEntity
|
||||
spstr strCommand.txt,entn5.txt,"~",86
|
||||
}
|
||||
if(tInstruction.txt=="notify")
|
||||
{
|
||||
@@ -1674,10 +1794,6 @@ Timer tmSerial
|
||||
{
|
||||
page cardChart
|
||||
}
|
||||
if(tId.txt=="cardLChart")
|
||||
{
|
||||
page cardLChart
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="timeout")
|
||||
{
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
Page cardBurnRec
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Timer tm0
|
||||
Attributes
|
||||
Scope : local
|
||||
Period (ms): 1001
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
dim=100
|
||||
sys0=0
|
||||
sys1=0
|
||||
if(sys2==WHITE)
|
||||
{
|
||||
sys2=BLACK
|
||||
}else
|
||||
{
|
||||
sys2=WHITE
|
||||
}
|
||||
sya1=sys2
|
||||
while(sys0<8)
|
||||
{
|
||||
sya0=sys0%2
|
||||
if(sya1==WHITE)
|
||||
{
|
||||
sya1=BLACK
|
||||
}else
|
||||
{
|
||||
sya1=WHITE
|
||||
}
|
||||
fill 0,40*sys0,480,40,sya1
|
||||
sys0++
|
||||
}
|
||||
|
||||
TouchCap tc0
|
||||
Attributes
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page pageStartup
|
||||
|
||||
@@ -141,19 +141,6 @@ Button b13
|
||||
Touch Press Event
|
||||
showqq
|
||||
|
||||
Button b14
|
||||
Attributes
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : burntest
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page cardBurnRec
|
||||
|
||||
Button b15
|
||||
Attributes
|
||||
Scope : local
|
||||
|
||||
@@ -443,6 +443,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardChart
|
||||
}
|
||||
if(tId.txt=="cardLChart")
|
||||
{
|
||||
page cardLChart
|
||||
}
|
||||
}
|
||||
// end of user code
|
||||
udelete payloadLength-1
|
||||
|
||||
@@ -48,11 +48,41 @@ Page screensaver2
|
||||
Postinitialize Event
|
||||
click m0,1
|
||||
|
||||
Variable (string) entn1
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn2
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn3
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn4
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) entn5
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 14
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 1979
|
||||
Max. Text Size: 1935
|
||||
|
||||
Variable (string) strTmp
|
||||
Attributes
|
||||
@@ -70,7 +100,7 @@ Variable (string) tInstruction
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) tSend
|
||||
Attributes
|
||||
@@ -82,7 +112,7 @@ Variable (string) tTmp
|
||||
Attributes
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 50
|
||||
Max. Text Size: 30
|
||||
|
||||
Variable (int32) vaTap
|
||||
Attributes
|
||||
@@ -344,6 +374,21 @@ Text f1Icon
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn1.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f2Icon
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -353,6 +398,21 @@ Text f2Icon
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn2.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f3Icon
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -362,6 +422,21 @@ Text f3Icon
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn3.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f4Icon
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -371,6 +446,21 @@ Text f4Icon
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn4.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text f5Icon
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -380,6 +470,21 @@ Text f5Icon
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,"+entn5.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
crcputh 55 bb
|
||||
crcputs sys0,2
|
||||
crcputs tSend.txt,0
|
||||
//send cmd
|
||||
printh 55 bb
|
||||
prints sys0,2
|
||||
prints tSend.txt,0
|
||||
prints crcval,2
|
||||
|
||||
Text m0
|
||||
Attributes
|
||||
Scope : local
|
||||
@@ -718,26 +823,36 @@ Timer tmSerial
|
||||
//f1Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",64
|
||||
covx tTmp.txt,f1Icon.pco,0,0
|
||||
//f1Icon intNameEntity
|
||||
spstr strCommand.txt,entn1.txt,"~",62
|
||||
//f2Icon
|
||||
spstr strCommand.txt,f2Icon.txt,"~",69
|
||||
//f2Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",70
|
||||
covx tTmp.txt,f2Icon.pco,0,0
|
||||
//f2Icon intNameEntity
|
||||
spstr strCommand.txt,entn2.txt,"~",68
|
||||
//f3Icon
|
||||
spstr strCommand.txt,f3Icon.txt,"~",75
|
||||
//f3Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",76
|
||||
covx tTmp.txt,f3Icon.pco,0,0
|
||||
//f3Icon intNameEntity
|
||||
spstr strCommand.txt,entn3.txt,"~",74
|
||||
//f4Icon
|
||||
spstr strCommand.txt,f4Icon.txt,"~",81
|
||||
//f4Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",82
|
||||
covx tTmp.txt,f4Icon.pco,0,0
|
||||
//f4Icon intNameEntity
|
||||
spstr strCommand.txt,entn4.txt,"~",80
|
||||
//f5Icon
|
||||
spstr strCommand.txt,f5Icon.txt,"~",87
|
||||
//f5Icon Color
|
||||
spstr strCommand.txt,tTmp.txt,"~",88
|
||||
covx tTmp.txt,f5Icon.pco,0,0
|
||||
//f5Icon intNameEntity
|
||||
spstr strCommand.txt,entn5.txt,"~",86
|
||||
}
|
||||
if(tInstruction.txt=="notify")
|
||||
{
|
||||
@@ -841,10 +956,6 @@ Timer tmSerial
|
||||
{
|
||||
page cardChart
|
||||
}
|
||||
if(tId.txt=="cardLChart")
|
||||
{
|
||||
page cardLChart
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="timeout")
|
||||
{
|
||||
|
||||
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -44,6 +44,8 @@ Using a 6th entity will automatically activate the alternative layout.
|
||||
type: 0
|
||||
- entity: weather.demo_weather_north
|
||||
type: 1
|
||||
- entity: weather.demo_weather_north
|
||||
type: 2
|
||||
- entity: sensor.energy_usage
|
||||
- entity: delete
|
||||
- entity: sensor.indoor_temp
|
||||
|
||||
1732
ioBroker/.iobroker/types/javascript.d.ts
vendored
Normal file
1732
ioBroker/.iobroker/types/javascript.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,74 +0,0 @@
|
||||
const idAbfalliCal = 'ical.1'; // iCal Instanz zum Abfallkalender
|
||||
const idZeichenLoeschen = 14; // x Zeichen links vom String abziehen, wenn vor dem Eventname noch Text steht z.B. Strassenname; Standard = 0
|
||||
const idRestmuellName ='Hausmüll'; // Schwarze Tonne
|
||||
const idWertstoffName = 'Gelber Sack'; // Gelbe Tonne / Sack
|
||||
const idPappePapierName = 'Papier'; // Blaue Tonne
|
||||
const idBioabfaelleName = 'Biomüll'; // Braune Tonne
|
||||
|
||||
|
||||
var i, Muell_JSON, Event2, Color = 0;
|
||||
|
||||
for (i = 1; i <= 4; i++) {
|
||||
if (!existsState('0_userdata.0.Abfallkalender.' + parseFloat(i) + '.date')) {
|
||||
log(i + '.date nicht vorhanden, wurde erstellt');
|
||||
createState('0_userdata.0.Abfallkalender.' + parseFloat(i) + '.date', '',
|
||||
{
|
||||
name: parseFloat(i) + '.date',
|
||||
role: 'state',
|
||||
type: 'string',
|
||||
read: true,
|
||||
write: true,
|
||||
def: ''
|
||||
});
|
||||
};
|
||||
if (!existsState('0_userdata.0.Abfallkalender.' + parseFloat(i) + '.event')) {
|
||||
log(i + '.event nicht vorhanden, wurde erstellt');
|
||||
createState('0_userdata.0.Abfallkalender.' + parseFloat(i) + '.event', '',
|
||||
{
|
||||
name: parseFloat(i) + '.event',
|
||||
role: 'state',
|
||||
type: 'string',
|
||||
read: true,
|
||||
write: true,
|
||||
def: ''
|
||||
});
|
||||
};
|
||||
if (!existsState('0_userdata.0.Abfallkalender.' + parseFloat(i) + '.color')) {
|
||||
log(i + '.color nicht vorhanden, wurde erstellt');
|
||||
createState('0_userdata.0.Abfallkalender.' + parseFloat(i) + '.color', 0,
|
||||
{
|
||||
name: parseFloat(i) + '.color',
|
||||
role: 'state',
|
||||
type: 'number',
|
||||
read: true,
|
||||
write: true,
|
||||
def: 0
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function subsequenceFromStartLast(sequence, at1) {
|
||||
var start = at1;
|
||||
var end = sequence.length;
|
||||
return sequence.slice(start, end);
|
||||
}
|
||||
|
||||
on({ id: idAbfalliCal + '.data.table', change: "ne" }, async function () {
|
||||
|
||||
for (i = 0; i <= 3; i++) {
|
||||
Muell_JSON = getState(idAbfalliCal + '.data.table').val;
|
||||
setStateDelayed((['0_userdata.0.Abfallkalender.', parseFloat(i) + 1, '.date'].join('')), getAttr(Muell_JSON, (String(i) + '.date')), false, parseInt(((0) || "").toString(), 10), false);
|
||||
Event2 = subsequenceFromStartLast(getAttr(Muell_JSON, (String(i) + '.event')), idZeichenLoeschen);
|
||||
setStateDelayed((['0_userdata.0.Abfallkalender.', parseFloat(i) + 1, '.event'].join('')), Event2, false, parseInt(((0) || "").toString(), 10), false);
|
||||
if (Event2 == idRestmuellName) {
|
||||
Color = 33840;
|
||||
} else if (Event2 == idBioabfaelleName) {
|
||||
Color = 2016;
|
||||
} else if (Event2 == idPappePapierName) {
|
||||
Color = 31;
|
||||
} else if (Event2 == idWertstoffName) {
|
||||
Color = 65504;
|
||||
}
|
||||
setStateDelayed((['0_userdata.0.Abfallkalender.', parseFloat(i) + 1, '.color'].join('')), Color, false, parseInt(((0) || "").toString(), 10), false);
|
||||
}
|
||||
});
|
||||
224
ioBroker/Blockly/Abfallkalender.ts
Normal file
224
ioBroker/Blockly/Abfallkalender.ts
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* @author 2023 @tt-tom
|
||||
*
|
||||
* Version 5.1.1
|
||||
*
|
||||
* Das Script erstellt die Datenpunkte und Alias für den Abfallkalender im Sonoff NSPanel
|
||||
* Es wird der iCal Adapter benötigt und eine URL mit Terminen vom Entsorger bzw. eine .ics-Datei mit den Terminen.
|
||||
* Das Script triggert auf dem bereitgestellten JSON im iCal adapter und füllt die 0_userdata.0 Datenpunkte
|
||||
* Weitere Informationen findest du in der FAQ auf Github https://github.com/joBr99/nspanel-lovelace-ui/wiki
|
||||
*
|
||||
* changelog
|
||||
* - 06.12.2023 - v5.0.2 add custom name for trashtype
|
||||
* - 06.12.2023 - v5.1.0 Refactoring
|
||||
* - 22.01.2024 - v5.1.1 Add tow Events more
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const idTrashData: string = 'ical.0.data.table'; // Datenpunkt mit Daten im JSON Format
|
||||
const idUserdataAbfallVerzeichnis: string = '0_userdata.0.Abfallkalender'; // Name des Datenpunktverzeichnis unter 0_userdata.0 -> Strandard = 0_userdata.0.Abfallkalender
|
||||
const idAliasPanelVerzeichnis: string = 'alias.0.NSPanel.allgemein'; //Name PanelVerzeichnis unter alias.0. Standard = alias.0.NSPanel.1
|
||||
const idAliasAbfallVerzeichnis: string = 'Abfall'; //Name Verzeichnis unterhalb der idPanelverzeichnis Standard = Abfall
|
||||
|
||||
const anzahlZeichenLoeschen: number = 14; // x Zeichen links vom String abziehen, wenn vor dem Eventname noch Text steht z.B. Strassenname; Standard = 0
|
||||
const jsonEventName1: string = 'Hausmüll'; // Vergleichstring für Schwarze Tonne
|
||||
const customEventName1: string = ''; // benutzerdefinierter Text für schwarze Tonne
|
||||
const jsonEventName2: string = 'Gelber Sack'; // Vergleichstring für Gelbe Tonne / Sack
|
||||
const customEventName2: string = ''; // benutzerdefinierter Text für gelbe Tonne
|
||||
const jsonEventName3: string = 'Papier'; // Vergleichstring für Blaue Tonne
|
||||
const customEventName3: string = ''; // benutzerdefinierter Text für blaue Tonne
|
||||
const jsonEventName4: string = 'Biomüll'; // Vergleichstring für Braune Tonne
|
||||
const customEventName4: string = ''; // benutzerdefinierter Text für braune Tonne
|
||||
const jsonEventName5: string = 'Treppe'; // Vergleichstring für Event 5
|
||||
const customEventName5: string = 'Besen schwingen'; // benutzerdefinierter Text für Event 5
|
||||
const jsonEventName6: string = ''; // Vergleichstring für Event 6
|
||||
const customEventName6: string = ''; // benutzerdefinierter Text für Event 6
|
||||
|
||||
const Debug: boolean = false;
|
||||
|
||||
// ------------------------- Trigger zum füllen der 0_userdata Datenpunkte aus dem json vom ical Adapter -------------------------------
|
||||
|
||||
// Trigger auf JSON Datenpunkt
|
||||
on({ id: idTrashData, change: 'ne' }, async function () {
|
||||
JSON_auswerten();
|
||||
});
|
||||
|
||||
// ------------------------------------- Ende Trigger ------------------------------------
|
||||
|
||||
// ------------------------------------- Funktion JSON auswerten und DP füllen -------------------------------
|
||||
async function JSON_auswerten() {
|
||||
try {
|
||||
|
||||
let trashJSON: any;
|
||||
let instanzName: any;
|
||||
let eventName: string;
|
||||
let eventDatum: string;
|
||||
let eventStartdatum: string;
|
||||
let farbNummer: number = 0;
|
||||
let farbString: string;
|
||||
let abfallNummer: number = 1;
|
||||
|
||||
trashJSON = getState(idTrashData).val;
|
||||
instanzName = idTrashData.split('.');
|
||||
|
||||
if (Debug) log('Rohdaten von Instanz ' + instanzName[0] + ': ' + JSON.stringify(trashJSON), 'info')
|
||||
|
||||
|
||||
if (Debug) log('Anzahl Trash - Daten: ' + trashJSON.length, 'info');
|
||||
|
||||
for (let i = 0; i < trashJSON.length; i++) {
|
||||
if (abfallNummer === 7) {
|
||||
if (Debug) log('Alle Abfall-Datenpunkte gefüllt', 'warn');
|
||||
break;
|
||||
}
|
||||
|
||||
log('Daten vom ical Adapter werden ausgewertet', 'info');
|
||||
eventName = getAttr(trashJSON, (String(i) + '.event')).slice(anzahlZeichenLoeschen, getAttr(trashJSON, (String(i) + '.event')).length);
|
||||
// Leerzeichen vorne und hinten löschen
|
||||
eventName = eventName.trimEnd();
|
||||
eventName = eventName.trimStart();
|
||||
eventDatum = getAttr(trashJSON, (String(i) + '.date'));
|
||||
eventStartdatum = getAttr(trashJSON, (String(i) + '._date'));
|
||||
|
||||
let d: Date = currentDate();
|
||||
let d1: Date = new Date(eventStartdatum);
|
||||
|
||||
if (Debug) log('--------- Nächster Termin wird geprüft ---------', 'info');
|
||||
//if (Debug) log(d + ' ' + d1, 'info');
|
||||
if (Debug) log('Startdatum UTC: ' + eventStartdatum, 'info');
|
||||
if (Debug) log('Datum: ' + eventDatum, 'info');
|
||||
if (Debug) log('Event: ' + eventName, 'info');
|
||||
if (Debug) log('Kontrolle Leerzeichen %' + eventName + '%', 'info');
|
||||
|
||||
if (d.getTime() <= d1.getTime()) {
|
||||
if ((eventName == jsonEventName1) || (eventName == jsonEventName2) || (eventName == jsonEventName3) || (eventName == jsonEventName4) || (eventName == jsonEventName5) || (eventName == jsonEventName6)) {
|
||||
|
||||
switch (eventName) {
|
||||
case jsonEventName1:
|
||||
farbNummer = 33840;
|
||||
if (customEventName1 != '') {
|
||||
eventName = customEventName1;
|
||||
if (Debug) log('Event customName: ' + eventName, 'info');
|
||||
};
|
||||
break;
|
||||
case jsonEventName2:
|
||||
farbNummer = 65504;
|
||||
if (customEventName2 != '') {
|
||||
eventName = customEventName2;
|
||||
if (Debug) log('Event customName: ' + eventName, 'info');
|
||||
};
|
||||
break;
|
||||
case jsonEventName3:
|
||||
farbNummer = 31;
|
||||
if (customEventName3 != '') {
|
||||
eventName = customEventName3
|
||||
if (Debug) log('Event customName: ' + eventName, 'info');
|
||||
};
|
||||
break;
|
||||
case jsonEventName4:
|
||||
farbNummer = 2016;
|
||||
if (customEventName4 != '') {
|
||||
eventName = customEventName4;
|
||||
if (Debug) log('Event customName: ' + eventName, 'info');
|
||||
};
|
||||
break;
|
||||
case jsonEventName5:
|
||||
farbNummer = 2016;
|
||||
if (customEventName5 != '') {
|
||||
eventName = customEventName5;
|
||||
if (Debug) log('Event customName: ' + eventName, 'info');
|
||||
};
|
||||
break;
|
||||
case jsonEventName6:
|
||||
farbNummer = 2016;
|
||||
if (customEventName6 != '') {
|
||||
eventName = customEventName6
|
||||
if (Debug) log('Event customName: ' + eventName, 'info');
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
//if (farbString != undefined) farbNummer = rgb_dec565(hex_rgb(farbString));
|
||||
|
||||
|
||||
setState(idUserdataAbfallVerzeichnis + '.' + String(abfallNummer) + '.date', eventDatum);
|
||||
setState(idUserdataAbfallVerzeichnis + '.' + String(abfallNummer) + '.event', eventName);
|
||||
setState(idUserdataAbfallVerzeichnis + '.' + String(abfallNummer) + '.color', farbNummer);
|
||||
|
||||
|
||||
//if (Debug) log('farbString: ' + farbString + ' farbNummer: ' + farbNummer, 'info');
|
||||
if (Debug) log('Abfallnummer: ' + abfallNummer, 'info');
|
||||
|
||||
abfallNummer += 1
|
||||
} else {
|
||||
if (Debug) log('Kein Abfalltermin => Event passt mit keinem Abfallnamen überein.', 'warn');
|
||||
}
|
||||
} else {
|
||||
if (Debug) log('Termin liegt vor dem heutigen Tag', 'warn');
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
log('error at subscrption: ' + err.message, 'warn');
|
||||
}
|
||||
};
|
||||
|
||||
// ------------------------------------- Ende Funktion JSON ------------------------------
|
||||
|
||||
// ------------------------------------- Funktion zur Prüfung und Erstellung der Datenpunkte in 0_userdata.0 und alias.0 -----------------------
|
||||
|
||||
async function Init_Datenpunkte() {
|
||||
try {
|
||||
for (let i = 1; i <= 6; i++) {
|
||||
if (existsObject(idUserdataAbfallVerzeichnis + '.' + String(i)) == false) {
|
||||
log('Datenpunkt ' + idUserdataAbfallVerzeichnis + '.' + String(i) + ' werden angelegt', 'info')
|
||||
await createStateAsync(idUserdataAbfallVerzeichnis + '.' + String(i) + '.date', '', { type: 'string' });
|
||||
await createStateAsync(idUserdataAbfallVerzeichnis + '.' + String(i) + '.event', '', { type: 'string' });
|
||||
await createStateAsync(idUserdataAbfallVerzeichnis + '.' + String(i) + '.color', 0, { type: 'number' });
|
||||
setObject(idAliasPanelVerzeichnis + '.' + idAliasAbfallVerzeichnis, { type: 'device', common: { name: { de: 'Abfall', en: 'Trash' } }, native: {} });
|
||||
setObject(idAliasPanelVerzeichnis + '.' + idAliasAbfallVerzeichnis + '.event' + String(i), { type: 'channel', common: { role: 'warning', name: { de: 'Ereignis ' + String(i), en: 'Event' + String(i) } }, native: {} });
|
||||
await createAliasAsync(idAliasPanelVerzeichnis + '.' + idAliasAbfallVerzeichnis + '.event' + String(i) + '.TITLE', idUserdataAbfallVerzeichnis + '.' + String(i) + '.event', true, <iobJS.StateCommon>{ type: 'string', role: 'weather.title.short', name: { de: 'TITEL', en: 'TITLE' } });
|
||||
await createAliasAsync(idAliasPanelVerzeichnis + '.' + idAliasAbfallVerzeichnis + '.event' + String(i) + '.LEVEL', idUserdataAbfallVerzeichnis + '.' + String(i) + '.color', true, <iobJS.StateCommon>{ type: 'number', role: 'value.warning', name: { de: 'LEVEL', en: 'LEVEL' } });
|
||||
await createAliasAsync(idAliasPanelVerzeichnis + '.' + idAliasAbfallVerzeichnis + '.event' + String(i) + '.INFO', idUserdataAbfallVerzeichnis + '.' + String(i) + '.date', true, <iobJS.StateCommon>{ type: 'string', role: 'weather.title', name: { de: 'INFO', en: 'INFO' } });
|
||||
log('Fertig', 'info')
|
||||
} else {
|
||||
log('Datenpunkt ' + idUserdataAbfallVerzeichnis + '.' + String(i) + ' vorhanden', 'info')
|
||||
}
|
||||
}
|
||||
log('Startabfrage der Daten', 'info');
|
||||
JSON_auswerten();
|
||||
} catch (err) {
|
||||
log('error at function Init_Datenpunkte: ' + err.message, 'warn');
|
||||
}
|
||||
}
|
||||
Init_Datenpunkte();
|
||||
|
||||
// --------------------------- Ende Funktion Datenpunkte ------------------------------------------------
|
||||
|
||||
|
||||
// --------------------------- Zusatzfuktionen -------------------------------------------------------------
|
||||
function currentDate() {
|
||||
let d: Date = new Date();
|
||||
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
||||
}
|
||||
|
||||
function rgb_dec565(rgb: RGB): number {
|
||||
//return ((Math.floor(rgb.red / 255 * 31) << 11) | (Math.floor(rgb.green / 255 * 63) << 5) | (Math.floor(rgb.blue / 255 * 31)));
|
||||
return ((rgb.red >> 3) << 11) | ((rgb.green >> 2)) << 5 | ((rgb.blue) >> 3);
|
||||
}
|
||||
|
||||
function hex_rgb(colorhex: string): RGB {
|
||||
let r = parseInt(colorhex.substring(1, 3), 16);
|
||||
let g = parseInt(colorhex.substring(3, 5), 16);
|
||||
let b = parseInt(colorhex.substring(5, 7), 16);
|
||||
return { red: r, green: g, blue: b };
|
||||
}
|
||||
|
||||
type RGB = {
|
||||
red: number,
|
||||
green: number,
|
||||
blue: number
|
||||
};
|
||||
|
||||
// -------------------- Ende Zudatzfunktionen --------------------------------------------------------------------------
|
||||
@@ -975,7 +975,32 @@
|
||||
<shadow type="logic_boolean" id="I4PsJQb;6k+70^g*Xt/}">
|
||||
<field name="BOOL">TRUE</field>
|
||||
</shadow>
|
||||
<block type="math_random_float" id="C5/h)jq=yPM?,9J=(w65"></block>
|
||||
<block type="text_join" id="XdhGC7#MxGw|KhC1x#MY">
|
||||
<mutation items="2"></mutation>
|
||||
<value name="ADD0">
|
||||
<block type="text" id="[(_1;{xE-xfzeB4]$uk;">
|
||||
<field name="TEXT">ID</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD1">
|
||||
<block type="convert_tostring" id="g{jZOA*6Clhc5`9::h.S">
|
||||
<value name="VALUE">
|
||||
<block type="math_random_int" id="SXG?j1]Jza!2fg[(cl!i">
|
||||
<value name="FROM">
|
||||
<shadow type="math_number" id="#/-;$~`{=}8wYY$kbvA9">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<shadow type="math_number" id="0x8~a;asHsiJ2Its%!VJ">
|
||||
<field name="NUM">100</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="DELAY_MS">
|
||||
<shadow type="math_number" id="+6#n%fO}e4h%;FhKPV0c">
|
||||
|
||||
50
ioBroker/Blockly/CardChart_History.js
Normal file
50
ioBroker/Blockly/CardChart_History.js
Normal file
@@ -0,0 +1,50 @@
|
||||
var sourceDP = 'alias.0.Wohnzimmer.Heizung.ACTUAL';
|
||||
var targetDP = '0_userdata.0.Test.chartTest';
|
||||
var rangeHours = 24;
|
||||
var maxXAchsisTicks = 6;
|
||||
var historyInstance = 'history.0';
|
||||
|
||||
on({id: sourceDP, change: "any"}, async function (obj) {
|
||||
sendTo(historyInstance, 'getHistory', {
|
||||
id: sourceDP,
|
||||
options: {
|
||||
start: Date.now() - (60 * 60 * 1000 * rangeHours),
|
||||
end: Date.now(),
|
||||
count: rangeHours,
|
||||
limit: rangeHours,
|
||||
aggregate: 'average'
|
||||
}
|
||||
}, function (result) {
|
||||
var cardChartString = "";
|
||||
var stepXAchsis = rangeHours / maxXAchsisTicks;
|
||||
|
||||
for (var i = 0; i < rangeHours; i++){
|
||||
var deltaHour = rangeHours - i;
|
||||
var targetDate = new Date(Date.now() - (deltaHour * 60 * 60 * 1000));
|
||||
|
||||
//Check history items for requested hours
|
||||
for (var j = 0, targetValue = 0; j < result.result.length; j++) {
|
||||
var valueDate = new Date(result.result[j].ts);
|
||||
var value = (Math.round(result.result[j].val * 10) / 10);
|
||||
|
||||
if (valueDate > targetDate){
|
||||
if ((targetDate.getHours() % stepXAchsis) == 0){
|
||||
cardChartString += targetValue + '^' + targetDate.getHours() + ':00' + '~';
|
||||
} else {
|
||||
cardChartString += targetValue + '~';
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
targetValue = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cardChartString = cardChartString.substring(0,cardChartString.length-1);
|
||||
if (existsState(targetDP) == false ) {
|
||||
createState(targetDP, cardChartString, true, { type: 'string' });
|
||||
} else {
|
||||
setState(targetDP, cardChartString, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
78
ioBroker/Blockly/CardLChart_History.js
Normal file
78
ioBroker/Blockly/CardLChart_History.js
Normal file
@@ -0,0 +1,78 @@
|
||||
const sourceDP = 'alias.0.Wohnzimmer.Heizung.ACTUAL';
|
||||
const targetDP = '0_userdata.0.Test.chartTest';
|
||||
const numberOfHoursAgo = 24; // Period of time in hours which shall be visualized
|
||||
const xAxisTicksEveryM = 60; // Time after x axis gets a tick in minutes
|
||||
const xAxisLabelEveryM = 240; // Time after x axis is labeled in minutes
|
||||
const historyInstance = 'history.0';
|
||||
|
||||
const Debug = false;
|
||||
const maxX = 1420;
|
||||
const limitMeasurements = 35;
|
||||
|
||||
createState(targetDP, "", {
|
||||
name: 'SensorGrid',
|
||||
desc: 'Sensor Values [~<time>:<value>]*',
|
||||
type: 'string',
|
||||
role: 'value',
|
||||
});
|
||||
|
||||
on({id: sourceDP, change: "any"}, async function (obj) {
|
||||
sendTo(historyInstance, 'getHistory', {
|
||||
id: sourceDP,
|
||||
options: {
|
||||
start: Date.now() - (numberOfHoursAgo * 60 * 60 * 1000 ), //Time in ms: hours * 60m * 60s * 1000ms
|
||||
end: Date.now(),
|
||||
count: limitMeasurements,
|
||||
limit: limitMeasurements,
|
||||
aggregate: 'average'
|
||||
}
|
||||
}, function (result) {
|
||||
var ticksAndLabels = ""
|
||||
var coordinates = "";
|
||||
var cardLChartString = "";
|
||||
|
||||
let ticksAndLabelsList = []
|
||||
var date = new Date();
|
||||
date.setMinutes(0, 0, 0);
|
||||
var ts = Math.round(date.getTime() / 1000);
|
||||
var tsYesterday = ts - (numberOfHoursAgo * 3600);
|
||||
|
||||
for (var x = tsYesterday, i = 0; x < ts; x += (xAxisTicksEveryM * 60), i += xAxisTicksEveryM)
|
||||
{
|
||||
if (i % xAxisLabelEveryM)
|
||||
{
|
||||
ticksAndLabelsList.push(i);
|
||||
} else
|
||||
{
|
||||
var currentDate = new Date(x * 1000);
|
||||
// Hours part from the timestamp
|
||||
var hours = "0" + currentDate.getHours();
|
||||
// Minutes part from the timestamp
|
||||
var minutes = "0" + currentDate.getMinutes();
|
||||
// Seconds part from the timestamp
|
||||
var seconds = "0" + currentDate.getSeconds();
|
||||
var formattedTime = hours.slice(-2) + ':' + minutes.slice(-2);
|
||||
ticksAndLabelsList.push(String(i) + "^" + formattedTime);
|
||||
}
|
||||
}
|
||||
ticksAndLabels = ticksAndLabelsList.join("+");
|
||||
|
||||
let list = [];
|
||||
let offSetTime = Math.round(result.result[0].ts / 1000);
|
||||
let counter = Math.round((result.result[result.result.length -1 ].ts / 1000 - offSetTime) / maxX);
|
||||
for (var i = 0; i < result.result.length; i++)
|
||||
{
|
||||
var time = Math.round(((result.result[i].ts / 1000) - offSetTime) / counter);
|
||||
var value = Math.round(result.result[i].val * 10);
|
||||
if ((value != null) && (value != 0)){
|
||||
list.push(time + ":" + value)
|
||||
}
|
||||
}
|
||||
|
||||
coordinates = list.join("~");
|
||||
cardLChartString = ticksAndLabels + '~' + coordinates
|
||||
setState(targetDP, cardLChartString, true);
|
||||
|
||||
if (Debug) console.log(cardLChartString);
|
||||
});
|
||||
});
|
||||
130
ioBroker/Blockly/CardLChart_Influx2.ts
Normal file
130
ioBroker/Blockly/CardLChart_Influx2.ts
Normal file
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
* Dieses Script fragt eine influxDb ab, um Daten für die cardLcart (Liniendiagramm) zuberechnen und im richtigen Format bereitzustellen.
|
||||
* Es erstellt automatisch einen Datenpunkt.
|
||||
* Die Abfrage muss ggf. angepasst werden. Aktuell ermittelt sie Werte der letzten 24h, zu Stundenwerten zusammengefasst.
|
||||
*/
|
||||
|
||||
const Debug = false; // true für erweiterte Ausgaben im Log
|
||||
|
||||
const NSPanel_Path = '0_userdata.0.NSPanel.';
|
||||
const Path = NSPanel_Path + 'Influx2NSPanel.cardLChart.';
|
||||
const InfluxInstance = 'influxdb.0';
|
||||
const influxDbBucket = 'storage_short';
|
||||
const numberOfHoursAgo = 24;
|
||||
const xAxisTicksEveryM = 60;
|
||||
const xAxisLabelEveryM = 240;
|
||||
//
|
||||
|
||||
const sensors : Record<string, Record <string, string>> = {};
|
||||
/**
|
||||
* Hier werden die Sensoren festgelegt nach flogendem Schema
|
||||
*
|
||||
* sensors[‘Datenpunkt(kompletter Pfad) des Messwertes'] = {'taget': 'Name des Datenpunkt für die Chartwerte', 'measurement': 'genutzter Alias in der Influxdb für den Messwert'};
|
||||
*
|
||||
* Wenn der Wert in der Datenbank keinen Alias hat bleibt der Wert 'measurement': weg.
|
||||
* Jeder Messwert bekommt einen eigenen sensors[...] = {'target':....}
|
||||
*/
|
||||
|
||||
|
||||
sensors['netatmo-crawler.0.stationData.1.temperature'] = {'target':'AussenTemp', 'measurement':'wetter.temperatur'};
|
||||
|
||||
// ##### ab hier keine Änderungen mehr nötig #####
|
||||
|
||||
// create data source for NsPanel on script startup
|
||||
Object.keys(sensors).forEach(async id => {
|
||||
await generateDateAsync(id);
|
||||
});
|
||||
|
||||
// then listen to the sensors and update the data source states accordingly
|
||||
on({ id: Object.keys(sensors), change: 'any' }, async function (obj) {
|
||||
if (!obj.id) {
|
||||
return;
|
||||
}
|
||||
await generateDateAsync(obj.id);
|
||||
});
|
||||
|
||||
//__________________________
|
||||
// Beschreibe diese Funktion: Daten generieren
|
||||
async function generateDateAsync(sensorId: string) {
|
||||
let idMeasurement = sensors[sensorId].measurement;
|
||||
if (idMeasurement =='' ||idMeasurement == undefined) {idMeasurement = sensorId};
|
||||
const dataPointId:string = Path + sensors[sensorId].target +'.ACTUAL';
|
||||
if (Debug) log(`(f) generateDateAsync: ${sensorId} ${dataPointId} > ${idMeasurement}`);
|
||||
|
||||
const query =[
|
||||
'from(bucket: "' + influxDbBucket + '")',
|
||||
'|> range(start: -' + numberOfHoursAgo + 'h)',
|
||||
'|> filter(fn: (r) => r["_measurement"] == "' + idMeasurement + '")',
|
||||
'|> filter(fn: (r) => r["_field"] == "value")',
|
||||
'|> drop(columns: ["from", "ack", "q"])',
|
||||
'|> aggregateWindow(every: 1h, fn: last, createEmpty: false)',
|
||||
'|> map(fn: (r) => ({ r with _rtime: int(v: r._time) - int(v: r._start)}))',
|
||||
'|> yield(name: "_result")'].join('');
|
||||
|
||||
if (Debug) console.log('Query: ' + query);
|
||||
|
||||
const result : any = await sendToAsync(InfluxInstance, 'query', query);
|
||||
if (result.error) {
|
||||
console.error(result.error);
|
||||
return;
|
||||
}
|
||||
if (Debug) console.log(JSON.stringify(result));
|
||||
const numResults = result.result.length;
|
||||
let coordinates : string = '';
|
||||
for (let r = 0; r < numResults; r++)
|
||||
{
|
||||
const list : string[] = [];
|
||||
const numValues = result.result[r].length;
|
||||
|
||||
for (let i = 0; i < numValues; i++)
|
||||
{
|
||||
const time = Math.round(result.result[r][i]._rtime/1000/1000/1000/60);
|
||||
const value = Math.round(result.result[r][i]._value * 10);
|
||||
list.push(time + ":" + value);
|
||||
}
|
||||
|
||||
coordinates = list.join("~");
|
||||
if (Debug) console.log(coordinates);
|
||||
}
|
||||
|
||||
const ticksAndLabelsList : string[] = []
|
||||
const date = new Date();
|
||||
date.setMinutes(0, 0, 0);
|
||||
const ts = Math.round(date.getTime() / 1000);
|
||||
const tsYesterday = ts - (numberOfHoursAgo * 3600);
|
||||
if (Debug) console.log('Iterate from ' + tsYesterday + ' to ' + ts + ' stepsize=' + (xAxisTicksEveryM * 60));
|
||||
for (let x = tsYesterday, i = 0; x < ts; x += (xAxisTicksEveryM * 60), i += xAxisTicksEveryM)
|
||||
{
|
||||
if ((i % xAxisLabelEveryM))
|
||||
ticksAndLabelsList.push('' + i);
|
||||
else
|
||||
{
|
||||
const currentDate = new Date(x * 1000);
|
||||
// Hours part from the timestamp
|
||||
const hours = "0" + String(currentDate.getHours());
|
||||
// Minutes part from the timestamp
|
||||
const minutes = "0" + String(currentDate.getMinutes());
|
||||
const formattedTime = hours.slice(-2) + ':' + minutes.slice(-2);
|
||||
|
||||
ticksAndLabelsList.push(String(i) + "^" + formattedTime);
|
||||
}
|
||||
}
|
||||
if (Debug) console.log('Ticks & Label: ' + ticksAndLabelsList);
|
||||
if (Debug) console.log('Coordinates: ' + coordinates);
|
||||
await setOrCreate(dataPointId, ticksAndLabelsList.join("+") + '~' + coordinates, true);
|
||||
}
|
||||
|
||||
//__________________________
|
||||
// Beschreibe diese Funktion: Datenpunkte anlegen bzw. schreiben
|
||||
async function setOrCreate(id : string, value : any, ack : boolean) {
|
||||
if (!(await existsStateAsync(id))) {
|
||||
await createStateAsync(id, value, {
|
||||
name: id.split('.').reverse()[0],
|
||||
desc: 'Sensor Values [~<time>:<value>]*',
|
||||
type: 'string',
|
||||
role: 'value',
|
||||
});
|
||||
} else {
|
||||
await setStateAsync(id, value, ack);
|
||||
}
|
||||
}
|
||||
54
ioBroker/Blockly/CardPower.js
Normal file
54
ioBroker/Blockly/CardPower.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* generate an JSON for display Power-Card on NSPanel
|
||||
* Source: https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker-Card-Definitionen-(Seiten)#cardpower-ab-ts-script-v341
|
||||
* Version: 0.1 - L4rs
|
||||
*/
|
||||
schedule("* * * * *", function () {
|
||||
|
||||
// Definition der Datenpunkte für das JSON der POWER-Card und der anzuzeigenden Leistungswerte
|
||||
var powerCardJson = "0_userdata.0.NSPanel.Energie.PowerCard",
|
||||
pwr1 = "", // Batterie
|
||||
pwr2 = Math.round(getState("mqtt.0.SmartHome.Energie.PV.openDTU.114180710360.0.power").val), // Solar
|
||||
pwr3 = "", // Wind
|
||||
pwr4 = "", // Verbraucher
|
||||
pwr5 = Math.round(getState("hm-rpc.0.MEQ0706303.1.POWER").val), // Stromnetz
|
||||
pwr6 = 0, // Auto
|
||||
pwrHome = Math.round(pwr5 - pwr2); // Berechnung des Energiefluss anstelle eines Datenpunktes
|
||||
|
||||
// Definition der Keys im JSON
|
||||
var keys = ["id", "value", "unit", "icon", "iconColor", "speed"];
|
||||
|
||||
// Definition der "Kacheln", inkl. StandardIcon. Es können alle Icon aus dem Iconmapping genutzt werden.
|
||||
// Kacheln die nicht genutzt werden sollen, müssen wie z.b. item1 formatiert sein
|
||||
var home = [0, pwrHome, "W", "home-lightning-bolt-outline", 0]; // Icon home
|
||||
var item1 = [1, pwr1, "", "", 0, ""]; // Icon battery-charging-60
|
||||
var item2 = [2, pwr2, "W", "solar-power-variant-outline", 3, pwr2 > 0 ? -2 : 0]; // Icon solar-power-variant
|
||||
var item3 = [3, pwr3, "", "", 0, ""]; // Icon wind-turbine
|
||||
var item4 = [4, pwr4, "", "", 0, ""]; // Icon shape
|
||||
var item5 = [5, pwr5, "W", "transmission-tower", 10, 10]; // Icon transmission-tower
|
||||
var item6 = [6, pwr6, "kW", "car-electric-outline", 5, 0]; // Icon car
|
||||
|
||||
/**
|
||||
* JSON generieren und in den Datenpunkt schreiben,
|
||||
*
|
||||
* --- ab hier keine Änderungen mehr ---
|
||||
*/
|
||||
function func(tags, values) {
|
||||
return Object.assign(
|
||||
...tags.map((element, index) => ({ [element]: values[index] }))
|
||||
);
|
||||
}
|
||||
|
||||
setState(
|
||||
powerCardJson,
|
||||
JSON.stringify([
|
||||
func(keys, home),
|
||||
func(keys, item1),
|
||||
func(keys, item2),
|
||||
func(keys, item3),
|
||||
func(keys, item4),
|
||||
func(keys, item5),
|
||||
func(keys, item6),
|
||||
])
|
||||
);
|
||||
});
|
||||
10304
ioBroker/DEV/NSPanelTs.ts
Normal file
10304
ioBroker/DEV/NSPanelTs.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2497,6 +2497,14 @@
|
||||
"vi-VN":"Mật khẩu",
|
||||
"zh-CN":"密码",
|
||||
"zh-TW":"密碼"
|
||||
},
|
||||
"Wlan enabled":{
|
||||
"en-US":"Wlan enabled",
|
||||
"de-DE":"Wlan aktiviert"
|
||||
},
|
||||
"Wlan disabled":{
|
||||
"en-US":"Wlan disabled",
|
||||
"de-DE":"Wlan deaktiviert"
|
||||
}
|
||||
},
|
||||
"media":{
|
||||
|
||||
@@ -2697,5 +2697,9 @@
|
||||
"update_message":{
|
||||
"en-US":"Update Notifications",
|
||||
"de-DE":"Update Mitteilungen"
|
||||
},
|
||||
"scriptname":{
|
||||
"en-US":"Script name",
|
||||
"de-DE":"Skriptname"
|
||||
}
|
||||
}
|
||||
|
||||
28
ioBroker/tsconfig.json
Normal file
28
ioBroker/tsconfig.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"compileOnSave": true,
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitAny": false,
|
||||
"target": "ES2022",
|
||||
"typeRoots": [
|
||||
".iobroker/types",
|
||||
"node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"**/*.js",
|
||||
"**/*.ts",
|
||||
"./.iobroker/types/javascript.d.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/**"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
||||
name: NSPanel Lovelace UI Addon
|
||||
version: "4.7.73"
|
||||
version: "4.7.78"
|
||||
slug: nspanel-lovelace-ui
|
||||
description: NSPanel Lovelace UI Addon
|
||||
services:
|
||||
|
||||
@@ -20,27 +20,32 @@ def calculate_dim_values(sleepTracking, sleepTrackingZones, sleepBrightness, scr
|
||||
dimmode = sleepBrightness
|
||||
elif isinstance(sleepBrightness, list):
|
||||
logging.error("list style config for sleepBrightness no longer supported")
|
||||
elif sleepBrightness.startswith("ha:"):
|
||||
time.sleep(1)
|
||||
dimmode = int(float(libs.home_assistant.get_template(sleepBrightness)[3:]))
|
||||
involved_entities.extend(libs.home_assistant.get_template_listener_entities(sleepBrightness))
|
||||
#elif sleepBrightness.startswith("ha:"):
|
||||
# time.sleep(1)
|
||||
# dimmode = int(float(libs.home_assistant.get_template(sleepBrightness)[3:]))
|
||||
# involved_entities.extend(libs.home_assistant.get_template_listener_entities(sleepBrightness))
|
||||
elif libs.home_assistant.is_existent(sleepBrightness):
|
||||
involved_entities.append(sleepBrightness)
|
||||
try:
|
||||
dimmode = int(float(libs.home_assistant.get_entity_data(sleepBrightness).get('state', 10)))
|
||||
except ValueError:
|
||||
print("sleepBrightness entity invalid")
|
||||
|
||||
if screenBrightness:
|
||||
if isinstance(screenBrightness, int):
|
||||
dimValueNormal = screenBrightness
|
||||
elif isinstance(screenBrightness, list):
|
||||
logging.error("list style config for screenBrightness no longer supported")
|
||||
elif screenBrightness.startswith("ha:"):
|
||||
time.sleep(1)
|
||||
dimValueNormal = int(float(libs.home_assistant.get_template(screenBrightness)[3:]))
|
||||
involved_entities.extend(libs.home_assistant.get_template_listener_entities(screenBrightness))
|
||||
#elif screenBrightness.startswith("ha:"):
|
||||
# time.sleep(1)
|
||||
# dimValueNormal = int(float(libs.home_assistant.get_template(screenBrightness)[3:]))
|
||||
# involved_entities.extend(libs.home_assistant.get_template_listener_entities(screenBrightness))
|
||||
elif libs.home_assistant.is_existent(screenBrightness):
|
||||
involved_entities.append(screenBrightness)
|
||||
try:
|
||||
dimValueNormal = int(float(libs.home_assistant.get_entity_data(screenBrightness).get('state', 100)))
|
||||
|
||||
except ValueError:
|
||||
print("screenBrightness entity invalid")
|
||||
# force sleep brightness to zero in case sleepTracking is active
|
||||
if sleepTracking:
|
||||
if libs.home_assistant.is_existent(sleepTracking):
|
||||
|
||||
@@ -67,7 +67,7 @@ class LovelaceUIPanel:
|
||||
self.schedule = Scheduler()
|
||||
self.schedule.minutely(datetime.time(second=0), self.update_time)
|
||||
self.schedule.hourly(datetime.time(
|
||||
minute=0, second=0), self.update_time)
|
||||
minute=0, second=0), self.update_date)
|
||||
schedule_thread = threading.Thread(target=self.schedule_thread_target)
|
||||
schedule_thread.daemon = True
|
||||
schedule_thread.start()
|
||||
|
||||
Reference in New Issue
Block a user