Compare commits

..

56 Commits

Author SHA1 Message Date
Johannes
415813d847 implements #654 2022-12-31 14:41:59 +01:00
Johannes Braun
2bc83a2e11 add hmi 2022-12-29 16:39:28 +01:00
Johannes Braun
eac9a73f8a add serial code 2022-12-29 16:38:58 +01:00
Johannes
80670a4722 started on backend changes for new thermo page format 2022-12-29 16:37:52 +01:00
Johannes
ccdc3a9a77 Update config.py 2022-12-29 16:35:01 +01:00
EddyK69
254f2a2e25 Respect iconOverride on navigate & service (#650)
iconOverrides on navigates & services where not shown when the status entity was of type 'sensor' on cardGrids
2022-12-29 14:09:23 +01:00
Johannes
688a847c77 fixes #649 2022-12-29 14:00:01 +01:00
Armilar
888dc5c402 v3.7.3.1 - Hotfix - Dateformat us-p
Hotfix - us-p - DateString - Use long/short Weekday and long/short Month
2022-12-29 11:39:10 +01:00
Armilar
a0836ea9c5 v3.7.3.1 - Hotfix - Dateformat us-p
Hotfix - us-p - DateString - Use long/short Weekday and long/short Month
2022-12-29 11:33:40 +01:00
Daniel Albert
0ee8120eed Add status functionality for non-entities (#645)
* Add status functionality for non-entities

I wanted to show services on `cardGrid` pages conditionally, using the
`state` and `state_not` options and based on a `status` entity.
The documentation looked as if this was possible, however it didn't work
due to the order of evaluation.

This change makes it possible to hide any item using `state` /
`state_not`, based on either the `entity` itself or the information
provided by the `status` entity.

This basically implements #483, I think.

* Use if/then/else instead of and/or expression evaluation rules

This improves the readability of the code for people not familiar with
the evaluation of and / or expressions.

Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
2022-12-29 09:50:52 +01:00
Johannes
61e7438128 Revert docs to old config, until release 2022-12-29 09:22:14 +01:00
Johannes
26eeb7e651 revert to if else syntax, to keep compatibility with python 3.9 2022-12-29 09:20:36 +01:00
Johannes
7057df2364 fix issue if there is only one top level card 2022-12-29 00:24:32 +01:00
Johannes
4e0ecbf9fd Update docs.yml 2022-12-28 23:18:56 +01:00
Armilar
8ab20b16a8 v3.7.3.0 Hotfix - bUp case / Update Berry Version 8
- Hotfix - bUp case
- Update Berry Version 8
2022-12-28 20:32:03 +01:00
Armilar
09a7786df4 v3.7.3.0 Hotfix - bUp case / Update Berry Version 8
- Hotfix - bUp case
- Update Berry Version 8
2022-12-28 20:24:16 +01:00
Johannes
ef6876b660 add compiled version 2022-12-28 20:18:16 +01:00
joBr99
2e275a9b44 start reworking navigation paramters (#644) (add nextion2text) 2022-12-28 19:03:54 +00:00
Johannes
d57fddbbf5 start reworking navigation paramters (#644)
* modify cardGrid/cardEntities nav

* rework backend nav for new style

* fix some bugs

* update other pages with new nav paramters

* readd readme part
2022-12-28 20:00:44 +01:00
Armilar
0c415c0797 Merge pull request #642 from kuckuckmann/patch-5
Create RGB_Dec565_rechner.xml
2022-12-28 15:59:25 +01:00
kuckuckmann
de49a35266 Create RGB_Dec565_rechner.xml 2022-12-28 15:57:36 +01:00
Daniel Albert
5b10a37aa7 Make single, right status icon possible (#640)
According to the [screensaver documentation](https://docs.nspanel.pky.eu/config-screensaver/),
the `statusIcon2` option controls the status icon right of the date.

However, if only `statusIcon2` is configured, it would have landed on the left
side, instead of the right side.
This commit adds padding for unconfigured status icons.

Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
2022-12-27 22:13:40 +01:00
Armilar
dd2dac4eb6 Merge pull request #638 from kuckuckmann/patch-4
Rename Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml.xml to A…
2022-12-27 15:38:11 +01:00
kuckuckmann
e72ede6e73 Rename Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml.xml to Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml 2022-12-27 15:29:51 +01:00
Armilar
9a53eda4a2 Delete Spotify_Premium_Alias.js 2022-12-27 15:08:01 +01:00
Armilar
e0854996fa Delete Sonos_Alias.js 2022-12-27 15:07:35 +01:00
Armilar
60665f5eac Delete Alexa2_Alias.js 2022-12-27 15:07:17 +01:00
Daniel Albert
4492f4df1f Fix state / state_not logic error for entities (#637)
According to the documentation, an entity is only displayed
* if `state` is set: if the entity state is equal to the `state` value
* if `state_not` is set: if the entity state is _not_ equal to the `state_not` value

So `""` – an **empty** string – shall only be returned – i.e. the **entity be hidden**
* if `state` is set: if the entity state is **not** equal to the `state` value
* if `state_not` is set: if the entity state is equal to the `state_not` value

Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
2022-12-27 14:14:18 +01:00
Armilar
b34586fce3 Merge pull request #636 from kuckuckmann/patch-3
Patch 3
2022-12-27 14:01:01 +01:00
kuckuckmann
4ce76ea5ef Create PopupNotify_layout2_Emulator.xml 2022-12-27 13:57:41 +01:00
kuckuckmann
fdd7d97178 Create CardChart.xml 2022-12-27 13:56:50 +01:00
kuckuckmann
1877b49b5b Create CardPower_Emulator_Skript.xml 2022-12-27 13:55:48 +01:00
kuckuckmann
2106720fe4 Create SqueezeBoxRPC_Alias.js 2022-12-27 13:50:29 +01:00
kuckuckmann
c32c95e6d4 Create Chrome_Alias.js 2022-12-27 13:49:45 +01:00
kuckuckmann
3cd8f6a0f5 Create Sonos_Alias.js 2022-12-27 13:49:11 +01:00
kuckuckmann
a5de459f81 Create Alexa2_Alias.js 2022-12-27 13:48:40 +01:00
kuckuckmann
c722f18193 Create Spotify_Premium_Alias.js 2022-12-27 13:48:12 +01:00
kuckuckmann
d3e68dcb06 Create PopupTimer.xml 2022-12-27 13:46:20 +01:00
Armilar
d4fe865379 Merge pull request #634 from kuckuckmann/patch-2
Create CardMedia_Equalizer.xml
2022-12-27 13:42:24 +01:00
Armilar
74e0905545 Merge pull request #635 from kuckuckmann/patch-1
Patch 1
2022-12-27 13:41:56 +01:00
kuckuckmann
964d9d1b26 Create CardMedia_Equalizer.xml 2022-12-27 13:37:44 +01:00
kuckuckmann
4fda41ffce Create CardMedia_Equalizer.xml 2022-12-27 13:32:16 +01:00
Armilar
8b136a7c26 Create Abfallkalender.xml 2022-12-27 13:31:38 +01:00
kuckuckmann
7f00c847ac Create DWD_Daten_Broadcast.xml 2022-12-27 13:31:17 +01:00
kuckuckmann
ef3fc0ed93 Create Hardware-Buttons_Multipress.xml 2022-12-27 13:30:07 +01:00
kuckuckmann
e7ff857089 Create Abfallkalender.js 2022-12-27 13:29:12 +01:00
kuckuckmann
c193e6c3c4 Create Abfallkalender.xml 2022-12-27 13:28:39 +01:00
kuckuckmann
48e14540a5 Create Screensaver-Info_auf_Request.xml 2022-12-27 13:27:28 +01:00
kuckuckmann
09eabd2986 Create Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml.xml 2022-12-27 13:25:54 +01:00
kuckuckmann
1198d8c2bc Create Alarm_Page_Testskript.xml
Exclude Blockly out of Wiki article https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker---FAQ-&-Anleitungen#2-alarm-page
2022-12-27 13:20:03 +01:00
Johannes
9711cdc74b Update nspanel-lovelace-ui.py 2022-12-27 01:06:09 +01:00
Johannes Braun
cc50c4c4b3 rework update logic with migration 2022-12-27 00:57:31 +01:00
Johannes Braun
4f832a9af2 update docs for berry driver installation 2022-12-27 00:03:58 +01:00
Johannes Braun
bd6d558cc5 add tapp file for testing 2022-12-26 23:47:00 +01:00
Johannes Braun
529b0516f4 implementes #539 2022-12-25 15:43:23 +01:00
Johannes
b9504a2ff0 fixes #631 2022-12-25 10:32:45 +01:00
62 changed files with 19814 additions and 1798 deletions

View File

@@ -9,6 +9,7 @@ on:
- docs/*
- .github/workflows/docs.yml
- mkdocs.yml
- HMI/README.md
jobs:
deploy:
@@ -19,4 +20,5 @@ jobs:
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-video markdown-include
- run: cp HMI/README.md docs/hmi-serial-protocol.md
- run: mkdocs gh-deploy --force

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6,8 +6,8 @@ head = sharedhead + """
spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation
print(head)
start = 3
for i in range(1,7):
start = 14
for i in range(1,5):
idxstart = start + (i-1)*6
item = f"""
// get Type

View File

@@ -6,7 +6,7 @@ head = sharedhead + """
spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation
print(head)
start = 3
start = 14
for i in range(1,7):
idxstart = start + (i-1)*6
item = f"""

View File

@@ -8,31 +8,31 @@ head = sharedhead + """
print(head)
print("""
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//title
spstr strCommand.txt,tTitle.txt,"~",4
spstr strCommand.txt,tTitle.txt,"~",15
//title farbe
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
if(tTmp.txt!="")
{
covx tTmp.txt,tTitle.pco,0,0
}
//author
spstr strCommand.txt,tAuthor.txt,"~",6
spstr strCommand.txt,tAuthor.txt,"~",17
//author farbe
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
if(tTmp.txt!="")
{
covx tTmp.txt,tAuthor.pco,0,0
}
//volume
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
hVolume.val=sys0
//icon
spstr strCommand.txt,tPlayPause.txt,"~",9
spstr strCommand.txt,tPlayPause.txt,"~",20
// on off button
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt=="disable")
{
vis t5,0
@@ -42,7 +42,7 @@ print("""
covx tTmp.txt,t5.pco,0,0
}
// shuffel btn
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt=="disable")
{
vis tShuffle,0
@@ -54,7 +54,7 @@ print("""
""")
start = 12
start = 23
for i in range(1,7):
idxstart = start + (i-1)*6
item = f"""

View File

@@ -6,15 +6,15 @@ head = sharedhead + """
spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation + """
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
"""
print(head)
start = 6
start = 17
for i in range(0,6):
idxstart = start + (i)*4
item = f"""

View File

@@ -8,68 +8,34 @@ text = sharedhead + """
text += """
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//currentTemp
spstr strCommand.txt,tCurTemp.txt,"~",4
spstr strCommand.txt,tCurTemp.txt,"~",15
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,xTempDest1.val,0,0
xTempDest.val=xTempDest1.val
//status
spstr strCommand.txt,tStatus.txt,"~",6
spstr strCommand.txt,tStatus.txt,"~",17
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,xTempMin1.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,xTempMax1.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,xTempStep1.val,0,0
// disable all buttons
vis bt0,0
vis bt1,0
vis bt2,0
vis bt3,0
vis bt4,0
vis bt5,0
vis bt6,0
vis bt7,0
"""
start = 10
for i in range(0,8):
idxstart = start + i*4
text += f"""
//bt{i}
spstr strCommand.txt,bt{i}.txt,"~",{idxstart}
if(bt{i}.txt!="")
{{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",{idxstart+1}
covx tTmp.txt,bt{i}.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",{idxstart+2}
covx tTmp.txt,bt{i}.val,0,0
// save action
spstr strCommand.txt,va{i}.txt,"~",{idxstart+3}
//enable
vis bt{i},1
}}"""
text += """
//Text tCurTempLbl
spstr strCommand.txt,tCurTempLbl.txt,"~",42
spstr strCommand.txt,tCurTempLbl.txt,"~",21
//Text tStateLbl
spstr strCommand.txt,tStateLbl.txt,"~",43
//Text tALbl
spstr strCommand.txt,tALbl.txt,"~",44
spstr strCommand.txt,tStateLbl.txt,"~",22
//Text tCF
spstr strCommand.txt,tCF.txt,"~",45
spstr strCommand.txt,tCF.txt,"~",23
tCF1.txt=tCF.txt
tCF2.txt=tCF.txt
//Second Temperature
spstr strCommand.txt,tTmp.txt,"~",46
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="")
{
covx tTmp.txt,xTempDest2.val,0,0
@@ -87,15 +53,46 @@ text += """
vis tCF2,1
}
//Show btDetail
spstr strCommand.txt,tTmp.txt,"~",47
if(tTmp.txt!="1")
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
vis btDetail,1
}else
{
vis btDetail,0
}
}
""" + sharedfoot
"""
print(text)
start = 26
for i in range(1,9):
idxstart = start + (i-1)*6
item = f"""
// get Type
spstr strCommand.txt,tTmp.txt,"~",{idxstart}
if(tTmp.txt=="delete"||tTmp.txt=="")
{{
vis bEntity{i},0
}}else
{{
// get internal name
spstr strCommand.txt,entn{i}.txt,"~",{idxstart+1}
// change icon
spstr strCommand.txt,bEntity{i}.txt,"~",{idxstart+2}
vis bEntity{i},1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",{idxstart+3}
covx tTmp.txt,sys0,0,0
bEntity{i}.pco=sys0
}}
"""
print(item)
print("""
}
""" + sharedfoot
)

360
HMI/code_gen/pages/out.txt Normal file
View File

@@ -0,0 +1,360 @@
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
}
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
vis t0u,1
vis h0,1
}else
{
vis t0Icon,0
vis t0u,0
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
vis t1u,1
vis h1,1
}else
{
vis t1Icon,0
vis t1u,0
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
vis t2u,1
vis h2,1
}else
{
vis t2Icon,0
vis t2u,0
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
vis t3u,1
vis h3,1
}else
{
vis t3Icon,0
vis t3u,0
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
vis t4u,1
vis h4,1
}else
{
vis t4Icon,0
vis t4u,0
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1
vis t5u,1
vis h5,1
}else
{
vis t5Icon,0
vis t5u,0
vis h5,0
}
}
if(tInstruction.txt=="pageType")
{
sleepValue=0
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//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")
{
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=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}

View File

@@ -166,44 +166,39 @@ sharedfoot = """
"""
navigation = """
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
"""

View File

@@ -72,6 +72,20 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 41
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 40
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 6
@@ -1014,14 +1028,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1068,14 +1075,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1223,86 +1223,80 @@ Timer tmSerial
{
//entn
spstr strCommand.txt,entn.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
spstr strCommand.txt,arm1.txt,"~",14
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
spstr strCommand.txt,va1.txt,"~",15
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
spstr strCommand.txt,arm2.txt,"~",16
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
spstr strCommand.txt,va2.txt,"~",17
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
spstr strCommand.txt,arm3.txt,"~",18
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
spstr strCommand.txt,va3.txt,"~",19
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
spstr strCommand.txt,arm4.txt,"~",20
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
spstr strCommand.txt,va4.txt,"~",21
//icon
spstr strCommand.txt,tIcon.txt,"~",11
spstr strCommand.txt,tIcon.txt,"~",22
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="disable")
{
vis b0,1
@@ -1335,7 +1329,7 @@ Timer tmSerial
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
tmFlash.en=1
@@ -1344,13 +1338,13 @@ Timer tmSerial
tmFlash.en=0
}
// extra button
spstr strCommand.txt,b9.txt,"~",15
spstr strCommand.txt,b9.txt,"~",26
if(b9.txt!="")
{
vis b9,1
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,b9.pco,0,0
spstr strCommand.txt,vaAddBtn.txt,"~",17
spstr strCommand.txt,vaAddBtn.txt,"~",28
}
}
if(tInstruction.txt=="time")

View File

@@ -58,6 +58,20 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 32
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 31
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 5
@@ -280,14 +294,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -334,14 +341,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -559,48 +559,42 @@ Timer tmSerial
if(tInstruction.txt=="entityUpd")
{
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,vaColorL.val,0,0
// prepare dark color
sys0=vaColorL.val>>11 // red
@@ -612,7 +606,7 @@ Timer tmSerial
//
// detect nValues and maxValue
vNValues.val=0
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
while(sya0>0)
{
@@ -623,7 +617,7 @@ Timer tmSerial
}
// next
vNValues.val++
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
}
//
@@ -638,7 +632,7 @@ Timer tmSerial
//
line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
spstr strCommand.txt,strTmp.txt,"~",5
spstr strCommand.txt,strTmp.txt,"~",16
sya1=0
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
@@ -671,7 +665,7 @@ Timer tmSerial
}
//
// y achis label
spstr strCommand.txt,tTmp.txt,"~",4
spstr strCommand.txt,tTmp.txt,"~",15
// tTmp.txt="Gas [kW]"
strlen tTmp.txt,sys1
sya1=sys1*12+m0.h-48/2
@@ -687,7 +681,7 @@ Timer tmSerial
vaValues.txt+="~"
}
// extract next entry
spstr strCommand.txt,tTmp.txt,"~",sys0+6
spstr strCommand.txt,tTmp.txt,"~",sys0+17
// calculate left
sys1=sys0*5*vaUnit.val
sys1+=vaLeft.val

View File

@@ -96,28 +96,42 @@ Page cardEntities
Variable (string) entn1
Attributes
ID : 44
ID : 42
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn2
Attributes
ID : 45
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn3
Attributes
ID : 46
ID : 44
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn4
Attributes
ID : 47
ID : 45
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 63
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 64
Scope : local
Text :
Max. Text Size: 80
@@ -131,42 +145,42 @@ Variable (string) strCommand
Variable (string) tSend
Attributes
ID : 64
ID : 62
Scope : local
Text :
Max. Text Size: 200
Variable (string) type1
Attributes
ID : 40
ID : 38
Scope : local
Text :
Max. Text Size: 10
Variable (string) type2
Attributes
ID : 41
ID : 39
Scope : local
Text :
Max. Text Size: 10
Variable (string) type3
Attributes
ID : 42
ID : 40
Scope : local
Text :
Max. Text Size: 10
Variable (string) type4
Attributes
ID : 43
ID : 41
Scope : local
Text :
Max. Text Size: 10
Number nNum1
Attributes
ID : 53
ID : 51
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -196,7 +210,7 @@ Number nNum1
Number nNum2
Attributes
ID : 54
ID : 52
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -226,7 +240,7 @@ Number nNum2
Number nNum3
Attributes
ID : 55
ID : 53
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -256,7 +270,7 @@ Number nNum3
Number nNum4
Attributes
ID : 56
ID : 54
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -663,7 +677,7 @@ Picture p0
Slider hSlider1
Attributes
ID : 49
ID : 47
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -706,7 +720,7 @@ Slider hSlider1
Slider hSlider2
Attributes
ID : 50
ID : 48
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -749,7 +763,7 @@ Slider hSlider2
Slider hSlider3
Attributes
ID : 51
ID : 49
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -792,7 +806,7 @@ Slider hSlider3
Slider hSlider4
Attributes
ID : 52
ID : 50
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1023,7 +1037,7 @@ Button bDown4
Button bNext
Attributes
ID : 33
ID : 65
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1055,14 +1069,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1077,7 +1084,7 @@ Button bNext
Button bPrev
Attributes
ID : 32
ID : 66
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1109,14 +1116,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1319,7 +1319,7 @@ Button bStop4
Button bText1
Attributes
ID : 60
ID : 58
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1366,7 +1366,7 @@ Button bText1
Button bText2
Attributes
ID : 61
ID : 59
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1413,7 +1413,7 @@ Button bText2
Button bText3
Attributes
ID : 62
ID : 60
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1460,7 +1460,7 @@ Button bText3
Button bText4
Attributes
ID : 63
ID : 61
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1875,7 +1875,7 @@ Dual-state Button btOnOff4
Hotspot m0
Attributes
ID : 38
ID : 36
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1919,7 +1919,7 @@ Hotspot m0
Hotspot m1
Attributes
ID : 37
ID : 35
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1963,7 +1963,7 @@ Hotspot m1
Hotspot m2
Attributes
ID : 36
ID : 34
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2007,7 +2007,7 @@ Hotspot m2
Hotspot m3
Attributes
ID : 39
ID : 37
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2051,7 +2051,7 @@ Hotspot m3
Hotspot mSpecial
Attributes
ID : 34
ID : 32
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2077,7 +2077,7 @@ Hotspot mSpecial
Hotspot mSwipeNext
Attributes
ID : 57
ID : 55
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2097,7 +2097,7 @@ Hotspot mSwipeNext
Hotspot mSwipePrev
Attributes
ID : 59
ID : 57
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2117,7 +2117,7 @@ Hotspot mSwipePrev
Hotspot mSwipeUp
Attributes
ID : 58
ID : 56
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2191,50 +2191,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis bUp1,0
@@ -2249,14 +2243,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",5
spstr strCommand.txt,tIcon1.txt,"~",16
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
if(type1.txt=="shutter")
@@ -2269,7 +2263,7 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",8
spstr strCommand.txt,tId.txt,"~",19
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2320,7 +2314,7 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -2337,7 +2331,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="button"||type1.txt=="input_sel")
{
@@ -2352,7 +2346,7 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="number")
{
@@ -2365,7 +2359,7 @@ Timer tmSerial
vis hSlider1,1
vis nNum1,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
//first value is current value
spstr bText1.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2381,9 +2375,9 @@ Timer tmSerial
hSlider1.maxval=sys0
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis bUp2,0
@@ -2398,14 +2392,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",11
spstr strCommand.txt,tIcon2.txt,"~",22
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
if(type2.txt=="shutter")
@@ -2418,7 +2412,7 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",14
spstr strCommand.txt,tId.txt,"~",25
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2469,7 +2463,7 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -2486,7 +2480,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="button"||type2.txt=="input_sel")
{
@@ -2501,7 +2495,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="number")
{
@@ -2514,7 +2508,7 @@ Timer tmSerial
vis hSlider2,1
vis nNum2,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
//first value is current value
spstr bText2.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2530,9 +2524,9 @@ Timer tmSerial
hSlider2.maxval=sys0
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis bUp3,0
@@ -2547,14 +2541,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon3.txt,"~",17
spstr strCommand.txt,tIcon3.txt,"~",28
vis tIcon3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
tIcon3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
if(type3.txt=="shutter")
@@ -2567,7 +2561,7 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",20
spstr strCommand.txt,tId.txt,"~",31
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2618,7 +2612,7 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,sys0,0,0
btOnOff3.val=sys0
}
@@ -2635,7 +2629,7 @@ Timer tmSerial
bText3.pco=65535
bText3.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="button"||type3.txt=="input_sel")
{
@@ -2650,7 +2644,7 @@ Timer tmSerial
bText3.pco=1374
bText3.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="number")
{
@@ -2663,7 +2657,7 @@ Timer tmSerial
vis hSlider3,1
vis nNum3,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
//first value is current value
spstr bText3.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2679,9 +2673,9 @@ Timer tmSerial
hSlider3.maxval=sys0
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis bUp4,0
@@ -2696,14 +2690,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon4.txt,"~",23
spstr strCommand.txt,tIcon4.txt,"~",34
vis tIcon4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
tIcon4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
if(type4.txt=="shutter")
@@ -2716,7 +2710,7 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",26
spstr strCommand.txt,tId.txt,"~",37
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2767,7 +2761,7 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,sys0,0,0
btOnOff4.val=sys0
}
@@ -2784,7 +2778,7 @@ Timer tmSerial
bText4.pco=65535
bText4.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="button"||type4.txt=="input_sel")
{
@@ -2799,7 +2793,7 @@ Timer tmSerial
bText4.pco=1374
bText4.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="number")
{
@@ -2812,7 +2806,7 @@ Timer tmSerial
vis hSlider4,1
vis nNum4,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
//first value is current value
spstr bText4.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2949,7 +2943,7 @@ Timer tmSerial
Timer tmSleep
Attributes
ID : 35
ID : 33
Scope : local
Period (ms): 1000
Enabled : yes
@@ -2980,7 +2974,7 @@ Timer tmSleep
TouchCap tc0
Attributes
ID : 48
ID : 46
Scope: local
Value: 0

View File

@@ -96,12 +96,26 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 42
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 4
Scope : local
Text :
Max. Text Size: 500
Max. Text Size: 700
Variable (string) tSend
Attributes
@@ -905,14 +919,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -933,9 +940,9 @@ Button bPrev
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
x coordinate : 10
y coordinate : 16
Width : 50
Width : 49
Height : 50
Effect : load
Effect Priority : 0
@@ -959,14 +966,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1139,50 +1139,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -1190,20 +1184,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",5
spstr strCommand.txt,bEntity1.txt,"~",16
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -1211,20 +1205,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",11
spstr strCommand.txt,bEntity2.txt,"~",22
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -1232,20 +1226,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",17
spstr strCommand.txt,bEntity3.txt,"~",28
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -1253,20 +1247,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",23
spstr strCommand.txt,bEntity4.txt,"~",34
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
spstr strCommand.txt,type5.txt,"~",38
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
spstr strCommand.txt,entn5.txt,"~",39
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -1274,20 +1268,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",29
spstr strCommand.txt,bEntity5.txt,"~",40
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
spstr strCommand.txt,tTmp.txt,"~",41
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
spstr strCommand.txt,tEntity5.txt,"~",42
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
spstr strCommand.txt,type6.txt,"~",44
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
spstr strCommand.txt,entn6.txt,"~",45
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -1295,14 +1289,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",35
spstr strCommand.txt,bEntity6.txt,"~",46
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
spstr strCommand.txt,tEntity6.txt,"~",48
vis tEntity6,1
}
}

View File

@@ -101,6 +101,20 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 58
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 57
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 5
@@ -1200,14 +1214,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1254,14 +1261,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1419,72 +1419,66 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//title
spstr strCommand.txt,tTitle.txt,"~",4
spstr strCommand.txt,tTitle.txt,"~",15
//title farbe
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
if(tTmp.txt!="")
{
covx tTmp.txt,tTitle.pco,0,0
}
//author
spstr strCommand.txt,tAuthor.txt,"~",6
spstr strCommand.txt,tAuthor.txt,"~",17
//author farbe
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
if(tTmp.txt!="")
{
covx tTmp.txt,tAuthor.pco,0,0
}
//volume
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
hVolume.val=sys0
//icon
spstr strCommand.txt,tPlayPause.txt,"~",9
spstr strCommand.txt,tPlayPause.txt,"~",20
// on off button
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt=="disable")
{
vis t5,0
@@ -1494,7 +1488,7 @@ Timer tmSerial
covx tTmp.txt,t5.pco,0,0
}
// shuffel btn
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt=="disable")
{
vis tShuffle,0
@@ -1504,9 +1498,9 @@ Timer tmSerial
tShuffle.txt=tTmp.txt
}
// get Type
spstr strCommand.txt,type1.txt,"~",12
spstr strCommand.txt,type1.txt,"~",23
// get internal name
spstr strCommand.txt,entn1.txt,"~",13
spstr strCommand.txt,entn1.txt,"~",24
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -1514,20 +1508,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",14
spstr strCommand.txt,bEntity1.txt,"~",25
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",16
spstr strCommand.txt,tEntity1.txt,"~",27
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",18
spstr strCommand.txt,type2.txt,"~",29
// get internal name
spstr strCommand.txt,entn2.txt,"~",19
spstr strCommand.txt,entn2.txt,"~",30
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -1535,20 +1529,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",20
spstr strCommand.txt,bEntity2.txt,"~",31
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",21
spstr strCommand.txt,tTmp.txt,"~",32
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",22
spstr strCommand.txt,tEntity2.txt,"~",33
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",24
spstr strCommand.txt,type3.txt,"~",35
// get internal name
spstr strCommand.txt,entn3.txt,"~",25
spstr strCommand.txt,entn3.txt,"~",36
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -1556,20 +1550,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",26
spstr strCommand.txt,bEntity3.txt,"~",37
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",27
spstr strCommand.txt,tTmp.txt,"~",38
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",28
spstr strCommand.txt,tEntity3.txt,"~",39
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",30
spstr strCommand.txt,type4.txt,"~",41
// get internal name
spstr strCommand.txt,entn4.txt,"~",31
spstr strCommand.txt,entn4.txt,"~",42
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -1577,20 +1571,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",32
spstr strCommand.txt,bEntity4.txt,"~",43
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",33
spstr strCommand.txt,tTmp.txt,"~",44
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",34
spstr strCommand.txt,tEntity4.txt,"~",45
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",36
spstr strCommand.txt,type5.txt,"~",47
// get internal name
spstr strCommand.txt,entn5.txt,"~",37
spstr strCommand.txt,entn5.txt,"~",48
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -1598,20 +1592,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",38
spstr strCommand.txt,bEntity5.txt,"~",49
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",39
spstr strCommand.txt,tTmp.txt,"~",50
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",40
spstr strCommand.txt,tEntity5.txt,"~",51
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",42
spstr strCommand.txt,type6.txt,"~",53
// get internal name
spstr strCommand.txt,entn6.txt,"~",43
spstr strCommand.txt,entn6.txt,"~",54
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -1619,14 +1613,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",44
spstr strCommand.txt,bEntity6.txt,"~",55
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",45
spstr strCommand.txt,tTmp.txt,"~",56
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",46
spstr strCommand.txt,tEntity6.txt,"~",57
vis tEntity6,1
}
}
@@ -1694,6 +1688,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -65,6 +65,20 @@ Page cardPower
}
}
Variable (string) nent1
Attributes
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 44
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 5
@@ -801,14 +815,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -855,14 +862,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1061,63 +1061,57 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",7
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",9
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
@@ -1130,15 +1124,15 @@ Timer tmSerial
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",11
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",13
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
@@ -1151,15 +1145,15 @@ Timer tmSerial
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",15
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",17
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
@@ -1172,15 +1166,15 @@ Timer tmSerial
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",19
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",21
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
@@ -1193,15 +1187,15 @@ Timer tmSerial
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",22
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",23
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",25
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
@@ -1214,15 +1208,15 @@ Timer tmSerial
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",27
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",29
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1

View File

@@ -81,12 +81,26 @@ Variable (string) entn2
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 32
Scope : local
Text :
Max. Text Size: 50
Variable (string) nent2
Attributes
ID : 33
Scope : local
Text :
Max. Text Size: 50
Variable (string) strCommand
Attributes
ID : 6
Scope : local
Text :
Max. Text Size: 275
Max. Text Size: 400
Variable (string) tId
Attributes
@@ -338,14 +352,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -392,14 +399,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -657,9 +657,9 @@ Hotspot mSwipePrev
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 9
Height : 310
y coordinate : 0
Width : 7
Height : 315
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -745,52 +745,46 @@ Timer tmSerial
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
//tHeading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3
spstr strCommand.txt,vaQR.txt,"~",14
// get Type
spstr strCommand.txt,type1.txt,"~",4
spstr strCommand.txt,type1.txt,"~",15
// get internal name
spstr strCommand.txt,entn1.txt,"~",5
spstr strCommand.txt,entn1.txt,"~",16
if(type1.txt=="delete"||type1.txt=="")
{
vis btOnOff1,0
@@ -800,14 +794,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",6
spstr strCommand.txt,tIcon1.txt,"~",17
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",8
spstr strCommand.txt,tEntity1.txt,"~",19
vis tEntity1,1
}
if(type1.txt=="light")
@@ -815,7 +809,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -824,7 +818,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -836,7 +830,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
if(type1.txt=="button")
{
@@ -846,12 +840,12 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
// get Type
spstr strCommand.txt,type2.txt,"~",10
spstr strCommand.txt,type2.txt,"~",21
// get internal name
spstr strCommand.txt,entn2.txt,"~",11
spstr strCommand.txt,entn2.txt,"~",22
if(type2.txt=="delete"||type2.txt=="")
{
vis btOnOff2,0
@@ -861,14 +855,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",12
spstr strCommand.txt,tIcon2.txt,"~",23
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",14
spstr strCommand.txt,tEntity2.txt,"~",25
vis tEntity2,1
}
if(type2.txt=="light")
@@ -876,7 +870,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -885,7 +879,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -897,7 +891,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="button")
{
@@ -907,7 +901,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="delete"||type2.txt=="")
{

View File

@@ -72,6 +72,20 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 56
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 55
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 4
@@ -634,14 +648,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -688,14 +695,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1557,64 +1557,58 @@ Timer tmSerial
{
//heading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//currentTemp
spstr strCommand.txt,tCurTemp.txt,"~",4
spstr strCommand.txt,tCurTemp.txt,"~",15
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,xTempDest1.val,0,0
xTempDest.val=xTempDest1.val
//status
spstr strCommand.txt,tStatus.txt,"~",6
spstr strCommand.txt,tStatus.txt,"~",17
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,xTempMin1.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,xTempMax1.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,xTempStep1.val,0,0
// disable all buttons
vis bt0,0
@@ -1626,137 +1620,137 @@ Timer tmSerial
vis bt6,0
vis bt7,0
//bt0
spstr strCommand.txt,bt0.txt,"~",10
spstr strCommand.txt,bt0.txt,"~",21
if(bt0.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
covx tTmp.txt,bt0.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,bt0.val,0,0
// save action
spstr strCommand.txt,va0.txt,"~",13
spstr strCommand.txt,va0.txt,"~",24
//enable
vis bt0,1
}
//bt1
spstr strCommand.txt,bt1.txt,"~",14
spstr strCommand.txt,bt1.txt,"~",25
if(bt1.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,bt1.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,bt1.val,0,0
// save action
spstr strCommand.txt,va1.txt,"~",17
spstr strCommand.txt,va1.txt,"~",28
//enable
vis bt1,1
}
//bt2
spstr strCommand.txt,bt2.txt,"~",18
spstr strCommand.txt,bt2.txt,"~",29
if(bt2.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,bt2.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,bt2.val,0,0
// save action
spstr strCommand.txt,va2.txt,"~",21
spstr strCommand.txt,va2.txt,"~",32
//enable
vis bt2,1
}
//bt3
spstr strCommand.txt,bt3.txt,"~",22
spstr strCommand.txt,bt3.txt,"~",33
if(bt3.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",23
spstr strCommand.txt,tTmp.txt,"~",34
covx tTmp.txt,bt3.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,bt3.val,0,0
// save action
spstr strCommand.txt,va3.txt,"~",25
spstr strCommand.txt,va3.txt,"~",36
//enable
vis bt3,1
}
//bt4
spstr strCommand.txt,bt4.txt,"~",26
spstr strCommand.txt,bt4.txt,"~",37
if(bt4.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",27
spstr strCommand.txt,tTmp.txt,"~",38
covx tTmp.txt,bt4.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,bt4.val,0,0
// save action
spstr strCommand.txt,va4.txt,"~",29
spstr strCommand.txt,va4.txt,"~",40
//enable
vis bt4,1
}
//bt5
spstr strCommand.txt,bt5.txt,"~",30
spstr strCommand.txt,bt5.txt,"~",41
if(bt5.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",31
spstr strCommand.txt,tTmp.txt,"~",42
covx tTmp.txt,bt5.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",32
spstr strCommand.txt,tTmp.txt,"~",43
covx tTmp.txt,bt5.val,0,0
// save action
spstr strCommand.txt,va5.txt,"~",33
spstr strCommand.txt,va5.txt,"~",44
//enable
vis bt5,1
}
//bt6
spstr strCommand.txt,bt6.txt,"~",34
spstr strCommand.txt,bt6.txt,"~",45
if(bt6.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",35
spstr strCommand.txt,tTmp.txt,"~",46
covx tTmp.txt,bt6.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,bt6.val,0,0
// save action
spstr strCommand.txt,va6.txt,"~",37
spstr strCommand.txt,va6.txt,"~",48
//enable
vis bt6,1
}
//bt7
spstr strCommand.txt,bt7.txt,"~",38
spstr strCommand.txt,bt7.txt,"~",49
if(bt7.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",39
spstr strCommand.txt,tTmp.txt,"~",50
covx tTmp.txt,bt7.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",40
spstr strCommand.txt,tTmp.txt,"~",51
covx tTmp.txt,bt7.val,0,0
// save action
spstr strCommand.txt,va7.txt,"~",41
spstr strCommand.txt,va7.txt,"~",52
//enable
vis bt7,1
}
//Text tCurTempLbl
spstr strCommand.txt,tCurTempLbl.txt,"~",42
spstr strCommand.txt,tCurTempLbl.txt,"~",53
//Text tStateLbl
spstr strCommand.txt,tStateLbl.txt,"~",43
spstr strCommand.txt,tStateLbl.txt,"~",54
//Text tALbl
//spstr strCommand.txt,tALbl.txt,"~",44
//spstr strCommand.txt,tALbl.txt,"~",55
//Text tCF
spstr strCommand.txt,tCF.txt,"~",45
spstr strCommand.txt,tCF.txt,"~",56
tCF1.txt=tCF.txt
tCF2.txt=tCF.txt
//Second Temperature
spstr strCommand.txt,tTmp.txt,"~",46
spstr strCommand.txt,tTmp.txt,"~",57
if(tTmp.txt!="")
{
covx tTmp.txt,xTempDest2.val,0,0
@@ -1774,8 +1768,8 @@ Timer tmSerial
vis tCF2,1
}
//Show btDetail
spstr strCommand.txt,tTmp.txt,"~",47
if(tTmp.txt=="1")
spstr strCommand.txt,tTmp.txt,"~",58
if(tTmp.txt!="1")
{
vis btDetail,1
}else

View File

@@ -15,9 +15,9 @@ popupNotify
257 Line(s) of event code
166 Unique line(s) of event code
cardChart
31 Component(s)
452 Line(s) of event code
296 Unique line(s) of event code
33 Component(s)
425 Line(s) of event code
290 Unique line(s) of event code
screensaver
47 Component(s)
411 Line(s) of event code
@@ -42,45 +42,45 @@ pageStartup
19 Component(s)
181 Line(s) of event code
129 Unique line(s) of event code
cardQR
34 Component(s)
398 Line(s) of event code
232 Unique line(s) of event code
pageTest
21 Component(s)
66 Line(s) of event code
64 Unique line(s) of event code
cardGrid
42 Component(s)
538 Line(s) of event code
300 Unique line(s) of event code
cardPower
43 Component(s)
439 Line(s) of event code
299 Unique line(s) of event code
cardAlarm
40 Component(s)
442 Line(s) of event code
262 Unique line(s) of event code
cardQR
32 Component(s)
425 Line(s) of event code
244 Unique line(s) of event code
44 Component(s)
511 Line(s) of event code
289 Unique line(s) of event code
cardMedia
59 Component(s)
637 Line(s) of event code
316 Unique line(s) of event code
popupTimer
42 Component(s)
512 Line(s) of event code
255 Unique line(s) of event code
cardThermo
55 Component(s)
555 Line(s) of event code
322 Unique line(s) of event code
cardMedia
57 Component(s)
660 Line(s) of event code
325 Unique line(s) of event code
cardPower
45 Component(s)
412 Line(s) of event code
289 Unique line(s) of event code
cardEntities
65 Component(s)
1185 Line(s) of event code
537 Unique line(s) of event code
67 Component(s)
1158 Line(s) of event code
526 Unique line(s) of event code
cardAlarm
42 Component(s)
415 Line(s) of event code
253 Unique line(s) of event code
cardThermo
57 Component(s)
528 Line(s) of event code
313 Unique line(s) of event code
Total
19 Page(s)
678 Component(s)
8429 Line(s) of event code
2132 Unique line(s) of event code
694 Component(s)
8217 Line(s) of event code
2124 Unique line(s) of event code

View File

@@ -63,6 +63,18 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -482,14 +494,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -514,14 +519,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -640,86 +638,80 @@ Timer tmSerial
{
//entn
spstr strCommand.txt,entn.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
spstr strCommand.txt,arm1.txt,"~",14
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
spstr strCommand.txt,va1.txt,"~",15
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
spstr strCommand.txt,arm2.txt,"~",16
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
spstr strCommand.txt,va2.txt,"~",17
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
spstr strCommand.txt,arm3.txt,"~",18
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
spstr strCommand.txt,va3.txt,"~",19
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
spstr strCommand.txt,arm4.txt,"~",20
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
spstr strCommand.txt,va4.txt,"~",21
//icon
spstr strCommand.txt,tIcon.txt,"~",11
spstr strCommand.txt,tIcon.txt,"~",22
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="disable")
{
vis b0,1
@@ -752,7 +744,7 @@ Timer tmSerial
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
tmFlash.en=1
@@ -761,13 +753,13 @@ Timer tmSerial
tmFlash.en=0
}
// extra button
spstr strCommand.txt,b9.txt,"~",15
spstr strCommand.txt,b9.txt,"~",26
if(b9.txt!="")
{
vis b9,1
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,b9.pco,0,0
spstr strCommand.txt,vaAddBtn.txt,"~",17
spstr strCommand.txt,vaAddBtn.txt,"~",28
}
}
if(tInstruction.txt=="time")

View File

@@ -49,6 +49,18 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -179,14 +191,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -211,14 +216,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -399,48 +397,42 @@ Timer tmSerial
if(tInstruction.txt=="entityUpd")
{
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,vaColorL.val,0,0
// prepare dark color
sys0=vaColorL.val>>11 // red
@@ -452,7 +444,7 @@ Timer tmSerial
//
// detect nValues and maxValue
vNValues.val=0
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
while(sya0>0)
{
@@ -463,7 +455,7 @@ Timer tmSerial
}
// next
vNValues.val++
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
}
//
@@ -478,7 +470,7 @@ Timer tmSerial
//
line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
spstr strCommand.txt,strTmp.txt,"~",5
spstr strCommand.txt,strTmp.txt,"~",16
sya1=0
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
@@ -511,7 +503,7 @@ Timer tmSerial
}
//
// y achis label
spstr strCommand.txt,tTmp.txt,"~",4
spstr strCommand.txt,tTmp.txt,"~",15
// tTmp.txt="Gas [kW]"
strlen tTmp.txt,sys1
sya1=sys1*12+m0.h-48/2
@@ -527,7 +519,7 @@ Timer tmSerial
vaValues.txt+="~"
}
// extract next entry
spstr strCommand.txt,tTmp.txt,"~",sys0+6
spstr strCommand.txt,tTmp.txt,"~",sys0+17
// calculate left
sys1=sys0*5*vaUnit.val
sys1+=vaLeft.val

View File

@@ -110,6 +110,18 @@ Variable (string) entn4
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -533,14 +545,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -565,14 +570,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1238,50 +1236,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis bUp1,0
@@ -1296,14 +1288,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",5
spstr strCommand.txt,tIcon1.txt,"~",16
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
if(type1.txt=="shutter")
@@ -1316,7 +1308,7 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",8
spstr strCommand.txt,tId.txt,"~",19
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1367,7 +1359,7 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -1384,7 +1376,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="button"||type1.txt=="input_sel")
{
@@ -1399,7 +1391,7 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="number")
{
@@ -1412,7 +1404,7 @@ Timer tmSerial
vis hSlider1,1
vis nNum1,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
//first value is current value
spstr bText1.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -1428,9 +1420,9 @@ Timer tmSerial
hSlider1.maxval=sys0
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis bUp2,0
@@ -1445,14 +1437,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",11
spstr strCommand.txt,tIcon2.txt,"~",22
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
if(type2.txt=="shutter")
@@ -1465,7 +1457,7 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",14
spstr strCommand.txt,tId.txt,"~",25
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1516,7 +1508,7 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -1533,7 +1525,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="button"||type2.txt=="input_sel")
{
@@ -1548,7 +1540,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="number")
{
@@ -1561,7 +1553,7 @@ Timer tmSerial
vis hSlider2,1
vis nNum2,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
//first value is current value
spstr bText2.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -1577,9 +1569,9 @@ Timer tmSerial
hSlider2.maxval=sys0
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis bUp3,0
@@ -1594,14 +1586,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon3.txt,"~",17
spstr strCommand.txt,tIcon3.txt,"~",28
vis tIcon3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
tIcon3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
if(type3.txt=="shutter")
@@ -1614,7 +1606,7 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",20
spstr strCommand.txt,tId.txt,"~",31
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1665,7 +1657,7 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,sys0,0,0
btOnOff3.val=sys0
}
@@ -1682,7 +1674,7 @@ Timer tmSerial
bText3.pco=65535
bText3.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="button"||type3.txt=="input_sel")
{
@@ -1697,7 +1689,7 @@ Timer tmSerial
bText3.pco=1374
bText3.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="number")
{
@@ -1710,7 +1702,7 @@ Timer tmSerial
vis hSlider3,1
vis nNum3,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
//first value is current value
spstr bText3.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -1726,9 +1718,9 @@ Timer tmSerial
hSlider3.maxval=sys0
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis bUp4,0
@@ -1743,14 +1735,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon4.txt,"~",23
spstr strCommand.txt,tIcon4.txt,"~",34
vis tIcon4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
tIcon4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
if(type4.txt=="shutter")
@@ -1763,7 +1755,7 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",26
spstr strCommand.txt,tId.txt,"~",37
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1814,7 +1806,7 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,sys0,0,0
btOnOff4.val=sys0
}
@@ -1831,7 +1823,7 @@ Timer tmSerial
bText4.pco=65535
bText4.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="button"||type4.txt=="input_sel")
{
@@ -1846,7 +1838,7 @@ Timer tmSerial
bText4.pco=1374
bText4.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="number")
{
@@ -1859,7 +1851,7 @@ Timer tmSerial
vis hSlider4,1
vis nNum4,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
//first value is current value
spstr bText4.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0

View File

@@ -82,11 +82,23 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Max. Text Size: 700
Variable (string) tSend
Attributes
@@ -519,14 +531,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -551,14 +556,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -693,50 +691,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -744,20 +736,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",5
spstr strCommand.txt,bEntity1.txt,"~",16
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -765,20 +757,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",11
spstr strCommand.txt,bEntity2.txt,"~",22
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -786,20 +778,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",17
spstr strCommand.txt,bEntity3.txt,"~",28
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -807,20 +799,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",23
spstr strCommand.txt,bEntity4.txt,"~",34
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
spstr strCommand.txt,type5.txt,"~",38
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
spstr strCommand.txt,entn5.txt,"~",39
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -828,20 +820,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",29
spstr strCommand.txt,bEntity5.txt,"~",40
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
spstr strCommand.txt,tTmp.txt,"~",41
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
spstr strCommand.txt,tEntity5.txt,"~",42
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
spstr strCommand.txt,type6.txt,"~",44
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
spstr strCommand.txt,entn6.txt,"~",45
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -849,14 +841,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",35
spstr strCommand.txt,bEntity6.txt,"~",46
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
spstr strCommand.txt,tEntity6.txt,"~",48
vis tEntity6,1
}
}

View File

@@ -86,6 +86,18 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -766,14 +778,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -798,14 +803,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -933,72 +931,66 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//title
spstr strCommand.txt,tTitle.txt,"~",4
spstr strCommand.txt,tTitle.txt,"~",15
//title farbe
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
if(tTmp.txt!="")
{
covx tTmp.txt,tTitle.pco,0,0
}
//author
spstr strCommand.txt,tAuthor.txt,"~",6
spstr strCommand.txt,tAuthor.txt,"~",17
//author farbe
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
if(tTmp.txt!="")
{
covx tTmp.txt,tAuthor.pco,0,0
}
//volume
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
hVolume.val=sys0
//icon
spstr strCommand.txt,tPlayPause.txt,"~",9
spstr strCommand.txt,tPlayPause.txt,"~",20
// on off button
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt=="disable")
{
vis t5,0
@@ -1008,7 +1000,7 @@ Timer tmSerial
covx tTmp.txt,t5.pco,0,0
}
// shuffel btn
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt=="disable")
{
vis tShuffle,0
@@ -1018,9 +1010,9 @@ Timer tmSerial
tShuffle.txt=tTmp.txt
}
// get Type
spstr strCommand.txt,type1.txt,"~",12
spstr strCommand.txt,type1.txt,"~",23
// get internal name
spstr strCommand.txt,entn1.txt,"~",13
spstr strCommand.txt,entn1.txt,"~",24
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -1028,20 +1020,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",14
spstr strCommand.txt,bEntity1.txt,"~",25
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",16
spstr strCommand.txt,tEntity1.txt,"~",27
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",18
spstr strCommand.txt,type2.txt,"~",29
// get internal name
spstr strCommand.txt,entn2.txt,"~",19
spstr strCommand.txt,entn2.txt,"~",30
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -1049,20 +1041,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",20
spstr strCommand.txt,bEntity2.txt,"~",31
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",21
spstr strCommand.txt,tTmp.txt,"~",32
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",22
spstr strCommand.txt,tEntity2.txt,"~",33
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",24
spstr strCommand.txt,type3.txt,"~",35
// get internal name
spstr strCommand.txt,entn3.txt,"~",25
spstr strCommand.txt,entn3.txt,"~",36
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -1070,20 +1062,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",26
spstr strCommand.txt,bEntity3.txt,"~",37
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",27
spstr strCommand.txt,tTmp.txt,"~",38
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",28
spstr strCommand.txt,tEntity3.txt,"~",39
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",30
spstr strCommand.txt,type4.txt,"~",41
// get internal name
spstr strCommand.txt,entn4.txt,"~",31
spstr strCommand.txt,entn4.txt,"~",42
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -1091,20 +1083,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",32
spstr strCommand.txt,bEntity4.txt,"~",43
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",33
spstr strCommand.txt,tTmp.txt,"~",44
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",34
spstr strCommand.txt,tEntity4.txt,"~",45
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",36
spstr strCommand.txt,type5.txt,"~",47
// get internal name
spstr strCommand.txt,entn5.txt,"~",37
spstr strCommand.txt,entn5.txt,"~",48
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -1112,20 +1104,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",38
spstr strCommand.txt,bEntity5.txt,"~",49
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",39
spstr strCommand.txt,tTmp.txt,"~",50
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",40
spstr strCommand.txt,tEntity5.txt,"~",51
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",42
spstr strCommand.txt,type6.txt,"~",53
// get internal name
spstr strCommand.txt,entn6.txt,"~",43
spstr strCommand.txt,entn6.txt,"~",54
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -1133,14 +1125,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",44
spstr strCommand.txt,bEntity6.txt,"~",55
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",45
spstr strCommand.txt,tTmp.txt,"~",56
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",46
spstr strCommand.txt,tEntity6.txt,"~",57
vis tEntity6,1
}
}
@@ -1208,6 +1200,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -57,6 +57,18 @@ Page cardPower
}
}
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -346,14 +358,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -378,14 +383,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -555,63 +553,57 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",7
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",9
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
@@ -624,15 +616,15 @@ Timer tmSerial
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",11
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",13
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
@@ -645,15 +637,15 @@ Timer tmSerial
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",15
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",17
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
@@ -666,15 +658,15 @@ Timer tmSerial
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",19
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",21
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
@@ -687,15 +679,15 @@ Timer tmSerial
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",22
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",23
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",25
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
@@ -708,15 +700,15 @@ Timer tmSerial
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",27
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",29
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1

View File

@@ -70,11 +70,23 @@ Variable (string) entn2
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 275
Max. Text Size: 400
Variable (string) tId
Attributes
@@ -187,14 +199,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -219,14 +224,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -446,52 +444,46 @@ Timer tmSerial
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
//tHeading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3
spstr strCommand.txt,vaQR.txt,"~",14
// get Type
spstr strCommand.txt,type1.txt,"~",4
spstr strCommand.txt,type1.txt,"~",15
// get internal name
spstr strCommand.txt,entn1.txt,"~",5
spstr strCommand.txt,entn1.txt,"~",16
if(type1.txt=="delete"||type1.txt=="")
{
vis btOnOff1,0
@@ -501,14 +493,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",6
spstr strCommand.txt,tIcon1.txt,"~",17
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",8
spstr strCommand.txt,tEntity1.txt,"~",19
vis tEntity1,1
}
if(type1.txt=="light")
@@ -516,7 +508,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -525,7 +517,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -537,7 +529,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
if(type1.txt=="button")
{
@@ -547,12 +539,12 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
// get Type
spstr strCommand.txt,type2.txt,"~",10
spstr strCommand.txt,type2.txt,"~",21
// get internal name
spstr strCommand.txt,entn2.txt,"~",11
spstr strCommand.txt,entn2.txt,"~",22
if(type2.txt=="delete"||type2.txt=="")
{
vis btOnOff2,0
@@ -562,14 +554,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",12
spstr strCommand.txt,tIcon2.txt,"~",23
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",14
spstr strCommand.txt,tEntity2.txt,"~",25
vis tEntity2,1
}
if(type2.txt=="light")
@@ -577,7 +569,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -586,7 +578,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -598,7 +590,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="button")
{
@@ -608,7 +600,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="delete"||type2.txt=="")
{

View File

@@ -63,6 +63,18 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -294,14 +306,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -326,14 +331,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -835,64 +833,58 @@ Timer tmSerial
{
//heading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//currentTemp
spstr strCommand.txt,tCurTemp.txt,"~",4
spstr strCommand.txt,tCurTemp.txt,"~",15
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,xTempDest1.val,0,0
xTempDest.val=xTempDest1.val
//status
spstr strCommand.txt,tStatus.txt,"~",6
spstr strCommand.txt,tStatus.txt,"~",17
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,xTempMin1.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,xTempMax1.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,xTempStep1.val,0,0
// disable all buttons
vis bt0,0
@@ -904,137 +896,137 @@ Timer tmSerial
vis bt6,0
vis bt7,0
//bt0
spstr strCommand.txt,bt0.txt,"~",10
spstr strCommand.txt,bt0.txt,"~",21
if(bt0.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
covx tTmp.txt,bt0.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,bt0.val,0,0
// save action
spstr strCommand.txt,va0.txt,"~",13
spstr strCommand.txt,va0.txt,"~",24
//enable
vis bt0,1
}
//bt1
spstr strCommand.txt,bt1.txt,"~",14
spstr strCommand.txt,bt1.txt,"~",25
if(bt1.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,bt1.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,bt1.val,0,0
// save action
spstr strCommand.txt,va1.txt,"~",17
spstr strCommand.txt,va1.txt,"~",28
//enable
vis bt1,1
}
//bt2
spstr strCommand.txt,bt2.txt,"~",18
spstr strCommand.txt,bt2.txt,"~",29
if(bt2.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,bt2.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,bt2.val,0,0
// save action
spstr strCommand.txt,va2.txt,"~",21
spstr strCommand.txt,va2.txt,"~",32
//enable
vis bt2,1
}
//bt3
spstr strCommand.txt,bt3.txt,"~",22
spstr strCommand.txt,bt3.txt,"~",33
if(bt3.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",23
spstr strCommand.txt,tTmp.txt,"~",34
covx tTmp.txt,bt3.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,bt3.val,0,0
// save action
spstr strCommand.txt,va3.txt,"~",25
spstr strCommand.txt,va3.txt,"~",36
//enable
vis bt3,1
}
//bt4
spstr strCommand.txt,bt4.txt,"~",26
spstr strCommand.txt,bt4.txt,"~",37
if(bt4.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",27
spstr strCommand.txt,tTmp.txt,"~",38
covx tTmp.txt,bt4.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,bt4.val,0,0
// save action
spstr strCommand.txt,va4.txt,"~",29
spstr strCommand.txt,va4.txt,"~",40
//enable
vis bt4,1
}
//bt5
spstr strCommand.txt,bt5.txt,"~",30
spstr strCommand.txt,bt5.txt,"~",41
if(bt5.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",31
spstr strCommand.txt,tTmp.txt,"~",42
covx tTmp.txt,bt5.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",32
spstr strCommand.txt,tTmp.txt,"~",43
covx tTmp.txt,bt5.val,0,0
// save action
spstr strCommand.txt,va5.txt,"~",33
spstr strCommand.txt,va5.txt,"~",44
//enable
vis bt5,1
}
//bt6
spstr strCommand.txt,bt6.txt,"~",34
spstr strCommand.txt,bt6.txt,"~",45
if(bt6.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",35
spstr strCommand.txt,tTmp.txt,"~",46
covx tTmp.txt,bt6.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,bt6.val,0,0
// save action
spstr strCommand.txt,va6.txt,"~",37
spstr strCommand.txt,va6.txt,"~",48
//enable
vis bt6,1
}
//bt7
spstr strCommand.txt,bt7.txt,"~",38
spstr strCommand.txt,bt7.txt,"~",49
if(bt7.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",39
spstr strCommand.txt,tTmp.txt,"~",50
covx tTmp.txt,bt7.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",40
spstr strCommand.txt,tTmp.txt,"~",51
covx tTmp.txt,bt7.val,0,0
// save action
spstr strCommand.txt,va7.txt,"~",41
spstr strCommand.txt,va7.txt,"~",52
//enable
vis bt7,1
}
//Text tCurTempLbl
spstr strCommand.txt,tCurTempLbl.txt,"~",42
spstr strCommand.txt,tCurTempLbl.txt,"~",53
//Text tStateLbl
spstr strCommand.txt,tStateLbl.txt,"~",43
spstr strCommand.txt,tStateLbl.txt,"~",54
//Text tALbl
//spstr strCommand.txt,tALbl.txt,"~",44
//spstr strCommand.txt,tALbl.txt,"~",55
//Text tCF
spstr strCommand.txt,tCF.txt,"~",45
spstr strCommand.txt,tCF.txt,"~",56
tCF1.txt=tCF.txt
tCF2.txt=tCF.txt
//Second Temperature
spstr strCommand.txt,tTmp.txt,"~",46
spstr strCommand.txt,tTmp.txt,"~",57
if(tTmp.txt!="")
{
covx tTmp.txt,xTempDest2.val,0,0
@@ -1052,8 +1044,8 @@ Timer tmSerial
vis tCF2,1
}
//Show btDetail
spstr strCommand.txt,tTmp.txt,"~",47
if(tTmp.txt=="1")
spstr strCommand.txt,tTmp.txt,"~",58
if(tTmp.txt!="1")
{
vis btDetail,1
}else

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1,2 @@
ha_api = None
mqtt_api = None

View File

@@ -1,4 +1,6 @@
from itertools import pairwise
import uuid
import apis
class Entity(object):
@@ -20,8 +22,11 @@ class Entity(object):
self.entity_input_config = entity_input_config
class Card(object):
def __init__(self, card_input_config, pos=None):
self.pos = pos
def __init__(self, card_input_config, hidden=False):
self.uuid = f"uuid.{uuid.uuid4().hex}"
self.uuid_prev = None
self.uuid_next = None
self.hidden = hidden
self.raw_config = card_input_config
self.cardType = card_input_config.get("type", "unknown")
self.title = card_input_config.get("title", "unknown")
@@ -35,7 +40,7 @@ class Card(object):
for e in card_input_config.get("entities", []):
self.entities.append(Entity(e))
self.id = f"{self.cardType}_{self.key}".replace(".","_").replace("~","_").replace(" ","_")
#self._ha_api.log(f"Created Card {self.cardType} with pos {pos} and id {self.id}")
#self._ha_api.log(f"Created Card {self.cardType} and id {self.id}")
def get_entity_names(self):
entityIds = []
@@ -60,7 +65,7 @@ class Card(object):
entitys = []
if self.entity is not None:
entitys.append(self.entity)
else:
if self.entities:
for e in self.entities:
entitys.append(e)
return entitys
@@ -81,7 +86,6 @@ class LuiBackendConfig(object):
self._config = {}
self._config_cards = []
self._config_screensaver = None
self._config_hidden_cards = []
self._DEFAULT_CONFIG = {
'panelRecvTopic': "tele/tasmota_your_mqtt_topic/RESULT",
@@ -148,20 +152,35 @@ class LuiBackendConfig(object):
self._config = self.dict_recursive_update(inconfig, self._DEFAULT_CONFIG)
apis.ha_api.log("Loaded config: %s", self._config)
# parse cards displayed on panel
pos = 0
# parse cards
for card in self.get("cards"):
self._config_cards.append(Card(card, pos))
pos = pos + 1
self._config_cards.append(Card(card))
# setup prev and next uuids
top_level_cards = filter(lambda card: not card.hidden, self._config_cards)
first_card = None
last_card = None
for cur, next in pairwise(top_level_cards):
if first_card is None:
first_card = cur
last_card = next
cur.uuid_next = next.uuid
next.uuid_prev = cur.uuid
# if there is only one top level card first and last card will be none
if first_card and last_card:
first_card.uuid_prev = last_card.uuid
last_card.uuid_next = first_card.uuid
# parse screensaver
self._config_screensaver = Card(self.get("screensaver"))
# parse hidden pages that can be accessed through navigate
# parse hidden cards
for card in self.get("hiddenCards"):
self._config_hidden_cards.append(Card(card))
self._config_cards.append(Card(card, hidden=True))
# all entites sorted by generated key, to be able to use short identifiers
self._config_entites_table = {x.uuid: x for x in self.get_all_entitys()}
self._config_card_table = {x.uuid: x for x in self._config_cards}
def get(self, name):
path = name.split(".")
@@ -182,8 +201,6 @@ class LuiBackendConfig(object):
entities = []
for card in self._config_cards:
entities.extend(card.get_entity_names())
for card in self._config_hidden_cards:
entities.extend(card.get_entity_names())
entities.extend(self._config_screensaver.get_entity_names())
return entities
@@ -191,21 +208,35 @@ class LuiBackendConfig(object):
entities = []
for card in self._config_cards:
entities.extend(card.get_entity_list())
for card in self._config_hidden_cards:
entities.extend(card.get_entity_list())
return entities
def getCard(self, pos):
card = self._config_cards[pos%len(self._config_cards)]
return card
def searchCard(self, id):
id = id.replace("navigate.", "")
if id.startswith("uuid"):
return self.get_card_by_uuid(id)
# legacy type_key
for card in self._config_cards:
if card.id == id:
return card
if self._config_screensaver.id == id:
return self._config_screensaver
for card in self._config_hidden_cards:
if card.id == id:
# just search for key
for card in self._config_cards:
if card.key == id:
return card
if self._config_screensaver.key == id:
return self._config_screensaver
def get_default_card(self):
defaultCard = self._config.get("screensaver.defaultCard")
defaultCard = apis.ha_api.render_template(defaultCard)
if defaultCard is not None:
defaultCard = self.search_card(defaultCard)
if defaultCard is not None:
return defaultCard
else:
return self._config_cards[0]
def get_card_by_uuid(self, uuid):
return self._config_card_table.get(uuid)

View File

@@ -1,9 +1,7 @@
import datetime
import apis
from helper import scale, pos_to_color, rgb_dec565
from pages import LuiPagesGen
class LuiController(object):
@@ -15,7 +13,7 @@ class LuiController(object):
self._current_card = self._config._config_screensaver
self._previous_cards = []
# first card (default, after startup)
self._previous_cards.append(self._config.getCard(0))
self._previous_cards.append(self._config.get_default_card())
self._pages_gen = LuiPagesGen(config, send_mqtt_msg)
@@ -207,9 +205,9 @@ class LuiController(object):
if dstCard is not None:
self._previous_cards = []
self._previous_cards.append(dstCard)
# set _previous_cards to first page in case it's empty
# set _previous_cards to default page in case it's empty
if len(self._previous_cards) == 0:
self._previous_cards.append(self._config.getCard(0))
self._previous_cards.append(self._config.get_default_card())
# 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()
@@ -227,28 +225,14 @@ class LuiController(object):
if button_type == "bExit":
self._pages_gen.render_card(self._current_card)
if button_type == "bUp":
if self._previous_cards:
self._current_card = self._previous_cards.pop()
else:
self._current_card = self._config.getCard(0)
self._pages_gen.render_card(self._current_card)
if button_type == "bHome":
if self._previous_cards:
self._current_card = self._previous_cards[0]
self._previous_cards.clear()
else:
self._current_card = self._config.getCard(0)
self._pages_gen.render_card(self._current_card)
#if button_type == "bHome":
# if self._previous_cards:
# self._current_card = self._previous_cards[0]
# self._previous_cards.clear()
# else:
# self._current_card = self._config.getCard(0)
# self._pages_gen.render_card(self._current_card)
if button_type == "bNext":
card = self._config.getCard(self._current_card.pos+1)
self._current_card = card
self._pages_gen.render_card(card)
if button_type == "bPrev":
card = self._config.getCard(self._current_card.pos-1)
self._current_card = card
self._pages_gen.render_card(card)
elif entity_id == "updateDisplayNoYes" and value == "no":
self._pages_gen.render_card(self._current_card)
@@ -295,14 +279,25 @@ class LuiController(object):
entity_id = le.entityId
if entity_id.startswith('navigate'):
# internal navigation for next/prev
if entity_id.startswith('navigate.uuid'):
dstCard = self._config.get_card_by_uuid(entity_id.replace('navigate.',''))
# internal for navigation to nested pages
else:
dstCard = self._config.searchCard(entity_id)
if dstCard is not None:
if dstCard.hidden:
self._previous_cards.append(self._current_card)
self._current_card = dstCard
self._pages_gen.render_card(self._current_card)
else:
apis.ha_api.log(f"No page with key {entity_id} found")
if entity_id.startswith('navUp'):
if self._previous_cards:
self._current_card = self._previous_cards.pop()
else:
self._current_card = self._config.get_default_card()
self._pages_gen.render_card(self._current_card)
elif entity_id.startswith('scene'):
apis.ha_api.get_entity(entity_id).call_service("turn_on")
elif entity_id.startswith('script'):

View File

@@ -1,5 +1,6 @@
import colorsys
import math
import apis
def scale(val, src, dst):
"""
@@ -37,6 +38,8 @@ def rgb_brightness(rgb_color, brightness):
return [int(red), int(green), int(blue)]
def rgb_dec565(rgb_color):
if type(rgb_color) is str:
rgb_color = apis.ha_api.render_template(rgb_color)
red = rgb_color[0]
green = rgb_color[1]
blue = rgb_color[2]

View File

@@ -1,18 +1,19 @@
import json
import apis
class LuiMqttListener(object):
def __init__(self, mqtt_api, topic, controller, updater):
def __init__(self, topic, controller, updater):
self._controller = controller
self._updater = updater
self._mqtt_api = mqtt_api
# Setup, mqtt subscription and callback
mqtt_api.mqtt_subscribe(topic=topic)
mqtt_api.listen_event(self.mqtt_event_callback, "MQTT_MESSAGE", topic=topic, namespace='mqtt')
apis.mqtt_api.mqtt_subscribe(topic=topic)
apis.mqtt_api.listen_event(self.mqtt_event_callback, "MQTT_MESSAGE", topic=topic, namespace='mqtt')
def mqtt_event_callback(self, event_name, data, kwargs):
self._mqtt_api.log(f'MQTT callback for: {data}')
apis.mqtt_api.log(f'MQTT callback for: {data}')
# Parse Json Message from Tasmota and strip out message from nextion display
data = json.loads(data["payload"])
if("nlui_driver_version" in data):
@@ -22,7 +23,7 @@ class LuiMqttListener(object):
if("CustomRecv" not in data):
return
msg = data["CustomRecv"]
self._mqtt_api.log(f"Received Message from Screen: {msg}")
apis.mqtt_api.log(f"Received Message from Screen: {msg}")
# Split message into parts seperated by ","
msg = msg.split(",")
# run action based on received command
@@ -30,8 +31,6 @@ class LuiMqttListener(object):
if msg[1] == "startup":
self._updater.request_berry_driver_version()
display_firmware_version = int(msg[2])
model = None
if display_firmware_version >= 23:
model = msg[3]
self._updater.set_current_display_firmware_version(display_firmware_version, model)
# check for updates
@@ -60,9 +59,8 @@ class LuiMqttListener(object):
self._controller.detail_open(msg[2], msg[3])
class LuiMqttSender(object):
def __init__(self, api, mqttapi, topic_send):
def __init__(self, api, topic_send):
self._ha_api = api
self._mqtt_api = mqttapi
self._topic_send = topic_send
self._prev_msg = ""
@@ -73,4 +71,4 @@ class LuiMqttSender(object):
if topic is None:
topic = self._topic_send
self._ha_api.log(f"Sending MQTT Message: {msg}")
self._mqtt_api.mqtt_publish(topic, msg)
apis.mqtt_api.mqtt_publish(topic, msg)

View File

@@ -9,6 +9,7 @@ from icons import get_icon, get_icon_ha
from icons import get_action_icon
from helper import scale, rgb_dec565, rgb_brightness, get_attr_safe, convert_temperature
from localization import get_translation
from config import Entity
# check Babel
import importlib
@@ -25,14 +26,17 @@ class LuiPagesGen(object):
def get_entity_color(self, entity, ha_type=None, overwrite=None):
if overwrite is not None:
if type(overwrite) is list:
if type(overwrite) in [str, list]:
return rgb_dec565(overwrite)
if type(overwrite) is dict:
state = entity.state
for overwrite_state, overwrite_val in overwrite.items():
if overwrite_state == state:
return rgb_dec565(overwrite_val)
if isinstance(entity, str):
default_color = rgb_dec565([68, 115, 158])
return default_color
else:
attr = entity.attributes
default_color_on = rgb_dec565([253, 216, 53])
default_color_off = rgb_dec565([68, 115, 158])
@@ -190,6 +194,9 @@ class LuiPagesGen(object):
color = self.get_entity_color(entity, ha_type=entityType, overwrite=statusIcon.get("color", None))
status_res += f"~{icon}~{color}"
altfont += f'~{statusIcon.get("altFont", "")}'
else:
status_res += "~~"
altfont += "~"
self._send_mqtt_msg(f"weatherUpdate~{icon_cur}~{text_cur}{weather_res}{altLayout}{status_res}{altfont}")
# send color if configured in screensaver
@@ -198,7 +205,7 @@ class LuiPagesGen(object):
state = None
self._send_mqtt_msg(get_screensaver_color_output(theme=theme, state=state))
def generate_entities_item(self, item, cardType, temp_unit=""):
def generate_entities_item(self, item, cardType="cardGrid", temp_unit=""):
entityId = item.entityId
icon = item.iconOverride
colorOverride = item.colorOverride
@@ -208,6 +215,21 @@ class LuiPagesGen(object):
entityType = entityId.split(".")[0]
apis.ha_api.log(f"Generating item for {entityId} with type {entityType}", level="DEBUG")
status_entity = apis.ha_api.get_entity(item.status) if item.status and apis.ha_api.entity_exists(item.status) else None
status_state = status_entity.state if status_entity is not None else None
entity = apis.ha_api.get_entity(entityId) if apis.ha_api.entity_exists(entityId) else None
entity_state = entity.state if entity is not None else None
state = status_state if status_state is not None else entity_state
if state is not None:
if item.condState is not None and item.condState != state:
return ""
if item.condStateNot is not None and item.condStateNot == state:
return ""
# Internal types
if entityType == "delete":
return f"~{entityType}~~~~~"
@@ -215,19 +237,18 @@ class LuiPagesGen(object):
page_search_res = self._config.searchCard(entityId)
if page_search_res is not None:
icon_res = get_icon_ha(entityId, overwrite=icon)
status_entity = None
name = name if name is not None else page_search_res.title
text = get_translation(self._locale, "frontend.ui.card.button.press")
if item.status is not None and apis.ha_api.entity_exists(item.status):
status_entity = apis.ha_api.get_entity(item.status)
if status_entity:
icon_res = get_icon_ha(item.status, overwrite=icon)
icon_color = self.get_entity_color(status_entity, ha_type=item.status.split(".")[0], overwrite=colorOverride)
if item.status.startswith("sensor") and cardType == "cardGrid":
if item.status.startswith("sensor") and cardType == "cardGrid" and item.iconOverride is None:
icon_res = status_entity.state[:4]
if icon_res[-1] == ".":
icon_res = icon_res[:-1]
else:
icon_color = rgb_dec565(colorOverride) if colorOverride is not None and type(colorOverride) is list else 17299
#icon_color = rgb_dec565(colorOverride) if colorOverride is not None and type(colorOverride) is list else 17299
icon_color = self.get_entity_color(entityId, overwrite=colorOverride)
return f"~button~{entityId}~{icon_res}~{icon_color}~{name}~{text}"
else:
return f"~text~{entityId}~{get_icon_id('alert-circle-outline')}~17299~page not found~"
@@ -241,26 +262,20 @@ class LuiPagesGen(object):
icon_id = get_icon("script", overwrite=icon)
text = get_translation(self._locale, "frontend.ui.card.script.run")
icon_color = icon_color = rgb_dec565(colorOverride) if colorOverride is not None and type(colorOverride) is list else 17299
if item.status is not None and apis.ha_api.entity_exists(item.status):
status_entity = apis.ha_api.get_entity(item.status)
if status_entity:
icon_id = get_icon_ha(item.status, overwrite=icon)
icon_color = self.get_entity_color(status_entity, ha_type=item.status.split(".")[0], overwrite=colorOverride)
if item.status.startswith("sensor") and cardType == "cardGrid":
if item.status.startswith("sensor") and cardType == "cardGrid" and item.iconOverride is None:
icon_id = status_entity.state[:4]
if icon_id[-1] == ".":
icon_id = icon_id[:-1]
return f"~button~{uuid}~{icon_id}~{icon_color}~{name}~{text}"
if not apis.ha_api.entity_exists(entityId):
if entity is None:
return f"~text~{entityId}~{get_icon_id('alert-circle-outline')}~17299~Not found check~ apps.yaml"
# HA Entities
entity = apis.ha_api.get_entity(entityId)
# check state for if a condition is defined
if item.condState is not None and item.condState == entity.state:
return ""
if item.condStateNot is not None and item.condStateNot != entity.state:
return ""
# HA Entities
# common res vars
entityTypePanel = "text"
icon_id = get_icon_ha(entityId, overwrite=icon)
@@ -386,13 +401,12 @@ class LuiPagesGen(object):
command += self.generate_entities_item(item, cardType, tempUnit)
self._send_mqtt_msg(command)
def generate_thermo_page(self, navigation, title, entity, temp_unit, overwrite_supported_modes):
def generate_thermo_page(self, navigation, title, entity, temp_unit, entities, overwrite_supported_modes):
item = entity.entityId
if(temp_unit == "celsius"):
temperature_unit_icon = get_icon_id("temperature-celsius")
temperature_unit = "°C"
else:
temperature_unit_icon = get_icon_id("temperature-fahrenheit")
temperature_unit = "°F"
@@ -400,83 +414,78 @@ class LuiPagesGen(object):
if not apis.ha_api.entity_exists(item):
command = f"entityUpd~Not found~{navigation}~{item}~check~220~apps.yaml~150~300~5~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Please~your~~"
else:
entity = apis.ha_api.get_entity(item)
heading = title if title != "unknown" else entity.attributes.friendly_name
current_temp = get_attr_safe(entity, "current_temperature", "")
dest_temp = get_attr_safe(entity, "temperature", None)
ha_entity = apis.ha_api.get_entity(item)
heading = title if title != "unknown" else ha_entity.attributes.friendly_name
current_temp = get_attr_safe(ha_entity, "current_temperature", "")
dest_temp = get_attr_safe(ha_entity, "temperature", None)
dest_temp2 = ""
if dest_temp is None:
dest_temp = get_attr_safe(entity, "target_temp_high", 0)
dest_temp2 = get_attr_safe(entity, "target_temp_low", None)
dest_temp = get_attr_safe(ha_entity, "target_temp_high", 0)
dest_temp2 = get_attr_safe(ha_entity, "target_temp_low", None)
if dest_temp2 != None and dest_temp2 != "null":
dest_temp2 = int(dest_temp2*10)
else:
dest_temp2 = ""
dest_temp = int(dest_temp*10)
hvac_action = get_attr_safe(entity, "hvac_action", "")
hvac_action = get_attr_safe(ha_entity, "hvac_action", "")
state_value = ""
if hvac_action != "":
state_value = get_translation(self._locale, f"frontend.state_attributes.climate.hvac_action.{hvac_action}")
state_value += "\r\n("
state_value += get_translation(self._locale, f"backend.component.climate.state._.{entity.state}")
state_value += get_translation(self._locale, f"backend.component.climate.state._.{ha_entity.state}")
if hvac_action != "":
state_value += ")"
min_temp = int(get_attr_safe(entity, "min_temp", 0)*10)
max_temp = int(get_attr_safe(entity, "max_temp", 0)*10)
step_temp = int(get_attr_safe(entity, "target_temp_step", 0.5)*10)
min_temp = int(get_attr_safe(ha_entity, "min_temp", 0)*10)
max_temp = int(get_attr_safe(ha_entity, "max_temp", 0)*10)
step_temp = int(get_attr_safe(ha_entity, "target_temp_step", 0.5)*10)
icon_res_list = []
icon_res = ""
hvac_modes = get_attr_safe(entity, "hvac_modes", [])
currently_translation = get_translation(self._locale, "frontend.ui.card.climate.currently")
state_translation = get_translation(self._locale, "frontend.ui.panel.config.devices.entities.state")
detailPage = ""
if any(x in ["preset_modes", "swing_modes", "fan_modes"] for x in ha_entity.attributes):
detailPage = "enable"
#hvac_modes = get_attr_safe(ha_entity, "hvac_modes", [])
#if overwrite_supported_modes is not None:
# hvac_modes = overwrite_supported_modes
#for mode in hvac_modes:
# icon_id = get_icon_ha(item, stateOverwrite=mode)
# color_on = 64512
# if mode in ["auto", "heat_cool"]:
# color_on = 1024
# if mode == "heat":
# color_on = 64512
# if mode == "off":
# color_on = 35921
# if mode == "cool":
# color_on = 11487
# if mode == "dry":
# color_on = 60897
# if mode == "fan_only":
# color_on = 35921
# state = 0
# if(mode == ha_entity.state):
# state = 1
item_str = ""
for eitem in entities:
item_str += self.generate_entities_item(eitem, "cardGrid")
hvac_modes = get_attr_safe(ha_entity, "hvac_modes", [])
if overwrite_supported_modes is not None:
hvac_modes = overwrite_supported_modes
for mode in hvac_modes:
icon_id = get_icon_ha(item, stateOverwrite=mode)
color_on = 64512
if mode in ["auto", "heat_cool"]:
color_on = 1024
if mode == "heat":
color_on = 64512
if mode == "off":
color_on = 35921
if mode == "cool":
color_on = 11487
if mode == "dry":
color_on = 60897
if mode == "fan_only":
color_on = 35921
state = 0
if(mode == entity.state):
state = 1
item_str += self.generate_entities_item(entity, "cardGrid")
icon_res_list.append(f"~{icon_id}~{color_on}~{state}~{mode}")
icon_res = "".join(icon_res_list)
if len(icon_res_list) == 1:
icon_res = "~"*4 + icon_res_list[0] + "~"*4*6
elif len(icon_res_list) == 2:
icon_res = "~"*4*2 + icon_res_list[0] + "~"*4*2 + icon_res_list[1] + "~"*4*2
elif len(icon_res_list) == 3:
icon_res = "~"*4*2 + icon_res_list[0] + "~"*4 + icon_res_list[1] + "~"*4 + icon_res_list[2] + "~"*4
elif len(icon_res_list) == 4:
icon_res = "~"*4 + icon_res_list[0] + "~"*4 + icon_res_list[1] + "~"*4 + icon_res_list[2] + "~"*4 + icon_res_list[3]
elif len(icon_res_list) >= 5:
icon_res = "~"*4 + "".join(icon_res_list) + "~"*4*(7-len(icon_res_list))
currently_translation = get_translation(self._locale, "frontend.ui.card.climate.currently")
state_translation = get_translation(self._locale, "frontend.ui.panel.config.devices.entities.state")
action_translation = get_translation(self._locale, "frontend.ui.card.climate.operation").replace(' ','\r\n')
detailPage = ""
if any(x in ["preset_modes", "swing_modes", "fan_modes"] for x in entity.attributes):
detailPage = "1"
command = f"entityUpd~{heading}~{navigation}~{item}~{current_temp} {temperature_unit}~{dest_temp}~{state_value}~{min_temp}~{max_temp}~{step_temp}{icon_res}~{currently_translation}~{state_translation}~{action_translation}~{temperature_unit_icon}~{dest_temp2}~{detailPage}"
command = f"entityUpd~{heading}~{navigation}~{item}~{current_temp} {temperature_unit}~{dest_temp}~{state_value}~{min_temp}~{max_temp}~{step_temp}~{currently_translation}~{state_translation}~{temperature_unit_icon}~{dest_temp2}~{detailPage}{item_str}"
self._send_mqtt_msg(command)
def generate_media_page(self, navigation, title, entity, entities, mediaBtn):
entityId = entity.entityId
if entity.status is not None:
@@ -629,19 +638,33 @@ class LuiPagesGen(object):
self._send_mqtt_msg(command)
def render_card(self, card, send_page_type=True):
apis.ha_api.log(f"Started rendering of page {card.pos} with type {card.cardType}")
l = 1
r = 1
l = self.generate_entities_item(Entity(
{
'entity': f'navigate.{card.uuid_prev}',
'icon': 'mdi:arrow-left-bold',
'color': [255, 255, 255],
}
))[1:]
r = self.generate_entities_item(Entity(
{
'entity': f'navigate.{card.uuid_next}',
'icon': 'mdi:arrow-right-bold',
'color': [255, 255, 255],
}
))[1:]
if len(self._config._config_cards) == 1:
l = 0
r = 0
if card.pos is None:
l = 2
r = 0
if self._config.get("homeButton"):
r = 2
navigation = f"{l}|{r}"
l = "delete~~~~~"
r = "delete~~~~~"
if card.hidden:
l = f"x~navUp~{get_icon_id('mdi:arrow-up-bold')}~65535~~"
r = "delete~~~~~"
# r = 0
# if self._config.get("homeButton"):
# r = 2
navigation = f"{l}~{r}"
# Switch to page
if send_page_type:

View File

@@ -58,7 +58,11 @@
"eco": "Eco",
"home": "En casa",
"none": "Ninguno",
"sleep": "Dormir"
"sleep": "Dormir",
"manual": "Manual",
"programming": "Programado",
"temporary_manual": "Temporal",
"holiday": "Vacaciones"
}
},
"humidifier": {

View File

@@ -5,43 +5,43 @@ from luibackend.controller import LuiController
from luibackend.mqtt import LuiMqttListener, LuiMqttSender
from luibackend.updater import Updater
import apis
class NsPanelLovelaceUIManager(hass.Hass):
def initialize(self):
self.log('Starting')
mqtt_api = self._mqtt_api = self.get_plugin_api("MQTT")
apis.ha_api = self
apis.mqtt_api = self.get_plugin_api("MQTT")
cfg = self._cfg = LuiBackendConfig(self, self.args["config"])
topic_send = cfg.get("panelSendTopic")
mqttsend = LuiMqttSender(self, mqtt_api, topic_send)
topic_recv = cfg.get("panelRecvTopic")
mqttsend = LuiMqttSender(self, topic_send)
# Request Tasmota Driver Version
mqtt_api.mqtt_publish(topic_send.replace("CustomSend", "GetDriverVersion"), "x")
apis.mqtt_api.mqtt_publish(topic_send.replace("CustomSend", "GetDriverVersion"), "x")
controller = LuiController(cfg, mqttsend.send_mqtt_msg)
desired_tasmota_driver_version = 8
desired_display_firmware_version = 46
version = "v3.7.0"
model = cfg.get("model")
if model == "us-l":
# us landscape version
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-l-{version}.tft"
elif model == "us-p":
# us portrait version
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-p-{version}.tft"
else:
# eu version
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
desired_tasmota_driver_version = 7
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"
mode = cfg.get("updateMode")
topic_send = cfg.get("panelSendTopic")
updater = Updater(self.log, mqttsend.send_mqtt_msg, topic_send, mode, desired_display_firmware_version, model, desired_display_firmware_url, desired_tasmota_driver_version, desired_tasmota_driver_url)
topic_recv = cfg.get("panelRecvTopic")
LuiMqttListener(mqtt_api, topic_recv, controller, updater)
LuiMqttListener(topic_recv, controller, updater)
self.log('Started')

View File

@@ -45,6 +45,11 @@ It is also possible to configure different color overwrites per state:
"on": [255,0,0]
"off": [0,0,255]
```
Dynamic color overwrites using homeassistant templates:
```yaml
color: '{{iif(states("binary_sensor.test")=="on", "[0,255,0]", "[255,165,0]")}}'
```
It is also possible to use text instead of icons with `text:X`

View File

@@ -24,11 +24,13 @@ After a reboot of tasmota your screen will light up with the stock display firmw
## Upload Berry Driver to Tasmota
1. Download the autoexec.be from the repository: [Berry Driver](https://github.com/joBr99/nspanel-lovelace-ui/blob/main/tasmota/autoexec.be)
Go to `Consoles` > `Console` in Tasmota and execute the following command:
2. Go to `Consoles` > `Manage File System` in Tasmota and upload the previously downloaded file.
```
Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1
```
3. Restart your NSPanel
This will download the autoexec.be file from the repository and restart tasmota.
## Flash Firmware to Nextion Screen
@@ -44,10 +46,6 @@ US Version Landscape: `FlashNextion http://nspanel.pky.eu/lui-us-l-release.tft`
After sending the command, the screen should show a progress bar. The flashing progress takes around 5 minutes.
> ⚠️: **If you are getting an error message with `[bytes('8080808080808080808080000` please try to downgrade tasmota to 12.2.0 (http://ota.tasmota.com/tasmota32/release-12.2.0/tasmota32-nspanel.bin).
>
> Please leave a comment on the following issue in both cases (working or not), since this isn't reproducable at the moment :/ https://github.com/joBr99/nspanel-lovelace-ui/issues/601**
Note: For the US Version Users - keep in mind that you need to add the model config option to your apps.yaml later, more details on config overview page

View File

@@ -24,11 +24,12 @@ After a reboot of tasmota your screen will light up with the stock display firmw
## Upload Berry Driver to Tasmota
1. Download the autoexec.be from the repository: [Berry Driver](https://github.com/joBr99/nspanel-lovelace-ui/blob/main/tasmota/autoexec.be)
Go to `Consoles` > `Console` in Tasmota and execute the following command:
2. Go to `Consoles` > `Manage File System` in Tasmota and upload the previously downloaded file.
```
Backlog UrlFetch https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1
```
3. Restart your NSPanel
## Flash Firmware to Nextion Screen

View File

@@ -1,6 +1,6 @@
# Subpages
You can configure entities with with the prefix `navigate`, that are navigating to cards, in case it's hidden card, the navigation items will change and the arrow is bringing you back to the privious page.
You can configure entities with with the prefix `navigate`, that are navigating to cards, in case it's hidden card, the navigation items will change and the arrow is bringing you back to the previous page.
```yaml
- entity: navigate.cardGrid_testKey
@@ -22,6 +22,6 @@ will allow you to navigate to a cardGrid page with the configured key testKey
You can override the status of navigation items, to make them look like different entities.
```yaml
- entity: navigate.cardThermo_test
- entity: navigate.cardGrid_test
status: climate.test
```

View File

@@ -0,0 +1,74 @@
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);
}
});

View File

@@ -0,0 +1,385 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="h}CE-n1l`S|gRf(0K%./">i</variable>
<variable id="j5C=K+Z.E:im1#q:;A=6">Muell_JSON</variable>
<variable id="^:v=Yb?;aM;Z[}4jCF3-">Event</variable>
<variable id="9^)S?J=tLkC7cUWc-u9w">Color</variable>
</variables>
<block type="on_ext" id="aFeZac36,?)=rfMg%3T|" x="38" y="-287">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="GSzQ}epUa))me3m8yyuD">
<field name="oid">ical.1.data.table</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_for" id="wduAM(OBPzLJ@bfYAK5%">
<field name="VAR" id="h}CE-n1l`S|gRf(0K%./">i</field>
<value name="FROM">
<shadow type="math_number" id="HK~R2U|`xb$U5W+tsHpN">
<field name="NUM">0</field>
</shadow>
</value>
<value name="TO">
<shadow type="math_number" id="Ed[L/:1e9-cwxrRaZiIv">
<field name="NUM">3</field>
</shadow>
</value>
<value name="BY">
<shadow type="math_number" id="o@5kngFiPpvl5dGo@Q$9">
<field name="NUM">1</field>
</shadow>
</value>
<statement name="DO">
<block type="variables_set" id="0T)vK0k8aikvg7mF6XHo">
<field name="VAR" id="j5C=K+Z.E:im1#q:;A=6">Muell_JSON</field>
<value name="VALUE">
<block type="get_value" id="1~kG;UHn$nw2zzbfOIT]">
<field name="ATTR">val</field>
<field name="OID">ical.1.data.table</field>
</block>
</value>
<next>
<block type="control_ex" id="UAu,2OBRJp9~Nzyxouyu">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="J_|uu;{e44n5Z-;qE+hP">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="8/|eHqk))j9Po-O*mK`e">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="Zp8GRfdfXujkeM41=PeZ">
<field name="TEXT">0_userdata.0.Abfallkalender.</field>
</block>
</value>
<value name="ADD1">
<block type="math_arithmetic" id="$!!l@[eJ~4Kdb5/Imo.X">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="zaU15{yD43xkuY@?)RY(">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="o3pJ(+3KE~Co%u-dy.:W">
<field name="VAR" id="h}CE-n1l`S|gRf(0K%./">i</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="_LBb[#z%M$n0~1Y}~8w+">
<field name="NUM">1</field>
</shadow>
</value>
</block>
</value>
<value name="ADD2">
<block type="text" id="Vt#-b{iDzusQQx]#0%0,">
<field name="TEXT">.date</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="/y1w}eely@o.gl$]#)o=">
<field name="BOOL">TRUE</field>
</shadow>
<block type="get_attr" id="p~0A1{eb$lD~.9`9R4K)">
<value name="PATH">
<shadow type="text">
<field name="TEXT">0.date</field>
</shadow>
<block type="text_join" id="DDs!.^n(V7=A_TK}DFQt">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="k1+Dybgb:u2y9v57OrCg">
<field name="VAR" id="h}CE-n1l`S|gRf(0K%./">i</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="EXgB=?B}IKiUdQ.2tKoa">
<field name="TEXT">.date</field>
</block>
</value>
</block>
</value>
<value name="OBJECT">
<block type="variables_get" id="dzLb1f^T!(MM,d=cYU9y">
<field name="VAR" id="j5C=K+Z.E:im1#q:;A=6">Muell_JSON</field>
</block>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="f8q~r@+q|8Kov#3EufsI">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="variables_set" id="E[W-)N[vKeufX{v$B[]p">
<field name="VAR" id="^:v=Yb?;aM;Z[}4jCF3-">Event</field>
<value name="VALUE">
<block type="text_getSubstring" id="YU_Q05y^+I.IzV[c9h9B" inline="false">
<mutation at1="true" at2="false"></mutation>
<field name="WHERE1">FROM_START</field>
<field name="WHERE2">LAST</field>
<value name="STRING">
<block type="get_attr" id=":/^m9o]3:=L%$4[9$f]7">
<value name="PATH">
<shadow type="text">
<field name="TEXT">0.event</field>
</shadow>
<block type="text_join" id="*MaT-W83R/Y5`?QCQNec">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="l5d$/glqMm3~+YA`5]wg">
<field name="VAR" id="h}CE-n1l`S|gRf(0K%./">i</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="$+g0XH}$`2`+{B}s3ID@">
<field name="TEXT">.event</field>
</block>
</value>
</block>
</value>
<value name="OBJECT">
<block type="variables_get" id="nSDdx_!gO45lc4.$`wI`">
<field name="VAR" id="j5C=K+Z.E:im1#q:;A=6">Muell_JSON</field>
</block>
</value>
</block>
</value>
<value name="AT1">
<block type="math_number" id="ic:P:#_w68q^w]#/;w+K">
<field name="NUM">9</field>
</block>
</value>
</block>
</value>
<next>
<block type="control_ex" id="^[032{A//-EpUE6lh7ml">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="`@U%x4KdNV~Y0I`#+,BB">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="Rk[N`gae|lr/9FXmY!no">
<field name="TEXT">0_userdata.0.Abfallkalender.</field>
</block>
</value>
<value name="ADD1">
<block type="math_arithmetic" id="=RY5pU%/0M!J;{^z81qr">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="TbkkwM2BKh^+;KTQY3C]">
<field name="VAR" id="h}CE-n1l`S|gRf(0K%./">i</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="e,-Pz1Hy!V:=8S,tHo`:">
<field name="NUM">1</field>
</shadow>
</value>
</block>
</value>
<value name="ADD2">
<block type="text" id="SApnes6}k9wDi243W2xp">
<field name="TEXT">.event</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="70uxCt~?y`hOTCs:tJ^~">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="}@7(YP=fmA0l@:FJS$v#">
<field name="VAR" id="^:v=Yb?;aM;Z[}4jCF3-">Event</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="@JEhP_3fysDQ6a_x:ILm">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="controls_if" id="r,.`4GPI|(([[.76Cft~">
<mutation elseif="3"></mutation>
<value name="IF0">
<block type="logic_compare" id="d4g.Ts.`^;_R!bu)T_~|">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="tC!eDI_BV-hGgDc@kuPc">
<field name="VAR" id="^:v=Yb?;aM;Z[}4jCF3-">Event</field>
</block>
</value>
<value name="B">
<block type="text" id="?3tZotX[hHq9HGFsA(x|">
<field name="TEXT">Reststoff</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="FXPSk]#;ZliNOBw7bVC8">
<field name="VAR" id="9^)S?J=tLkC7cUWc-u9w">Color</field>
<value name="VALUE">
<block type="math_number" id="-6AJ8U932(j5LuWN@Sp,">
<field name="NUM">33840</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id=":{8uXg8tzuFNCxedDJ:F">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="0A}m@W~711B2u){_B8uP">
<field name="VAR" id="^:v=Yb?;aM;Z[}4jCF3-">Event</field>
</block>
</value>
<value name="B">
<block type="text" id="x,Cz(O2e|co^a7rJEdO7">
<field name="TEXT">Biotonne</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="variables_set" id="Y#|WXlt|w+`5h3B`VI]*">
<field name="VAR" id="9^)S?J=tLkC7cUWc-u9w">Color</field>
<value name="VALUE">
<block type="math_number" id="BVnWo|iSfirB?Vw*M7;o">
<field name="NUM">2016</field>
</block>
</value>
</block>
</statement>
<value name="IF2">
<block type="logic_compare" id="Q0ejJ+ovU#35l7SaPd`7">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="/EhoIt{trOOc3*+k5m4C">
<field name="VAR" id="^:v=Yb?;aM;Z[}4jCF3-">Event</field>
</block>
</value>
<value name="B">
<block type="text" id="BVzI8#S#S*Yqk5v;$?kD">
<field name="TEXT">Blaue Tonne</field>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="variables_set" id="R7DF(c~|*~pR_D]JqW7c">
<field name="VAR" id="9^)S?J=tLkC7cUWc-u9w">Color</field>
<value name="VALUE">
<block type="math_number" id="#A]b|UX(@QPk*SM_q)RZ">
<field name="NUM">31</field>
</block>
</value>
</block>
</statement>
<value name="IF3">
<block type="logic_compare" id="MjEHt,7LG#}DST*Iuc.R">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="(WzO?43I0:YSK;VgFmnX">
<field name="VAR" id="^:v=Yb?;aM;Z[}4jCF3-">Event</field>
</block>
</value>
<value name="B">
<block type="text" id="![3nA.95iLG[3]m5%GYS">
<field name="TEXT">Gelbe Tonne</field>
</block>
</value>
</block>
</value>
<statement name="DO3">
<block type="variables_set" id="959t9eG^*uj2c;pF^HGP">
<field name="VAR" id="9^)S?J=tLkC7cUWc-u9w">Color</field>
<value name="VALUE">
<block type="math_number" id="{*68t/i/Q7}6cb+0$`6Y">
<field name="NUM">65504</field>
</block>
</value>
</block>
</statement>
<next>
<block type="control_ex" id="^c0LOh0WChe-1QNTGVAy">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="7gi,zaI;54L/Ek{e9,I@">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="J|nD$KZ,I6q=mt,xW@:X">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="kwm[DP}25YD]Te=}p`S0">
<field name="TEXT">0_userdata.0.Abfallkalender.</field>
</block>
</value>
<value name="ADD1">
<block type="math_arithmetic" id="pj~|`_~%6}=?B^fK4@;L">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="To0?Cg*f2pZ(Z`zK|=?M">
<field name="VAR" id="h}CE-n1l`S|gRf(0K%./">i</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="=Q|k5qeOIy1ya}{CVNF@">
<field name="NUM">1</field>
</shadow>
</value>
</block>
</value>
<value name="ADD2">
<block type="text" id="If6$$63npGW3OazEE^46">
<field name="TEXT">.color</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id=")+b01E8B2-c#vcsGmA+Y">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="/5*6z@-R5w^1i2*XphN|">
<field name="VAR" id="9^)S?J=tLkC7cUWc-u9w">Color</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="79qt?j;aoK%i)roQkfoE">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="LwJJoNeQC4K?A;BW5:o">nspanelAlarmPath</variable>
<variable id=".d{cc!R.4y2U9N+gLY1K">dpAlarmState</variable>
</variables>
<block type="comment" id="I^BpP.H=p^7Vj|-sy!%" x="-937" y="-162"> <field name="COMMENT">Bitte nspanelAlarmPath anpassen</field> <next> <block type="comment" id="JL[C{;Q}PF[TQ_BfpN$c"> <field name="COMMENT">Der Rest wird dynamisch für das jeweilige Panel ermittelt</field> <next> <block type="variables_set" id="2}X9[s}b1IDUV{6QPzh?"> <field name="VAR" id="LwJJoNeQC4K?A;BW5:_o">nspanelAlarmPath</field> <value name="VALUE"> <block type="text" id="in2z;TR0jhq1QI85qO8">
<field name="TEXT">0_userdata.0.NSPanel.Alarm.</field>
</block>
</value>
<next>
<block type="variables_set" id="+tlGEcYI17~KL5S%%1O">
<field name="VAR" id=".d{cc!R.4y2U9N+gLY1K">dpAlarmState</field>
<value name="VALUE">
<block type="text_join" id="PWihVQn3v+ef7aPA%zyx">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="v2AT~!{!0Qc0BI2!SgN"> <field name="VAR" id="LwJJoNeQC4K?A;BW5:_o">nspanelAlarmPath</field> </block> </value> <value name="ADD1"> <block type="text" id="78{g[~wI2yQXnYZvL4}t"> <field name="TEXT">AlarmState</field> </block> </value> </block> </value> <next> <block type="on_ext" id="q!?(x}z/f~TClQnNmbyU"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="]~f@4kO$zmxdg=}/810C"> <field name="oid">0_userdata.0.NSPanel.Alarm.AlarmState</field> </shadow> <block type="variables_get" id="vCPAx:V[ZG~6IkkFu/r">
<field name="VAR" id=".d{cc!R.4y2U9N+gLY1K">dpAlarmState</field>
</block>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="=e7bf!Q]$tg*0U1_2F"> <mutation elseif="2"></mutation> <value name="IF0"> <block type="logic_compare" id="0_9gv(MmSSJ{2a$j{}(P"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="H$WWrxxX|NaWkT%W]g!Z"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id="_TnyjJ5x!)JY~rQ:Opj)"> <field name="TEXT">arming</field> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="=w_/N]5Tu)B)NwyTbxSp"> <field name="COMMENT">weitere ioBroker-Überprüfung - z.B. Fenster offen</field> <next> <block type="control_ex" id="FGZ}]#=@X?IJ3ddc[9rP" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="OID"> <shadow type="field_oid" id="=EKIKVg=5v+fyd:5J3]B"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="Y,]v4(aeLZ~(@alJ-8;D"> <field name="VAR" id=".d{cc!R.4y2U9N+gLY1K">dpAlarmState</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="2A;g]]ox]cFCoGeBOge">
<field name="BOOL">TRUE</field>
</shadow>
<block type="text" id="WOt(NkkB-R9/-Xho,6}-">
<field name="TEXT">armed</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="M@|2SGg8%@2nZdqU51f">
<field name="NUM">0</field>
</shadow>
<block type="math_number" id=".e9qh.?F@m)/t(HM7|M"> <field name="NUM">1000</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="]p3s+ouB~BJkfd:e)G:("> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id=":n]Z,t6+q#-l_hP+MEI@"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id="([Ep{MPBu5s.C-lOdHgr"> <field name="TEXT">pending</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control_ex" id="FI3q9?nQ|FDT]dY;djZz" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id=":8ls:Akgxi%bWPgrIJT}"> <field name="VAR" id=".d{cc!R.4y2U9N+gLY1K">dpAlarmState</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean"> <field name="BOOL">TRUE</field> </shadow> <block type="text" id="MH!9j:G.S:mOaq31i!aM"> <field name="TEXT">disarmed</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number"> <field name="NUM">0</field> </shadow> <block type="math_number" id="zO=:KFH/FH-zc4ob5b7^"> <field name="NUM">1000</field> </block> </value> </block> </statement> <value name="IF2"> <block type="logic_compare" id="pHUmm^o8GqFji*VULm*Z"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="ques8D:5Hge-)^s,XBR!"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id="3Hd)Fn4g#;XPXSWwe-$">
<field name="TEXT">triggered</field>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="comment" id="c%VR#jE+K$AoZ2m%HuY_">
<field name="COMMENT">Wenn der PIN bei der Deaktivierung falsch war</field>
<next>
<block type="comment" id="I-Iasuh.K$wmTE`(e!;K">
<field name="COMMENT">Zum Beispiel MEldung an Telegram oder popupNotify </field>
<next>
<block type="comment" id="j_U/cfS;e3c]-j}Bie,7">
<field name="COMMENT">an Panel senden</field>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,704 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id=";7d1NODEunxn(R(kK*f=">sourceDP</variable>
<variable id="YH0NB9:6eZ9eFq:C](Zk">targetDP</variable>
<variable id="qmC4{i5;_ZCpInQr};^K">AxisXHours</variable>
<variable id="+Zu]|)A/$l?Zp[x%5@^+">AxisXTicks</variable>
<variable id="lGZ3XJ7}x8tLG|?0du(Q">Debug</variable>
<variable id="fYyJ=y.Qe_5LkMTl8V]">flux</variable>
<variable id="Ow]/GM_.lMrwSdIR[S*Z">AxisTickCounter</variable>
<variable id="1Nf6J@P?M|2X?Po0#,F@">i</variable>
<variable id="$|*Q:b}!fv28l6vg#z(Y">queryStunde</variable>
<variable id="xnC#93sMF3Exd~jlOYt(">queryOutput</variable>
<variable id="{(1Z0Pr};hMs+7G:j%j*">queryValue</variable>
<variable id="?LaH161y!66.OJe+g+R*">AxisTicksBool</variable>
<variable id="N,zaD%}Jd:vQKKFbFFom">result</variable>
</variables>
<block type="comment" id="wkWe{We!g7,qW.!~JkMK" x="-638" y="-312">
<field name="COMMENT">Example String</field>
<next>
<block type="comment" id="0UP24=E28ipyLcEjQvF-">
<field name="COMMENT">7^2:00~7~6^4:00~6~7^6:00~0~7^8:00~5~1^10:00~1~10^12:00~5~6^14:00~8</field>
<next>
<block type="comment" id="Jibhz,.R178)fWS=[$/4">
<field name="COMMENT">Start Parameter</field>
<next>
<block type="variables_set" id="VN-e=u7{hEeqE{e^xdN;">
<field name="VAR" id=";7d1NODEunxn(R(kK*f=">sourceDP</field>
<value name="VALUE">
<block type="text" id="3l*sfN6[o{u/zaS./DjO">
<field name="TEXT">sonoff.0.DZG_DWSB20_2H.DZG_Leistung_Aktuell</field>
</block>
</value>
<next>
<block type="variables_set" id="k7=176;,*CD:8UDb/f2G">
<field name="VAR" id="YH0NB9:6eZ9eFq:C](Zk">targetDP</field>
<value name="VALUE">
<block type="text" id=".?Cc/K5}d0$lh~,p)jfm">
<field name="TEXT">0_userdata.0.Test.cardChart.txt</field>
</block>
</value>
<next>
<block type="variables_set" id="WPJ_@tOGD#-D-:Jumd7m">
<field name="VAR" id="qmC4{i5;_ZCpInQr};^K">AxisXHours</field>
<value name="VALUE">
<block type="math_number" id="}d6:akvZohJ1)i-d`2Go">
<field name="NUM">24</field>
</block>
</value>
<next>
<block type="variables_set" id="k]IpircrS|EKhTI={wlF">
<field name="VAR" id="+Zu]|)A/$l?Zp[x%5@^+">AxisXTicks</field>
<value name="VALUE">
<block type="math_number" id="f~y|4BVEQ)FNM4:]rI^J">
<field name="NUM">5</field>
</block>
</value>
<next>
<block type="variables_set" id="8v0y2i{_e=;y6*|avE7[">
<field name="VAR" id="lGZ3XJ7}x8tLG|?0du(Q">Debug</field>
<value name="VALUE">
<block type="logic_boolean" id="^_?/X}Fm%e:D?iV]9:3E">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="comment" id="Tqk|AM`Mu.GXY4UJ2xT|">
<field name="COMMENT">Ende Parameter</field>
<next>
<block type="on_ext" id="ks8x]yI8Qf20+w:b!^52">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="8A.JZN9y5y6[arj0Vj^l">
<field name="oid">default</field>
</shadow>
<block type="variables_get" id="$I#;?pm;mn,:kIyvCiYz">
<field name="VAR" id=";7d1NODEunxn(R(kK*f=">sourceDP</field>
</block>
</value>
<statement name="STATEMENT">
<block type="variables_set" id="U@DE;=Am$0u0zf=QocVY">
<field name="VAR" id="fYyJ=y.Qe_5LkMTl8V]">flux</field>
<value name="VALUE">
<block type="text_join" id="^wVY,!j8|XAXxZ~u|I]?">
<mutation items="8"></mutation>
<value name="ADD0">
<block type="text" id="?Wz=]TXWJi1|K|eLCv).">
<field name="TEXT">from(bucket: "iobroker")</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="[O){s@j%{{`U[gX;hGo;">
<field name="TEXT">|&gt; range(start: -24h, stop: now())</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="4%9GPSSInNc.RRMZ2H#-">
<field name="TEXT">|&gt; filter(fn: (r) =&gt; r["_measurement"] == "</field>
</block>
</value>
<value name="ADD3">
<block type="variables_get" id="1$2YKrW$BR=m1R+c};@,">
<field name="VAR" id=";7d1NODEunxn(R(kK*f=">sourceDP</field>
</block>
</value>
<value name="ADD4">
<block type="text" id="Uv3)99m(M0kwiYEom+AH">
<field name="TEXT">")</field>
</block>
</value>
<value name="ADD5">
<block type="text" id="?|)Iu}YksZ%O)t-]ki32">
<field name="TEXT">|&gt; filter(fn: (r) =&gt; r["_field"] == "value")</field>
</block>
</value>
<value name="ADD6">
<block type="text" id="P];z*fmF{dsEVopJC]hc">
<field name="TEXT">|&gt; aggregateWindow(every: 1h, fn: mean, createEmpty: false)</field>
</block>
</value>
<value name="ADD7">
<block type="text" id="b,./zRV/Rmud0j!=G$9G">
<field name="TEXT">|&gt; yield(name: "mean")</field>
</block>
</value>
</block>
</value>
<next>
<block type="sendto_custom" id="]Z_xq8=!F4a-E1,RBDD2">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="" with_statement="true"></mutation>
<field name="INSTANCE">influxdb.1</field>
<field name="COMMAND">query</field>
<field name="LOG"></field>
<field name="WITH_STATEMENT">TRUE</field>
<value name="ARG0">
<shadow type="text" id="yv_a*bq^?@[:)e,1?#6">
<field name="TEXT"></field>
</shadow>
<block type="variables_get" id="JOt^(8s6}Ee!0+.V[[#">
<field name="VAR" id="fYyJ=y.Qe_5LkMTl8V]">flux</field>
</block>
</value>
<statement name="STATEMENT">
<block type="variables_set" id=",IBFSX,3Y-ZMl3fA4=}M">
<field name="VAR" id="Ow]/GM_.lMrwSdIR[S*Z">AxisTickCounter</field>
<value name="VALUE">
<block type="math_number" id="HWBy6dA.volh]^mxt5P9">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="controls_for" id="{$qw^{lXn8L6M7b*7Fr$">
<field name="VAR" id="1Nf6J@P?M|2X?Po0#,F@">i</field>
<value name="FROM">
<shadow type="math_number" id="md-KTdJ_(DIC??]Dg-`d">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id="dMpL|%R;2N9mu6Ij^da`">
<field name="NUM">1</field>
</block>
</value>
<value name="TO">
<shadow type="math_number" id="|$C.`SsIiT*vwn`Z05VD">
<field name="NUM">24</field>
</shadow>
<block type="variables_get" id="NYP8S3(??dGUL/G2-OU]">
<field name="VAR" id="qmC4{i5;_ZCpInQr};^K">AxisXHours</field>
</block>
</value>
<value name="BY">
<shadow type="math_number" id="qn4Hre5oCJ)uf}:Frf]u">
<field name="NUM">1</field>
</shadow>
</value>
<statement name="DO">
<block type="math_change" id="NQ~5@b3X|mdi$a)i$=}z">
<field name="VAR" id="Ow]/GM_.lMrwSdIR[S*Z">AxisTickCounter</field>
<value name="DELTA">
<shadow type="math_number" id="_}MNUh_Mq_gFC1zUFo]+">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id="k52lIOyN0Z`qv)Xg%|dQ">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="variables_set" id="A@H]-Ve}k7U2u7=D?[n#">
<field name="VAR" id="$|*Q:b}!fv28l6vg#z(Y">queryStunde</field>
<value name="VALUE">
<block type="convert_from_date" id="H+}#b$rG()d)P.*@|7h?">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">h</field>
<value name="VALUE">
<block type="get_attr" id="I#)[#q^O10d*_g+o}cf2">
<value name="PATH">
<shadow type="text">
<field name="TEXT">result.0.0._value</field>
</shadow>
<block type="text_join" id="Qw$6nILPYcHFVSEZr/w:">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="o6m^u,!iX#sh.Qc75zPQ">
<field name="TEXT">result.0.</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="^RM~n?nXM:/OJt[/NY$9">
<field name="VAR" id="1Nf6J@P?M|2X?Po0#,F@">i</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="hB~m0VIdsK,]vV7+oCcA">
<field name="TEXT">._time</field>
</block>
</value>
</block>
</value>
<value name="OBJECT">
<block type="convert_object2json" id="DU6l$m)RB%|l~y9RnA5U">
<field name="PRETTIFY">TRUE</field>
<value name="VALUE">
<block type="variables_get" id="/v9}|bsSI%A,NE%uAbR#">
<field name="VAR" id="N,zaD%}Jd:vQKKFbFFom">result</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="`z!}x2oI3Mf2y+A[Dr_=">
<field name="VAR" id="{(1Z0Pr};hMs+7G:j%j*">queryValue</field>
<value name="VALUE">
<block type="math_round" id="C[%LfaasYPH=xa064S!3">
<field name="OP">ROUND</field>
<value name="NUM">
<shadow type="math_number" id="W,7BwFhH68eCan-4iv_J">
<field name="NUM">3.1</field>
</shadow>
<block type="math_arithmetic" id="rRK|686XgVGyM(FDKMI7">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number" id="W$$H@Kl;8,2X[Q:D():U">
<field name="NUM">1</field>
</shadow>
<block type="convert_tonumber" id="dk@3yGhr1G^5^LS(;V">
<value name="VALUE">
<block type="get_attr" id=",G;cxxz[Lf]xXm)^p:X+">
<value name="PATH">
<shadow type="text" id="o+=S7dn|/OY#6Wcc9pdM">
<field name="TEXT">result.0.0._value</field>
</shadow>
<block type="text_join" id="q2ryv}1jI?!G`;h0=p(d">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="i=WVO)n/G}+TVe!Rw:$P">
<field name="TEXT">result.0.</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="528p7%T)$J64Y}XO,[zV">
<field name="VAR" id="1Nf6J@P?M|2X?Po0#,F@">i</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="|1)N]).,yaTGOktgZFmy">
<field name="TEXT">._value</field>
</block>
</value>
</block>
</value>
<value name="OBJECT">
<block type="convert_object2json" id="|Ta;,0qe?ZtKwOO)dD,$">
<field name="PRETTIFY">TRUE</field>
<value name="VALUE">
<block type="variables_get" id="ch!DPazljsLz1:R(edb]">
<field name="VAR" id="N,zaD%}Jd:vQKKFbFFom">result</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="q7c[8MB5sjlM!9o7WV-h">
<field name="NUM">100</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="(,IE/`t3aVgV{H+#]PA7">
<mutation elseif="1" else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="tV;dZ/IHWT5E4x}%87JT">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="x`ZE}QKrxtHpi83BC*%*">
<field name="VAR" id="1Nf6J@P?M|2X?Po0#,F@">i</field>
</block>
</value>
<value name="B">
<block type="math_number" id="eo!y;fdOxOZ%./Pg+DK:">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="a8)vt2i8.9MAj7?=Zmxv">
<field name="VAR" id="?LaH161y!66.OJe+g+R*">AxisTicksBool</field>
<value name="VALUE">
<block type="logic_boolean" id="R{I5#aCW}jqjakagHkW8">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="eM^tI;vd|sr{R1`ccxiH">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="XVgFr@cabe%dK0J-=.k$">
<field name="VAR" id="Ow]/GM_.lMrwSdIR[S*Z">AxisTickCounter</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="DL^G^o~1`4N7P0B{|-^7">
<field name="VAR" id="+Zu]|)A/$l?Zp[x%5@^+">AxisXTicks</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="variables_set" id="inpPrsBe%J3q(asZK!f~">
<field name="VAR" id="?LaH161y!66.OJe+g+R*">AxisTicksBool</field>
<value name="VALUE">
<block type="logic_boolean" id="X}J/g+-elB;iIiNN6kTd">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="variables_set" id="?OTYd?4N2yU!]I|AJnkG">
<field name="VAR" id="Ow]/GM_.lMrwSdIR[S*Z">AxisTickCounter</field>
<value name="VALUE">
<block type="math_number" id="Q7pZkxcD?T=Rs%7e=o|#">
<field name="NUM">1</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="O!Z{qF79n$B@5asE|.Fq">
<field name="VAR" id="?LaH161y!66.OJe+g+R*">AxisTicksBool</field>
<value name="VALUE">
<block type="logic_boolean" id="+va#+zpdik~K(^~H%dDl">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="(#Ac`oPyRV--tDrLjb[D">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="4XqOzFnbdGbH$?sP=n?C">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="YWWM)!uH}MR9O8j@S~vp">
<field name="VAR" id="1Nf6J@P?M|2X?Po0#,F@">i</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="Y8@$l}$@Z2gMN`!ff;YS">
<field name="VAR" id="qmC4{i5;_ZCpInQr};^K">AxisXHours</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="8BlMu(La/dEdOiI336]$">
<mutation else="1"></mutation>
<value name="IF0">
<block type="variables_get" id="Hu5YR|`#%|V~NU99xfz5">
<field name="VAR" id="?LaH161y!66.OJe+g+R*">AxisTicksBool</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="dh65}MMXtDunBL6mAk@s">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
<value name="VALUE">
<block type="text_join" id="8fo[$zsvjpz#~_c|XgQ8">
<mutation items="5"></mutation>
<value name="ADD0">
<block type="variables_get" id="sK5_][sn:J|i*obw-V$U">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="W8Qx.b[qRX/(VqtX}J7.">
<field name="VAR" id="{(1Z0Pr};hMs+7G:j%j*">queryValue</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="$D(B*v*BGW}k#Rh89pqD">
<field name="TEXT">^</field>
</block>
</value>
<value name="ADD3">
<block type="variables_get" id="fKP`g4vz-f~=M|em+DP$">
<field name="VAR" id="$|*Q:b}!fv28l6vg#z(Y">queryStunde</field>
</block>
</value>
<value name="ADD4">
<block type="text" id="1@uaN?vTyjWWniIuiuC+">
<field name="TEXT">:00</field>
</block>
</value>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="BXEq*ZK7sqd?ci@GO(?}">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
<value name="VALUE">
<block type="text_join" id="$4p;!(0dDim]=2A%E)n1">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="8.,C*.;i!u~(H#?D9lt]">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="~pRL+,zS1m7w?#J3fc1y">
<field name="VAR" id="{(1Z0Pr};hMs+7G:j%j*">queryValue</field>
</block>
</value>
</block>
</value>
</block>
</statement>
</block>
</statement>
<statement name="ELSE">
<block type="controls_if" id="~2S9VH/AHE:,A%!w]+:t">
<mutation else="1"></mutation>
<value name="IF0">
<block type="variables_get" id="[4BIh{$U[:+%N[~[rc%-">
<field name="VAR" id="?LaH161y!66.OJe+g+R*">AxisTicksBool</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="`}E=fYR/VXYqe4.TJ|@o">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
<value name="VALUE">
<block type="text_join" id="}E?T?bGDhyVDfK4U/i;K">
<mutation items="6"></mutation>
<value name="ADD0">
<block type="variables_get" id="H4jv7eyLo_;bsR.$$!yh">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="XL|RbFT(}u#U7x@DcvKO">
<field name="VAR" id="{(1Z0Pr};hMs+7G:j%j*">queryValue</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="`?r.5%PR+1m7T}S-sZhT">
<field name="TEXT">^</field>
</block>
</value>
<value name="ADD3">
<block type="variables_get" id="|)./@c@-#U;a89o;,eV}">
<field name="VAR" id="$|*Q:b}!fv28l6vg#z(Y">queryStunde</field>
</block>
</value>
<value name="ADD4">
<block type="text" id="XB5y5jf[}Wk-t%v7~oAo">
<field name="TEXT">:00</field>
</block>
</value>
<value name="ADD5">
<block type="text" id="Sgn7o[am{*(oK`Wu*jCd">
<field name="TEXT">~</field>
</block>
</value>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="i4B33cC-m]8*ka2b~2Hv">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
<value name="VALUE">
<block type="text_join" id="x+XvH;%F|(0:q?_bAPgr">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="variables_get" id="|k-p/4ma?V|Trj-O{cc_">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="Phk4rUj9CI;T$PJ)3T/J">
<field name="VAR" id="{(1Z0Pr};hMs+7G:j%j*">queryValue</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="90]Z5Tj3Jc1QXVxw=#lM">
<field name="TEXT">~</field>
</block>
</value>
</block>
</value>
</block>
</statement>
</block>
</statement>
<next>
<block type="controls_if" id="_QT3e7=mT#u6tzKV7LH{">
<value name="IF0">
<block type="logic_compare" id="^j3H?q-luM9w0@G@bKdj">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="/5#TfTmAT|/Nel+hgd37">
<field name="VAR" id="1Nf6J@P?M|2X?Po0#,F@">i</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="kep:qt_.8LtUMyR=lay!">
<field name="VAR" id="qmC4{i5;_ZCpInQr};^K">AxisXHours</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="math_change" id="!HkN^c`=Ne9[PI:EW6cd">
<field name="VAR" id="$|*Q:b}!fv28l6vg#z(Y">queryStunde</field>
<value name="DELTA">
<shadow type="math_number" id="u5KL]z#%Vdhkpw03)}g2">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id="_o,gHQNIv7dBzA=?Kw1|">
<field name="NUM">1</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="8x;2cN=A3c{3akok$qPJ">
<value name="IF0">
<block type="variables_get" id="h.?LWY-xQQmWuA,J,o6c">
<field name="VAR" id="lGZ3XJ7}x8tLG|?0du(Q">Debug</field>
</block>
</value>
<statement name="DO0">
<block type="debug" id="!nBe#a61R!L;$Gg0yE=r">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="#`;@4{,7HhXAI_z0XD`_">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="$)h?C/}A3d+2{;ircsVo">
<mutation items="5"></mutation>
<value name="ADD0">
<block type="variables_get" id="drC=n%z%cg]L/ChAQ,r(">
<field name="VAR" id="1Nf6J@P?M|2X?Po0#,F@">i</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="T?RPZ1KdAVs@4~L?bjIQ">
<field name="TEXT"> - </field>
</block>
</value>
<value name="ADD2">
<block type="variables_get" id="qD/6epYv15t)29;5u^rM">
<field name="VAR" id="{(1Z0Pr};hMs+7G:j%j*">queryValue</field>
</block>
</value>
<value name="ADD3">
<block type="text" id=",~ZFy.irPx-D=f3=5j_*">
<field name="TEXT"> - </field>
</block>
</value>
<value name="ADD4">
<block type="variables_get" id="?})ZpV:e09-$Bm}zP:6M">
<field name="VAR" id="$|*Q:b}!fv28l6vg#z(Y">queryStunde</field>
</block>
</value>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="control_ex" id="Lw=6*IJt^6=y^4UUAoaE">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="LF,wvJc^B098JB?jm!L+">
<field name="oid">Object ID</field>
</shadow>
<block type="variables_get" id="*_[s=|h$;uJ(/5K9pUEA">
<field name="VAR" id="YH0NB9:6eZ9eFq:C](Zk">targetDP</field>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="%*VY@2+N{ljW|1O8#Q.x">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="QTf-s_v1[9Fd9yY!EV.l">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="p]iW*DltJ@dQ/f_Z^^WN">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="controls_if" id="$/AV!7DH%;l*W6CAHyt]">
<value name="IF0">
<block type="variables_get" id="ltYP1+G)`6X*g9~_(h-$">
<field name="VAR" id="lGZ3XJ7}x8tLG|?0du(Q">Debug</field>
</block>
</value>
<statement name="DO0">
<block type="debug" id="Da6e+gbB[5Lh`KNrCWi6">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="i3{gh~sI+^Tdgf0=ENeN">
<field name="TEXT">test</field>
</shadow>
<block type="variables_get" id="aLUEHsE;Z|-=%7Ydbb2m">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
</block>
</value>
</block>
</statement>
<next>
<block type="variables_set" id="a;uA(wofssCu[/d{_/:c">
<field name="VAR" id="xnC#93sMF3Exd~jlOYt(">queryOutput</field>
<value name="VALUE">
<block type="text" id="0WALNak)hre,22(Am@ny">
<field name="TEXT"></field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
const aliasPath = 'alias.0.NSPanel_1.Media'; // ggfs. Anpassen
const aliasDevice = 'PlayerChromecast'; // ggfs. Anpassen
//Ergibt alias.0.NSPanel_1.Media.PlayerChromecast.
const chromecastInstanz = 'chromecast.0.'; // Anpasssen, wenn nicht Instanz 0
const chromecastDevice = 'GoogleHome3224'; // Anpassen an dein eigenes Devoice
var typeAlias, read, write, nameAlias, role, desc, min, max, unit, states, custom;
function createAlias(idDst, idName,idSrc, idRd, idType, idRole, idAliasType) {
if(existsState(idDst)) log(idDst + ' schon vorhanden !', 'warn');
else {
var obj = {};
obj.type = idType;
obj.common = getObject(idSrc).common;
obj.common.alias = {};
if(idRd) {
obj.common.alias.id = {};
obj.common.alias.id.read = idRd;
obj.common.alias.id.write = idSrc;
obj.common.read = true;
} else obj.common.alias.id = idSrc;
obj.common.type = idAliasType;
if(obj.common.read !== false && read) obj.common.alias.read = read;
if(obj.common.write !== false && write) obj.common.alias.write = write;
obj.common.name = idName;
obj.common.role = idRole;
obj.common.desc = idDst;
if(min !== undefined) obj.common.min = min;
if(max !== undefined) obj.common.max = max;
if(unit) obj.common.unit = unit;
obj.common.states = states;
if(custom && obj.common.custom) obj.common.custom = custom;
obj.native = {};
setObject(idDst, obj);
}
}
createAlias(aliasPath + '.' + aliasDevice, '', chromecastInstanz + chromecastDevice, '', 'channel', 'media', 'string');
createAlias(aliasPath + '.' + aliasDevice + '.ALBUM', 'ALBUM', chromecastInstanz + chromecastDevice + '.album', '', 'state', 'media.album', 'string');
createAlias(aliasPath + '.' + aliasDevice + '.ARTIST', 'ARTIST', chromecastInstanz + chromecastDevice + '.artist', '', 'state', 'media.artist', 'string');
createAlias(aliasPath + '.' + aliasDevice + '.TITLE', 'TITLE', chromecastInstanz + chromecastDevice + '.title', '', 'state', 'media.title', 'string');
createAlias(aliasPath + '.' + aliasDevice + '.NEXT', 'NEXT', chromecastInstanz + chromecastDevice + '.next', '', 'state', 'button.next', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.PREV', 'PREV', chromecastInstanz + chromecastDevice + '.prev', '', 'state', 'button.prev', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.PLAY', 'PLAY', chromecastInstanz + chromecastDevice + '.play', '', 'state', 'button.play', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.PAUSE', 'PAUSE', chromecastInstanz + chromecastDevice + '.pause', '', 'state', 'button.pause', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.STOP', 'STOP', chromecastInstanz + chromecastDevice + '.stop', '', 'state', 'button.stop', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.STATE', 'STATE', chromecastInstanz + chromecastDevice + '.state', '', 'state', 'media.state', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.VOLUME', 'VOLUME', chromecastInstanz + chromecastDevice + '.volume', '', 'state', 'level.volume', 'number');
createAlias(aliasPath + '.' + aliasDevice + '.VOLUME_ACTUAL', 'VOLUME_ACTUAL', chromecastInstanz + chromecastDevice + '.volume', '', 'state', 'value.volume', 'number');

View File

@@ -0,0 +1,131 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="VC{%szTBZ]@G*_Z1kd=p">NSPanel_Path</variable>
<variable id="7-~%q%O+i,p)gd]2E]u%">i</variable>
</variables>
<block type="comment" id=".H8cu)X4;0/ELXg0~!2" x="-212" y="-137"> <field name="COMMENT">1.) DWD-Adapter muss installiert sein!</field> <next> <block type="comment" id="cMAJA*6Mucx!}~#*FItV"> <field name="COMMENT">2.) Anpassen: Pfade deiner NSPanel 1-n</field> <next> <block type="comment" id="I,l}p*+|7)O*7iDhs{C{"> <field name="COMMENT">wenn mehr NSPanel dann Liste erweitern</field> <next> <block type="comment" id="z#bI#s:k[=wnRjs?t=M">
<field name="COMMENT">wenn weniger NSPanel dann Liste verkürzen</field>
<next>
<block type="variables_set" id="IZv),n_W8%BJqvjwFH60">
<field name="VAR" id="VC{%szTBZ]@G*Z1kd=p">NSPanel_Path</field>
<value name="VALUE">
<block type="lists_create_with" id="hbVUA-n,wK$8EN8v9M2x">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="^nQ3=mooLvr$lZ;cPu!t">
<field name="TEXT">0.userdata.0.NSPanel.1.</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="X!Pp5k{{2N5^~VZ24!X{">
<field name="TEXT">0.userdata.0.NSPanel.2.</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="htgZqn!7]yOK?I%{#m9D">
<field name="TEXT">0.userdata.0.NSPanel.EMU.</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="}C)!uPDDrlP+Z_ZZxCTP">
<field name="COMMENT">Trigger auf dwd.0.warning.headline</field>
<next>
<block type="on_ext" id="?o?W:(X@bTJ~te|=L*A"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="o;@Yb+8-u0:)}3FV/ayZ"> <field name="oid">default</field> </shadow> <block type="field_oid" id="en?eq5J4w5-U^CGl=+Iq"> <field name="oid">dwd.0.warning.headline</field> </block> </value> <statement name="STATEMENT"> <block type="controls_forEach" id="cY44Jgg1PYPJ54ee{d2t"> <field name="VAR" id="7-~%q%O+i,p)gd]2E]u%">i</field> <value name="LIST"> <block type="variables_get" id="g.tPwvave?zcNnhoj#.o"> <field name="VAR" id="VC{%szTBZ]@G*_Z1kd=p">NSPanel_Path</field> </block> </value> <statement name="DO"> <block type="controls_if" id="QPGGF3MVC*NdY!,Moey?"> <value name="IF0"> <block type="logic_compare" id="}r2=99u*N|9-V+V=o?E">
<field name="OP">GT</field>
<value name="A">
<block type="text_length" id="(TJ!yd2sS0(/Sk_iE1;">
<value name="VALUE">
<shadow type="text" id="ynMYy4ITGRb%9Q-7A6^n">
<field name="TEXT">abc</field>
</shadow>
<block type="on_source" id=";)N~d3E+|T|z{Fyxp%#">
<field name="ATTR">state.val</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="Vw,J0v/)7719Hc@+Fi=x">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="comment" id="PX+4_x%y+g1GWg+Ug6R">
<field name="COMMENT">ScreensaverInfo.popupNotifyHeading</field>
<next>
<block type="control_ex" id="o7P*;1Ttxs*C/e.0Pn88" inline="true">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="@?zbekjnHNiqZ.?:UZ,"> <field name="oid">Object ID</field> </shadow> <block type="text_join" id="VAdQl$ZWG@WOy_,rcu6%"> <mutation items="2"></mutation> <value name="ADD0"> <block type="variables_get" id="YT;mRR_H6+t{J~}QU_E/"> <field name="VAR" id="7-~%q%O+i,p)gd]2E]u%">i</field> </block> </value> <value name="ADD1"> <block type="text" id="^7!wIf6=?EvYr$SoR^P">
<field name="TEXT">ScreensaverInfo.popupNotifyHeading</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="4]C|sQYZbuEUMP]xH-Ab">
<field name="BOOL">TRUE</field>
</shadow>
<block type="text" id="+(i@.kA,fI(I2w-ZHuo">
<field name="TEXT">Deutscher Wetterdienst</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="rDN^aNATSKF-a=?gO?Ww">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="comment" id="TG}L5iTO?~|;AN-yf?NV">
<field name="COMMENT">ScreensaverInfo.popupNotifyText</field>
<next>
<block type="control_ex" id="q/ci(sG(Vxs+s07bvr]b" inline="true">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="IoU]L/3.jrEgMe=(I)K">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="EXcC{bR:k@EwC!QkJ)YQ">
<field name="VAR" id="7-~%q%O+i,p)gd]2E]u%">i</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="+Zex[j7epd,T21~*k6-"> <field name="TEXT">ScreensaverInfo.popupNotifyText</field> </block> </value> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="0{J_-SZvB.zu]ETOXlH/"> <field name="BOOL">TRUE</field> </shadow> <block type="on_source" id="5?IF}*4XhhK0PN3[wD!z"> <field name="ATTR">state.val</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="pJ2jr~?.G0YB;6r]?S=">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,486 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="$%h)IyP*A]i!w|o;@^u~">PanelResult</variable>
<variable id="iG,DhTT3ntIL)6jkdBSx">Action</variable>
</variables>
<block type="on_ext" id="Z*WW:Hq=V/0/+D.7sBGj" x="88" y="63">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="s?5LPlVoKvrW,Gf/,d6(">
<field name="oid">default</field>
</shadow>
<block type="field_oid" id=";VZs-nq`+#GL`5jVspo^">
<field name="oid">mqtt.0.SmartHome.NSPanel_1.stat.RESULT</field>
</block>
</value>
<statement name="STATEMENT">
<block type="variables_set" id="W*-eYA4LLj$WMX1vlx9+">
<field name="VAR" id="$%h)IyP*A]i!w|o;@^u~">PanelResult</field>
<value name="VALUE">
<block type="convert_json2object" id="H}rYz*|_N_r:7lN6kRq)">
<value name="VALUE">
<block type="on_source" id="ks};I#sE9{y$Os12X3%`">
<field name="ATTR">state.val</field>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="|e+,CBW1}SywJvnEFroP">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="tkA^fRI!3FU^2Tiqlahc">
<field name="OP">EQ</field>
<value name="A">
<block type="text_getSubstring" id="k}-`K]@kua~8fg*?I[t#">
<mutation at1="true" at2="true"></mutation>
<field name="WHERE1">FROM_START</field>
<field name="WHERE2">FROM_START</field>
<value name="STRING">
<block type="on_source" id="qCOa@52xDIv4(R#:]Yzp">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="AT1">
<block type="math_number" id="Ncm@lgRgVYVBF~^yWKRE">
<field name="NUM">3</field>
</block>
</value>
<value name="AT2">
<block type="math_number" id="Gov$3|Qrd91N~RUzWea=">
<field name="NUM">9</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="text" id="2~EGhvBs4KIPXXMcNVkx">
<field name="TEXT">Button1</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="G!Z=C5KTj-Nl+XFa0RU_">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
<value name="VALUE">
<block type="get_attr" id="Ed}{-}B{X+obkb^Mmk8O">
<value name="PATH">
<shadow type="text">
<field name="TEXT">Button2.Action</field>
</shadow>
<block type="text" id="-XSmbNSLD2q^JU.3)[(^">
<field name="TEXT">Button1.Action</field>
</block>
</value>
<value name="OBJECT">
<block type="variables_get" id="-%8e}:rqW1kj_iUDQyyf">
<field name="VAR" id="$%h)IyP*A]i!w|o;@^u~">PanelResult</field>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="729?J2a__sAP*2PmMN2%">
<mutation elseif="4"></mutation>
<value name="IF0">
<block type="logic_compare" id="u9lV/l]c1,yVRl3(21(L">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="kG0ARQ1j%HKz(I=l}`:P">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="v?m}nM1~E8zR0,Ja+if+">
<field name="TEXT">SINGLE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="comment" id="iqFwhe!^P0z9-W9D[tyh">
<field name="COMMENT">Schalte etwas: Button1 1x gedrückt</field>
<next>
<block type="debug" id="F22M/f@lJ_xQ$t2#QW[#">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="?r3.Wy5c@$3DxmvbIGr}">
<field name="TEXT">Button1 SINGLE wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="[Vpq7B,RWb4k)Bhwq{nh">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="|Whz!$I5#Iym52Pg8N?p">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="~f_cI8hrs;I)wJ-S.G3r">
<field name="TEXT">DOUBLE</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="comment" id="D;PPB54t87N)%F{.hQAx">
<field name="COMMENT">Schalte etwas: Button1 2x gedrückt</field>
<next>
<block type="debug" id="xoG/r3;33`8/j$QeZHW5">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="9PgW|#6f8``brbWQM9q7">
<field name="TEXT">Button1 DOUBLE wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF2">
<block type="logic_compare" id="t)8drGw=u/q0Pl+ul^43">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="-lf~?Q^H8o}J:cf@I5aN">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="Z!={5~.hF?V-NFw73|BL">
<field name="TEXT">TRIPLE</field>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="comment" id="xjdh~X8eM8ab/a/JuIM/">
<field name="COMMENT">Schalte etwas: Button1 3x gedrückt</field>
<next>
<block type="debug" id="n$kU%^k3$wHN/L**K=jA">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="SA^R/OJX#a7JDhE7LwL[">
<field name="TEXT">Button1 TRIPLE wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF3">
<block type="logic_compare" id="ZCUeBK[Sc08KKQVMF)tC">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id=":Jlhv9(rM!D5H*eM|Gw-">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="6NH!g[HN7f=7_q%U10M!">
<field name="TEXT">QUAD</field>
</block>
</value>
</block>
</value>
<statement name="DO3">
<block type="comment" id="77*X9-*|mO]|P0$Jw=K`">
<field name="COMMENT">Schalte etwas: Button1 4x gedrückt</field>
<next>
<block type="debug" id="qE@`G.#9s!UAtrlMJ/yi">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="G:19{lKn)m`B!x(NUx5S">
<field name="TEXT">Button1 QUAD wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF4">
<block type="logic_compare" id="fz#2[~sK=iF%wd=4`hB,">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="ROFyrrPZn5KJg7?Hs),Z">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="a]-o=$vOr9JDr(T!#SmL">
<field name="TEXT">PENTA</field>
</block>
</value>
</block>
</value>
<statement name="DO4">
<block type="comment" id="fxPE82.Ci3L`ME=X3nl|">
<field name="COMMENT">Schalte etwas: Button1 5x gedrückt</field>
<next>
<block type="debug" id="7GbZ650het?k*+CCO:nr">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="*[}-a1hl?2pc^*@4E*hI">
<field name="TEXT">Button1 PENTA wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="8Ev:iPPfN3B?L^Q]oOIc">
<field name="OP">EQ</field>
<value name="A">
<block type="text_getSubstring" id="xx:q0nC7,q8A8~v?PC#s">
<mutation at1="true" at2="true"></mutation>
<field name="WHERE1">FROM_START</field>
<field name="WHERE2">FROM_START</field>
<value name="STRING">
<block type="on_source" id="JWC4m9/7dS^!]+xQ-I0Y">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="AT1">
<block type="math_number" id="k7=j)18I6TmB%)upvAVJ">
<field name="NUM">3</field>
</block>
</value>
<value name="AT2">
<block type="math_number" id=",EKn%h/uX3}ZjCvmW1KE">
<field name="NUM">9</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="text" id="Uuj{UrX@-3nNjw{n!H/@">
<field name="TEXT">Button2</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="variables_set" id="U~1k_f;62_-QkRvGZz=)">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
<value name="VALUE">
<block type="get_attr" id="izCz6K1Y;L.7M7MlHA$c">
<value name="PATH">
<shadow type="text">
<field name="TEXT">Button2.Action</field>
</shadow>
<block type="text" id="y1)^1#)QjYVVA7)mWdvM">
<field name="TEXT">Button2.Action</field>
</block>
</value>
<value name="OBJECT">
<block type="variables_get" id="TIg$Lr%^Fuk`fxDLC:,^">
<field name="VAR" id="$%h)IyP*A]i!w|o;@^u~">PanelResult</field>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="tC_APU:6jW5063/l=sR1">
<mutation elseif="4"></mutation>
<value name="IF0">
<block type="logic_compare" id="P9XXNXzc+3H{*^w1P_@q">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="sua/L8[qi8e:U#m}d^pi">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="E^e9/nh{n@)S6e:4q3_h">
<field name="TEXT">SINGLE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="comment" id="qoOw*}O|E06w[5[cXWLo">
<field name="COMMENT">Schalte etwas: Button2 1x gedrückt</field>
<next>
<block type="debug" id=",tE:-UWz(0Zqlc8KBLqO">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="!waPZV$J9fR+dq462%h+">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="{3#KVO|*86E:3pR/!%WP">
<field name="TEXT">Button2 SINGLE wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="_Z+eBL!Zj.|LQL+_s|Ld">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="15Tx7/a!(wJ;FO+x!4JW">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="}l%?@L+:Ma!=:d2Ky/%*">
<field name="TEXT">DOUBLE</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="comment" id="~72fN$sZV!.O{%*0+awy">
<field name="COMMENT">Schalte etwas: Button2 2x gedrückt</field>
<next>
<block type="debug" id="-T4*$n8-_X_{@6!Ga5FQ">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="LFX2j}Pr:o,{$YxQVcp2">
<field name="TEXT">Button2 DOUBLE wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF2">
<block type="logic_compare" id="6-2Eew1,aoyC]Th*AaJ5">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="4Nl6[tYm2pL@rL7v8vLI">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="zthA#*kib2r|xv+,A{Sh">
<field name="TEXT">TRIPLE</field>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="comment" id="?OI)q#8XL#1)x.E=*m~~">
<field name="COMMENT">Schalte etwas: Button2 3x gedrückt</field>
<next>
<block type="debug" id="%6ZLfC`!6?Z%jXlF:mFa">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="eh|tY,l}uz:WTx}4_G_E">
<field name="TEXT">Button2 TRIPLE wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF3">
<block type="logic_compare" id="*~f.cy|6d8U0s?|^%:8R">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="tiZ6%x5iuvhh:Yi*9qB9">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="I|K0m__6/:.kuBtYQE5l">
<field name="TEXT">QUAD</field>
</block>
</value>
</block>
</value>
<statement name="DO3">
<block type="comment" id="ToQ_dt~n$Ef|8-fb|__O">
<field name="COMMENT">Schalte etwas: Button2 4x gedrückt</field>
<next>
<block type="debug" id="qyb7DL~:^6|r@9~KOb+A">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="tb4wo7_n@J)Q9$FLf|rV">
<field name="TEXT">Button2 QUAD wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<value name="IF4">
<block type="logic_compare" id="M:x`b;I}a8;jJU=g}u)[">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="Yh,)fk$+WmVXS=iwbzK{">
<field name="VAR" id="iG,DhTT3ntIL)6jkdBSx">Action</field>
</block>
</value>
<value name="B">
<block type="text" id="1FMk3I`mfaAfEhMd$D#e">
<field name="TEXT">PENTA</field>
</block>
</value>
</block>
</value>
<statement name="DO4">
<block type="comment" id="5+tVGCf{MdkG(OBDmuy|">
<field name="COMMENT">Schalte etwas: Button2 5x gedrückt</field>
<next>
<block type="debug" id="}{-PVi#AL#[EGD,eb?M#">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">Button</field>
</shadow>
<block type="text" id="HuBkD3zi|o@.S3w.Qh7n">
<field name="TEXT">Button2 PENTA wurde gedrückt</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</xml>

View File

@@ -0,0 +1,838 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</variable>
<variable id="UIsM8Eact}h@ZW5?xVbR">Sensor_Temperatur</variable>
<variable id="~WSzaicRZ8#urLe2[R=k">Sensor_Lutfeuchte</variable>
<variable id="caeHuwwu}!^U=Jns}u%t">Sensor_Luftdruck</variable>
<variable id="+s+k$`6x!Mb[t~Ts^Zrp">Button1Text</variable>
<variable id="iP=Bs[zV55PS82(Q$`|7">Button2Text</variable>
<variable id="RLIY*e=6(.:_k@OJSC?Y">HeadingTextColor</variable>
<variable id="K~gzNq|K||t-`B*`Kcr`">TextColor</variable>
<variable id="G~p{^+hG44{B?m4L(cyH">Button1TextColor</variable>
<variable id="QZ7wov(RrAOyZv@8lF3I">Button2TextColor</variable>
<variable id="Db)I2;9^!VMzALbYVYNO">IconColor</variable>
<variable id="#?MpfqBMCW|l*?q]RI[X">i</variable>
<variable id="6sx!Ebx43k2^RFs;w0^K">HeadingText</variable>
<variable id=")S5LKNN/K5V9|_8OXyGn">Icon</variable>
<variable id="n%`;Bp1UH/yVByUHY*9b">FontSize</variable>
<variable id="e%^+o,6sf9B/FYnuhoqQ">Text</variable>
</variables>
<block type="variables_set" id="G^=Qx9%S9Rc7#7G|=LdU" x="63" y="-87">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
<value name="VALUE">
<block type="text" id=";F]Cj%Y8B#%Y}*oX%rj8">
<field name="TEXT">0_userdata.0.NSPanel.1.popupNotify.</field>
</block>
</value>
<next>
<block type="variables_set" id="LYci`3V?n:Q#XhI.5e59">
<field name="VAR" id="UIsM8Eact}h@ZW5?xVbR">Sensor_Temperatur</field>
<value name="VALUE">
<block type="get_value" id="4Ijc:Qssy9cfYZVr;)0.">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.65.temperature</field>
</block>
</value>
<next>
<block type="variables_set" id="Bt`wC{P74q3?|E+Vh%m1">
<field name="VAR" id="~WSzaicRZ8#urLe2[R=k">Sensor_Lutfeuchte</field>
<value name="VALUE">
<block type="get_value" id="1Jtt.?XFKfkSR2E0`B29">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.64.humidity</field>
</block>
</value>
<next>
<block type="variables_set" id="2{jbPU@a|To?U4W0Kh7Y">
<field name="VAR" id="caeHuwwu}!^U=Jns}u%t">Sensor_Luftdruck</field>
<value name="VALUE">
<block type="get_value" id="2;Aq(8-i$|{N0^QN(=W)">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.66.pressure</field>
</block>
</value>
<next>
<block type="variables_set" id="{Lb:e?Hk0ZLIHgUQS0Qh">
<field name="VAR" id="+s+k$`6x!Mb[t~Ts^Zrp">Button1Text</field>
<value name="VALUE">
<block type="text" id="6-c,SdgQfdpE*oCAH~Pi">
<field name="TEXT"></field>
</block>
</value>
<next>
<block type="variables_set" id="v%1=S8_YX1_6HCM}h5y~">
<field name="VAR" id="iP=Bs[zV55PS82(Q$`|7">Button2Text</field>
<value name="VALUE">
<block type="text" id="EN5c[^;WQN%2qxxwI]JA">
<field name="TEXT">OK</field>
</block>
</value>
<next>
<block type="comment" id="35(LvkLl0Jnnh_RAMRXd">
<field name="COMMENT">Color Picker für RGB565</field>
<next>
<block type="comment" id="lJiiRl$j]^YDgx45TGPE">
<field name="COMMENT">http://www.barth-dev.de/online/rgb565-color-picker/</field>
<next>
<block type="variables_set" id="QYSdj*q`P/1qY@o.,Y*c">
<field name="VAR" id="RLIY*e=6(.:_k@OJSC?Y">HeadingTextColor</field>
<value name="VALUE">
<block type="text" id="`G$CYT?54r,Jz8I|6OJ]">
<field name="TEXT">65535</field>
</block>
</value>
<next>
<block type="variables_set" id="/6-PAaad6dF)|FJp0fr{">
<field name="VAR" id="K~gzNq|K||t-`B*`Kcr`">TextColor</field>
<value name="VALUE">
<block type="text" id="-PM7_=ur??KJOqX^9^?{">
<field name="TEXT">65535</field>
</block>
</value>
<next>
<block type="variables_set" id="PzSv:8)o0G*q_C3EKk9A">
<field name="VAR" id="G~p{^+hG44{B?m4L(cyH">Button1TextColor</field>
<value name="VALUE">
<block type="text" id="4)Tu5`-6dM`O5q5-[![6">
<field name="TEXT">2016</field>
</block>
</value>
<next>
<block type="variables_set" id="(_?5tyOL{jA@@:(jGn.Z">
<field name="VAR" id="QZ7wov(RrAOyZv@8lF3I">Button2TextColor</field>
<value name="VALUE">
<block type="text" id="$IMWrRZ=n/}+S.iv~5#`">
<field name="TEXT">63488</field>
</block>
</value>
<next>
<block type="variables_set" id="u?h3*S@Lj|P-TA*XR?$`">
<field name="VAR" id="Db)I2;9^!VMzALbYVYNO">IconColor</field>
<value name="VALUE">
<block type="text" id="BItuXFzt@:Zwi;/BS)!p">
<field name="TEXT">2000</field>
</block>
</value>
<next>
<block type="comment" id="yAIk,I@:X#4vWvs2^Z5u">
<field name="COMMENT">Zähler für Loop</field>
<next>
<block type="variables_set" id="t96AiB0(*g^eeiww)ui{">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
<value name="VALUE">
<block type="math_number" id="li[k8_)s6ZF*/K?{v3GN">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="comment" id="T0h2*mk,r8}E%%H;a03{">
<field name="COMMENT">Überschrift</field>
<next>
<block type="variables_set" id="m$!KKv4b:6FR2;NNzm*=">
<field name="VAR" id="6sx!Ebx43k2^RFs;w0^K">HeadingText</field>
<value name="VALUE">
<block type="lists_create_with" id="yk2|MrLr{x.xt!CqgB9j">
<mutation items="4"></mutation>
<value name="ADD0">
<block type="text" id="qJAN7r)iM[A$,+G@WYXR">
<field name="TEXT">Zeit</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="(RK{##(fYn_L]u:BvnYw">
<field name="TEXT">Temperatur</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="--7Salv^WN%?/9`8:~R:">
<field name="TEXT">Luftfeuchte</field>
</block>
</value>
<value name="ADD3">
<block type="text" id="-1fw|22@Uq@zv-iozeIe">
<field name="TEXT">Luftdruck</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id=")+`r*B#Fg|@X*k_!F6D@">
<field name="COMMENT">Icons</field>
<next>
<block type="variables_set" id=":1y)d^LO{nG9OjG)Be6y">
<field name="VAR" id=")S5LKNN/K5V9|_8OXyGn">Icon</field>
<value name="VALUE">
<block type="lists_create_with" id="Xt3m,u[dT5AVvg!Eg1H`">
<mutation items="4"></mutation>
<value name="ADD0">
<block type="text" id="Ji~6sz[EnevFbxY[jA75">
<field name="TEXT">clock</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="r{^8_]O2Gd}??)v*2e,o">
<field name="TEXT">thermometer</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="QxZ|xRW,2s+~Cq5d7EE=">
<field name="TEXT">water-percent</field>
</block>
</value>
<value name="ADD3">
<block type="text" id="aG59A=2KjBO$8]{*fKbx">
<field name="TEXT">car-speed-limiter</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="aKv%|di[CtSIh!D`(#gX">
<field name="COMMENT">Font 0 - Default - Size 24 (No Icons, Support for various special chars from different langs) </field>
<next>
<block type="comment" id="+r5N^`^j1p[P,5J`Le^Q">
<field name="COMMENT">Font 1 - Size 32 (Icons and limited chars) </field>
<next>
<block type="comment" id="tUOdMlG-_thdgbYnc4nm">
<field name="COMMENT">Font 2 - Size 32 (No Icons, Support for various special chars from different langs) </field>
<next>
<block type="comment" id="@lerf@f9)v[4nMzqv5gt">
<field name="COMMENT">Font 3 - Size 48 (Icons and limited chars) </field>
<next>
<block type="comment" id="bZgk)F:jLfyS.IJvAr$V">
<field name="COMMENT">Font 4 - Size 80 (Icons and limited chars)</field>
<next>
<block type="comment" id="clX[{}N_[.*S=k%*0cLW">
<field name="COMMENT">Font 5 - Size 128 (ascii only)</field>
<next>
<block type="variables_set" id="5p9m!(nJ}iGu?9Ex7KYc">
<field name="VAR" id="n%`;Bp1UH/yVByUHY*9b">FontSize</field>
<value name="VALUE">
<block type="lists_create_with" id="fblI%hv]`?Co1Y-+sfTP">
<mutation items="4"></mutation>
<value name="ADD0">
<block type="math_number" id="^)oAb-m3)a2qMfx%{F6T">
<field name="NUM">4</field>
</block>
</value>
<value name="ADD1">
<block type="math_number" id="wYStw[Uw2cGDsh(WMSzE">
<field name="NUM">4</field>
</block>
</value>
<value name="ADD2">
<block type="math_number" id="7~NoZ:|e@5o}alTv^c:]">
<field name="NUM">4</field>
</block>
</value>
<value name="ADD3">
<block type="math_number" id="XQ+MBjj`Bmb{YMj(^~$v">
<field name="NUM">4</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="1|4*7{{`=6agLOA|rY}X">
<field name="COMMENT">Text oder Sensordaten</field>
<next>
<block type="variables_set" id="42f6I36pzY%^j$dQ)P%^">
<field name="VAR" id="e%^+o,6sf9B/FYnuhoqQ">Text</field>
<value name="VALUE">
<block type="lists_create_with" id="SVU6Ucg![qiSxerdD+mv">
<mutation items="4"></mutation>
<value name="ADD0">
<block type="convert_tostring" id="aKsR2QJD%]jm;WWFv^d:">
<value name="VALUE">
<block type="time_get" id="o.R[,nuFt!=z^9-{;-Dl">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">hh:mm</field>
</block>
</value>
</block>
</value>
<value name="ADD1">
<block type="text_join" id="4=,76hqfY.9/g.~n[03C">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="Wly~BGOs02ySg1OOi,|u">
<field name="VAR" id="UIsM8Eact}h@ZW5?xVbR">Sensor_Temperatur</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="VDO{sH([6L!x5#Svp7sF">
<field name="TEXT"> °C</field>
</block>
</value>
</block>
</value>
<value name="ADD2">
<block type="text_join" id="*?t?Dd~4u{w(Pz[1WBLG">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="BGnINq:/jfk##b11G]oh">
<field name="VAR" id="~WSzaicRZ8#urLe2[R=k">Sensor_Lutfeuchte</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="wf_|6[5_]DhE%!pF=@[2">
<field name="TEXT"> %</field>
</block>
</value>
</block>
</value>
<value name="ADD3">
<block type="text_join" id="*gvlhRb5NB.d{}JF=`.V">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="zcu(qzk4WzJ=Zv`d!oNZ">
<field name="VAR" id="caeHuwwu}!^U=Jns}u%t">Sensor_Luftdruck</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="3Y~0vG4[$iTKSHT;Mpz3">
<field name="TEXT"> hPa</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="schedule" id="U-4ddK7pM21IC2DZ3*,7">
<field name="SCHEDULE">*/5 * * * * *</field>
<statement name="STATEMENT">
<block type="lists_setIndex" id="1+OL;,34r/VFKuu2zx6n">
<mutation at="true"></mutation>
<field name="MODE">SET</field>
<field name="WHERE">FROM_START</field>
<value name="LIST">
<block type="variables_get" id="J:wdR.){K9LDC|d_LH$T">
<field name="VAR" id="e%^+o,6sf9B/FYnuhoqQ">Text</field>
</block>
</value>
<value name="AT">
<block type="math_number" id="9_V=`mXu+Wm)lJ275EP[">
<field name="NUM">1</field>
</block>
</value>
<value name="TO">
<block type="convert_tostring" id="@obyv{DZy3wLv~Ysdylj">
<value name="VALUE">
<block type="time_get" id="1h,YOr;^qtt[)g]Qd:8t">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">hh:mm</field>
</block>
</value>
</block>
</value>
<next>
<block type="control_ex" id="KtA?uX2s-h=6FkK5E--N">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="b[-*zw~9*A3F*[]%Om~3">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="{0__[Pcpe!ZHo-r+*bf:">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="GfgJkb;fG,c^kI[qnEc1">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="f98;yX!r.O8A3p+SP|G(">
<field name="TEXT">popupNotifyHeading</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="L_yvKy)2.4$YL1]eq;{l">
<field name="BOOL">TRUE</field>
</shadow>
<block type="lists_getIndex" id="_g`XG{z;.#`~2[Ax6|of">
<mutation statement="false" at="true"></mutation>
<field name="MODE">GET</field>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="%`l~)W-tL1y=YR.4Dzi!">
<field name="VAR" id="6sx!Ebx43k2^RFs;w0^K">HeadingText</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="^6gJ@h2EDap%OAfBDkyQ">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
</block>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="OW68u!evOdS(H:ivZ#J/">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="control_ex" id="hG6k{T-.^N^l*f,]ZrNB">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="]xCee:h/7dD@P^Cfq,c/">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="E(mbFtkv+6!wvR_?H6G7">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="TKU!xgmlF2ibxh?Nt/RL">
<field name="TEXT">popupNotifyText</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean">
<field name="BOOL">TRUE</field>
</shadow>
<block type="lists_getIndex" id="!u7Zw{NnBDW~x8+_ZCHd">
<mutation statement="false" at="true"></mutation>
<field name="MODE">GET</field>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="x,Us%3OwtWWi]Nd!7njK">
<field name="VAR" id="e%^+o,6sf9B/FYnuhoqQ">Text</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="6e`5#3?`qDOGH.6q`a0P">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
</block>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="|Tr{+H=7b/qXfSTo({t~">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="control_ex" id="F+F9Sk6]69W:)[:n@vX/">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="b9GuVy.TEzA.-}/qdzZN">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="DSjeUg9RvA2,WCaeMfd@">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="|wYb/ve-Y*jnE%ca!I_G">
<field name="TEXT">popupNotifyButton1Text</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="*X6QutFAYIY$iK5V+~UD">
<field name="VAR" id="+s+k$`6x!Mb[t~Ts^Zrp">Button1Text</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="Ml=_Ulq81[g69a)@|Qkm">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="control_ex" id="3Z)3)(|.(hkIx3-PT@|P">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="0#.$9%@5zvXChK]o?Ea-">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="Vlqn+`oBU)ah9-3j.C/6">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="[#Qn_6*0:SEOF8c(e(O{">
<field name="TEXT">popupNotifyButton2Text</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="b,d/aOuz,.z7YW9u.t)L">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="REAQ|_d7R|Nseprua+z)">
<field name="VAR" id="iP=Bs[zV55PS82(Q$`|7">Button2Text</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="-hKt9zkZ)EW}2JPfUQ0P">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="control_ex" id="E6Fv|5]Mo`o2V#.X:C!l">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="e%zigg.})n+9kv=nF?U:">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="E-K;vy1^]dwA_.QTR%vY">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="]Dfo.AuiBLRnzoy2y^5+">
<field name="TEXT">popupNotifyIcon</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean">
<field name="BOOL">TRUE</field>
</shadow>
<block type="lists_getIndex" id="n)hhvq!@eP4fpgv]{t;L">
<mutation statement="false" at="true"></mutation>
<field name="MODE">GET</field>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="vnPh!svY^|ea(Qy%7D4;">
<field name="VAR" id=")S5LKNN/K5V9|_8OXyGn">Icon</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="NzDd.GJ,LAb5{:b9BKW$">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
</block>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="mwhM5`NFI5gHFUI=k?l$">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="control_ex" id="e8uy*Pv6GuNS8aYQ*VK]">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="z+#e[O1i?5p39o`mKa%H">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="w(,@Ea[q^648(ct7uMuu">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="qe{^,D}.QwO`cVxy/0lY">
<field name="TEXT">popupNotifyFontIdText</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean">
<field name="BOOL">TRUE</field>
</shadow>
<block type="lists_getIndex" id="~Ya(l{Klir2gjz_Rs|lU">
<mutation statement="false" at="true"></mutation>
<field name="MODE">GET</field>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="~XuGUXm/c1-u^QZwNG:?">
<field name="VAR" id="n%`;Bp1UH/yVByUHY*9b">FontSize</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="Y:d)mhntP8(zQP~Mhr!N">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
</block>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="+H}hyUjz|NF{:PO91Amp">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="comment" id="?s`?D911sLmb=(!DW/H5">
<field name="COMMENT">Farben</field>
<next>
<block type="control_ex" id="k}pAIbU2NC6fx,ddNOy4">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="G7)$yw:BL.aTmiGwk/rK">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="g^@EpqGv[x[x2r|P}F4M">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="8fCdKD%2+q?4?`b;lQh`">
<field name="TEXT">popupNotifyHeadingColor</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="C=O+`dda7{`bqbl-n[ba">
<field name="VAR" id="RLIY*e=6(.:_k@OJSC?Y">HeadingTextColor</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="/M,.9e?A^FnpJW6dIxbh">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="control_ex" id="/3BW4FG^eXdSm7t*e!/6">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="_xy9Ii5CdY+F9GwFp4g+">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="/!qDhB5w,D%V:{aB_wpg">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="3v)4.yEZ2fGbKtGX`3ey">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id=")A@9%?K[M8wo2ZZUe?5L">
<field name="TEXT">popupNotifyTextColor</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="t~f!0F6^(~=qL9f6~_oc">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="Df/fUIbt82CM3o2ogA,X">
<field name="VAR" id="K~gzNq|K||t-`B*`Kcr`">TextColor</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="eR{B_FXP*E3vS80#CCf:">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="comment" id="iFc,dYv9#FZk,4kqcuFk">
<field name="COMMENT">Zum Schuss InternalName (Trigger)</field>
<next>
<block type="control_ex" id="L(~Pj.ix0^{Ya/r#3[0K">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid">
<field name="oid">Object ID</field>
</shadow>
<block type="text_join" id="OlxQxLn/pYGmeA_xRnO8">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get" id="Z.!S^TTi/upc/Nl*cxRY">
<field name="VAR" id="7Q3%H,r3WG((Q;]w,bbK">0_userdata_Path</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="Z#)T9XCNj(g@_4Gp`k2R">
<field name="TEXT">popupNotifyInternalName</field>
</block>
</value>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean">
<field name="BOOL">TRUE</field>
</shadow>
<block type="lists_getIndex" id="}#tL$1].x^u5K.,%*~?+">
<mutation statement="false" at="true"></mutation>
<field name="MODE">GET</field>
<field name="WHERE">FROM_START</field>
<value name="VALUE">
<block type="variables_get" id="M8w@CJqHS)q[|s?lPKLn">
<field name="VAR" id="6sx!Ebx43k2^RFs;w0^K">HeadingText</field>
</block>
</value>
<value name="AT">
<block type="variables_get" id="qL@?;F_N~=WoTq:?,X.Y">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
</block>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="SLN(b%5k(a6xbm3U_cuX">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="controls_if" id="ow;^lRZ-Ilt^t8FxHvAB">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="qi}D0]*xjQ]+-@yJ8H0D">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="O@o^%WEIe5aX?5Nzk|{T">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
</block>
</value>
<value name="B">
<block type="lists_length" id=")65Ex%xEDX+T|[fjS6-M">
<value name="VALUE">
<block type="variables_get" id=":TljLB4j,Dbg(1CbBsb`">
<field name="VAR" id="6sx!Ebx43k2^RFs;w0^K">HeadingText</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="S%n3B6G2LY0/41=z[89j">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
<value name="VALUE">
<block type="math_number" id="oFB,97B}*NYW:;=)w(Sx">
<field name="NUM">1</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="math_change" id="s0-P!tG!UgB8t6vbR03G">
<field name="VAR" id="#?MpfqBMCW|l*?q]RI[X">i</field>
<value name="DELTA">
<shadow type="math_number" id="7.eLfBS{0kkyTn#,I:B4">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id="v}2ivqnyQ2W`E`r@UNS0">
<field name="NUM">1</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,236 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="QPiqoyWT$%Cp)OZ=|`*W">vSTATE</variable>
<variable id="!E]!o]+#iwtI}R=X+,zV">vACTUAL</variable>
<variable id="#BYGZV@hvwAL/]L2%/8w">sec_timer</variable>
<variable type="interval" id="Intervall">Intervall</variable>
</variables>
<block type="variables_set" id="XV2H4i,jWn`z+)|k#NJw" x="38" y="-263">
<field name="VAR" id="QPiqoyWT$%Cp)OZ=|`*W">vSTATE</field>
<value name="VALUE">
<block type="text" id="r,7fA;o:e.|28/,@0]JH">
<field name="TEXT">0_userdata.0.Timer.NSPanel.1.Countdown.Zustand</field>
</block>
</value>
<next>
<block type="variables_set" id="r4Cw8qj}45yA4j7D(^B-">
<field name="VAR" id="!E]!o]+#iwtI}R=X+,zV">vACTUAL</field>
<value name="VALUE">
<block type="text" id="nRXWb#VRyJS5cXNbhq0y">
<field name="TEXT">0_userdata.0.Timer.NSPanel.1.Countdown.Sekunden</field>
</block>
</value>
<next>
<block type="variables_set" id="57{xGHam)5G*~)???W)5">
<field name="VAR" id="#BYGZV@hvwAL/]L2%/8w">sec_timer</field>
<value name="VALUE">
<block type="get_value_var" id="s9stp?b253SRZwZo*b`t">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text" id="K,Lb1bBP41R.OE[NS)i1">
<field name="TEXT"></field>
</shadow>
<block type="variables_get" id="uqn`Azeg-~BoGAP`6l7c">
<field name="VAR" id="!E]!o]+#iwtI}R=X+,zV">vACTUAL</field>
</block>
</value>
</block>
</value>
<next>
<block type="on_ext" id="KTTXX_aR/l#vo.Oy!god">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="[~]6MakRk81y;6T=D#E1">
<field name="oid">default</field>
</shadow>
<block type="text" id="99{OsQ*le2{H2clp=,[^">
<field name="TEXT">0_userdata.0.Timer.NSPanel.1.Countdown.Zustand</field>
</block>
</value>
<statement name="STATEMENT">
<block type="logic_switch_case" id="*DcmKGH^MzH`@|}$)`Vi">
<mutation xmlns="http://www.w3.org/1999/xhtml" default="1"></mutation>
<value name="CONDITION">
<block type="on_source" id="Kv#`7##ZlSfAaV9U*YlU">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="CASECONDITION0">
<block type="text" id="jSK+-X9^LZ52;FZkF{N@">
<field name="TEXT">active</field>
</block>
</value>
<statement name="CASE0">
<block type="timeouts_clearinterval" id="H1?KT2GS=;m|lB4B[d9{">
<field name="NAME">Intervall</field>
<next>
<block type="timeouts_setinterval" id="OCAffLYx5xl2^)mb:1ON">
<field name="NAME">Intervall</field>
<field name="INTERVAL">1000</field>
<field name="UNIT">ms</field>
<statement name="STATEMENT">
<block type="controls_if" id="M:$D10b:c^VB7N-[zAAs">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="Y%K:Fww+C*D)mW_pAvb5" inline="false">
<field name="OP">GT</field>
<value name="A">
<block type="get_value_var" id="AkNnDdzS;{lm8`UsDA$a">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text" id="jvzl]}[mrPTl0ev@@~.i">
<field name="TEXT"></field>
</shadow>
<block type="variables_get" id="0}HonAc*HO)G!?xMBnx]">
<field name="VAR" id="!E]!o]+#iwtI}R=X+,zV">vACTUAL</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="E}Xx=@{9XDIhj5($(DXz">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="[lc#LS]+_y3JU6;*iy/;">
<field name="VAR" id="#BYGZV@hvwAL/]L2%/8w">sec_timer</field>
<value name="VALUE">
<block type="get_value_var" id="()czu@y9l5__t%_~guQ4">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text" id="O~#Pq`;j8,}OcT/IMc2|">
<field name="TEXT"></field>
</shadow>
<block type="variables_get" id="B0a}HDdI9+PoN,71,$tV">
<field name="VAR" id="!E]!o]+#iwtI}R=X+,zV">vACTUAL</field>
</block>
</value>
</block>
</value>
<next>
<block type="control_ex" id="3I8#ZkQ(OTw*^t6-dpu6" inline="true">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="YjjD8L[b+^gS7jV^+[Y~">
<field name="oid">Object ID</field>
</shadow>
<block type="variables_get" id="?r6MSEFq,iv61OR]$K6R">
<field name="VAR" id="!E]!o]+#iwtI}R=X+,zV">vACTUAL</field>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="G4EZc5H)j2Zdg:=;eu%n">
<field name="BOOL">TRUE</field>
</shadow>
<block type="math_arithmetic" id="0178UKVA@dcT|$46OmJx">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="8Ymex9XyD-+Ouo]MD`8d">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="RHFea=Bu!IabYuXBG:EX">
<field name="VAR" id="#BYGZV@hvwAL/]L2%/8w">sec_timer</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="sejG{?~!bE6~.u.4td%|">
<field name="NUM">1</field>
</shadow>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="k:`kho).[#@/%ye+g.u?">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="control_ex" id="QsmpsLDys?p|Hy=+M`nA" inline="true">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id=".74}mEqIO9M~:ek5U;R(">
<field name="oid">Object ID</field>
</shadow>
<block type="variables_get" id="f`@kho?65GVY~$;xysw3">
<field name="VAR" id="!E]!o]+#iwtI}R=X+,zV">vACTUAL</field>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="hkR7Dc_[$;{L`+JxicRa">
<field name="BOOL">TRUE</field>
</shadow>
<block type="math_number" id="4u6KIhWH@!VZ0*$MD;u7">
<field name="NUM">0</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="g]^hfC+$vJu[_o`O!8c1">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="control_ex" id="Bk@3kjR?T{Px,8U!3]{w" inline="true">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="#GVc9+G/u85]l_vcm;zH">
<field name="oid">Object ID</field>
</shadow>
<block type="variables_get" id=":,.Z}O;]8X=;wj%SxO5w">
<field name="VAR" id="QPiqoyWT$%Cp)OZ=|`*W">vSTATE</field>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="5ne=aTSnU@7c$CGM9EUC">
<field name="BOOL">TRUE</field>
</shadow>
<block type="text" id="mm{`e;eblljVtUBz2(_!">
<field name="TEXT">idle</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="/.0#c4XU-@]c!Q{onR2T">
<field name="NUM">0</field>
</shadow>
</value>
<next>
<block type="comment" id="Uvi2,2[ruXRlYD.4c(=^">
<field name="COMMENT">An dieser Stelle kann auch noch eine Meldung an Alexa oder Telegram, etc. erfolgen</field>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</statement>
<statement name="ONDEFAULT">
<block type="timeouts_clearinterval" id="t*fh0y@^c/W:T/x#PS!g">
<field name="NAME">Intervall</field>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,39 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="Uw.Jx`*MQ7d]N=k6_hef">red</variable>
<variable id="l/tKh!CxVZ8MaUD8]4BC">green</variable>
<variable id="W+I@m/~8~V?qYW18MFf;">blue</variable>
</variables>
<block type="procedures_callcustomnoreturn" id="Q,IVDSL4b@cXsV7yc{3]" x="163" y="-462">
<mutation name="rgb_dec565">
<arg name="red"></arg>
<arg name="green"></arg>
<arg name="blue"></arg>
</mutation>
<value name="ARG0">
<block type="math_number" id="^yjvoCmYPYdayZ,S?8m@">
<field name="NUM">255</field>
</block>
</value>
<value name="ARG1">
<block type="math_number" id="|-SI7Y?An]a$M^UJTXf@">
<field name="NUM">255</field>
</block>
</value>
<value name="ARG2">
<block type="math_number" id="|qlCesDW{Y%4-P%nJ0@D">
<field name="NUM">255</field>
</block>
</value>
</block>
<block type="procedures_defcustomnoreturn" id="+p_U;y%).og3oh3En}~T" x="163" y="-337">
<mutation statements="false">
<arg name="red" varid="Uw.Jx`*MQ7d]N=k6_hef"></arg>
<arg name="green" varid="l/tKh!CxVZ8MaUD8]4BC"></arg>
<arg name="blue" varid="W+I@m/~8~V?qYW18MFf;"></arg>
</mutation>
<field name="NAME">rgb_dec565</field>
<field name="SCRIPT">Y29uc29sZS53YXJuKCgoTWF0aC5mbG9vcihyZWQgLyAyNTUgKiAzMSkgPDwgMTEpIHwgKE1hdGguZmxvb3IoZ3JlZW4gLyAyNTUgKiA2MykgPDwgNSkgfCAoTWF0aC5mbG9vcihibHVlIC8gMjU1ICogMzEpKSkpOw0K</field>
<comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
</block>
</xml>

View File

@@ -0,0 +1,94 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on" id="^D-c/jQ8.N);=7Ic~rAw" x="-238" y="-237">
<field name="OID">0_userdata.0.NSPanel.1.DP_RQ.NSPanel_InfoRQ</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="NA-Iy%xl.-1qP}_ntm-K">
<value name="IF0">
<block type="logic_compare" id="xU6_pkIHp:+an:llYxO7">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="zt-oj}9|^lz$y0Y+uX{z">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.NSPanel.1.DP_RQ.NSPanel_InfoRQ</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="W*,0+F8r{1lGvOZRLqR!">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="timeouts_wait" id="PWh;}}r)zb#ugpv6*sj|">
<field name="DELAY">20</field>
<field name="UNIT">sec</field>
<next>
<block type="control" id="oiUfnP)ms6:HeZU2e|;u">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.NSPanel.1.ScreensaverInfo.popupNotifyHeading</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="k:,q%UL1r6loKc@D}r+(">
<field name="TEXT">INFO</field>
</block>
</value>
<next>
<block type="control" id="Ma4m/8_a28*A7/`%`*0X">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.NSPanel.1.ScreensaverInfo.popupNotifyText</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="ng-xB),UUycdg4GI2|K{">
<field name="TEXT">Heute ist es ganz schön heiß!</field>
</block>
</value>
<next>
<block type="toggle" id="qUH1D!wwJXiYr[KQ,.}A">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.NSPanel.1.DP_RQ.NSPanel_InfoRQ</field>
<field name="WITH_DELAY">FALSE</field>
<next>
<block type="timeouts_wait" id=";93SSUfV69!-h_CWkA.@">
<field name="DELAY">20</field>
<field name="UNIT">sec</field>
<next>
<block type="control" id="}fxN7f3*x$HF9#ePhL3i">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.NSPanel.1.ScreensaverInfo.popupNotifyHeading</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="b0jBsnk@!YwX~cuxkgOi">
<field name="TEXT"></field>
</block>
</value>
<next>
<block type="control" id="C}QMk;?Qtx^ZviUKh-}9">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.NSPanel.1.ScreensaverInfo.popupNotifyText</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="m;bIZ!Y7H`e|BikGQ$%S">
<field name="TEXT"></field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>

View File

@@ -0,0 +1,51 @@
const aliasPath = 'alias.0.Media.LMS'; // ggfs. Anpassen
const aliasDevice = 'SqueezePlay'; // ggfs. Anpassen
//Ergibt alias.0.NSPanel_1.Media.SqueezeBoxRPC
const squeezeBoxInstanz = 'squeezeboxrpc.0.Players.'; // Anpasssen, wenn nicht Instanz 0
const squeezeBoxDevice = 'SqueezePlay'; // Anpassen an dein eigenes Device
var typeAlias, read, write, nameAlias, role, desc, min, max, unit, states, custom;
function createAlias(idDst, idName,idSrc, idRd, idType, idRole, idAliasType) {
if(existsState(idDst)) log(idDst + ' schon vorhanden !', 'warn');
else {
var obj = {};
obj.type = idType;
obj.common = getObject(idSrc).common
obj.common.alias = {};
if(idRd) {
obj.common.alias.id = {};
obj.common.alias.id.read = idRd;
obj.common.alias.id.write = idSrc;
obj.common.read = true;
} else {
obj.common.alias.id = idSrc;
}
obj.common.type = idAliasType;
if(obj.common.read !== false && read) obj.common.alias.read = read;
if(obj.common.write !== false && write) obj.common.alias.write = write;
obj.common.name = idName;
obj.common.role = idRole;
obj.common.desc = idDst;
if(min !== undefined) obj.common.min = min;
if(max !== undefined) obj.common.max = max;
if(unit) obj.common.unit = unit;
obj.common.states = states;
if(custom && obj.common.custom) obj.common.custom = custom;
obj.native = {};
setObject(idDst, obj);
}
}
createAlias(aliasPath + '.' + aliasDevice + '.ALBUM', 'ALBUM', squeezeBoxInstanz + squeezeBoxDevice + '.Album', '', 'state', 'media.album', 'string');
createAlias(aliasPath + '.' + aliasDevice + '.ARTIST', 'ARTIST', squeezeBoxInstanz + squeezeBoxDevice + '.Artist', '', 'state', 'media.artist', 'string');
createAlias(aliasPath + '.' + aliasDevice + '.TITLE', 'TITLE', squeezeBoxInstanz + squeezeBoxDevice + '.Title', '', 'state', 'media.title', 'string');
createAlias(aliasPath + '.' + aliasDevice + '.NEXT', 'NEXT', squeezeBoxInstanz + squeezeBoxDevice + '.btnForward', '', 'state', 'button.forward', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.PREV', 'PREV', squeezeBoxInstanz + squeezeBoxDevice + '.btnRewind', '', 'state', 'button.reverse', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.PLAY', 'PLAY', squeezeBoxInstanz + squeezeBoxDevice + '.state', '', 'state', 'media.state', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.PAUSE', 'PAUSE', squeezeBoxInstanz + squeezeBoxDevice + '.state', '', 'state', 'media.state', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.STOP', 'STOP', squeezeBoxInstanz + squeezeBoxDevice + '.state', '', 'state', 'media.state', 'boolean');
createAlias(aliasPath + '.' + aliasDevice + '.STATE', 'STATE', squeezeBoxInstanz + squeezeBoxDevice + '.Power', '', 'state', 'switch', 'number');
createAlias(aliasPath + '.' + aliasDevice + '.VOLUME', 'VOLUME', squeezeBoxInstanz + squeezeBoxDevice + '.Volume', '', 'state', 'level.volume', 'number');
createAlias(aliasPath + '.' + aliasDevice + '.VOLUME_ACTUAL', 'VOLUME_ACTUAL', squeezeBoxInstanz + squeezeBoxDevice + '.Volume', '', 'state', 'value.volume', 'number');

View File

@@ -1,6 +1,6 @@
/*-----------------------------------------------------------------------
TypeScript v3.7.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 46 / v3.7.0 / BerryDriver 6 / Tasmota 12.3.1
TypeScript v3.7.3.1 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 46 / v3.7.3 / BerryDriver 8 / Tasmota 12.3.1
@joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker
NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts
icon_mapping.ts: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/icon_mapping.ts (TypeScript muss in global liegen)
@@ -101,6 +101,10 @@ ReleaseNotes:
- 20.12.2022 - v3.7.0 Add popUpTimer / New ALIAS Type level.timer
- 21.12.2022 - v3.7.0 Add Fan / New ALIAS Type level.mode.fan
- 22.12.2022 - v3.7.0 Add InSel - InputSelector with Alias Type buttonSensor (DP .VALUE)
- 23.10.2022 - v3.7.0 Upgrade TFT 46
- 28.12.2022 - v3.7.3.0 Hotfix - bUp case
- 28.12.2022 - v3.7.3.0 Update Berry Version 8
- 29.12.2022 - v3.7.3.1 Hotfix - us-p - DateString - Use long/short Weekday and long/short Month
*****************************************************************************************************************
* Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! *
@@ -174,7 +178,7 @@ Erforderliche Adapter:
Upgrades in Konsole:
Tasmota BerryDriver : Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.7.0.tft
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.7.3.tft
---------------------------------------------------------------------------------------
*/
let Icons = new IconsSelector();
@@ -913,6 +917,16 @@ async function InitAlternateMRIconsSize() {
}
InitAlternateMRIconsSize();
//DateString short/long
async function InitDateformat() {
if (existsState(NSPanel_Path + 'Config.Dateformat.weekday') == false ||
existsState(NSPanel_Path + 'Config.Dateformat.month') == false) {
await createStateAsync(NSPanel_Path + 'Config.Dateformat.weekday', 'long', { type: 'string' });
await createStateAsync(NSPanel_Path + 'Config.Dateformat.month', 'long', { type: 'string' });
}
}
InitDateformat();
on({id: [].concat(String(NSPanel_Path) + 'Relay.1').concat(String(NSPanel_Path) + 'Relay.2'), change: "ne"}, async function (obj) {
try {
let Button = obj.id.split('.');
@@ -1343,7 +1357,7 @@ function get_locales() {
async function check_updates() {
try {
const desired_display_firmware_version = 46;
const berry_driver_version = 6;
const berry_driver_version = 8;
if (Debug) {
console.log('Check-Updates');
@@ -1791,7 +1805,7 @@ function update_berry_driver_version() {
}
function update_tft_firmware() {
const tft_version: string = 'v3.7.0';
const tft_version: string = 'v3.7.3';
const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`;
try {
request({
@@ -2027,8 +2041,11 @@ function HandleStartupProcess(): void {
function SendDate(): void {
try {
let dpWeekday = existsObject(NSPanel_Path + 'Config.Dateformat.weekday') ? getState(NSPanel_Path + 'Config.Dateformat.weekday').val : 'short'
let dpMonth = existsObject(NSPanel_Path + 'Config.Dateformat.month') ? getState(NSPanel_Path + 'Config.Dateformat.month').val : 'short'
const date = new Date();
const options: any = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
const options: any = { weekday: dpWeekday, year: 'numeric', month: dpMonth, day: 'numeric' };
const _SendDate = date.toLocaleDateString(config.locale, options);
SendToPanel(<Payload>{ payload: 'date~' + _SendDate });
@@ -3733,11 +3750,27 @@ function HandleButtonEvent(words): void {
case 'bUp':
if (pageId < 0) { // Prüfen, ob button1page oder button2page
pageId = 0;
} else {
pageId = Math.abs(pageNum);
}
UnsubscribeWatcher();
GeneratePage(config.pages[pageId]);
} else {
pageNum = (((pageId - 1) % config.pages.length) + config.pages.length) % config.pages.length;
pageId = pageNum;
UnsubscribeWatcher();
if (activePage != undefined && activePage.parent != undefined) {
//update pageID
for (let i = 0; i < config.pages.length; i++) {
if (config.pages[i] == activePage.parent) {
pageId = i;
break;
}
}
GeneratePage(activePage.parent);
}
else {
GeneratePage(config.pages[pageId]);
}
break;
}
break;
case 'bNext':
pageNum = (((pageId + 1) % config.pages.length) + config.pages.length) % config.pages.length;

View File

@@ -1,6 +1,6 @@
/*-----------------------------------------------------------------------
TypeScript v3.7.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 46 / v3.7.0 / BerryDriver 6 / Tasmota 12.3.1
TypeScript v3.7.3.1 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 46 / v3.7.3 / BerryDriver 8 / Tasmota 12.3.1
@joBr99 Projekt: https://github.com/joBr99/nspanel-lovelace-ui/tree/main/ioBroker
NsPanelTs.ts (dieses TypeScript in ioBroker) Stable: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts
icon_mapping.ts: https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/icon_mapping.ts (TypeScript muss in global liegen)
@@ -101,6 +101,10 @@ ReleaseNotes:
- 20.12.2022 - v3.7.0 Add popUpTimer / New ALIAS Type level.timer
- 21.12.2022 - v3.7.0 Add Fan / New ALIAS Type level.mode.fan
- 22.12.2022 - v3.7.0 Add InSel - InputSelector with Alias Type buttonSensor (DP .VALUE)
- 23.10.2022 - v3.7.0 Upgrade TFT 46
- 28.12.2022 - v3.7.3.0 Hotfix - bUp case
- 28.12.2022 - v3.7.3.0 Update Berry Version 8
- 29.12.2022 - v3.7.3.1 Hotfix - us-p - DateString - Use long/short Weekday and long/short Month
*****************************************************************************************************************
* Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! *
@@ -174,7 +178,7 @@ Erforderliche Adapter:
Upgrades in Konsole:
Tasmota BerryDriver : Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.7.0.tft
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.7.3.tft
---------------------------------------------------------------------------------------
*/
let Icons = new IconsSelector();
@@ -500,6 +504,16 @@ async function InitAlternateMRIconsSize() {
}
InitAlternateMRIconsSize();
//DateString short/long
async function InitDateformat() {
if (existsState(NSPanel_Path + 'Config.Dateformat.weekday') == false ||
existsState(NSPanel_Path + 'Config.Dateformat.month') == false) {
await createStateAsync(NSPanel_Path + 'Config.Dateformat.weekday', 'long', { type: 'string' });
await createStateAsync(NSPanel_Path + 'Config.Dateformat.month', 'long', { type: 'string' });
}
}
InitDateformat();
on({id: [].concat(String(NSPanel_Path) + 'Relay.1').concat(String(NSPanel_Path) + 'Relay.2'), change: "ne"}, async function (obj) {
try {
let Button = obj.id.split('.');
@@ -930,7 +944,7 @@ function get_locales() {
async function check_updates() {
try {
const desired_display_firmware_version = 46;
const berry_driver_version = 6;
const berry_driver_version = 8;
if (Debug) {
console.log('Check-Updates');
@@ -1378,7 +1392,7 @@ function update_berry_driver_version() {
}
function update_tft_firmware() {
const tft_version: string = 'v3.7.0';
const tft_version: string = 'v3.7.3';
const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`;
try {
request({
@@ -1614,8 +1628,11 @@ function HandleStartupProcess(): void {
function SendDate(): void {
try {
let dpWeekday = existsObject(NSPanel_Path + 'Config.Dateformat.weekday') ? getState(NSPanel_Path + 'Config.Dateformat.weekday').val : 'short'
let dpMonth = existsObject(NSPanel_Path + 'Config.Dateformat.month') ? getState(NSPanel_Path + 'Config.Dateformat.month').val : 'short'
const date = new Date();
const options: any = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
const options: any = { weekday: dpWeekday, year: 'numeric', month: dpMonth, day: 'numeric' };
const _SendDate = date.toLocaleDateString(config.locale, options);
SendToPanel(<Payload>{ payload: 'date~' + _SendDate });
@@ -3320,11 +3337,27 @@ function HandleButtonEvent(words): void {
case 'bUp':
if (pageId < 0) { // Prüfen, ob button1page oder button2page
pageId = 0;
} else {
pageId = Math.abs(pageNum);
}
UnsubscribeWatcher();
GeneratePage(config.pages[pageId]);
} else {
pageNum = (((pageId - 1) % config.pages.length) + config.pages.length) % config.pages.length;
pageId = pageNum;
UnsubscribeWatcher();
if (activePage != undefined && activePage.parent != undefined) {
//update pageID
for (let i = 0; i < config.pages.length; i++) {
if (config.pages[i] == activePage.parent) {
pageId = i;
break;
}
}
GeneratePage(activePage.parent);
}
else {
GeneratePage(config.pages[pageId]);
}
break;
}
break;
case 'bNext':
pageNum = (((pageId + 1) % config.pages.length) + config.pages.length) % config.pages.length;

View File

@@ -321,7 +321,7 @@ tasmota.add_driver(nextion)
def get_current_version(cmd, idx, payload, payload_json)
import string
var version_of_this_script = 7
var version_of_this_script = 8
var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script)
tasmota.publish_result(jm, "RESULT")
end
@@ -330,7 +330,35 @@ tasmota.add_cmd('GetDriverVersion', get_current_version)
def update_berry_driver(cmd, idx, payload, payload_json)
def task()
import path
import string
if string.find(payload, ".tapp") > 0
print("tapp in URL; will do .tapp update and migration if necessary")
if path.exists("autoexec.be")
print("autoexec.be found; will check for migration")
var autoexecfile = open('autoexec.be')
var line = autoexecfile.readline()
autoexecfile.close()
if string.find(line, "NSPanel Tasmota Lovelace UI Berry Driver") > 0
print("found lovelace berry driver, going to delete autoexec.be and .bec")
path.remove("autoexec.be")
path.remove("autoexec.bec")
end
end
var r = tasmota.urlfetch(payload, "nsp-lovelace-driver.tapp")
if r < 0
print("Update failed")
else
tasmota.cmd("Restart 1")
end
elif string.find(payload, ".be") > 0
print("be in URL; will do .be update")
if path.exists("nsp-lovelace-driver.tapp")
print("Error: there is the tapp version of the berry driver installed; cannot do .be update.")
else
var cl = webclient()
cl.begin(payload)
var r = cl.GET()
@@ -344,15 +372,29 @@ def update_berry_driver(cmd, idx, payload, payload_json)
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")
tasmota.cmd("Restart 1")
end
end
else
var jm = string.format("{\"nlui_driver_update\":\"%s\"}", "failed")
tasmota.publish_result(jm, "RESULT")
print("invalid url filetype")
end
if path.exists("nsp-lovelace-driver.tapp")
var r = string.find(payload, ".tapp")
if r < 0
print("URL doesn't contain .tapp skipping update")
else
end
else
var r = string.find(payload, ".be")
if r < 0
print("URL doesn't contain .be skipping update")
else
end
end
end
tasmota.set_timer(0,task)

Binary file not shown.