From 55365dcfaa18e783b019fd8618834f84b9f02bd7 Mon Sep 17 00:00:00 2001 From: joBr99 Date: Thu, 5 Jan 2023 18:06:23 +0000 Subject: [PATCH 01/16] added flipped version (add nextion2text) --- HMI/US/landscape/diff-eu-version.txt | 2877 +---------------- HMI/US/landscape/n2t-out-visual/Program.s.txt | 1 + HMI/US/landscape/n2t-out-visual/cardAlarm.txt | 122 +- HMI/US/landscape/n2t-out-visual/cardChart.txt | 166 +- .../landscape/n2t-out-visual/cardEntities.txt | 258 +- HMI/US/landscape/n2t-out-visual/cardGrid.txt | 196 +- HMI/US/landscape/n2t-out-visual/cardMedia.txt | 216 +- HMI/US/landscape/n2t-out-visual/cardPower.txt | 146 +- HMI/US/landscape/n2t-out-visual/cardQR.txt | 136 +- .../landscape/n2t-out-visual/cardThermo.txt | 190 +- .../n2t-out-visual/nspanel_US_L_Stats.txt | 116 +- HMI/US/landscape/n2t-out-visual/pageIcons.txt | 2 +- .../landscape/n2t-out-visual/pageStartup.txt | 2 +- HMI/US/landscape/n2t-out-visual/pageTest.txt | 213 +- .../landscape/n2t-out-visual/popupLight.txt | 6 +- .../landscape/n2t-out-visual/popupNotify.txt | 6 +- .../landscape/n2t-out-visual/popupShutter.txt | 28 +- .../landscape/n2t-out-visual/popupThermo.txt | 36 +- .../landscape/n2t-out-visual/screensaver.txt | 134 +- HMI/US/landscape/n2t-out/Program.s.txt | 1 + HMI/US/landscape/n2t-out/cardAlarm.txt | 114 +- HMI/US/landscape/n2t-out/cardChart.txt | 96 +- HMI/US/landscape/n2t-out/cardEntities.txt | 164 +- HMI/US/landscape/n2t-out/cardGrid.txt | 146 +- HMI/US/landscape/n2t-out/cardMedia.txt | 166 +- HMI/US/landscape/n2t-out/cardPower.txt | 138 +- HMI/US/landscape/n2t-out/cardQR.txt | 124 +- HMI/US/landscape/n2t-out/cardThermo.txt | 178 +- HMI/US/landscape/n2t-out/pageStartup.txt | 2 +- HMI/US/landscape/n2t-out/pageTest.txt | 127 +- HMI/US/landscape/n2t-out/screensaver.txt | 29 +- HMI/US/portrait/diff-eu-version.txt | 18 - HMI/US/portrait/diff-filtered.txt | 22 +- HMI/US/portrait/n2t-out-visual/cardThermo.txt | 2 +- .../n2t-out-visual/nspanel_US_P_Stats.txt | 8 +- .../portrait/n2t-out-visual/pageStartup.txt | 2 +- HMI/US/portrait/n2t-out/cardThermo.txt | 2 +- HMI/US/portrait/n2t-out/pageStartup.txt | 2 +- HMI/n2t-out-visual/nspanel_Stats.txt | 8 +- HMI/n2t-out-visual/pageStartup.txt | 2 +- HMI/n2t-out/pageStartup.txt | 2 +- 41 files changed, 1773 insertions(+), 4431 deletions(-) diff --git a/HMI/US/landscape/diff-eu-version.txt b/HMI/US/landscape/diff-eu-version.txt index 5491d101..41502c67 100644 --- a/HMI/US/landscape/diff-eu-version.txt +++ b/HMI/US/landscape/diff-eu-version.txt @@ -2,7 +2,7 @@ +++ HMI/US/landscape/n2t-out │ --- HMI/n2t-out/Program.s.txt ├── +++ HMI/US/landscape/n2t-out/Program.s.txt -│ @@ -10,10 +10,7 @@ +│ @@ -10,10 +10,8 @@ │ int sleepValue=0 │ // dim value │ int dimValue=40 @@ -12,2809 +12,7 @@ │ int defaultBcoColor=6371 │ - // fix touch offset │ - lcd_dev fffb 0002 0000 0020 -│ - page pageStartup -│ --- HMI/n2t-out/cardAlarm.txt -├── +++ HMI/US/landscape/n2t-out/cardAlarm.txt -│ @@ -59,26 +59,14 @@ -│ -│ Variable (string) entn -│ Attributes -│ Scope : local -│ 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: 200 -│ -│ Variable (string) tSend -│ @@ -490,15 +478,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardAlarm," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -515,15 +510,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardAlarm," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -634,88 +636,94 @@ -│ 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") -│ { -│ //entn -│ spstr strCommand.txt,entn.txt,"~",1 -│ - // navigation icon left -│ - spstr strCommand.txt,tTmp.txt,"~",2 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bPrev,1 -│ + tsw mSwipePrev,1 -│ + tsw mSwipeUp,0 -│ + bPrev.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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,0 -│ + tsw mSwipeUp,1 -│ + bPrev.txt="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + spstr tId.txt,tTmp.txt,"|",1 -│ + if(tTmp.txt=="0") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bNext,1 -│ + tsw mSwipeNext,1 -│ + bNext.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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 -│ + bNext.txt="" -│ } -│ //text arm1 -│ - spstr strCommand.txt,arm1.txt,"~",14 -│ + spstr strCommand.txt,arm1.txt,"~",3 -│ if(arm1.txt!="") -│ { -│ vis arm1,1 -│ } -│ //id arm1 -│ - spstr strCommand.txt,va1.txt,"~",15 -│ + spstr strCommand.txt,va1.txt,"~",4 -│ //text arm2 -│ - spstr strCommand.txt,arm2.txt,"~",16 -│ + spstr strCommand.txt,arm2.txt,"~",5 -│ if(arm2.txt!="") -│ { -│ vis arm2,1 -│ } -│ //id arm2 -│ - spstr strCommand.txt,va2.txt,"~",17 -│ + spstr strCommand.txt,va2.txt,"~",6 -│ //text arm3 -│ - spstr strCommand.txt,arm3.txt,"~",18 -│ + spstr strCommand.txt,arm3.txt,"~",7 -│ if(arm3.txt!="") -│ { -│ vis arm3,1 -│ } -│ //id arm3 -│ - spstr strCommand.txt,va3.txt,"~",19 -│ + spstr strCommand.txt,va3.txt,"~",8 -│ //text arm4 -│ - spstr strCommand.txt,arm4.txt,"~",20 -│ + spstr strCommand.txt,arm4.txt,"~",9 -│ if(arm4.txt!="") -│ { -│ vis arm4,1 -│ } -│ //id arm4 -│ - spstr strCommand.txt,va4.txt,"~",21 -│ + spstr strCommand.txt,va4.txt,"~",10 -│ //icon -│ - spstr strCommand.txt,tIcon.txt,"~",22 -│ + spstr strCommand.txt,tIcon.txt,"~",11 -│ //icon color -│ - spstr strCommand.txt,tTmp.txt,"~",23 -│ + spstr strCommand.txt,tTmp.txt,"~",12 -│ covx tTmp.txt,sys0,0,0 -│ tIcon.pco=sys0 -│ //numpad status -│ - spstr strCommand.txt,tTmp.txt,"~",24 -│ + spstr strCommand.txt,tTmp.txt,"~",13 -│ if(tTmp.txt!="disable") -│ { -│ vis b0,1 -│ vis b1,1 -│ vis b2,1 -│ vis b3,1 -│ vis b4,1 -│ @@ -740,30 +748,30 @@ -│ vis b8,0 -│ vis b9,0 -│ vis b10,0 -│ vis b11,0 -│ vis tCode,0 -│ } -│ //flashing status -│ - spstr strCommand.txt,tTmp.txt,"~",25 -│ + spstr strCommand.txt,tTmp.txt,"~",14 -│ if(tTmp.txt=="enable") -│ { -│ tmFlash.en=1 -│ }else -│ { -│ tmFlash.en=0 -│ } -│ // extra button -│ - spstr strCommand.txt,b9.txt,"~",26 -│ + spstr strCommand.txt,b9.txt,"~",15 -│ if(b9.txt!="") -│ { -│ vis b9,1 -│ - spstr strCommand.txt,tTmp.txt,"~",27 -│ + spstr strCommand.txt,tTmp.txt,"~",16 -│ covx tTmp.txt,b9.pco,0,0 -│ - spstr strCommand.txt,vaAddBtn.txt,"~",28 -│ + spstr strCommand.txt,vaAddBtn.txt,"~",17 -│ } -│ } -│ if(tInstruction.txt=="time") -│ { -│ // get set time to global variable -│ spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 -│ } -│ --- HMI/n2t-out/cardChart.txt -├── +++ HMI/US/landscape/n2t-out/cardChart.txt -│ @@ -45,26 +45,14 @@ -│ -│ Variable (string) entn -│ Attributes -│ Scope : local -│ 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: 275 -│ -│ Variable (string) strTmp -│ @@ -187,15 +175,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardChart," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -212,15 +207,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardChart," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -393,88 +395,94 @@ -│ // here is the location where acual code should be -│ 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") -│ { -│ spstr strCommand.txt,tHeading.txt,"~",1 -│ - // navigation icon left -│ - spstr strCommand.txt,tTmp.txt,"~",2 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ { -│ - // 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="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.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") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bNext,1 -│ + tsw mSwipeNext,1 -│ + bNext.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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 -│ + bNext.txt="" -│ } -│ // extract color -│ - spstr strCommand.txt,tTmp.txt,"~",14 -│ + spstr strCommand.txt,tTmp.txt,"~",3 -│ covx tTmp.txt,vaColorL.val,0,0 -│ // prepare dark color -│ sys0=vaColorL.val>>11 // red -│ vaColorD.val=sys0*8/10<<11 // store and shift -│ sys0=vaColorL.val>>5%64 // green -│ vaColorD.val=sys0*8/10<<5+vaColorD.val // store and shift -│ sys0=vaColorL.val%32 -│ vaColorD.val=sys0*8/10+vaColorD.val // store and add -│ // -│ // detect nValues and maxValue -│ vNValues.val=0 -│ - spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17 -│ + spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6 -│ strlen tTmp.txt,sya0 -│ while(sya0>0) -│ { -│ covx tTmp.txt,sya1,0,0 -│ if(sya1>vMax.val) -│ { -│ vMax.val=sya1 -│ } -│ // next -│ vNValues.val++ -│ - spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17 -│ + spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6 -│ strlen tTmp.txt,sya0 -│ } -│ // -│ // calculate unit width -│ sys0=vNValues.val*4 -│ sys0+=vNValues.val-1 -│ vaUnit.val=m0.w-25-40*100 -│ vaUnit.val/=sys0 -│ vaBottom.val=m0.y+m0.h-24 -│ vaLeft.val=m0.x+25+40*100 -│ vaYUnit.val=m0.h-24/vMax.val -│ // -│ 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,"~",16 -│ + spstr strCommand.txt,strTmp.txt,"~",5 -│ sya1=0 -│ spstr strTmp.txt,tTmp.txt,":",sya1 -│ strlen tTmp.txt,sya0 -│ while(sya0>0) -│ { -│ covx tTmp.txt,sys1,0,0 -│ if(sys1<=vMax.val) -│ @@ -499,15 +507,15 @@ -│ // next -│ sya1++ -│ spstr strTmp.txt,tTmp.txt,":",sya1 -│ strlen tTmp.txt,sya0 -│ } -│ // -│ // y achis label -│ - spstr strCommand.txt,tTmp.txt,"~",15 -│ + spstr strCommand.txt,tTmp.txt,"~",4 -│ // tTmp.txt="Gas [kW]" -│ strlen tTmp.txt,sys1 -│ sya1=sys1*12+m0.h-48/2 -│ for(sys0=0;sys00) -│ { -│ vaValues.txt+="~" -│ } -│ // extract next entry -│ - spstr strCommand.txt,tTmp.txt,"~",sys0+17 -│ + spstr strCommand.txt,tTmp.txt,"~",sys0+6 -│ // calculate left -│ sys1=sys0*5*vaUnit.val -│ sys1+=vaLeft.val -│ // if there is a colon in the obtained value we have a label/and gridline -│ spstr tTmp.txt,strTmp.txt,"^",1 -│ strlen strTmp.txt,sya0 -│ if(sya0>0) -│ --- HMI/n2t-out/cardEntities.txt -├── +++ HMI/US/landscape/n2t-out/cardEntities.txt -│ @@ -106,26 +106,14 @@ -│ -│ Variable (string) entn4 -│ Attributes -│ Scope : local -│ 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 -│ -│ Variable (string) tSend -│ @@ -541,15 +529,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardEntities," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -566,15 +561,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardEntities," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -1232,87 +1234,93 @@ -│ 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,[,type,internalName,iconId,displayName,optionalValue]x4 -│ spstr strCommand.txt,tHeading.txt,"~",1 -│ - // navigation icon left -│ - spstr strCommand.txt,tTmp.txt,"~",2 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bPrev,1 -│ + tsw mSwipePrev,1 -│ + tsw mSwipeUp,0 -│ + bPrev.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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,0 -│ + tsw mSwipeUp,1 -│ + bPrev.txt="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + spstr tId.txt,tTmp.txt,"|",1 -│ + if(tTmp.txt=="0") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bNext,1 -│ + tsw mSwipeNext,1 -│ + bNext.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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 -│ + bNext.txt="" -│ } -│ // get Type -│ - spstr strCommand.txt,type1.txt,"~",14 -│ + spstr strCommand.txt,type1.txt,"~",3 -│ // get internal name -│ - spstr strCommand.txt,entn1.txt,"~",15 -│ + spstr strCommand.txt,entn1.txt,"~",4 -│ if(type1.txt=="delete"||type1.txt=="") -│ { -│ vis bUp1,0 -│ vis bStop1,0 -│ vis bDown1,0 -│ vis btOnOff1,0 -│ vis tEntity1,0 -│ vis tIcon1,0 -│ vis bText1,0 -│ vis hSlider1,0 -│ vis nNum1,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,tIcon1.txt,"~",16 -│ + spstr strCommand.txt,tIcon1.txt,"~",5 -│ vis tIcon1,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",17 -│ + spstr strCommand.txt,tTmp.txt,"~",6 -│ covx tTmp.txt,sys0,0,0 -│ tIcon1.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity1.txt,"~",18 -│ + spstr strCommand.txt,tEntity1.txt,"~",7 -│ vis tEntity1,1 -│ } -│ if(type1.txt=="shutter") -│ { -│ vis bUp1,1 -│ vis bStop1,1 -│ vis bDown1,1 -│ vis btOnOff1,0 -│ vis bText1,0 -│ vis hSlider1,0 -│ vis nNum1,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tId.txt,"~",19 -│ + spstr strCommand.txt,tId.txt,"~",8 -│ // up button -│ spstr tId.txt,tTmp.txt,"|",3 -│ if(tTmp.txt=="disable") -│ { -│ bUp1.pco=27501 -│ spstr tId.txt,bUp1.txt,"|",0 -│ tsw bUp1,0 -│ @@ -1355,15 +1363,15 @@ -│ vis bStop1,0 -│ vis bDown1,0 -│ vis btOnOff1,1 -│ vis bText1,0 -│ vis hSlider1,0 -│ vis nNum1,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",19 -│ + spstr strCommand.txt,tTmp.txt,"~",8 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff1.val=sys0 -│ } -│ if(type1.txt=="text"||type1.txt=="timer") -│ { -│ vis bUp1,0 -│ vis bStop1,0 -│ @@ -1372,43 +1380,43 @@ -│ vis bText1,1 -│ tsw bText1,0 -│ vis hSlider1,0 -│ vis nNum1,0 -│ bText1.pco=65535 -│ bText1.pco2=65535 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText1.txt,"~",19 -│ + spstr strCommand.txt,bText1.txt,"~",8 -│ } -│ if(type1.txt=="button"||type1.txt=="input_sel") -│ { -│ vis bUp1,0 -│ vis bStop1,0 -│ vis bDown1,0 -│ vis btOnOff1,0 -│ vis bText1,1 -│ tsw bText1,1 -│ vis hSlider1,0 -│ vis nNum1,0 -│ bText1.pco=1374 -│ bText1.pco2=1374 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText1.txt,"~",19 -│ + spstr strCommand.txt,bText1.txt,"~",8 -│ } -│ if(type1.txt=="number") -│ { -│ vis bUp1,0 -│ vis bStop1,0 -│ vis bDown1,0 -│ vis btOnOff1,0 -│ vis bText1,0 -│ tsw bText1,0 -│ vis hSlider1,1 -│ vis nNum1,1 -│ // get config (optional Value) (use bText as variable) -│ - spstr strCommand.txt,bText1.txt,"~",19 -│ + spstr strCommand.txt,bText1.txt,"~",8 -│ //first value is current value -│ spstr bText1.txt,tTmp.txt,"|",0 -│ covx tTmp.txt,sys0,0,0 -│ hSlider1.val=sys0 -│ nNum1.val=sys0 -│ //second value is min value -│ spstr bText1.txt,tTmp.txt,"|",1 -│ @@ -1416,52 +1424,52 @@ -│ hSlider1.minval=sys0 -│ //third value is max value -│ spstr bText1.txt,tTmp.txt,"|",2 -│ covx tTmp.txt,sys0,0,0 -│ hSlider1.maxval=sys0 -│ } -│ // get Type -│ - spstr strCommand.txt,type2.txt,"~",20 -│ + spstr strCommand.txt,type2.txt,"~",9 -│ // get internal name -│ - spstr strCommand.txt,entn2.txt,"~",21 -│ + spstr strCommand.txt,entn2.txt,"~",10 -│ if(type2.txt=="delete"||type2.txt=="") -│ { -│ vis bUp2,0 -│ vis bStop2,0 -│ vis bDown2,0 -│ vis btOnOff2,0 -│ vis tEntity2,0 -│ vis tIcon2,0 -│ vis bText2,0 -│ vis hSlider2,0 -│ vis nNum2,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,tIcon2.txt,"~",22 -│ + spstr strCommand.txt,tIcon2.txt,"~",11 -│ vis tIcon2,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",23 -│ + spstr strCommand.txt,tTmp.txt,"~",12 -│ covx tTmp.txt,sys0,0,0 -│ tIcon2.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity2.txt,"~",24 -│ + spstr strCommand.txt,tEntity2.txt,"~",13 -│ vis tEntity2,1 -│ } -│ if(type2.txt=="shutter") -│ { -│ vis bUp2,1 -│ vis bStop2,1 -│ vis bDown2,1 -│ vis btOnOff2,0 -│ vis bText2,0 -│ vis hSlider2,0 -│ vis nNum2,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tId.txt,"~",25 -│ + spstr strCommand.txt,tId.txt,"~",14 -│ // up button -│ spstr tId.txt,tTmp.txt,"|",3 -│ if(tTmp.txt=="disable") -│ { -│ bUp2.pco=27501 -│ spstr tId.txt,bUp2.txt,"|",0 -│ tsw bUp2,0 -│ @@ -1504,15 +1512,15 @@ -│ vis bStop2,0 -│ vis bDown2,0 -│ vis btOnOff2,1 -│ vis bText2,0 -│ vis hSlider2,0 -│ vis nNum2,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",25 -│ + spstr strCommand.txt,tTmp.txt,"~",14 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff2.val=sys0 -│ } -│ if(type2.txt=="text"||type2.txt=="timer") -│ { -│ vis bUp2,0 -│ vis bStop2,0 -│ @@ -1521,43 +1529,43 @@ -│ vis bText2,1 -│ tsw bText2,0 -│ vis hSlider2,0 -│ vis nNum2,0 -│ bText2.pco=65535 -│ bText2.pco2=65535 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText2.txt,"~",25 -│ + spstr strCommand.txt,bText2.txt,"~",14 -│ } -│ if(type2.txt=="button"||type2.txt=="input_sel") -│ { -│ vis bUp2,0 -│ vis bStop2,0 -│ vis bDown2,0 -│ vis btOnOff2,0 -│ vis bText2,1 -│ tsw bText2,1 -│ vis hSlider2,0 -│ vis nNum2,0 -│ bText2.pco=1374 -│ bText2.pco2=1374 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText2.txt,"~",25 -│ + spstr strCommand.txt,bText2.txt,"~",14 -│ } -│ if(type2.txt=="number") -│ { -│ vis bUp2,0 -│ vis bStop2,0 -│ vis bDown2,0 -│ vis btOnOff2,0 -│ vis bText2,0 -│ tsw bText2,0 -│ vis hSlider2,1 -│ vis nNum2,1 -│ // get config (optional Value) (use bText as variable) -│ - spstr strCommand.txt,bText2.txt,"~",25 -│ + spstr strCommand.txt,bText2.txt,"~",14 -│ //first value is current value -│ spstr bText2.txt,tTmp.txt,"|",0 -│ covx tTmp.txt,sys0,0,0 -│ hSlider2.val=sys0 -│ nNum2.val=sys0 -│ //second value is min value -│ spstr bText2.txt,tTmp.txt,"|",1 -│ @@ -1565,52 +1573,52 @@ -│ hSlider2.minval=sys0 -│ //third value is max value -│ spstr bText2.txt,tTmp.txt,"|",2 -│ covx tTmp.txt,sys0,0,0 -│ hSlider2.maxval=sys0 -│ } -│ // get Type -│ - spstr strCommand.txt,type3.txt,"~",26 -│ + spstr strCommand.txt,type3.txt,"~",15 -│ // get internal name -│ - spstr strCommand.txt,entn3.txt,"~",27 -│ + spstr strCommand.txt,entn3.txt,"~",16 -│ if(type3.txt=="delete"||type3.txt=="") -│ { -│ vis bUp3,0 -│ vis bStop3,0 -│ vis bDown3,0 -│ vis btOnOff3,0 -│ vis tEntity3,0 -│ vis tIcon3,0 -│ vis bText3,0 -│ vis hSlider3,0 -│ vis nNum3,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,tIcon3.txt,"~",28 -│ + spstr strCommand.txt,tIcon3.txt,"~",17 -│ vis tIcon3,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",29 -│ + spstr strCommand.txt,tTmp.txt,"~",18 -│ covx tTmp.txt,sys0,0,0 -│ tIcon3.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity3.txt,"~",30 -│ + spstr strCommand.txt,tEntity3.txt,"~",19 -│ vis tEntity3,1 -│ } -│ if(type3.txt=="shutter") -│ { -│ vis bUp3,1 -│ vis bStop3,1 -│ vis bDown3,1 -│ vis btOnOff3,0 -│ vis bText3,0 -│ vis hSlider3,0 -│ vis nNum3,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tId.txt,"~",31 -│ + spstr strCommand.txt,tId.txt,"~",20 -│ // up button -│ spstr tId.txt,tTmp.txt,"|",3 -│ if(tTmp.txt=="disable") -│ { -│ bUp3.pco=27501 -│ spstr tId.txt,bUp3.txt,"|",0 -│ tsw bUp3,0 -│ @@ -1653,15 +1661,15 @@ -│ vis bStop3,0 -│ vis bDown3,0 -│ vis btOnOff3,1 -│ vis bText3,0 -│ vis hSlider3,0 -│ vis nNum3,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",31 -│ + spstr strCommand.txt,tTmp.txt,"~",20 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff3.val=sys0 -│ } -│ if(type3.txt=="text"||type3.txt=="timer") -│ { -│ vis bUp3,0 -│ vis bStop3,0 -│ @@ -1670,43 +1678,43 @@ -│ vis bText3,1 -│ tsw bText3,0 -│ vis hSlider3,0 -│ vis nNum3,0 -│ bText3.pco=65535 -│ bText3.pco2=65535 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText3.txt,"~",31 -│ + spstr strCommand.txt,bText3.txt,"~",20 -│ } -│ if(type3.txt=="button"||type3.txt=="input_sel") -│ { -│ vis bUp3,0 -│ vis bStop3,0 -│ vis bDown3,0 -│ vis btOnOff3,0 -│ vis bText3,1 -│ tsw bText3,1 -│ vis hSlider3,0 -│ vis nNum3,0 -│ bText3.pco=1374 -│ bText3.pco2=1374 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText3.txt,"~",31 -│ + spstr strCommand.txt,bText3.txt,"~",20 -│ } -│ if(type3.txt=="number") -│ { -│ vis bUp3,0 -│ vis bStop3,0 -│ vis bDown3,0 -│ vis btOnOff3,0 -│ vis bText3,0 -│ tsw bText3,0 -│ vis hSlider3,1 -│ vis nNum3,1 -│ // get config (optional Value) (use bText as variable) -│ - spstr strCommand.txt,bText3.txt,"~",31 -│ + spstr strCommand.txt,bText3.txt,"~",20 -│ //first value is current value -│ spstr bText3.txt,tTmp.txt,"|",0 -│ covx tTmp.txt,sys0,0,0 -│ hSlider3.val=sys0 -│ nNum3.val=sys0 -│ //second value is min value -│ spstr bText3.txt,tTmp.txt,"|",1 -│ @@ -1714,52 +1722,52 @@ -│ hSlider3.minval=sys0 -│ //third value is max value -│ spstr bText3.txt,tTmp.txt,"|",2 -│ covx tTmp.txt,sys0,0,0 -│ hSlider3.maxval=sys0 -│ } -│ // get Type -│ - spstr strCommand.txt,type4.txt,"~",32 -│ + spstr strCommand.txt,type4.txt,"~",21 -│ // get internal name -│ - spstr strCommand.txt,entn4.txt,"~",33 -│ + spstr strCommand.txt,entn4.txt,"~",22 -│ if(type4.txt=="delete"||type4.txt=="") -│ { -│ vis bUp4,0 -│ vis bStop4,0 -│ vis bDown4,0 -│ vis btOnOff4,0 -│ vis tEntity4,0 -│ vis tIcon4,0 -│ vis bText4,0 -│ vis hSlider4,0 -│ vis nNum4,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,tIcon4.txt,"~",34 -│ + spstr strCommand.txt,tIcon4.txt,"~",23 -│ vis tIcon4,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",35 -│ + spstr strCommand.txt,tTmp.txt,"~",24 -│ covx tTmp.txt,sys0,0,0 -│ tIcon4.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity4.txt,"~",36 -│ + spstr strCommand.txt,tEntity4.txt,"~",25 -│ vis tEntity4,1 -│ } -│ if(type4.txt=="shutter") -│ { -│ vis bUp4,1 -│ vis bStop4,1 -│ vis bDown4,1 -│ vis btOnOff4,0 -│ vis bText4,0 -│ vis hSlider4,0 -│ vis nNum4,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tId.txt,"~",37 -│ + spstr strCommand.txt,tId.txt,"~",26 -│ // up button -│ spstr tId.txt,tTmp.txt,"|",3 -│ if(tTmp.txt=="disable") -│ { -│ bUp4.pco=27501 -│ spstr tId.txt,bUp4.txt,"|",0 -│ tsw bUp4,0 -│ @@ -1802,15 +1810,15 @@ -│ vis bStop4,0 -│ vis bDown4,0 -│ vis btOnOff4,1 -│ vis bText4,0 -│ vis hSlider4,0 -│ vis nNum4,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",37 -│ + spstr strCommand.txt,tTmp.txt,"~",26 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff4.val=sys0 -│ } -│ if(type4.txt=="text"||type4.txt=="timer") -│ { -│ vis bUp4,0 -│ vis bStop4,0 -│ @@ -1819,43 +1827,43 @@ -│ vis bText4,1 -│ tsw bText4,0 -│ vis hSlider4,0 -│ vis nNum4,0 -│ bText4.pco=65535 -│ bText4.pco2=65535 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText4.txt,"~",37 -│ + spstr strCommand.txt,bText4.txt,"~",26 -│ } -│ if(type4.txt=="button"||type4.txt=="input_sel") -│ { -│ vis bUp4,0 -│ vis bStop4,0 -│ vis bDown4,0 -│ vis btOnOff4,0 -│ vis bText4,1 -│ tsw bText4,1 -│ vis hSlider4,0 -│ vis nNum4,0 -│ bText4.pco=1374 -│ bText4.pco2=1374 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText4.txt,"~",37 -│ + spstr strCommand.txt,bText4.txt,"~",26 -│ } -│ if(type4.txt=="number") -│ { -│ vis bUp4,0 -│ vis bStop4,0 -│ vis bDown4,0 -│ vis btOnOff4,0 -│ vis bText4,0 -│ tsw bText4,0 -│ vis hSlider4,1 -│ vis nNum4,1 -│ // get config (optional Value) (use bText as variable) -│ - spstr strCommand.txt,bText4.txt,"~",37 -│ + spstr strCommand.txt,bText4.txt,"~",26 -│ //first value is current value -│ spstr bText4.txt,tTmp.txt,"|",0 -│ covx tTmp.txt,sys0,0,0 -│ hSlider4.val=sys0 -│ nNum4.val=sys0 -│ //second value is min value -│ spstr bText4.txt,tTmp.txt,"|",1 -│ --- HMI/n2t-out/cardGrid.txt -├── +++ HMI/US/landscape/n2t-out/cardGrid.txt -│ @@ -78,31 +78,19 @@ -│ -│ Variable (string) entn6 -│ Attributes -│ Scope : local -│ 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: 700 -│ + Max. Text Size: 500 -│ -│ Variable (string) tSend -│ Attributes -│ Scope : local -│ Text : -│ Max. Text Size: 200 -│ -│ @@ -527,15 +515,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardGrid," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -552,15 +547,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardGrid," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -687,172 +689,178 @@ -│ 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,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6 -│ spstr strCommand.txt,tHeading.txt,"~",1 -│ - // navigation icon left -│ - spstr strCommand.txt,tTmp.txt,"~",2 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bPrev,1 -│ + tsw mSwipePrev,1 -│ + tsw mSwipeUp,0 -│ + bPrev.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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,0 -│ + tsw mSwipeUp,1 -│ + bPrev.txt="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + spstr tId.txt,tTmp.txt,"|",1 -│ + if(tTmp.txt=="0") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bNext,1 -│ + tsw mSwipeNext,1 -│ + bNext.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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 -│ + bNext.txt="" -│ } -│ // get Type -│ - spstr strCommand.txt,type1.txt,"~",14 -│ + spstr strCommand.txt,type1.txt,"~",3 -│ // get internal name -│ - spstr strCommand.txt,entn1.txt,"~",15 -│ + spstr strCommand.txt,entn1.txt,"~",4 -│ if(type1.txt=="delete"||type1.txt=="") -│ { -│ vis tEntity1,0 -│ vis bEntity1,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity1.txt,"~",16 -│ + spstr strCommand.txt,bEntity1.txt,"~",5 -│ vis bEntity1,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",17 -│ + spstr strCommand.txt,tTmp.txt,"~",6 -│ covx tTmp.txt,sys0,0,0 -│ bEntity1.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity1.txt,"~",18 -│ + spstr strCommand.txt,tEntity1.txt,"~",7 -│ vis tEntity1,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type2.txt,"~",20 -│ + spstr strCommand.txt,type2.txt,"~",9 -│ // get internal name -│ - spstr strCommand.txt,entn2.txt,"~",21 -│ + spstr strCommand.txt,entn2.txt,"~",10 -│ if(type2.txt=="delete"||type2.txt=="") -│ { -│ vis tEntity2,0 -│ vis bEntity2,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity2.txt,"~",22 -│ + spstr strCommand.txt,bEntity2.txt,"~",11 -│ vis bEntity2,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",23 -│ + spstr strCommand.txt,tTmp.txt,"~",12 -│ covx tTmp.txt,sys0,0,0 -│ bEntity2.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity2.txt,"~",24 -│ + spstr strCommand.txt,tEntity2.txt,"~",13 -│ vis tEntity2,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type3.txt,"~",26 -│ + spstr strCommand.txt,type3.txt,"~",15 -│ // get internal name -│ - spstr strCommand.txt,entn3.txt,"~",27 -│ + spstr strCommand.txt,entn3.txt,"~",16 -│ if(type3.txt=="delete"||type3.txt=="") -│ { -│ vis tEntity3,0 -│ vis bEntity3,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity3.txt,"~",28 -│ + spstr strCommand.txt,bEntity3.txt,"~",17 -│ vis bEntity3,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",29 -│ + spstr strCommand.txt,tTmp.txt,"~",18 -│ covx tTmp.txt,sys0,0,0 -│ bEntity3.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity3.txt,"~",30 -│ + spstr strCommand.txt,tEntity3.txt,"~",19 -│ vis tEntity3,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type4.txt,"~",32 -│ + spstr strCommand.txt,type4.txt,"~",21 -│ // get internal name -│ - spstr strCommand.txt,entn4.txt,"~",33 -│ + spstr strCommand.txt,entn4.txt,"~",22 -│ if(type4.txt=="delete"||type4.txt=="") -│ { -│ vis tEntity4,0 -│ vis bEntity4,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity4.txt,"~",34 -│ + spstr strCommand.txt,bEntity4.txt,"~",23 -│ vis bEntity4,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",35 -│ + spstr strCommand.txt,tTmp.txt,"~",24 -│ covx tTmp.txt,sys0,0,0 -│ bEntity4.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity4.txt,"~",36 -│ + spstr strCommand.txt,tEntity4.txt,"~",25 -│ vis tEntity4,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type5.txt,"~",38 -│ + spstr strCommand.txt,type5.txt,"~",27 -│ // get internal name -│ - spstr strCommand.txt,entn5.txt,"~",39 -│ + spstr strCommand.txt,entn5.txt,"~",28 -│ if(type5.txt=="delete"||type5.txt=="") -│ { -│ vis tEntity5,0 -│ vis bEntity5,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity5.txt,"~",40 -│ + spstr strCommand.txt,bEntity5.txt,"~",29 -│ vis bEntity5,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",41 -│ + spstr strCommand.txt,tTmp.txt,"~",30 -│ covx tTmp.txt,sys0,0,0 -│ bEntity5.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity5.txt,"~",42 -│ + spstr strCommand.txt,tEntity5.txt,"~",31 -│ vis tEntity5,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type6.txt,"~",44 -│ + spstr strCommand.txt,type6.txt,"~",33 -│ // get internal name -│ - spstr strCommand.txt,entn6.txt,"~",45 -│ + spstr strCommand.txt,entn6.txt,"~",34 -│ if(type6.txt=="delete"||type6.txt=="") -│ { -│ vis tEntity6,0 -│ vis bEntity6,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity6.txt,"~",46 -│ + spstr strCommand.txt,bEntity6.txt,"~",35 -│ vis bEntity6,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",47 -│ + spstr strCommand.txt,tTmp.txt,"~",36 -│ covx tTmp.txt,sys0,0,0 -│ bEntity6.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity6.txt,"~",48 -│ + spstr strCommand.txt,tEntity6.txt,"~",37 -│ vis tEntity6,1 -│ } -│ } -│ if(tInstruction.txt=="pageType") -│ { -│ sleepValue=0 -│ //command format pageType,specialPageName -│ --- HMI/n2t-out/cardMedia.txt -├── +++ HMI/US/landscape/n2t-out/cardMedia.txt -│ @@ -82,26 +82,14 @@ -│ -│ Variable (string) entn6 -│ Attributes -│ Scope : local -│ 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: 750 -│ -│ Variable (string) tEntity1 -│ @@ -774,15 +762,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardMedia," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -799,15 +794,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardMedia," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -927,216 +929,222 @@ -│ 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,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6 -│ spstr strCommand.txt,tHeading.txt,"~",1 -│ - // navigation icon left -│ - spstr strCommand.txt,tTmp.txt,"~",2 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ { -│ - // 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="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.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") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bNext,1 -│ + tsw mSwipeNext,1 -│ + bNext.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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 -│ + bNext.txt="" -│ } -│ //entity name -│ - spstr strCommand.txt,entn.txt,"~",14 -│ + spstr strCommand.txt,entn.txt,"~",3 -│ //title -│ - spstr strCommand.txt,tTitle.txt,"~",15 -│ + spstr strCommand.txt,tTitle.txt,"~",4 -│ //title farbe -│ - spstr strCommand.txt,tTmp.txt,"~",16 -│ + spstr strCommand.txt,tTmp.txt,"~",5 -│ if(tTmp.txt!="") -│ { -│ covx tTmp.txt,tTitle.pco,0,0 -│ } -│ //author -│ - spstr strCommand.txt,tAuthor.txt,"~",17 -│ + spstr strCommand.txt,tAuthor.txt,"~",6 -│ //author farbe -│ - spstr strCommand.txt,tTmp.txt,"~",18 -│ + spstr strCommand.txt,tTmp.txt,"~",7 -│ if(tTmp.txt!="") -│ { -│ covx tTmp.txt,tAuthor.pco,0,0 -│ } -│ //volume -│ - spstr strCommand.txt,tTmp.txt,"~",19 -│ + spstr strCommand.txt,tTmp.txt,"~",8 -│ covx tTmp.txt,sys0,0,0 -│ hVolume.val=sys0 -│ //icon -│ - spstr strCommand.txt,tPlayPause.txt,"~",20 -│ + spstr strCommand.txt,tPlayPause.txt,"~",9 -│ // on off button -│ - spstr strCommand.txt,tTmp.txt,"~",21 -│ + spstr strCommand.txt,tTmp.txt,"~",10 -│ if(tTmp.txt=="disable") -│ { -│ vis t5,0 -│ }else -│ { -│ vis t5,1 -│ covx tTmp.txt,t5.pco,0,0 -│ } -│ // shuffel btn -│ - spstr strCommand.txt,tTmp.txt,"~",22 -│ + spstr strCommand.txt,tTmp.txt,"~",11 -│ if(tTmp.txt=="disable") -│ { -│ vis tShuffle,0 -│ }else -│ { -│ vis tShuffle,1 -│ tShuffle.txt=tTmp.txt -│ } -│ // get Type -│ - spstr strCommand.txt,type1.txt,"~",23 -│ + spstr strCommand.txt,type1.txt,"~",12 -│ // get internal name -│ - spstr strCommand.txt,entn1.txt,"~",24 -│ + spstr strCommand.txt,entn1.txt,"~",13 -│ if(type1.txt=="delete"||type1.txt=="") -│ { -│ vis tEntity1,0 -│ vis bEntity1,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity1.txt,"~",25 -│ + spstr strCommand.txt,bEntity1.txt,"~",14 -│ vis bEntity1,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",26 -│ + spstr strCommand.txt,tTmp.txt,"~",15 -│ covx tTmp.txt,sys0,0,0 -│ bEntity1.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity1.txt,"~",27 -│ + spstr strCommand.txt,tEntity1.txt,"~",16 -│ vis tEntity1,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type2.txt,"~",29 -│ + spstr strCommand.txt,type2.txt,"~",18 -│ // get internal name -│ - spstr strCommand.txt,entn2.txt,"~",30 -│ + spstr strCommand.txt,entn2.txt,"~",19 -│ if(type2.txt=="delete"||type2.txt=="") -│ { -│ vis tEntity2,0 -│ vis bEntity2,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity2.txt,"~",31 -│ + spstr strCommand.txt,bEntity2.txt,"~",20 -│ vis bEntity2,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",32 -│ + spstr strCommand.txt,tTmp.txt,"~",21 -│ covx tTmp.txt,sys0,0,0 -│ bEntity2.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity2.txt,"~",33 -│ + spstr strCommand.txt,tEntity2.txt,"~",22 -│ vis tEntity2,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type3.txt,"~",35 -│ + spstr strCommand.txt,type3.txt,"~",24 -│ // get internal name -│ - spstr strCommand.txt,entn3.txt,"~",36 -│ + spstr strCommand.txt,entn3.txt,"~",25 -│ if(type3.txt=="delete"||type3.txt=="") -│ { -│ vis tEntity3,0 -│ vis bEntity3,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity3.txt,"~",37 -│ + spstr strCommand.txt,bEntity3.txt,"~",26 -│ vis bEntity3,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",38 -│ + spstr strCommand.txt,tTmp.txt,"~",27 -│ covx tTmp.txt,sys0,0,0 -│ bEntity3.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity3.txt,"~",39 -│ + spstr strCommand.txt,tEntity3.txt,"~",28 -│ vis tEntity3,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type4.txt,"~",41 -│ + spstr strCommand.txt,type4.txt,"~",30 -│ // get internal name -│ - spstr strCommand.txt,entn4.txt,"~",42 -│ + spstr strCommand.txt,entn4.txt,"~",31 -│ if(type4.txt=="delete"||type4.txt=="") -│ { -│ vis tEntity4,0 -│ vis bEntity4,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity4.txt,"~",43 -│ + spstr strCommand.txt,bEntity4.txt,"~",32 -│ vis bEntity4,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",44 -│ + spstr strCommand.txt,tTmp.txt,"~",33 -│ covx tTmp.txt,sys0,0,0 -│ bEntity4.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity4.txt,"~",45 -│ + spstr strCommand.txt,tEntity4.txt,"~",34 -│ vis tEntity4,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type5.txt,"~",47 -│ + spstr strCommand.txt,type5.txt,"~",36 -│ // get internal name -│ - spstr strCommand.txt,entn5.txt,"~",48 -│ + spstr strCommand.txt,entn5.txt,"~",37 -│ if(type5.txt=="delete"||type5.txt=="") -│ { -│ vis tEntity5,0 -│ vis bEntity5,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity5.txt,"~",49 -│ + spstr strCommand.txt,bEntity5.txt,"~",38 -│ vis bEntity5,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",50 -│ + spstr strCommand.txt,tTmp.txt,"~",39 -│ covx tTmp.txt,sys0,0,0 -│ bEntity5.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity5.txt,"~",51 -│ + spstr strCommand.txt,tEntity5.txt,"~",40 -│ vis tEntity5,1 -│ } -│ // get Type -│ - spstr strCommand.txt,type6.txt,"~",53 -│ + spstr strCommand.txt,type6.txt,"~",42 -│ // get internal name -│ - spstr strCommand.txt,entn6.txt,"~",54 -│ + spstr strCommand.txt,entn6.txt,"~",43 -│ if(type6.txt=="delete"||type6.txt=="") -│ { -│ vis tEntity6,0 -│ vis bEntity6,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,bEntity6.txt,"~",55 -│ + spstr strCommand.txt,bEntity6.txt,"~",44 -│ vis bEntity6,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",56 -│ + spstr strCommand.txt,tTmp.txt,"~",45 -│ covx tTmp.txt,sys0,0,0 -│ bEntity6.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity6.txt,"~",57 -│ + spstr strCommand.txt,tEntity6.txt,"~",46 -│ vis tEntity6,1 -│ } -│ } -│ if(tInstruction.txt=="pageType") -│ { -│ sleepValue=0 -│ //command format pageType,specialPageName -│ @@ -1196,18 +1204,14 @@ -│ { -│ 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") -│ --- HMI/n2t-out/cardPower.txt -├── +++ HMI/US/landscape/n2t-out/cardPower.txt -│ @@ -53,26 +53,14 @@ -│ b[sys0].pic=19 -│ b[sys0].pic1=19 -│ b[sys0].pic2=15 -│ } -│ } -│ } -│ -│ -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: 275 -│ -│ Variable (int32) t0Speed -│ @@ -354,15 +342,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardPower," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -379,15 +374,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardAlarm," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -549,170 +551,176 @@ -│ 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=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ { -│ - // 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="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.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") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bNext,1 -│ + tsw mSwipeNext,1 -│ + bNext.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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 -│ + bNext.txt="" -│ } -│ // icon color home -│ - spstr strCommand.txt,tTmp.txt,"~",14 -│ + spstr strCommand.txt,tTmp.txt,"~",3 -│ covx tTmp.txt,t1.pco,0,0 -│ // icon home -│ - spstr strCommand.txt,t1.txt,"~",15 -│ + spstr strCommand.txt,t1.txt,"~",4 -│ // text home -│ - spstr strCommand.txt,tHome.txt,"~",16 -│ + spstr strCommand.txt,tHome.txt,"~",5 -│ // iconColor -│ - spstr strCommand.txt,tTmp.txt,"~",17 -│ + spstr strCommand.txt,tTmp.txt,"~",6 -│ covx tTmp.txt,t0Icon.pco,0,0 -│ // icon -│ - spstr strCommand.txt,t0Icon.txt,"~",18 -│ + spstr strCommand.txt,t0Icon.txt,"~",7 -│ // speed -│ - spstr strCommand.txt,tTmp.txt,"~",19 -│ + spstr strCommand.txt,tTmp.txt,"~",8 -│ covx tTmp.txt,t0Speed.val,0,0 -│ // lower text -│ - spstr strCommand.txt,t0u.txt,"~",20 -│ + spstr strCommand.txt,t0u.txt,"~",9 -│ 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 -│ + spstr strCommand.txt,tTmp.txt,"~",10 -│ covx tTmp.txt,t1Icon.pco,0,0 -│ // icon -│ - spstr strCommand.txt,t1Icon.txt,"~",22 -│ + spstr strCommand.txt,t1Icon.txt,"~",11 -│ // speed -│ - spstr strCommand.txt,tTmp.txt,"~",23 -│ + spstr strCommand.txt,tTmp.txt,"~",12 -│ covx tTmp.txt,t1Speed.val,0,0 -│ // lower text -│ - spstr strCommand.txt,t1u.txt,"~",24 -│ + spstr strCommand.txt,t1u.txt,"~",13 -│ 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 -│ + spstr strCommand.txt,tTmp.txt,"~",14 -│ covx tTmp.txt,t2Icon.pco,0,0 -│ // icon -│ - spstr strCommand.txt,t2Icon.txt,"~",26 -│ + spstr strCommand.txt,t2Icon.txt,"~",15 -│ // speed -│ - spstr strCommand.txt,tTmp.txt,"~",27 -│ + spstr strCommand.txt,tTmp.txt,"~",16 -│ covx tTmp.txt,t2Speed.val,0,0 -│ // lower text -│ - spstr strCommand.txt,t2u.txt,"~",28 -│ + spstr strCommand.txt,t2u.txt,"~",17 -│ 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 -│ + spstr strCommand.txt,tTmp.txt,"~",18 -│ covx tTmp.txt,t3Icon.pco,0,0 -│ // icon -│ - spstr strCommand.txt,t3Icon.txt,"~",30 -│ + spstr strCommand.txt,t3Icon.txt,"~",19 -│ // speed -│ - spstr strCommand.txt,tTmp.txt,"~",31 -│ + spstr strCommand.txt,tTmp.txt,"~",20 -│ covx tTmp.txt,t3Speed.val,0,0 -│ // lower text -│ - spstr strCommand.txt,t3u.txt,"~",32 -│ + spstr strCommand.txt,t3u.txt,"~",21 -│ 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 -│ + spstr strCommand.txt,tTmp.txt,"~",22 -│ covx tTmp.txt,t4Icon.pco,0,0 -│ // icon -│ - spstr strCommand.txt,t4Icon.txt,"~",34 -│ + spstr strCommand.txt,t4Icon.txt,"~",23 -│ // speed -│ - spstr strCommand.txt,tTmp.txt,"~",35 -│ + spstr strCommand.txt,tTmp.txt,"~",24 -│ covx tTmp.txt,t4Speed.val,0,0 -│ // lower text -│ - spstr strCommand.txt,t4u.txt,"~",36 -│ + spstr strCommand.txt,t4u.txt,"~",25 -│ 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 -│ + spstr strCommand.txt,tTmp.txt,"~",26 -│ covx tTmp.txt,t5Icon.pco,0,0 -│ // icon -│ - spstr strCommand.txt,t5Icon.txt,"~",38 -│ + spstr strCommand.txt,t5Icon.txt,"~",27 -│ // speed -│ - spstr strCommand.txt,tTmp.txt,"~",39 -│ + spstr strCommand.txt,tTmp.txt,"~",28 -│ covx tTmp.txt,t5Speed.val,0,0 -│ // lower text -│ - spstr strCommand.txt,t5u.txt,"~",40 -│ + spstr strCommand.txt,t5u.txt,"~",29 -│ if(t5Icon.txt!="") -│ { -│ vis t5Icon,1 -│ vis t5u,1 -│ vis h5,1 -│ }else -│ { -│ --- HMI/n2t-out/cardQR.txt -├── +++ HMI/US/landscape/n2t-out/cardQR.txt -│ @@ -66,31 +66,19 @@ -│ -│ Variable (string) entn2 -│ Attributes -│ Scope : local -│ 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: 400 -│ + Max. Text Size: 275 -│ -│ Variable (string) tId -│ Attributes -│ Scope : local -│ Text : -│ Max. Text Size: 20 -│ -│ @@ -195,15 +183,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardQR," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -220,15 +215,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardAlarm," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -440,171 +442,177 @@ -│ // 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,textQR[,type,internalName,iconId,displayName,optionalValue]x2 -│ //tHeading -│ spstr strCommand.txt,tHeading.txt,"~",1 -│ - // navigation icon left -│ - spstr strCommand.txt,tTmp.txt,"~",2 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ { -│ - // 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="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.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") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bNext,1 -│ + tsw mSwipeNext,1 -│ + bNext.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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 -│ + bNext.txt="" -│ } -│ //text qrcode -│ - spstr strCommand.txt,vaQR.txt,"~",14 -│ + spstr strCommand.txt,vaQR.txt,"~",3 -│ // get Type -│ - spstr strCommand.txt,type1.txt,"~",15 -│ + spstr strCommand.txt,type1.txt,"~",4 -│ // get internal name -│ - spstr strCommand.txt,entn1.txt,"~",16 -│ + spstr strCommand.txt,entn1.txt,"~",5 -│ if(type1.txt=="delete"||type1.txt=="") -│ { -│ vis btOnOff1,0 -│ vis tEntity1,0 -│ vis tIcon1,0 -│ vis bText1,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,tIcon1.txt,"~",17 -│ + spstr strCommand.txt,tIcon1.txt,"~",6 -│ vis tIcon1,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",18 -│ + spstr strCommand.txt,tTmp.txt,"~",7 -│ covx tTmp.txt,sys0,0,0 -│ tIcon1.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity1.txt,"~",19 -│ + spstr strCommand.txt,tEntity1.txt,"~",8 -│ vis tEntity1,1 -│ } -│ if(type1.txt=="light") -│ { -│ vis btOnOff1,1 -│ vis bText1,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",20 -│ + spstr strCommand.txt,tTmp.txt,"~",9 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff1.val=sys0 -│ } -│ if(type1.txt=="switch") -│ { -│ vis btOnOff1,1 -│ vis bText1,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",20 -│ + spstr strCommand.txt,tTmp.txt,"~",9 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff1.val=sys0 -│ } -│ if(type1.txt=="text") -│ { -│ vis btOnOff1,0 -│ vis bText1,1 -│ tsw bText1,0 -│ bText1.pco=65535 -│ bText1.pco2=65535 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText1.txt,"~",20 -│ + spstr strCommand.txt,bText1.txt,"~",9 -│ } -│ if(type1.txt=="button") -│ { -│ vis btOnOff1,0 -│ vis bText1,1 -│ tsw bText1,1 -│ bText1.pco=1374 -│ bText1.pco2=1374 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText1.txt,"~",20 -│ + spstr strCommand.txt,bText1.txt,"~",9 -│ } -│ // get Type -│ - spstr strCommand.txt,type2.txt,"~",21 -│ + spstr strCommand.txt,type2.txt,"~",10 -│ // get internal name -│ - spstr strCommand.txt,entn2.txt,"~",22 -│ + spstr strCommand.txt,entn2.txt,"~",11 -│ if(type2.txt=="delete"||type2.txt=="") -│ { -│ vis btOnOff2,0 -│ vis tEntity2,0 -│ vis tIcon2,0 -│ vis bText2,0 -│ }else -│ { -│ // change icon -│ - spstr strCommand.txt,tIcon2.txt,"~",23 -│ + spstr strCommand.txt,tIcon2.txt,"~",12 -│ vis tIcon2,1 -│ // change icon color -│ - spstr strCommand.txt,tTmp.txt,"~",24 -│ + spstr strCommand.txt,tTmp.txt,"~",13 -│ covx tTmp.txt,sys0,0,0 -│ tIcon2.pco=sys0 -│ // set name -│ - spstr strCommand.txt,tEntity2.txt,"~",25 -│ + spstr strCommand.txt,tEntity2.txt,"~",14 -│ vis tEntity2,1 -│ } -│ if(type2.txt=="light") -│ { -│ vis btOnOff2,1 -│ vis bText2,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",26 -│ + spstr strCommand.txt,tTmp.txt,"~",15 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff2.val=sys0 -│ } -│ if(type2.txt=="switch") -│ { -│ vis btOnOff2,1 -│ vis bText2,0 -│ // get Button State (optional Value) -│ - spstr strCommand.txt,tTmp.txt,"~",26 -│ + spstr strCommand.txt,tTmp.txt,"~",15 -│ covx tTmp.txt,sys0,0,0 -│ btOnOff2.val=sys0 -│ } -│ if(type2.txt=="text") -│ { -│ vis btOnOff2,0 -│ vis bText2,1 -│ tsw bText2,0 -│ bText2.pco=65535 -│ bText2.pco2=65535 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText2.txt,"~",26 -│ + spstr strCommand.txt,bText2.txt,"~",15 -│ } -│ if(type2.txt=="button") -│ { -│ vis btOnOff2,0 -│ vis bText2,1 -│ tsw bText2,1 -│ bText2.pco=1374 -│ bText2.pco2=1374 -│ // get Text (optional Value) -│ - spstr strCommand.txt,bText2.txt,"~",26 -│ + spstr strCommand.txt,bText2.txt,"~",15 -│ } -│ if(type2.txt=="delete"||type2.txt=="") -│ { -│ if(type1.txt=="delete"||type1.txt=="") -│ { -│ qrcode m1.x,m1.y,200,6371,65535,-1,vaQR.txt -│ } -│ --- HMI/n2t-out/cardThermo.txt -├── +++ HMI/US/landscape/n2t-out/cardThermo.txt -│ @@ -59,31 +59,19 @@ -│ -│ Variable (string) entn -│ Attributes -│ Scope : local -│ 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: 750 -│ + Max. Text Size: 250 -│ -│ Variable (string) tId -│ Attributes -│ Scope : local -│ Text : -│ Max. Text Size: 20 -│ -│ @@ -302,15 +290,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent2.txt+",button" -│ + tSend.txt="event,buttonPress2,cardThermo," -│ + if(bNext.txt=="") -│ + { -│ + tSend.txt+="bHome" -│ + }else -│ + { -│ + tSend.txt+="bNext" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -327,15 +322,22 @@ -│ Send Component ID : disabled -│ State : unpressed -│ Text :  -│ Max. Text Size : 10 -│ -│ Events -│ Touch Press Event -│ - tSend.txt="event,buttonPress2,"+nent1.txt+",button" -│ + tSend.txt="event,buttonPress2,cardThermo," -│ + if(bPrev.txt=="") -│ + { -│ + tSend.txt+="bUp" -│ + }else -│ + { -│ + tSend.txt+="bPrev" -│ + } -│ //send calc crc -│ btlen tSend.txt,sys0 -│ crcrest 1,0xffff // reset CRC -│ crcputh 55 bb -│ crcputs sys0,2 -│ crcputs tSend.txt,0 -│ //send cmd -│ @@ -829,208 +831,214 @@ -│ 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") -│ { -│ //heading -│ spstr strCommand.txt,tHeading.txt,"~",1 -│ - // navigation icon left -│ - spstr strCommand.txt,tTmp.txt,"~",2 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + // navigation icons -│ + spstr strCommand.txt,tId.txt,"~",2 -│ + spstr tId.txt,tTmp.txt,"|",0 -│ + if(tTmp.txt=="0") -│ { -│ vis bPrev,0 -│ - }else -│ + tsw mSwipePrev,0 -│ + tsw mSwipeUp,0 -│ + } -│ + if(tTmp.txt=="1") -│ + { -│ + vis bPrev,1 -│ + tsw mSwipePrev,1 -│ + tsw mSwipeUp,0 -│ + bPrev.txt="" -│ + } -│ + if(tTmp.txt=="2") -│ { -│ - // 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,0 -│ + tsw mSwipeUp,1 -│ + bPrev.txt="" -│ } -│ - // navigation icon right -│ - spstr strCommand.txt,tTmp.txt,"~",8 //type -│ - if(tTmp.txt=="delete"||tTmp.txt=="") -│ + spstr tId.txt,tTmp.txt,"|",1 -│ + if(tTmp.txt=="0") -│ { -│ vis bNext,0 -│ - }else -│ + tsw mSwipeNext,0 -│ + } -│ + if(tTmp.txt=="1") -│ { -│ - // 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,"~",14 -│ + spstr strCommand.txt,entn.txt,"~",3 -│ //currentTemp -│ - spstr strCommand.txt,tCurTemp.txt,"~",15 -│ + spstr strCommand.txt,tCurTemp.txt,"~",4 -│ //dstTemp -│ - spstr strCommand.txt,tTmp.txt,"~",16 -│ + spstr strCommand.txt,tTmp.txt,"~",5 -│ covx tTmp.txt,xTempDest1.val,0,0 -│ xTempDest.val=xTempDest1.val -│ //status -│ - spstr strCommand.txt,tStatus.txt,"~",17 -│ + spstr strCommand.txt,tStatus.txt,"~",6 -│ //minTemp -│ - spstr strCommand.txt,tTmp.txt,"~",18 -│ + spstr strCommand.txt,tTmp.txt,"~",7 -│ covx tTmp.txt,xTempMin1.val,0,0 -│ //maxTemp -│ - spstr strCommand.txt,tTmp.txt,"~",19 -│ + spstr strCommand.txt,tTmp.txt,"~",8 -│ covx tTmp.txt,xTempMax1.val,0,0 -│ //tempStep -│ - spstr strCommand.txt,tTmp.txt,"~",20 -│ + spstr strCommand.txt,tTmp.txt,"~",9 -│ 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 -│ //bt0 -│ - spstr strCommand.txt,bt0.txt,"~",21 -│ + spstr strCommand.txt,bt0.txt,"~",10 -│ if(bt0.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",22 -│ + spstr strCommand.txt,tTmp.txt,"~",11 -│ covx tTmp.txt,bt0.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",23 -│ + spstr strCommand.txt,tTmp.txt,"~",12 -│ covx tTmp.txt,bt0.val,0,0 -│ // save action -│ - spstr strCommand.txt,va0.txt,"~",24 -│ + spstr strCommand.txt,va0.txt,"~",13 -│ //enable -│ vis bt0,1 -│ } -│ //bt1 -│ - spstr strCommand.txt,bt1.txt,"~",25 -│ + spstr strCommand.txt,bt1.txt,"~",14 -│ if(bt1.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",26 -│ + spstr strCommand.txt,tTmp.txt,"~",15 -│ covx tTmp.txt,bt1.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",27 -│ + spstr strCommand.txt,tTmp.txt,"~",16 -│ covx tTmp.txt,bt1.val,0,0 -│ // save action -│ - spstr strCommand.txt,va1.txt,"~",28 -│ + spstr strCommand.txt,va1.txt,"~",17 -│ //enable -│ vis bt1,1 -│ } -│ //bt2 -│ - spstr strCommand.txt,bt2.txt,"~",29 -│ + spstr strCommand.txt,bt2.txt,"~",18 -│ if(bt2.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",30 -│ + spstr strCommand.txt,tTmp.txt,"~",19 -│ covx tTmp.txt,bt2.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",31 -│ + spstr strCommand.txt,tTmp.txt,"~",20 -│ covx tTmp.txt,bt2.val,0,0 -│ // save action -│ - spstr strCommand.txt,va2.txt,"~",32 -│ + spstr strCommand.txt,va2.txt,"~",21 -│ //enable -│ vis bt2,1 -│ } -│ //bt3 -│ - spstr strCommand.txt,bt3.txt,"~",33 -│ + spstr strCommand.txt,bt3.txt,"~",22 -│ if(bt3.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",34 -│ + spstr strCommand.txt,tTmp.txt,"~",23 -│ covx tTmp.txt,bt3.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",35 -│ + spstr strCommand.txt,tTmp.txt,"~",24 -│ covx tTmp.txt,bt3.val,0,0 -│ // save action -│ - spstr strCommand.txt,va3.txt,"~",36 -│ + spstr strCommand.txt,va3.txt,"~",25 -│ //enable -│ vis bt3,1 -│ } -│ //bt4 -│ - spstr strCommand.txt,bt4.txt,"~",37 -│ + spstr strCommand.txt,bt4.txt,"~",26 -│ if(bt4.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",38 -│ + spstr strCommand.txt,tTmp.txt,"~",27 -│ covx tTmp.txt,bt4.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",39 -│ + spstr strCommand.txt,tTmp.txt,"~",28 -│ covx tTmp.txt,bt4.val,0,0 -│ // save action -│ - spstr strCommand.txt,va4.txt,"~",40 -│ + spstr strCommand.txt,va4.txt,"~",29 -│ //enable -│ vis bt4,1 -│ } -│ //bt5 -│ - spstr strCommand.txt,bt5.txt,"~",41 -│ + spstr strCommand.txt,bt5.txt,"~",30 -│ if(bt5.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",42 -│ + spstr strCommand.txt,tTmp.txt,"~",31 -│ covx tTmp.txt,bt5.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",43 -│ + spstr strCommand.txt,tTmp.txt,"~",32 -│ covx tTmp.txt,bt5.val,0,0 -│ // save action -│ - spstr strCommand.txt,va5.txt,"~",44 -│ + spstr strCommand.txt,va5.txt,"~",33 -│ //enable -│ vis bt5,1 -│ } -│ //bt6 -│ - spstr strCommand.txt,bt6.txt,"~",45 -│ + spstr strCommand.txt,bt6.txt,"~",34 -│ if(bt6.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",46 -│ + spstr strCommand.txt,tTmp.txt,"~",35 -│ covx tTmp.txt,bt6.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",47 -│ + spstr strCommand.txt,tTmp.txt,"~",36 -│ covx tTmp.txt,bt6.val,0,0 -│ // save action -│ - spstr strCommand.txt,va6.txt,"~",48 -│ + spstr strCommand.txt,va6.txt,"~",37 -│ //enable -│ vis bt6,1 -│ } -│ //bt7 -│ - spstr strCommand.txt,bt7.txt,"~",49 -│ + spstr strCommand.txt,bt7.txt,"~",38 -│ if(bt7.txt!="") -│ { -│ // set text color on active state -│ - spstr strCommand.txt,tTmp.txt,"~",50 -│ + spstr strCommand.txt,tTmp.txt,"~",39 -│ covx tTmp.txt,bt7.pco2,0,0 -│ // set state -│ - spstr strCommand.txt,tTmp.txt,"~",51 -│ + spstr strCommand.txt,tTmp.txt,"~",40 -│ covx tTmp.txt,bt7.val,0,0 -│ // save action -│ - spstr strCommand.txt,va7.txt,"~",52 -│ + spstr strCommand.txt,va7.txt,"~",41 -│ //enable -│ vis bt7,1 -│ } -│ //Text tCurTempLbl -│ - spstr strCommand.txt,tCurTempLbl.txt,"~",53 -│ + spstr strCommand.txt,tCurTempLbl.txt,"~",42 -│ //Text tStateLbl -│ - spstr strCommand.txt,tStateLbl.txt,"~",54 -│ + spstr strCommand.txt,tStateLbl.txt,"~",43 -│ //Text tALbl -│ - //spstr strCommand.txt,tALbl.txt,"~",55 -│ + //spstr strCommand.txt,tALbl.txt,"~",44 -│ //Text tCF -│ - spstr strCommand.txt,tCF.txt,"~",56 -│ + spstr strCommand.txt,tCF.txt,"~",45 -│ tCF1.txt=tCF.txt -│ tCF2.txt=tCF.txt -│ //Second Temperature -│ - spstr strCommand.txt,tTmp.txt,"~",57 -│ + spstr strCommand.txt,tTmp.txt,"~",46 -│ if(tTmp.txt!="") -│ { -│ covx tTmp.txt,xTempDest2.val,0,0 -│ vis btUp,0 -│ vis xTempDest,0 -│ vis btDown,0 -│ vis tCF,0 -│ @@ -1040,16 +1048,16 @@ -│ vis tCF1,1 -│ vis bUp2,1 -│ vis xTempDest2,1 -│ vis bDown2,1 -│ vis tCF2,1 -│ } -│ //Show btDetail -│ - spstr strCommand.txt,tTmp.txt,"~",58 -│ - if(tTmp.txt!="1") -│ + spstr strCommand.txt,tTmp.txt,"~",47 -│ + if(tTmp.txt=="1") -│ { -│ vis btDetail,1 -│ }else -│ { -│ vis btDetail,0 -│ } -│ } +│ page pageStartup │ --- HMI/n2t-out/pageStartup.txt ├── +++ HMI/US/landscape/n2t-out/pageStartup.txt │ @@ -173,15 +173,15 @@ @@ -2836,7 +34,7 @@ │ //send cmd │ --- HMI/n2t-out/screensaver.txt ├── +++ HMI/US/landscape/n2t-out/screensaver.txt -│ @@ -29,29 +29,20 @@ +│ @@ -29,17 +29,14 @@ │ } │ tDate.txt=pageIcons.vaDate.txt │ dim=dimValue @@ -2853,20 +51,8 @@ │ Text : │ Max. Text Size: 200 │ -│ -Variable (string) strTmp -│ - Attributes -│ - Scope : local -│ - Text : -│ - Max. Text Size: 2 -│ - -│ Variable (string) tId -│ Attributes -│ Scope : local -│ Text : -│ Max. Text Size: 25 -│ -│ Variable (string) tInstruction -│ @@ -103,24 +94,14 @@ +│ Variable (string) strTmp +│ @@ -103,24 +100,14 @@ │ Value: 0 │ │ Variable (int32) ycR @@ -2891,56 +77,3 @@ │ Disable release event after dragging: 0 │ Send Component ID : disabled │ Associated Keyboard : none -│ @@ -361,15 +342,15 @@ -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ Associated Keyboard : none -│ Text : -│ - Max. Text Size : 120 -│ + Max. Text Size : 80 -│ -│ Text tTime -│ Attributes -│ Scope : local -│ Dragging : 0 -│ Disable release event after dragging: 0 -│ Send Component ID : disabled -│ @@ -508,35 +489,14 @@ -│ } -│ if(tInstruction.txt=="timeout") -│ { -│ //set timeout to global var -│ spstr strCommand.txt,tTmp.txt,"~",1 -│ covx tTmp.txt,sleepTimeout,0,0 -│ } -│ - if(tInstruction.txt=="statusUpdate") -│ - { -│ - //statusIcon1 -│ - spstr strCommand.txt,tIcon1.txt,"~",1 -│ - spstr strCommand.txt,tTmp.txt,"~",2 -│ - covx tTmp.txt,tIcon1.pco,0,0 -│ - //statusIcon2 -│ - spstr strCommand.txt,tIcon2.txt,"~",3 -│ - spstr strCommand.txt,tTmp.txt,"~",4 -│ - covx tTmp.txt,tIcon2.pco,0,0 -│ - spstr strCommand.txt,tTmp.txt,"~",5 -│ - if(tTmp.txt!="") -│ - { -│ - tIcon1.font=3 -│ - } -│ - spstr strCommand.txt,tTmp.txt,"~",6 -│ - if(tTmp.txt!="") -│ - { -│ - tIcon2.font=3 -│ - } -│ - } -│ if(tInstruction.txt=="weatherUpdate"&&tNotifyHead.txt==""&&tNotifyText.txt=="") -│ { -│ vis tMainIcon,1 -│ vis tMainIconAlt,0 -│ vis tMainText,1 -│ vis tMainTextAlt,0 -│ vis tMRIcon,0 diff --git a/HMI/US/landscape/n2t-out-visual/Program.s.txt b/HMI/US/landscape/n2t-out-visual/Program.s.txt index 194b9009..cc6080ba 100644 --- a/HMI/US/landscape/n2t-out-visual/Program.s.txt +++ b/HMI/US/landscape/n2t-out-visual/Program.s.txt @@ -14,3 +14,4 @@ Program.s //color vars int defaultFontColor=65535 int defaultBcoColor=6371 + page pageStartup diff --git a/HMI/US/landscape/n2t-out-visual/cardAlarm.txt b/HMI/US/landscape/n2t-out-visual/cardAlarm.txt index 1a28cab4..988e1768 100644 --- a/HMI/US/landscape/n2t-out-visual/cardAlarm.txt +++ b/HMI/US/landscape/n2t-out-visual/cardAlarm.txt @@ -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 @@ -1096,9 +1096,9 @@ Hotspot mSwipeNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -1118,7 +1118,7 @@ Hotspot mSwipePrev Opacity : 127 x coordinate : 0 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -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") diff --git a/HMI/US/landscape/n2t-out-visual/cardChart.txt b/HMI/US/landscape/n2t-out-visual/cardChart.txt index 94f29e45..692fbef8 100644 --- a/HMI/US/landscape/n2t-out-visual/cardChart.txt +++ b/HMI/US/landscape/n2t-out-visual/cardChart.txt @@ -53,129 +53,143 @@ Page cardChart Variable (string) entn Attributes - ID : 4 + ID : 6 + Scope : local + 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 : 3 + ID : 5 Scope : local Text : Max. Text Size: 275 Variable (string) strTmp Attributes - ID : 14 + ID : 18 Scope : local Text : Max. Text Size: 200 Variable (string) tId Attributes - ID : 11 + ID : 14 Scope : local Text : Max. Text Size: 20 Variable (string) tInstruction Attributes - ID : 12 + ID : 15 Scope : local Text : Max. Text Size: 20 Variable (string) tSend Attributes - ID : 7 + ID : 9 Scope : local Text : Max. Text Size: 200 Variable (string) tTmp Attributes - ID : 10 + ID : 13 Scope : local Text : Max. Text Size: 20 Variable (int32) vMax Attributes - ID : 25 + ID : 29 Scope: local Value: 0 Variable (int32) vNValues Attributes - ID : 13 + ID : 17 Scope: local Value: 0 Variable (int32) vaBottom Attributes - ID : 18 + ID : 22 Scope: local Value: 0 Variable (int32) vaColorD Attributes - ID : 24 + ID : 28 Scope: local Value: 0 Variable (int32) vaColorL Attributes - ID : 23 + ID : 27 Scope: local Value: 0 Variable (int32) vaLast Attributes - ID : 21 + ID : 25 Scope: local Value: 4294967295 Variable (int32) vaLeft Attributes - ID : 19 + ID : 23 Scope: local Value: 0 Variable (int32) vaUnit Attributes - ID : 16 + ID : 20 Scope: local Value: 0 Variable (int32) vaValue Attributes - ID : 17 + ID : 21 Scope: local Value: 0 Variable (string) vaValues Attributes - ID : 20 + ID : 24 Scope : local Text : Max. Text Size: 100 Variable (int32) vaYUnit Attributes - ID : 26 + ID : 30 Scope: local Value: 0 XFloat x0 Attributes - ID : 22 + ID : 26 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 190 + x coordinate : 188 y coordinate : 84 Width : 100 Height : 30 @@ -201,7 +215,7 @@ XFloat x0 Text tHeading Attributes - ID : 28 + ID : 16 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -248,7 +262,7 @@ Picture p0 Button bNext Attributes - ID : 29 + ID : 2 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -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 @@ -302,7 +309,7 @@ Button bNext Button bPrev Attributes - ID : 27 + ID : 3 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -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 @@ -356,15 +356,15 @@ Button bPrev Hotspot m0 Attributes - ID : 15 + ID : 19 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 20 + x coordinate : 35 y coordinate : 90 - Width : 440 + Width : 410 Height : 220 Effect : load Effect Priority : 0 @@ -447,15 +447,15 @@ Hotspot m0 Hotspot mSwipeNext Attributes - ID : 30 + ID : 10 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -467,7 +467,7 @@ Hotspot mSwipeNext Hotspot mSwipePrev Attributes - ID : 9 + ID : 12 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -487,7 +487,7 @@ Hotspot mSwipePrev Hotspot mSwipeUp Attributes - ID : 8 + ID : 11 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -507,7 +507,7 @@ Hotspot mSwipeUp Timer tmSerial Attributes - ID : 2 + ID : 4 Scope : local Period (ms): 50 Enabled : yes @@ -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 @@ -868,7 +862,7 @@ Timer tmSerial Timer tmSleep Attributes - ID : 5 + ID : 7 Scope : local Period (ms): 1000 Enabled : yes @@ -899,7 +893,7 @@ Timer tmSleep TouchCap tc0 Attributes - ID : 6 + ID : 8 Scope: local Value: 0 diff --git a/HMI/US/landscape/n2t-out-visual/cardEntities.txt b/HMI/US/landscape/n2t-out-visual/cardEntities.txt index e83fe465..83975b4c 100644 --- a/HMI/US/landscape/n2t-out-visual/cardEntities.txt +++ b/HMI/US/landscape/n2t-out-visual/cardEntities.txt @@ -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 @@ -294,7 +308,7 @@ Text tEntity1 Opacity : 127 x coordinate : 92 y coordinate : 85 - Width : 180 + Width : 184 Height : 30 Effect : load Effect Priority : 0 @@ -324,7 +338,7 @@ Text tEntity2 Opacity : 127 x coordinate : 93 y coordinate : 142 - Width : 180 + Width : 184 Height : 30 Effect : load Effect Priority : 0 @@ -354,7 +368,7 @@ Text tEntity3 Opacity : 127 x coordinate : 93 y coordinate : 198 - Width : 180 + Width : 184 Height : 30 Effect : load Effect Priority : 0 @@ -384,7 +398,7 @@ Text tEntity4 Opacity : 127 x coordinate : 93 y coordinate : 254 - Width : 180 + Width : 184 Height : 30 Effect : load Effect Priority : 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,14 +1319,14 @@ Button bStop4 Button bText1 Attributes - ID : 60 + ID : 58 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 x coordinate : 276 - y coordinate : 75 + y coordinate : 74 Width : 166 Height : 50 Effect : load @@ -1366,14 +1366,14 @@ Button bText1 Button bText2 Attributes - ID : 61 + ID : 59 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 x coordinate : 276 - y coordinate : 131 + y coordinate : 132 Width : 166 Height : 50 Effect : load @@ -1413,7 +1413,7 @@ Button bText2 Button bText3 Attributes - ID : 62 + ID : 60 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -1460,14 +1460,14 @@ Button bText3 Button bText4 Attributes - ID : 63 + ID : 61 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 x coordinate : 277 - y coordinate : 245 + y coordinate : 244 Width : 166 Height : 50 Effect : load @@ -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,15 +2077,15 @@ Hotspot mSpecial Hotspot mSwipeNext Attributes - ID : 57 + ID : 55 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -2097,7 +2097,7 @@ Hotspot mSwipeNext Hotspot mSwipePrev Attributes - ID : 59 + ID : 57 Scope : local Dragging : 0 Disable release event after dragging: 0 @@ -2105,7 +2105,7 @@ Hotspot mSwipePrev Opacity : 127 x coordinate : 0 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -2117,16 +2117,16 @@ Hotspot mSwipePrev Hotspot mSwipeUp Attributes - ID : 58 + ID : 56 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 25 + x coordinate : 27 y coordinate : 0 - Width : 425 - Height : 7 + Width : 426 + Height : 9 Effect : load Effect Priority : 0 Effect Time : 300 @@ -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 diff --git a/HMI/US/landscape/n2t-out-visual/cardGrid.txt b/HMI/US/landscape/n2t-out-visual/cardGrid.txt index 2d8ccbb4..ee0a79fb 100644 --- a/HMI/US/landscape/n2t-out-visual/cardGrid.txt +++ b/HMI/US/landscape/n2t-out-visual/cardGrid.txt @@ -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 @@ -160,7 +174,7 @@ Text tEntity1 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 26 + x coordinate : 21 y coordinate : 155 Width : 140 Height : 30 @@ -190,7 +204,7 @@ Text tEntity2 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 173 + x coordinate : 168 y coordinate : 155 Width : 140 Height : 30 @@ -220,7 +234,7 @@ Text tEntity3 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 319 + x coordinate : 314 y coordinate : 155 Width : 140 Height : 30 @@ -250,7 +264,7 @@ Text tEntity4 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 26 + x coordinate : 21 y coordinate : 274 Width : 140 Height : 30 @@ -280,7 +294,7 @@ Text tEntity5 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 173 + x coordinate : 168 y coordinate : 274 Width : 140 Height : 30 @@ -310,7 +324,7 @@ Text tEntity6 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 319 + x coordinate : 314 y coordinate : 274 Width : 140 Height : 30 @@ -340,7 +354,7 @@ Text tHeading Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 131 + x coordinate : 126 y coordinate : 26 Width : 227 Height : 30 @@ -370,7 +384,7 @@ Text tId Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 131 + x coordinate : 126 y coordinate : 290 Width : 39 Height : 30 @@ -400,7 +414,7 @@ Text tInstruction Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 20 + x coordinate : 15 y coordinate : 290 Width : 100 Height : 30 @@ -430,7 +444,7 @@ Text tTmp Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 420 + x coordinate : 415 y coordinate : 290 Width : 34 Height : 30 @@ -477,7 +491,7 @@ Button bEntity1 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 26 + x coordinate : 21 y coordinate : 75 Width : 140 Height : 80 @@ -544,7 +558,7 @@ Button bEntity2 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 173 + x coordinate : 167 y coordinate : 75 Width : 140 Height : 80 @@ -611,7 +625,7 @@ Button bEntity3 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 319 + x coordinate : 314 y coordinate : 75 Width : 140 Height : 80 @@ -678,7 +692,7 @@ Button bEntity4 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 26 + x coordinate : 21 y coordinate : 194 Width : 140 Height : 80 @@ -745,7 +759,7 @@ Button bEntity5 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 173 + x coordinate : 168 y coordinate : 194 Width : 140 Height : 80 @@ -812,7 +826,7 @@ Button bEntity6 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 319 + x coordinate : 314 y coordinate : 194 Width : 140 Height : 80 @@ -879,7 +893,7 @@ Button bNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 411 + x coordinate : 406 y coordinate : 16 Width : 50 Height : 50 @@ -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 : 29 + x coordinate : 25 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 @@ -987,7 +987,7 @@ Hotspot mSpecial Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 328 + x coordinate : 323 y coordinate : 0 Width : 83 Height : 67 @@ -1013,9 +1013,9 @@ Hotspot mSwipeNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -1035,7 +1035,7 @@ Hotspot mSwipePrev Opacity : 127 x coordinate : 0 y coordinate : 5 - Width : 7 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -1053,7 +1053,7 @@ Hotspot mSwipeUp Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 32 + x coordinate : 27 y coordinate : 0 Width : 426 Height : 9 @@ -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 } } diff --git a/HMI/US/landscape/n2t-out-visual/cardMedia.txt b/HMI/US/landscape/n2t-out-visual/cardMedia.txt index 9d1fc3df..66963752 100644 --- a/HMI/US/landscape/n2t-out-visual/cardMedia.txt +++ b/HMI/US/landscape/n2t-out-visual/cardMedia.txt @@ -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 @@ -248,7 +262,7 @@ Text t0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 126 + x coordinate : 123 y coordinate : 145 Width : 50 Height : 50 @@ -297,7 +311,7 @@ Text t1 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 25 + x coordinate : 22 y coordinate : 201 Width : 50 Height : 50 @@ -347,7 +361,7 @@ Text t2 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 316 + x coordinate : 313 y coordinate : 145 Width : 50 Height : 50 @@ -396,7 +410,7 @@ Text t3 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 411 + x coordinate : 408 y coordinate : 201 Width : 50 Height : 50 @@ -446,7 +460,7 @@ Text t5 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 411 + x coordinate : 408 y coordinate : 145 Width : 50 Height : 50 @@ -495,7 +509,7 @@ Text tAuthor Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 103 + x coordinate : 100 y coordinate : 108 Width : 358 Height : 25 @@ -525,7 +539,7 @@ Text tHeading Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 129 + x coordinate : 126 y coordinate : 26 Width : 228 Height : 30 @@ -535,7 +549,7 @@ Text tHeading Fill : solid color Style : flat Associated Keyboard : none - Font ID : 1 + Font ID : 2 Back. Color : 6371 Font Color : 65535 Horizontal Alignment : center @@ -555,7 +569,7 @@ Text tInstruction Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 296 + x coordinate : 311 y coordinate : 0 Width : 100 Height : 20 @@ -585,7 +599,7 @@ Text tPlayPause Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 221 + x coordinate : 218 y coordinate : 145 Width : 50 Height : 50 @@ -634,7 +648,7 @@ Text tShuffle Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 31 + x coordinate : 28 y coordinate : 145 Width : 50 Height : 50 @@ -683,7 +697,7 @@ Text tTitle Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 102 + x coordinate : 99 y coordinate : 78 Width : 358 Height : 25 @@ -730,7 +744,7 @@ Slider hVolume Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 79 + x coordinate : 76 y coordinate : 206 Width : 328 Height : 43 @@ -776,7 +790,7 @@ Button bEntity1 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 29 + x coordinate : 26 y coordinate : 75 Width : 71 Height : 62 @@ -839,7 +853,7 @@ Button bEntity2 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 31 + x coordinate : 28 y coordinate : 257 Width : 55 Height : 55 @@ -906,7 +920,7 @@ Button bEntity3 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 122 + x coordinate : 119 y coordinate : 257 Width : 55 Height : 55 @@ -973,7 +987,7 @@ Button bEntity4 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 213 + x coordinate : 210 y coordinate : 257 Width : 55 Height : 55 @@ -1040,7 +1054,7 @@ Button bEntity5 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 304 + x coordinate : 301 y coordinate : 257 Width : 55 Height : 55 @@ -1107,7 +1121,7 @@ Button bEntity6 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 400 + x coordinate : 397 y coordinate : 257 Width : 55 Height : 55 @@ -1174,7 +1188,7 @@ Button bNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 409 + x coordinate : 406 y coordinate : 16 Width : 50 Height : 50 @@ -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 @@ -1228,7 +1235,7 @@ Button bPrev Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 27 + x coordinate : 24 y coordinate : 16 Width : 50 Height : 50 @@ -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 @@ -1282,9 +1282,9 @@ Hotspot mSwipeNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -1322,7 +1322,7 @@ Hotspot mSwipeUp Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 12 + x coordinate : 27 y coordinate : 0 Width : 426 Height : 9 @@ -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") { diff --git a/HMI/US/landscape/n2t-out-visual/cardPower.txt b/HMI/US/landscape/n2t-out-visual/cardPower.txt index 38ad0da4..6fc11f3c 100644 --- a/HMI/US/landscape/n2t-out-visual/cardPower.txt +++ b/HMI/US/landscape/n2t-out-visual/cardPower.txt @@ -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 @@ -883,9 +883,9 @@ Hotspot mSwipeNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -923,7 +923,7 @@ Hotspot mSwipeUp Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 12 + x coordinate : 27 y coordinate : 0 Width : 426 Height : 9 @@ -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 diff --git a/HMI/US/landscape/n2t-out-visual/cardQR.txt b/HMI/US/landscape/n2t-out-visual/cardQR.txt index c681c9d2..5ab149e9 100644 --- a/HMI/US/landscape/n2t-out-visual/cardQR.txt +++ b/HMI/US/landscape/n2t-out-visual/cardQR.txt @@ -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 @@ -636,9 +636,9 @@ Hotspot mSwipeNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -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=="") { diff --git a/HMI/US/landscape/n2t-out-visual/cardThermo.txt b/HMI/US/landscape/n2t-out-visual/cardThermo.txt index 9265a092..3d42c408 100644 --- a/HMI/US/landscape/n2t-out-visual/cardThermo.txt +++ b/HMI/US/landscape/n2t-out-visual/cardThermo.txt @@ -72,12 +72,26 @@ 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 Scope : local Text : - Max. Text Size: 250 + Max. Text Size: 750 Variable (string) tId Attributes @@ -511,7 +525,7 @@ Text tHeading Fill : solid color Style : flat Associated Keyboard : none - Font ID : 1 + Font ID : 2 Back. Color : 6371 Font Color : 65535 Horizontal Alignment : center @@ -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 @@ -1386,9 +1386,9 @@ Hotspot mSwipeNext Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 472 + x coordinate : 471 y coordinate : 5 - Width : 8 + Width : 9 Height : 310 Effect : load Effect Priority : 0 @@ -1406,7 +1406,7 @@ Hotspot mSwipePrev Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 0 + x coordinate : 15 y coordinate : 5 Width : 9 Height : 310 @@ -1426,7 +1426,7 @@ Hotspot mSwipeUp Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 12 + x coordinate : 27 y coordinate : 0 Width : 426 Height : 9 @@ -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 diff --git a/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt b/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt index f338c38e..c41c0aa9 100644 --- a/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt +++ b/HMI/US/landscape/n2t-out-visual/nspanel_US_L_Stats.txt @@ -1,86 +1,86 @@ Program.s 0 Component(s) - 11 Line(s) of event code - 11 Unique line(s) of event code + 12 Line(s) of event code + 12 Unique line(s) of event code pageIcons 7 Component(s) 0 Line(s) of event code 0 Unique line(s) of event code -pageTest - 15 Component(s) - 15 Line(s) of event code - 15 Unique line(s) of event code -cardChart - 31 Component(s) - 452 Line(s) of event code - 296 Unique line(s) of event code -pageStartup - 19 Component(s) - 181 Line(s) of event code - 129 Unique line(s) of event code popupNotify 19 Component(s) 257 Line(s) of event code 166 Unique line(s) of event code -popupTimer - 42 Component(s) - 512 Line(s) of event code - 255 Unique line(s) of event code -popupLight - 28 Component(s) - 408 Line(s) of event code - 225 Unique line(s) of event code popupShutter 25 Component(s) 398 Line(s) of event code 218 Unique line(s) of event code -popupFan - 27 Component(s) - 351 Line(s) of event code - 204 Unique line(s) of event code popupInSel 34 Component(s) 617 Line(s) of event code 295 Unique line(s) of event code -cardQR - 32 Component(s) - 425 Line(s) of event code - 244 Unique line(s) of event code -cardGrid - 42 Component(s) - 538 Line(s) of event code - 300 Unique line(s) of event code screensaver - 45 Component(s) - 410 Line(s) of event code - 298 Unique line(s) of event code -cardAlarm - 40 Component(s) - 442 Line(s) of event code - 262 Unique line(s) of event code + 46 Component(s) + 429 Line(s) of event code + 301 Unique line(s) of event code +popupLight + 28 Component(s) + 408 Line(s) of event code + 225 Unique line(s) of event code +popupFan + 27 Component(s) + 351 Line(s) of event code + 204 Unique line(s) of event code +popupTimer + 42 Component(s) + 512 Line(s) of event code + 255 Unique line(s) of event code +pageStartup + 19 Component(s) + 181 Line(s) of event code + 129 Unique line(s) of event code +cardChart + 33 Component(s) + 425 Line(s) of event code + 290 Unique line(s) of event code +pageTest + 21 Component(s) + 66 Line(s) of event code + 64 Unique line(s) of event code +cardGrid + 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 +cardThermo + 57 Component(s) + 528 Line(s) of event code + 313 Unique line(s) of event code cardPower - 43 Component(s) - 439 Line(s) of event code - 299 Unique line(s) of event code + 45 Component(s) + 412 Line(s) of event code + 289 Unique line(s) of event code +cardAlarm + 42 Component(s) + 415 Line(s) of event code + 253 Unique line(s) of event code +cardQR + 34 Component(s) + 398 Line(s) of event code + 232 Unique line(s) of event code popupThermo 44 Component(s) 519 Line(s) of event code 274 Unique line(s) of event code -cardMedia - 57 Component(s) - 660 Line(s) of event code - 325 Unique line(s) of event code cardEntities - 65 Component(s) - 1185 Line(s) of event code - 537 Unique line(s) of event code -cardThermo - 55 Component(s) - 555 Line(s) of event code - 322 Unique line(s) of event code + 67 Component(s) + 1158 Line(s) of event code + 526 Unique line(s) of event code Total 19 Page(s) - 670 Component(s) - 8375 Line(s) of event code - 2116 Unique line(s) of event code + 693 Component(s) + 8234 Line(s) of event code + 2125 Unique line(s) of event code diff --git a/HMI/US/landscape/n2t-out-visual/pageIcons.txt b/HMI/US/landscape/n2t-out-visual/pageIcons.txt index 47a463a9..a5989d55 100644 --- a/HMI/US/landscape/n2t-out-visual/pageIcons.txt +++ b/HMI/US/landscape/n2t-out-visual/pageIcons.txt @@ -101,7 +101,7 @@ Text tTmp3 Send Component ID : disabled Opacity : 127 x coordinate : 302 - y coordinate : 152 + y coordinate : 154 Width : 146 Height : 69 Effect : load diff --git a/HMI/US/landscape/n2t-out-visual/pageStartup.txt b/HMI/US/landscape/n2t-out-visual/pageStartup.txt index 213b5a6a..e0fcf26b 100644 --- a/HMI/US/landscape/n2t-out-visual/pageStartup.txt +++ b/HMI/US/landscape/n2t-out-visual/pageStartup.txt @@ -402,7 +402,7 @@ Text tVersion Horizontal Alignment : center Vertical Alignment : center Input Type : character - Text : 46 + Text : 47 Max. Text Size : 10 Word wrap : disabled Horizontal Spacing : 0 diff --git a/HMI/US/landscape/n2t-out-visual/pageTest.txt b/HMI/US/landscape/n2t-out-visual/pageTest.txt index b40fcb18..ff46f405 100644 --- a/HMI/US/landscape/n2t-out-visual/pageTest.txt +++ b/HMI/US/landscape/n2t-out-visual/pageTest.txt @@ -21,7 +21,60 @@ Page pageTest Events Preinitialize Event vis p0,0 + recmod=1 + baud=115200 +Variable (string) strCommand + Attributes + ID : 17 + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) tInstruction + Attributes + ID : 16 + Scope : local + Text : + Max. Text Size: 30 + +Variable (string) tSend + Attributes + ID : 18 + Scope : local + Text : + Max. Text Size: 40 + +Text tBench + Attributes + ID : 15 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 288 + y coordinate : 90 + Width : 152 + Height : 30 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : flat + Associated Keyboard : none + Font ID : 0 + Back. Color : 65535 + Font Color : 0 + Horizontal Alignment : center + Vertical Alignment : center + Input Type : character + Text : + Max. Text Size : 20 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + Picture p0 Attributes ID : 1 @@ -47,8 +100,8 @@ Button b0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 5 - y coordinate : 12 + x coordinate : 0 + y coordinate : 0 Width : 100 Height : 50 Effect : load @@ -119,8 +172,8 @@ Button b10 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 115 - y coordinate : 128 + x coordinate : 100 + y coordinate : 98 Width : 100 Height : 50 Effect : load @@ -155,8 +208,8 @@ Button b11 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 117 - y coordinate : 184 + x coordinate : 100 + y coordinate : 145 Width : 100 Height : 50 Effect : load @@ -185,14 +238,14 @@ Button b11 Button b12 Attributes - ID : 14 + ID : 19 Scope : local Dragging : 0 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 115 - y coordinate : 244 + x coordinate : 0 + y coordinate : 242 Width : 100 Height : 50 Effect : load @@ -209,7 +262,7 @@ Button b12 Horizontal Alignment : center Vertical Alignment : center State : unpressed - Text : chart + Text : power Max. Text Size : 10 Word wrap : disabled Horizontal Spacing : 0 @@ -217,7 +270,43 @@ Button b12 Events Touch Press Event - page cardChart + page cardPower + +Button b13 + Attributes + ID : 20 + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Opacity : 127 + x coordinate : 152 + y coordinate : 245 + Width : 100 + Height : 50 + Effect : load + Effect Priority : 0 + Effect Time : 300 + Fill : solid color + Style : 3D auto + Font ID : 0 + Back. Color : 50712 + Back. Picture ID (Pressed) : 65535 + Back. Color (Pressed) : 1024 + Font Color (Unpressed) : 0 + Font Color (Pressed) : 65535 + Horizontal Alignment : center + Vertical Alignment : center + State : unpressed + Text : newtxt + Max. Text Size : 10 + Word wrap : disabled + Horizontal Spacing : 0 + Vertical Spacing : 0 + + Events + Touch Press Event + showqq Button b2 Attributes @@ -228,7 +317,7 @@ Button b2 Send Component ID : disabled Opacity : 127 x coordinate : 0 - y coordinate : 244 + y coordinate : 195 Width : 100 Height : 50 Effect : load @@ -299,8 +388,8 @@ Button b4 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 7 - y coordinate : 120 + x coordinate : 0 + y coordinate : 96 Width : 100 Height : 50 Effect : load @@ -335,8 +424,8 @@ Button b5 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 111 - y coordinate : 12 + x coordinate : 100 + y coordinate : 0 Width : 100 Height : 50 Effect : load @@ -371,8 +460,8 @@ Button b6 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 5 - y coordinate : 64 + x coordinate : 0 + y coordinate : 49 Width : 100 Height : 50 Effect : load @@ -407,8 +496,8 @@ Button b7 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 113 - y coordinate : 72 + x coordinate : 100 + y coordinate : 49 Width : 100 Height : 50 Effect : load @@ -480,8 +569,8 @@ Button b9 Disable release event after dragging: 0 Send Component ID : disabled Opacity : 127 - x coordinate : 6 - y coordinate : 175 + x coordinate : 0 + y coordinate : 146 Width : 100 Height : 50 Effect : load @@ -508,3 +597,83 @@ Button b9 Touch Press Event page popupNotify +Timer tmSerial + Attributes + ID : 14 + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + // data available + if(usize>1) + { + bufferPos=0 + while(bufferPos>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 diff --git a/HMI/US/landscape/n2t-out/cardEntities.txt b/HMI/US/landscape/n2t-out/cardEntities.txt index 79bd7775..0784d32e 100644 --- a/HMI/US/landscape/n2t-out/cardEntities.txt +++ b/HMI/US/landscape/n2t-out/cardEntities.txt @@ -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 diff --git a/HMI/US/landscape/n2t-out/cardGrid.txt b/HMI/US/landscape/n2t-out/cardGrid.txt index 71ce4b2d..1ad6c8f4 100644 --- a/HMI/US/landscape/n2t-out/cardGrid.txt +++ b/HMI/US/landscape/n2t-out/cardGrid.txt @@ -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 } } diff --git a/HMI/US/landscape/n2t-out/cardMedia.txt b/HMI/US/landscape/n2t-out/cardMedia.txt index e02027c0..b7909860 100644 --- a/HMI/US/landscape/n2t-out/cardMedia.txt +++ b/HMI/US/landscape/n2t-out/cardMedia.txt @@ -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") { diff --git a/HMI/US/landscape/n2t-out/cardPower.txt b/HMI/US/landscape/n2t-out/cardPower.txt index cfc75293..a29d2d83 100644 --- a/HMI/US/landscape/n2t-out/cardPower.txt +++ b/HMI/US/landscape/n2t-out/cardPower.txt @@ -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 diff --git a/HMI/US/landscape/n2t-out/cardQR.txt b/HMI/US/landscape/n2t-out/cardQR.txt index 9b3e879a..1b44aa31 100644 --- a/HMI/US/landscape/n2t-out/cardQR.txt +++ b/HMI/US/landscape/n2t-out/cardQR.txt @@ -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=="") { diff --git a/HMI/US/landscape/n2t-out/cardThermo.txt b/HMI/US/landscape/n2t-out/cardThermo.txt index bbb08974..55223073 100644 --- a/HMI/US/landscape/n2t-out/cardThermo.txt +++ b/HMI/US/landscape/n2t-out/cardThermo.txt @@ -63,11 +63,23 @@ 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 Text : - Max. Text Size: 250 + Max. Text Size: 750 Variable (string) tId Attributes @@ -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 diff --git a/HMI/US/landscape/n2t-out/pageStartup.txt b/HMI/US/landscape/n2t-out/pageStartup.txt index 80355119..32cc6502 100644 --- a/HMI/US/landscape/n2t-out/pageStartup.txt +++ b/HMI/US/landscape/n2t-out/pageStartup.txt @@ -152,7 +152,7 @@ Text tVersion Disable release event after dragging: 0 Send Component ID : disabled Associated Keyboard : none - Text : 46 + Text : 47 Max. Text Size : 10 Picture p0 diff --git a/HMI/US/landscape/n2t-out/pageTest.txt b/HMI/US/landscape/n2t-out/pageTest.txt index a6c9f873..24c80390 100644 --- a/HMI/US/landscape/n2t-out/pageTest.txt +++ b/HMI/US/landscape/n2t-out/pageTest.txt @@ -13,7 +13,37 @@ Page pageTest Events Preinitialize Event vis p0,0 + recmod=1 + baud=115200 +Variable (string) strCommand + Attributes + Scope : local + Text : + Max. Text Size: 20 + +Variable (string) tInstruction + Attributes + Scope : local + Text : + Max. Text Size: 30 + +Variable (string) tSend + Attributes + Scope : local + Text : + Max. Text Size: 40 + +Text tBench + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + Associated Keyboard : none + Text : + Max. Text Size : 20 + Picture p0 Attributes Scope : local @@ -84,12 +114,26 @@ Button b12 Disable release event after dragging: 0 Send Component ID : disabled State : unpressed - Text : chart + Text : power Max. Text Size : 10 Events Touch Press Event - page cardChart + page cardPower + +Button b13 + Attributes + Scope : local + Dragging : 0 + Disable release event after dragging: 0 + Send Component ID : disabled + State : unpressed + Text : newtxt + Max. Text Size : 10 + + Events + Touch Press Event + showqq Button b2 Attributes @@ -204,3 +248,82 @@ Button b9 Touch Press Event page popupNotify +Timer tmSerial + Attributes + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + // data available + if(usize>1) + { + bufferPos=0 + while(bufferPos Date: Thu, 5 Jan 2023 21:04:39 +0100 Subject: [PATCH 02/16] Update subpages.md --- docs/subpages.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/subpages.md b/docs/subpages.md index c9311578..02398fe5 100644 --- a/docs/subpages.md +++ b/docs/subpages.md @@ -3,7 +3,7 @@ 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 + - entity: navigate.testKey ``` will allow you to navigate to a cardGrid page with the configured key 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.cardGrid_test + - entity: navigate.testKey status: climate.test ``` From 2147ae722f56e0be31c4edbeca80fe20c22780d2 Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:05:39 +0100 Subject: [PATCH 03/16] Update subpages.md --- docs/subpages.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/subpages.md b/docs/subpages.md index 02398fe5..3e8bd687 100644 --- a/docs/subpages.md +++ b/docs/subpages.md @@ -25,3 +25,16 @@ You can override the status of navigation items, to make them look like differen - entity: navigate.testKey status: climate.test ``` + +# Override Navigation Items itself + +``` + cards: + - type: cardGrid + title: Wohnzimmer + navItem1: + entity: light.bad_lights + navItem2: + entity: light.bad_lights + entities: +``` From b8acbb531fc4fd51a3db49bfbd8daa172c30635a Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:06:08 +0100 Subject: [PATCH 04/16] Update subpages.md --- docs/subpages.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/subpages.md b/docs/subpages.md index 3e8bd687..2de68c37 100644 --- a/docs/subpages.md +++ b/docs/subpages.md @@ -28,6 +28,8 @@ You can override the status of navigation items, to make them look like differen # Override Navigation Items itself +![image](https://user-images.githubusercontent.com/29555657/210870248-dfbaf95a-3dcb-4482-a24f-afca2e426406.png) + ``` cards: - type: cardGrid From c626a4eb2731edca3e2b661aee201e9b8f573cd2 Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:09:31 +0100 Subject: [PATCH 05/16] Update nspanel-lovelace-ui.py --- apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py b/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py index b8d53a57..c61e3c1f 100644 --- a/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py +++ b/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py @@ -27,8 +27,8 @@ class NsPanelLovelaceUIManager(hass.Hass): controller = LuiController(cfg, mqttsend.send_mqtt_msg) desired_tasmota_driver_version = 8 - desired_display_firmware_version = 46 - version = "v3.7.0" + desired_display_firmware_version = 47 + version = "v3.8.0" model = cfg.get("model") if model == "us-l": From c78ccfc24a0a90c9c2faa651636be588bbc14e21 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Thu, 5 Jan 2023 23:20:06 +0100 Subject: [PATCH 06/16] v3.8.0 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia - Upgrade TFT 47 --- ioBroker/NsPanelTs_without_Examples.ts | 342 +++++++++++++++++++++---- 1 file changed, 292 insertions(+), 50 deletions(-) diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index dfd459c2..d1d4cee6 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -1,6 +1,6 @@ /*----------------------------------------------------------------------- -TypeScript v3.7.3.2 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 +TypeScript v3.8.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf +- abgestimmt auf TFT 47 / v3.8.0 / 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) @@ -106,6 +106,12 @@ ReleaseNotes: - 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 - 29.12.2022 - v3.7.3.2 Add pageItem.id to Submenu; New Parameter targetPage by TT-TOM / @tt-tom17 + - 30.12.2022 - v3.8.0 Add New HMI-Navi + - 01.01.2023 - v3.8.0 Add Tasmota "Web Admin Password" + - 02.01.2023 - v3.8.0 Add Navigation bSubPrev and bSubNext and Subpages for bHome + - 03.01.2023 - v3.8.0 Bugfix for cardThermostat - Payload (Minor) + - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia + - 05.01.2023 - v3.8.0 Upgrade TFT 47 ***************************************************************************************************************** * Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! * @@ -179,7 +185,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.3.tft + TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.8.0.tft --------------------------------------------------------------------------------------- */ let Icons = new IconsSelector(); @@ -189,6 +195,9 @@ const autoCreateAlias = true; //Für diese Option muss der Hak const weatherAdapterInstance: string = 'accuweather.0.'; //Möglich 'accuweather.0.' oder 'daswetter.0.' const weatherScreensaverTempMinMax: string = 'MinMax'; // Mögliche Werte: 'Min', 'Max' oder 'MinMax' +const tasmota_web_admin_user: string = 'admin'; // ändern, falls der User im Tasmota vor dem Kompilieren umbenannt wurde (Standard Tasmota: admin) +const tasmota_web_admin_password: string = ''; // setzten, falls "Web Admin Password" in Tasmote vergeben + const NSPanel_Path = '0_userdata.0.NSPanel.1.'; const NSPanel_Alarm_Path = '0_userdata.0.NSPanel.'; //Neuer Pfad für gemeinsame Nutzung durch mehrere Panels (bei Nutzung der cardAlarm) @@ -293,32 +302,38 @@ let vwIconColor = []; let Service: PageEntities = { - "type": "cardEntities", - "heading": "NSPanel Service", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: AliasPath + 'autoUpdate', name: "Auto-Updates" ,icon: "update", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: "NSPanel_Infos", icon: "information-outline", onColor: White, name: "NSPanel Infos"}, - { navigate: true, id: "NSPanel_Firmware_Info", icon: "update", onColor: White, name: "Firmware Infos"}, - { navigate: true, id: "NSPanel_Einstellungen", icon: "wrench-outline", onColor: White, name: "Screensaver"} + 'type': 'cardEntities', + 'heading': 'NSPanel Service', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: AliasPath + 'autoUpdate', name: 'Auto-Updates' ,icon: 'update', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: 'NSPanel_Infos', icon: 'information-outline', onColor: White, name: 'NSPanel Infos'}, + { navigate: true, id: 'NSPanel_Firmware_Info', icon: 'update', onColor: White, name: 'Firmware Infos'}, + { navigate: true, id: 'NSPanel_Einstellungen', icon: 'wrench-outline', onColor: White, name: 'Screensaver'} ] }; //Subpage 1 von Subpages_2 let NSPanel_Infos: PageEntities = { - "type": "cardEntities", - "heading": "NSPanel Infos", - "useColor": true, - "subPage": true, - "parent": Service, - "items": [ + 'type': 'cardEntities', + 'heading': 'NSPanel Infos', + 'useColor': true, + 'subPage': true, + 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ { id: AliasPath + 'Tasmota.Hardware', name: 'Hardware', icon: 'memory', offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Sensor.ESP32.Temperature', name: "ESP Temperatur", icon: "thermometer", unit: "°C", offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Tasmota.Uptime', name: "Uptime", icon: "timeline-clock-outline", offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Tasmota.Wifi.RSSI', name: "Wifi-Signal", icon: "signal-distance-variant", unit: "dBm", offColor: MSYellow, onColor: MSYellow, useColor: true} + { id: AliasPath + 'Sensor.ESP32.Temperature', name: 'ESP Temperatur', icon: 'thermometer', unit: '°C', offColor: MSYellow, onColor: MSYellow, useColor: true}, + { id: AliasPath + 'Tasmota.Uptime', name: 'Uptime', icon: 'timeline-clock-outline', offColor: MSYellow, onColor: MSYellow, useColor: true}, + { id: AliasPath + 'Tasmota.Wifi.RSSI', name: 'Wifi-Signal', icon: 'signal-distance-variant', unit: 'dBm', offColor: MSYellow, onColor: MSYellow, useColor: true} ] }; @@ -330,6 +345,9 @@ let Service: PageEntities = 'useColor': true, 'subPage': true, 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 5, maxValue: 10}, { id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 4}, @@ -346,6 +364,9 @@ let Service: PageEntities = 'useColor': true, 'subPage': true, 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: AliasPath + 'Tasmota.Version', name: 'Tasmota Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true}, { id: AliasPath + 'Display.TFTVersion', name: 'TFT-Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true}, @@ -369,24 +390,96 @@ export const config: Config = { timeoutScreensaver: 20, screenSaverDoubleClick: true, locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc. - weatherEntity: 'alias.0.Wetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können + weatherEntity: 'alias.0.DasWetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können defaultOffColor: Off, defaultOnColor: On, defaultColor: Off, defaultBackgroundColor: HMIDark, //New Parameter temperatureUnit: '°C', pages: [ + Level_0_Grundstueck, + Buero_Seite_1, //Beispiel-Seite + WLED, //Beispiel-Seite + Radiosender, //Beispiel-Seite + SensorGrid, //Beispiel-Seite + CardChartExample, //Beispiel-Seite + CardPowerExample, //Beispiel-Seite + //SqueezeboxRPC, //Beispiel-Seite + Sonos, //Beispiel-Seite + SpotifyPremium, //Beispiel-Seite + Alexa, //Beispiel-Seite + Buero_Seite_2, //Beispiel-Seite + Buero_Klimaanlage, //Beispiel-Seite + Button_1, //Beispiel-Seite + Test_Licht1, //Beispiel-Seite + Test_Licht2, //Beispiel-Seite + Test_Funktionen, //Beispiel-Seite + Fenster_1, //Beispiel-Seite + Subpages_1, //Beispiel-Seite + Buero_Themostat, //Beispiel-Seite + Buero_Alarm, //Beispiel-Seite Service //Auto-Alias Service Page ], subPages: [ + Abfall, //Beispiel-Unterseite + WLAN, //Beispiel-Unterseite NSPanel_Infos, //Auto-Alias Service Page NSPanel_Einstellungen, //Auto-Alias Service Page - NSPanel_Firmware_Info //Auto-Alias Service Page + NSPanel_Firmware_Info, //Auto-Alias Service Page + + Level_1_Haus, + Level_2_Erdgeschoss_1, + Level_3_Wohnzimmer, + Level_4_Wohnzimmer_Licht_1, + Level_4_Wohnzimmer_Licht_2, + Level_4_Wohnzimmer_Sensoren_1, + Level_4_Wohnzimmer_Aktoren, + Level_4_Wohnzimmer_Thermostat, + Level_3_Esszimmer, + + Level_3_Buero, + Level_4_Buero_Licht, + Level_4_Buero_Sensoren_1, + Level_4_Buero_Sensoren_2, + Level_4_Buero_Aktoren, + Level_4_Buero_Thermostat, + Level_3_Kueche, + + Level_3_Bad, + + Level_2_Erdgeschoss_2, + Level_3_Kaminzimmer, + + Level_3_GaesteWC, + + Level_3_Hauswirtschaftsraum, + + Level_3_FlurVorne, + + Level_3_FlurHinten, + + Level_1_Gartenhaus, + Level_2_GH_Licht, + Level_3_GH_Lampen_1, + Level_3_GH_Lampen_2, + Level_3_GH_Lampen_3, + Level_3_GH_Lampen_4, + Level_3_GH_LED_Stripes, + Level_3_GH_WLED, + Level_3_GH_Aussenlampen, + Level_2_GH_Sensoren_1, + Level_2_GH_Sensoren_2, + Level_2_GH_Aktoren_1, + Level_2_GH_Aktoren_2, + Level_2_GH_Heizkoerper, + Level_1_Aussen, + + Level_1_Garage ], - button1Page: null, //Beispiel-Seite auf Button 1, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, - button2Page: null //Beispiel-Seite auf Button 2, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, + button1Page: button1Page, //Beispiel-Seite auf Button 1, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, + button2Page: button2Page //Beispiel-Seite auf Button 2, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, }; // _________________________________ Ab hier keine Konfiguration mehr _____________________________________ @@ -914,6 +1007,11 @@ setState(config.panelSendTopic, 'pageType~pageStartup'); get_tasmota_status0(); get_panel_update_data(); check_updates(); +/* +setTimeout(async function () { + setState(config.panelSendTopic, 'pageType~pageStartup'); +}, 60000); +*/ //------------------Begin Update Functions @@ -1179,8 +1277,15 @@ function get_current_berry_driver_version() { if (Debug) { console.log('Requesting current berry driver version'); } + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=GetDriverVersion`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=GetDriverVersion`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=GetDriverVersion`, + + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1206,8 +1311,14 @@ function get_tasmota_status0() { if (Debug) { console.log('Requesting tasmota status0'); } + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Status0`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Status0`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Status0`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1379,8 +1490,14 @@ on({ id: config.panelRecvTopic }, async (obj) => { function update_berry_driver_version() { try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1396,8 +1513,14 @@ function update_tft_firmware() { const tft_version: string = 'v3.7.3'; const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`; try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=FlashNextion ${desired_display_firmware_url}`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=FlashNextion ${desired_display_firmware_url}`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=FlashNextion ${desired_display_firmware_url}`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1412,8 +1535,14 @@ function update_tft_firmware() { function update_tasmota_firmware() { try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Upgrade 1`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Upgrade 1`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Upgrade 1`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -2012,6 +2141,19 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + windowState; case 'motion': + + type = 'text'; + if (val === true) { + optVal = 'On'; + iconColor = GetIconColor(pageItem, true, useColors); + iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('motion-sensor'); + } else { + optVal = 'Off'; + iconColor = GetIconColor(pageItem, false, useColors); + iconId = pageItem.icon2 !== undefined ? Icons.GetIcon(pageItem.icon2) : Icons.GetIcon('motion-sensor'); + } + + return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal; case 'info': @@ -2547,9 +2689,9 @@ function GenerateThermoPage(page: PageThermo): Payload[] { + minTemp + '~' // Thermostat Min-Temperatur + maxTemp + '~' // Thermostat Max-Temperatur + stepTemp + '~' // Schritte für Soll (5°C) - + icon_res + '~' // Icons Status + + icon_res // Icons Status + findLocale('thermostat', 'Currently') + '~' // Bezeichner vor Aktueller Raumtemperatur - + findLocale('thermostat', 'State') + '~' // Bezeichner vor State + + findLocale('thermostat', 'State') + '~~' // Bezeichner vor State + config.temperatureUnit + '~' // iconTemperature dstTempTwoTempMode + destTemp2 + '~' // dstTempTwoTempMode --> Wenn Wert, dann 2 Temp + thermoPopup // PopUp @@ -2688,6 +2830,33 @@ async function createAutoMediaAlias(id: string, mediaDevice: string, adapterPlay } } } + + if (adapterPlayerInstance.startsWith('volumio')) { + if (existsObject(id) == false){ + console.log('Volumio Alias ' + id + ' existiert nicht - wird jetzt angelegt') + + let dpPath: string = adapterPlayerInstance; + try { + setObject(id, {_id: id, type: 'channel', common: {role: 'media', name:'media'}, native: {}}); + await createAliasAsync(id + '.ACTUAL', dpPath + 'playbackInfo.volume', true, { type: 'number', role: 'value.volume', name: 'ACTUAL' }); + await createAliasAsync(id + '.ALBUM', dpPath + 'playbackInfo.album', true, { type: 'string', role: 'media.album', name: 'ALBUM' }); + await createAliasAsync(id + '.ARTIST', dpPath + 'playbackInfo.artist', true, { type: 'string', role: 'media.artist', name: 'ARTIST' }); + await createAliasAsync(id + '.TITLE', dpPath + 'playbackInfo.title', true, { type: 'string', role: 'media.title', name: 'TITLE' }); + await createAliasAsync(id + '.NEXT', dpPath + 'player.next', true, { type: 'boolean', role: 'button.next', name: 'NEXT' }); + await createAliasAsync(id + '.PREV', dpPath + 'player.prev', true, { type: 'boolean', role: 'button.prev', name: 'PREV' }); + await createAliasAsync(id + '.PLAY', dpPath + 'player.play', true, { type: 'boolean', role: 'button.play', name: 'PLAY' }); + await createAliasAsync(id + '.PAUSE', dpPath + 'player.toggle', true, { type: 'boolean', role: 'button.pause', name: 'PAUSE' }); + await createAliasAsync(id + '.STOP', dpPath + 'player.stop', true, { type: 'boolean', role: 'button.stop', name: 'STOP' }); + await createAliasAsync(id + '.STATE', dpPath + 'playbackInfo.status', true, { type: 'boolean', role: 'media.state', name: 'STATE' }); + await createAliasAsync(id + '.VOLUME', dpPath + 'playbackInfo.volume', true, { type: 'number', role: 'level.volume', name: 'VOLUME' }); + await createAliasAsync(id + '.REPEAT', dpPath + 'playbackInfo.repeat', true, { type: 'number', role: 'media.mode.repeat', name: 'REPEAT' }); + await createAliasAsync(id + '.SHUFFLE', dpPath + 'queue.shuffle', true, { type: 'boolean', role: 'media.mode.shuffle', name: 'SHUFFLE' }); + await createAliasAsync(id + '.status', dpPath + 'playbackInfo.status', true, { type: 'string', role: 'media.state', name: 'status' }); + } catch (err) { + console.warn('function createAutoMediaAlias: ' + err.message); + } + } + } } } @@ -2792,6 +2961,13 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } + //Volumio + if (v2Adapter == 'volumio') { + if (name != undefined) { author = author + " [" + name + "]"; } + name = getState(vInstance + 'info.name').val; /* page.heading; + getState(id + '.TRACK').val; */ + } + let volume = getState(id + '.VOLUME').val; let iconplaypause = Icons.GetIcon('pause'); //pause let shuffle_icon = Icons.GetIcon('shuffle-variant'); //shuffle @@ -2800,6 +2976,8 @@ function GenerateMediaPage(page: PageMedia): Payload[] { if (shuffle == 'off' || shuffle == false || shuffle == 0) { shuffle_icon = Icons.GetIcon('shuffle-disabled'); //shuffle } + if (v2Adapter == 'volumio') { shuffle_icon = Icons.GetIcon('refresh'); } //Volumio: refresh playlist + //Für alle Player if (getState(id + '.STATE').val) { @@ -2819,6 +2997,16 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } + //Ausnahme Volumio: status = string: play, pause, stop usw. + if (v2Adapter == 'volumio') { + if (getState(id + '.status').val == 'play') { + onoffbutton = 65535; + iconplaypause = Icons.GetIcon('pause'); //pause + } else { + iconplaypause = Icons.GetIcon('play'); //play + } + } + let currentSpeaker = 'kein Speaker gefunden'; if (v2Adapter == 'alexa2') { @@ -2834,7 +3022,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } //------------------------------------------------------------------------------------------------------------- // nachfolgend alle Alexa-Devices (ist Online / Player- und Commands-Verzeichnis vorhanden) auflisten und verketten - // Wenn Konstante alexaSpeakerList mind. einen Eintrag enthält, wird die Konstante verwendet - ansonsten Alle Devices aus dem Alexa Adapter + // Wenn Konstante alexaSpeakerList mind. einen Eintrag enthält, wird die Konstante verwendet - ansonsten Alle Devices aus dem Alexa Adapter let speakerList = ''; if (page.items[0].speakerList.length > 0) { for (let i_index in page.items[0].speakerList) { @@ -2877,17 +3065,30 @@ function GenerateMediaPage(page: PageMedia): Payload[] { let playListString: string = '~~~~~~' let playListIconCol = rgb_dec565(HMIOff); if (page.items[0].playList != undefined) { + /* Volumio: get actual playlist if empty */ + if (v2Adapter == 'volumio') { + if (page.items[0].playList.length == 0) { + request({ url: `${getState(vInstance+'info.host').val}/api/listplaylists`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result) => { + try { + page.items[0].playList = JSON.parse(result); + if (Debug) console.log(page.items[0].playList); + } catch (err) { + console.log('get_volumio-playlist: ' + err.message); + } + } + ); + } + } playListIconCol = rgb_dec565(HMIOn); playListString = 'input_sel' + '~' + id + '?playlist' + '~' + Icons.GetIcon('playlist-play') + '~' + playListIconCol + '~' + - 'Playlist' + '~' + + 'PlayL ' + page.heading + '~' + 'media1~' } - //Testvariable ******************** - //InSel Playlist let trackListString: string = '~~~~~~' let trackListIconCol = rgb_dec565(HMIOff); @@ -2949,6 +3150,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { repeatIconCol = rgb_dec565(HMIOn); } } + /* Volumio todo: 2 boolean 'Repeat' + 'RepeatSingle' */ if (v2Adapter == 'spotify-premium' || v2Adapter == 'alexa2' || v2Adapter == 'sonos') { repeatButtonString = 'button' + '~' + @@ -3357,6 +3559,10 @@ function HandleButtonEvent(words): void { return; } + if (words[2] == 'bNext' || words[2] == 'bPrev' || words[2] == 'bUp' || words[2] == 'bHome' || words[2] == 'bSubNext' || words[2] == 'bSubPrev' ) { + buttonAction = words[2]; + } + if (Debug) { console.log(buttonAction); } @@ -3395,6 +3601,10 @@ function HandleButtonEvent(words): void { UnsubscribeWatcher(); GeneratePage(config.pages[pageId]); break; + case 'bSubNext': + UnsubscribeWatcher(); + GeneratePage(eval(activePage.next)); + break; case 'bPrev': pageNum = (((pageId - 1) % config.pages.length) + config.pages.length) % config.pages.length; pageId = pageNum; @@ -3413,6 +3623,10 @@ function HandleButtonEvent(words): void { GeneratePage(config.pages[pageId]); } break; + case 'bSubPrev': + UnsubscribeWatcher(); + GeneratePage(eval(activePage.prev)); + break; case 'bExit': if (config.screenSaverDoubleClick && words[2] == 'screensaver') { if (words[4] >= 2) { @@ -3442,7 +3656,11 @@ function HandleButtonEvent(words): void { console.log('bExit: ' + words[4] + ' - ' + pageId); } UnsubscribeWatcher(); - GeneratePage(config.pages[0]); + if (activePage.home != undefined) { + GeneratePage(eval(activePage.home)); + } else { + GeneratePage(config.pages[0]); + } break; case 'notifyAction': if (words[4] == 'yes') { @@ -3684,6 +3902,7 @@ function HandleButtonEvent(words): void { setIfExists(id + '.NEXT', true); break; case 'media-shuffle': + if ((findPageItem(id).adapterPlayerInstance).startsWith("volumio")) { findPageItem(id).playList = []; break; } //Volumio: empty playlist $uha-20230103 if (getState(id + '.SHUFFLE').val == 'off') { setIfExists(id + '.SHUFFLE', 'on'); } else { @@ -3733,6 +3952,7 @@ function HandleButtonEvent(words): void { switch (deviceAdapterPL) { case 'spotify-premium': let strDevicePI = pageItemPL.playList[words[4]] + console.log(strDevicePI) let playlistListString = (getState(adapterInstancePL + 'playlists.playlistListString').val).split(';'); let playlistListIds = (getState(adapterInstancePL + 'playlists.playlistListIds').val).split(';'); let playlistIndex = playlistListString.indexOf(strDevicePI); @@ -3745,6 +3965,11 @@ function HandleButtonEvent(words): void { let tempListItem = pageItemPL.playList[words[4]].split('.'); setState(adapterInstancePL + 'Echo-Devices.' + pageItemPL.mediaDevice + '.Music-Provider.' + tempListItem[0], tempListItem[1]); break; + case 'volumio': + let strDevicePL = pageItemPL.playList[words[4]]; + request({ url:`${getState(adapterInstancePL+'info.host').val}/api/commands/?cmd=playplaylist&name=${strDevicePL}`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result)=>{}); /* nothing todo @ error */ + break; } break; case 'mode-tracklist': @@ -4012,20 +4237,26 @@ function GetNavigationString(pageId: number): string { // 2|0 = (right) up navigation arrow // 2|2 = (right) up navigation arrow | (left) home navigation icon - if (activePage.subPage) - return '2|2'; + if (activePage.subPage && activePage.prev == undefined && activePage.next == undefined) { + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~button~bHome~' + Icons.GetIcon('home') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev == undefined && activePage.next != undefined) { + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~button~bSubNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev != undefined && activePage.next != undefined) { + return 'button~bSubPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bSubNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev != undefined && activePage.next == undefined) { + return 'button~bSubPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bHome~' + Icons.GetIcon('home') + '~' + rgb_dec565(White) + '~~'; + } switch (pageId) { case 0: - return '1|1'; case config.pages.length - 1: - return '1|1'; + return 'button~bPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; case -1: - return '2|0'; + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + ' ~~~delete~~~~~'; case -2: - return '2|0'; + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~delete~~~~~'; default: - return '1|1'; + return 'button~bPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; } } catch (err) { @@ -4034,7 +4265,7 @@ function GetNavigationString(pageId: number): string { } function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): Payload[] { - //console.log(type + ' - ' + optional + ' - ' + pageItem.id) + if (Debug) console.log(type + ' - ' + optional + ' - ' + pageItem.id); try { let out_msgs: Array = []; let id = pageItem.id @@ -4654,13 +4885,21 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): let tempItem = pageItem.playList[i].split('.'); tPlayList[i] = tempItem[1]; } - + let tempPlayList = []; for (let i = 0; i < tPlayList.length; i++) { tempPlayList[i] = formatInSelText(tPlayList[i]); } optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : '' - } + } else if (vAdapter == 'volumio') { /* Volumio: limit 900 chars */ + actualState = ''; //todo: no actual playlistname saving + let tempPlayList = []; let tempPll = 0; + for (let i = 0; i < pageItem.playList.length; i++) { + tempPll += pageItem.playList[i].length; if (tempPll > 900) break; + tempPlayList[i] = formatInSelText(pageItem.playList[i]); + } + optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : '' + } /**/ mode = 'playlist'; } else if (optional == 'tracklist') { actualState = '' @@ -4668,7 +4907,7 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): actualState = (actualState.replace('?','')).split(' -'); actualState = actualState[0].split(" ("); actualState = formatInSelText(actualState[0]); - //Limit 900 Zeichen, danach Speicherüberlauf --> Soweit kürzen wie möglich + //Limit 900 Zeichen, danach Speicherüberlauf --> Soweit kürzen wie möglich let temp_array = []; //let trackArray = (function () { try {return JSON.parse(getState(pageItem.adapterPlayerInstance + 'player.playlist.trackListArray').val);} catch(e) {return {};}})(); for (let track_index=0; track_index < 45; track_index++) { @@ -5809,7 +6048,10 @@ type Page = { items: PageItem[], useColor: boolean, subPage: boolean, - parent: Page + parent: Page, + prev: string, + next: string, + home: string }; interface PageEntities extends Page { From b9e70315002a6895720712a6f1a19db1b75e54aa Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Thu, 5 Jan 2023 23:23:24 +0100 Subject: [PATCH 07/16] v3.8.0 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia - Upgrade TFT 47 --- ioBroker/NsPanelTs_without_Examples.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index d1d4cee6..71f88d65 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -1042,7 +1042,7 @@ function get_locales() { async function check_updates() { try { - const desired_display_firmware_version = 46; + const desired_display_firmware_version = 47; const berry_driver_version = 8; if (Debug) { @@ -1510,7 +1510,7 @@ function update_berry_driver_version() { } function update_tft_firmware() { - const tft_version: string = 'v3.7.3'; + const tft_version: string = 'v3.8.0'; const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`; try { From f7cba480cfd81141ad4859d03c3f5b5dad012dc5 Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Fri, 6 Jan 2023 01:22:05 +0100 Subject: [PATCH 08/16] Fix Prev/Next UUID Assignment in #665 Implementation fixes #669 --- apps/nspanel-lovelace-ui/luibackend/config.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/config.py b/apps/nspanel-lovelace-ui/luibackend/config.py index 65503c2c..403050fa 100644 --- a/apps/nspanel-lovelace-ui/luibackend/config.py +++ b/apps/nspanel-lovelace-ui/luibackend/config.py @@ -165,14 +165,14 @@ class LuiBackendConfig(object): # setup prev and next uuids top_level_cards = list(filter(lambda card: not card.hidden, self._config_cards)) - card_ids = [card.id for card in top_level_cards] + card_uuids = [card.uuid for card in top_level_cards] - prev_ids = card_ids[-1:] + card_ids[:-1] - next_ids = card_ids[ 1:] + card_ids[: 1] + prev_uuids = card_uuids[-1:] + card_uuids[:-1] + next_uuids = card_uuids[ 1:] + card_uuids[: 1] - if len(card_ids) > 1: - for prev_id, card, next_id in zip(prev_ids, top_level_cards, next_ids): - (card.uuid_prev, card.uuid_next) = (prev_id, next_id) + if len(card_uuids) > 1: + for prev_uuids, card, next_uuids in zip(prev_uuids, top_level_cards, next_uuids): + (card.uuid_prev, card.uuid_next) = (prev_uuids, next_uuids) # parse screensaver self._config_screensaver = Card(self.get("screensaver")) From 42e715c6b51fecf3ba34289d859e064e8db7d7e9 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:42:38 +0100 Subject: [PATCH 09/16] v3.8.0 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia by @egal - Upgrade TFT 47 - Add Volumio-Tracklist to cardMedia by @egal --- ioBroker/NsPanelTs.ts | 1392 ++++++++++++++++++++++++++++++++++------- 1 file changed, 1161 insertions(+), 231 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 866cf389..14c14f63 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1,6 +1,6 @@ /*----------------------------------------------------------------------- -TypeScript v3.7.3.2 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 +TypeScript v3.8.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf +- abgestimmt auf TFT 47 / v3.8.0 / 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) @@ -13,7 +13,7 @@ Achtung Änderung des Sonoff ESP-Temperatursensors !!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!! ******************************************************************************* In bestimmten Situationen kommt es vor, dass sich das Panel mit FlashNextion -unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Dowengrade +unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Downgrade durchführen und FlashNextion wiederholen. ******************************************************************************* @@ -105,7 +105,14 @@ ReleaseNotes: - 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 - - 29.12.2022 - v3.7.3.2 Add pageItem.id to Submenu; New Parameter targetPage by TT-TOM + - 29.12.2022 - v3.7.3.2 Add pageItem.id to Submenu; New Parameter targetPage by TT-TOM / @tt-tom17 + - 30.12.2022 - v3.8.0 Add New HMI-Navi + - 01.01.2023 - v3.8.0 Add Tasmota "Web Admin Password" + - 02.01.2023 - v3.8.0 Add Navigation bSubPrev and bSubNext and Subpages for bHome + - 03.01.2023 - v3.8.0 Bugfix for cardThermostat - Payload (Minor) + - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia by @egal + - 05.01.2023 - v3.8.0 Upgrade TFT 47 + - 06.01.2023 - v3.8.0 Add Volumio Tracklist by @egal ***************************************************************************************************************** * Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! * @@ -179,7 +186,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.3.tft + TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.8.0.tft --------------------------------------------------------------------------------------- */ let Icons = new IconsSelector(); @@ -189,6 +196,9 @@ const autoCreateAlias = true; //Für diese Option muss der Hak const weatherAdapterInstance: string = 'accuweather.0.'; //Möglich 'accuweather.0.' oder 'daswetter.0.' const weatherScreensaverTempMinMax: string = 'MinMax'; // Mögliche Werte: 'Min', 'Max' oder 'MinMax' +const tasmota_web_admin_user: string = 'admin'; // ändern, falls der User im Tasmota vor dem Kompilieren umbenannt wurde (Standard Tasmota: admin) +const tasmota_web_admin_password: string = ''; // setzten, falls "Web Admin Password" in Tasmote vergeben + const NSPanel_Path = '0_userdata.0.NSPanel.1.'; const NSPanel_Alarm_Path = '0_userdata.0.NSPanel.'; //Neuer Pfad für gemeinsame Nutzung durch mehrere Panels (bei Nutzung der cardAlarm) @@ -285,28 +295,34 @@ let vwIconColor = []; let Test_Licht1: PageEntities = { - "type": "cardEntities", - "heading": "Color Aliase 1", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestRGBLichteinzeln", name: "RGB-Licht Hex-Color", interpolateColor: true}, - { id: "alias.0.NSPanel_1.TestRGBLicht", name: "RGB-Licht", minValueBrightness: 0, maxValueBrightness: 100, interpolateColor: true}, - { id: "alias.0.NSPanel_1.TestCTmitHUE", name: "HUE-Licht-CT", minValueBrightness: 0, maxValueBrightness: 70, minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true}, - { id: "alias.0.NSPanel_1.TestHUELicht", name: "HUE-Licht-Color", minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true} + 'type': 'cardEntities', + 'heading': 'Color Aliase 1', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestRGBLichteinzeln', name: 'RGB-Licht Hex-Color', interpolateColor: true}, + { id: 'alias.0.NSPanel_1.TestRGBLicht', name: 'RGB-Licht', minValueBrightness: 0, maxValueBrightness: 100, interpolateColor: true}, + { id: 'alias.0.NSPanel_1.TestCTmitHUE', name: 'HUE-Licht-CT', minValueBrightness: 0, maxValueBrightness: 70, minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true}, + { id: 'alias.0.NSPanel_1.TestHUELicht', name: 'HUE-Licht-Color', minValueColorTemp: 500, maxValueColorTemp: 6500, interpolateColor: true} ] }; //Only DEV --> Test let CardChartExample: PageChart = { - "type": "cardChart", - "heading": "Stromzähler L1+L2+L3", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ + 'type': 'cardChart', + 'heading': 'Stromzähler L1+L2+L3', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.NSPanel_1.cardChart', yAxis: 'Leistung [kW]', yAxisTicks: [2,4,6,8,10,2,4,6,8,20,2], @@ -316,201 +332,240 @@ let CardChartExample: PageChart = let CardPowerExample: PagePower = { - "type": "cardPower", - "heading": "cardPower Emulator", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ + 'type': 'cardPower', + 'heading': 'cardPower Emulator', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ { id: 'alias.0.NSPanel_1.Power.PowerCard' }, ] }; let Test_Licht2: PageEntities = { - "type": "cardEntities", - "heading": "Color Aliase 2", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ + 'type': 'cardEntities', + 'heading': 'Color Aliase 2', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ //Beispiel für RGB Light mit neuem PageItem-Parameter colormode: "xy" alternativ colormode: "rgb" oder weglassen //Steuert im z.B. DeConz Adapter unter Lampen die Farben per CIE (XY) - { id: "alias.0.NSPanel_2.WZ_E14_Fenster_rechts", name: "Fensterbank rechts", minValueBrightness: 0, maxValueBrightness: 100, minValueColorTemp: 500, maxValueColorTemp: 150, interpolateColor: true, colormode: "xy"}, - { id: "alias.0.NSPanel_1.TestFarbtemperatur", name: "Farbtemperatur", interpolateColor: true}, + { id: "alias.0.NSPanel_2.WZ_E14_Fenster_rechts", name: 'Fensterbank rechts', minValueBrightness: 0, maxValueBrightness: 100, minValueColorTemp: 500, maxValueColorTemp: 150, interpolateColor: true, colormode: 'xy'}, + { id: "alias.0.NSPanel_1.TestFarbtemperatur", name: 'Farbtemperatur', interpolateColor: true}, ] }; let Test_Funktionen: PageEntities = { - "type": "cardEntities", - "heading": "Sonstige Aliase", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestLautstärke", offColor: MSRed, onColor: MSGreen, name: "Echo Spot Büro", minValue: 0, maxValue: 100 }, - { id: "alias.0.NSPanel_1.TestTemperatur",name: "Temperatur außen", icon: "thermometer", onColor: White }, - { id: "alias.0.NSPanel_1.TestFeuchtigkeit", name: "Luftfeuchte außen", icon: "water-percent", unit: "%H", onColor: White }, - //{ id: "alias.0.NSPanel_1.TestInfo", name: "Windstärke", icon: "wind-power-outline", offColor: MSRed, onColor: MSGreen, unit: "bft", minValue: 0, maxValue: 12, interpolateColor: true, useColor: true }, - { id: "alias.0.NSPanel_1.Ventilator.Fan_1",name: "Ventilator", icon: "fan", onColor: On, offColor: HMIOff, modeList: ['Low', 'Medium', 'High', 'Move', 'Sleep', 'Auto', 'Manual']}, + 'type': 'cardEntities', + 'heading': 'Sonstige Aliase', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestLautstärke', offColor: MSRed, onColor: MSGreen, name: 'Echo Spot Büro', minValue: 0, maxValue: 100 }, + { id: 'alias.0.NSPanel_1.TestTemperatur',name: 'Temperatur außen', icon: 'thermometer', onColor: White }, + { id: 'alias.0.NSPanel_1.TestFeuchtigkeit', name: 'Luftfeuchte außen', icon: 'water-percent', unit: '%H', onColor: White }, + //{ id: 'alias.0.NSPanel_1.TestInfo', name: 'Windstärke', icon: 'wind-power-outline', offColor: MSRed, onColor: MSGreen, unit: 'bft', minValue: 0, maxValue: 12, interpolateColor: true, useColor: true }, + { id: 'alias.0.NSPanel_1.Ventilator.Fan_1',name: 'Ventilator', icon: 'fan', onColor: On, offColor: HMIOff, modeList: ['Low', 'Medium', 'High', 'Move', 'Sleep', 'Auto', 'Manual']}, ] }; let Buero_Seite_1: PageEntities = { - "type": "cardEntities", - "heading": "Büro", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.Schreibtischlampe", interpolateColor: true}, - { id: "alias.0.NSPanel_1.Deckenbeleuchtung", interpolateColor: true}, - { id: "alias.0.NSPanel_1.Testlampe2", name: "Filamentlampe", minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true}, - { id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", icon2: "power",offColor: MSRed, onColor: MSGreen} + 'type': 'cardEntities', + 'heading': 'Büro', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Schreibtischlampe', interpolateColor: true}, + { id: 'alias.0.NSPanel_1.Deckenbeleuchtung', interpolateColor: true}, + { id: 'alias.0.NSPanel_1.Testlampe2', name: 'Filamentlampe', minValueBrightness: 0, maxValueBrightness: 70, interpolateColor: true}, + { id: 'alias.0.NSPanel_1.Luftreiniger', icon: 'power', icon2: 'power',offColor: MSRed, onColor: MSGreen} ] }; let Fenster_1: PageEntities = { - "type": "cardEntities", - "heading": "Fenster und Türen", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestFenster", offColor: MSRed, onColor: MSGreen, name: "Büro Fenster"}, - { id: "alias.0.NSPanel_1.Haustuer", offColor: MSRed, onColor: MSGreen, name: "Haustür"}, - { id: "alias.0.NSPanel_1.TestBlind", icon: "blinds-horizontal", offColor: White, onColor: Yellow, name: "Büro", secondRow: "Hier Text für 2. Zeile"}, - { id: "alias.0.NSPanel_1.TestDoorlock", offColor: MSRed, onColor: MSGreen, name: "Türschloss"}, + 'type': 'cardEntities', + 'heading': 'Fenster und Türen', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestFenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'}, + { id: 'alias.0.NSPanel_1.Haustuer', offColor: MSRed, onColor: MSGreen, name: 'Haustür'}, + { id: 'alias.0.NSPanel_1.TestBlind', icon: "blinds-horizontal", offColor: White, onColor: Yellow, name: 'Büro', secondRow: 'Hier Text für 2. Zeile'}, + { id: 'alias.0.NSPanel_1.TestDoorlock', offColor: MSRed, onColor: MSGreen, name: 'Türschloss'}, ] }; //{ id: "alias.0.NS-Panel.Buero.Rollade", icon: "blinds-horizontal", offColor: White, onColor: Yellow, name: "Büro", secondRow: "Hier Text für 2. Zeile"}, let Button_1: PageEntities = { - "type": "cardEntities", - "heading": "Button Aliase", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestTastensensor", name: "Tastensensor (FFN)"}, - { id: "alias.0.NSPanel_1.Radio.NDR2", icon: "radio", name: "Taste (NDR2)", onColor: colorRadio}, - { id: "alias.0.NSPanel_1.TestVentil1", icon: "valve-open", icon2: "valve-closed",offColor: MSRed, onColor: MSGreen, name: "Test-Ventil 1"}, - { id: "alias.0.NSPanel_1.Radio.NDR2", icon: 'alarm-light', name: "Alert mit Zielseite", offColor: MSGreen, onColor: MSRed, targetPage: 'Abfall', buttonText: 'Popup'}, + 'type': 'cardEntities', + 'heading': 'Button Aliase', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestTastensensor', name: 'Tastensensor (FFN)'}, + { id: 'alias.0.NSPanel_1.Radio.NDR2', icon: 'radio', name: 'Taste (NDR2)', onColor: colorRadio}, + { id: 'alias.0.NSPanel_1.TestVentil1', icon: 'valve-open', icon2: 'valve-closed',offColor: MSRed, onColor: MSGreen, name: 'Test-Ventil 1'}, + { id: 'alias.0.NSPanel_1.Radio.NDR2', icon: 'alarm-light', name: 'Alert mit Zielseite', offColor: MSGreen, onColor: MSRed, targetPage: 'Abfall', buttonText: 'Popup'}, ] }; let Subpages_1: PageEntities = { - "type": "cardEntities", - "heading": "Test Subpages", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { navigate: true, id: "Abfall", onColor: White, name: "Abfallkalender"}, - { navigate: true, id: "WLAN", onColor: White, name: "Gäste WLAN"}, + 'type': 'cardEntities', + 'heading': 'Test Subpages', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { navigate: true, id: null, targetPage: 'Abfall', onColor: White, name: "Abfallkalender"}, + { navigate: true, id: 'alias.0.NSPanel_1.TestBlind', targetPage: 'WLAN', name: 'Gäste WLAN', onColor: MSGreen, offColor: MSRed }, ] }; //Subpage 1 von Subpages_1 let Abfall: PageEntities = { - "type": "cardEntities", - "heading": "Abfallkalender", - "useColor": true, - "subPage": true, - "parent": Subpages_1, - "items": [ - { id: "alias.0.NSPanel_1.Abfall.event1",icon: "trash-can"}, - { id: "alias.0.NSPanel_1.Abfall.event2",icon: "trash-can"}, - { id: "alias.0.NSPanel_1.Abfall.event3",icon: "trash-can"}, - { id: "alias.0.NSPanel_1.Abfall.event4",icon: "trash-can"} + 'type': 'cardEntities', + 'heading': 'Abfallkalender', + 'useColor': true, + 'subPage': true, + 'parent': Subpages_1, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Abfall.event1',icon: 'trash-can'}, + { id: 'alias.0.NSPanel_1.Abfall.event2',icon: 'trash-can'}, + { id: 'alias.0.NSPanel_1.Abfall.event3',icon: 'trash-can'}, + { id: 'alias.0.NSPanel_1.Abfall.event4',icon: 'trash-can'} ] }; //Subpage 2 von Subpages_1 let WLAN: PageQR = { - "type": "cardQR", - "heading": "Gäste WLAN", - "useColor": true, - "subPage": true, - "parent": Subpages_1, - "items": [{ id: "alias.0.NSPanel_1.Guest_Wifi", hidePassword: true }] + 'type': 'cardQR', + 'heading': 'Gäste WLAN', + 'useColor': true, + 'subPage': true, + 'parent': Subpages_1, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.NSPanel_1.Guest_Wifi', hidePassword: true }] }; let Buero_Seite_2: PageGrid = { - "type": "cardGrid", - "heading": "Büro 2", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.Schreibtischlampe", name: "Schreibtisch"}, - { id: "alias.0.NSPanel_1.Deckenbeleuchtung", name: "Deckenlampe"}, - { id: "alias.0.NSPanel_1.TestFenster", offColor: MSRed, onColor: MSGreen, name: "Büro Fenster"}, - { id: "alias.0.NSPanel_1.Luftreiniger", icon: "power", offColor: MSRed, onColor: MSGreen}, - { id: "alias.0.NSPanel_1.TestBlind", icon: "projector-screen", onColor: White, name: "Beamer", secondRow: "auch Text"}, - { id: "alias.0.NSPanel_1.Radio.Bob", icon: "play", onColor: White, name: "TuneIn"} + 'type': 'cardGrid', + 'heading': 'Büro 2', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Schreibtischlampe', name: 'Schreibtisch'}, + { id: 'alias.0.NSPanel_1.Deckenbeleuchtung', name: 'Deckenlampe'}, + { id: 'alias.0.NSPanel_1.TestFenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'}, + { id: 'alias.0.NSPanel_1.Luftreiniger', icon: 'power', offColor: MSRed, onColor: MSGreen}, + { id: 'alias.0.NSPanel_1.TestBlind', icon: 'projector-screen', onColor: White, name: 'Beamer', secondRow: 'auch Text'}, + { id: 'alias.0.NSPanel_1.Radio.Bob', icon: 'play', onColor: White, name: 'TuneIn'} ] }; let Radiosender: PageGrid = { - "type": "cardGrid", - "heading": "Büro 2", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.Radio.Bob", icon: "radio", name: "Radio BOB", onColor: colorRadio}, - { id: "alias.0.NSPanel_1.Countdown", icon: "timer-outline", name: "Timer", onColor: White} + 'type': 'cardGrid', + 'heading': 'Büro 2', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.Radio.Bob', icon: 'radio', name: 'Radio BOB', onColor: colorRadio}, + { id: 'alias.0.NSPanel_1.Countdown', icon: 'timer-outline', name: 'Timer', onColor: White} ] }; let WLED: PageGrid = { - "type": "cardGrid", - "heading": "WLED Stripes WZ", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.WLED.Example.On", name: "Power", icon: "power", onColor: HMIOn, offColor: HMIOff}, - { id: "alias.0.NSPanel_1.WLED.Example.Sync", name: "Sync", icon: "sync", onColor: HMIOn, offColor: White}, - { id: "alias.0.NSPanel_1.WLED.Example.Segments", icon: "heart-outline", name: "Presets", onColor: White, modeList: ['Preset 0', 'Add Preset']}, - { id: "alias.0.NSPanel_1.WLED.Example.Colors", icon: "palette", name: "Colors", onColor: White, + 'type': 'cardGrid', + 'heading': 'WLED Stripes WZ', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.WLED.Example.On', name: 'Power', icon: 'power', onColor: HMIOn, offColor: HMIOff}, + { id: 'alias.0.NSPanel_1.WLED.Example.Sync', name: 'Sync', icon: 'sync', onColor: HMIOn, offColor: White}, + { id: 'alias.0.NSPanel_1.WLED.Example.Presets', icon: 'heart-outline', name: 'Presets', onColor: White, modeList: ['Preset 0', 'Add Preset']}, + { id: 'alias.0.NSPanel_1.WLED.Example.Colors', icon: 'palette', name: 'Colors', onColor: White, modeList: ['Default', '* Color 1', '* Color Gradient', '* Colors 1&2', '* Colors Only', '* Random Cycle', 'Analogus','April Night', 'Aqua Flash', 'Atlantica', 'Aurora', 'Beach', 'Beech', 'Blink Red', 'Breeze', 'C9', 'C9 New', 'Candy', 'Candy2', 'Cloud', 'Cyane', 'Departure', 'Drywet', 'Fairy Reaf', 'Fire', 'Forest', 'etc' ]}, - { id: "alias.0.NSPanel_1.WLED.Example.Effects", icon: "emoticon-outline", name: "Effects", onColor: White, + { id: 'alias.0.NSPanel_1.WLED.Example.Effects', icon: 'emoticon-outline', name: 'Effects', onColor: White, modeList: ['Solid', 'Android', 'Aurora', 'Blends', 'Blink', 'Blink Rainbow', 'Bouncing Balls','Bpm', 'Breathe', 'Candle', 'Candle Multi', 'Candy Cane', 'Chase', 'Chase 1', 'Chase 2', 'Chase 3', 'Chase Flash', 'Chase Flash Rnd', 'Chase Rainbow', 'Chase Random', 'Chunchun', 'Colorful', 'Colorloop', 'Colortwinkles', 'Colorwaves', 'Dancing Shadows', 'etc' ]}, - { id: "alias.0.NSPanel_1.WLED.Example.Segments", icon: "layers", name: "Segments", onColor: White, modeList: ['Segment 0', 'Add Segment']}, + { id: 'alias.0.NSPanel_1.WLED.Example.Segments', icon: 'layers', name: 'Segments', onColor: White, modeList: ['Segment 0', 'Add Segment']}, ] }; let SensorGrid: PageGrid = { - "type": "cardGrid", - "heading": "Sensor Werte", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: "alias.0.NSPanel_1.TestTemperatur", name: "Außentemp. °C", offColor: MSRed, onColor: MSGreen, useValue: true }, - { id: "alias.0.NSPanel_1.TestFeuchtigkeit", name: "Luftfeuchte %", offColor: MSYellow, onColor: MSYellow , useValue: true }, - { id: "alias.0.NSPanel_1.Taupunkt", name: "Taupunkt °C", offColor: MSRed, onColor: MSGreen, useValue: true }, - { id: "alias.0.NSPanel_1.UV_Index", name: "UV Index", offColor: White , onColor: White, useValue: true }, - { id: "alias.0.NSPanel_1.Windstaerke", name: "Windstärke bft", offColor: White , onColor: White, useValue: true }, - { id: "alias.0.NSPanel_1.Luftdruck", name: "Luftdruck hPa", offColor: White , onColor: White, useValue: true } + 'type': 'cardGrid', + 'heading': 'Sensor Werte', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: 'alias.0.NSPanel_1.TestTemperatur', name: 'Außentemp. °C', offColor: MSRed, onColor: MSGreen, useValue: true }, + { id: 'alias.0.NSPanel_1.TestFeuchtigkeit', name: 'Luftfeuchte %', offColor: MSYellow, onColor: MSYellow , useValue: true }, + { id: 'alias.0.NSPanel_1.Taupunkt', name: 'Taupunkt °C', offColor: MSRed, onColor: MSGreen, useValue: true }, + { id: 'alias.0.NSPanel_1.UV_Index', name: 'UV Index', offColor: White , onColor: White, useValue: true }, + { id: 'alias.0.NSPanel_1.Windstaerke', name: 'Windstärke bft', offColor: White , onColor: White, useValue: true }, + { id: 'alias.0.NSPanel_1.Luftdruck', name: 'Luftdruck hPa', offColor: White , onColor: White, useValue: true } ] }; @@ -523,10 +578,13 @@ let Alexa: PageMedia = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [{ id: AliasPath + 'Media.PlayerAlexa', adapterPlayerInstance: 'alexa2.0.', - mediaDevice: 'G0XXXXXXXXXXXXXX', //Eigene Seriennummer des primären Alexa-Device einstellen + mediaDevice: 'G0XXXXXXXXXXXXXX', speakerList: ['Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche','Echo Spot Buero'], //analog alexa2 Music-Provider playList: ['Spotify-Playlist.PartyPlaylist', @@ -555,10 +613,13 @@ let Sonos: PageMedia = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [{ id: AliasPath + 'Media.PlayerSonos', - adapterPlayerInstance: "sonos.0.", - mediaDevice: "192_168_1_212", + adapterPlayerInstance: 'sonos.0.', + mediaDevice: '192_168_1_212', speakerList: ['Terrasse'], colorMediaIcon: colorSpotify, colorMediaArtist: Yellow, @@ -574,10 +635,13 @@ let SpotifyPremium: PageMedia = "useColor": true, "subPage": false, "parent": undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, "items": [{ id: AliasPath + 'Media.PlayerSpotifyPremium', adapterPlayerInstance: "spotify-premium.0.", - speakerList: ['LOGINT-W11-JB', 'Terrasse','Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche', + speakerList: ['LENOVO-W11-01', 'Terrasse','Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche', 'Echo Spot Buero'], playList: ['PartyPlaylist','Sabaton Radio','Rock Party','This Is Nightwish','Metal Christmas'], repeatList: ['off','context','track'], @@ -592,43 +656,52 @@ let SpotifyPremium: PageMedia = let SqueezeboxRPC: PageMedia = { - "type": "cardMedia", - "heading": "SqueezeboxRPC", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ - id: "alias.0.Media.LMS.SqueezePlay", - adapterPlayerInstance: "squeezeboxrpc.0.Players.SqueezePlay.", + 'type': 'cardMedia', + 'heading': 'SqueezeboxRPC', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ + id: 'alias.0.Media.LMS.SqueezePlay', + adapterPlayerInstance: 'squeezeboxrpc.0.Players.SqueezePlay.', speakerList: ['SqueezePlay'] }] }; let Buero_Themostat: PageThermo = { - "type": "cardThermo", - "heading": "Test Thermostat", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ id: "alias.0.NSPanel_1.Thermostat_Buero", minValue: 50, maxValue: 300 }] + 'type': 'cardThermo', + 'heading': 'Test Thermostat', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.NSPanel_1.Thermostat_Buero', minValue: 50, maxValue: 300 }] }; let Buero_Klimaanlage: PageThermo = { - "type": "cardThermo", - "heading": "Test Klimaanlage", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ - id: "alias.0.NSPanel_1.TestKlimaanlage", + 'type': 'cardThermo', + 'heading': 'Test Klimaanlage', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ + id: 'alias.0.NSPanel_1.TestKlimaanlage', minValue: 50, maxValue: 250, popupThermoMode1: ['Auto','0','1','2','3'], popupThermoMode2: ['Auto','0','1','2','3','4','5'], popupThermoMode3: ['Auto','Manual','Boost',], - popUpThermoName: ["Schwenk-Modus", 'Speed', 'Temperatur'], + popUpThermoName: ['Schwenk-Modus', 'Speed', 'Temperatur'], icon: 'fan', setThermoAlias: ['MODE1','MODE2','MODE3'], setThermoDestTemp2: 'ACTUAL2' @@ -637,12 +710,15 @@ let Buero_Klimaanlage: PageThermo = let Buero_Alarm: PageAlarm = { - "type": "cardAlarm", - "heading": "Alarm", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [{ id: "alias.0.Alarm" }] + 'type': 'cardAlarm', + 'heading': 'Alarm', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [{ id: 'alias.0.Alarm' }] }; let button1Page: PageGrid = @@ -652,6 +728,9 @@ let button1Page: PageGrid = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: 'alias.0.NSPanel_1.Radio.FFN', icon: 'radio', name: 'FFN', onColor: colorRadio}, { id: 'alias.0.NSPanel_1.Radio.Antenne' , icon: 'radio', name: 'Antenne Nds.', onColor: colorRadio}, @@ -669,6 +748,9 @@ let button2Page: PageEntities = 'useColor': true, 'subPage': false, 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: 'alias.0.NSPanel_1.Schreibtischlampe'}, { id: 'alias.0.NSPanel_1.Deckenbeleuchtung'} @@ -684,32 +766,38 @@ let button2Page: PageEntities = let Service: PageEntities = { - "type": "cardEntities", - "heading": "NSPanel Service", - "useColor": true, - "subPage": false, - "parent": undefined, - "items": [ - { id: AliasPath + 'autoUpdate', name: "Auto-Updates" ,icon: "update", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: "NSPanel_Infos", icon: "information-outline", onColor: White, name: "NSPanel Infos"}, - { navigate: true, id: "NSPanel_Firmware_Info", icon: "update", onColor: White, name: "Firmware Infos"}, - { navigate: true, id: "NSPanel_Einstellungen", icon: "wrench-outline", onColor: White, name: "Screensaver"} + 'type': 'cardEntities', + 'heading': 'NSPanel Service', + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { id: AliasPath + 'autoUpdate', name: 'Auto-Updates' ,icon: 'update', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: 'NSPanel_Infos', icon: 'information-outline', onColor: White, name: 'NSPanel Infos'}, + { navigate: true, id: 'NSPanel_Firmware_Info', icon: 'update', onColor: White, name: 'Firmware Infos'}, + { navigate: true, id: 'NSPanel_Einstellungen', icon: 'wrench-outline', onColor: White, name: 'Screensaver'} ] }; //Subpage 1 von Subpages_2 let NSPanel_Infos: PageEntities = { - "type": "cardEntities", - "heading": "NSPanel Infos", - "useColor": true, - "subPage": true, - "parent": Service, - "items": [ + 'type': 'cardEntities', + 'heading': 'NSPanel Infos', + 'useColor': true, + 'subPage': true, + 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ { id: AliasPath + 'Tasmota.Hardware', name: 'Hardware', icon: 'memory', offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Sensor.ESP32.Temperature', name: "ESP Temperatur", icon: "thermometer", unit: "°C", offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Tasmota.Uptime', name: "Uptime", icon: "timeline-clock-outline", offColor: MSYellow, onColor: MSYellow, useColor: true}, - { id: AliasPath + 'Tasmota.Wifi.RSSI', name: "Wifi-Signal", icon: "signal-distance-variant", unit: "dBm", offColor: MSYellow, onColor: MSYellow, useColor: true} + { id: AliasPath + 'Sensor.ESP32.Temperature', name: 'ESP Temperatur', icon: 'thermometer', unit: '°C', offColor: MSYellow, onColor: MSYellow, useColor: true}, + { id: AliasPath + 'Tasmota.Uptime', name: 'Uptime', icon: 'timeline-clock-outline', offColor: MSYellow, onColor: MSYellow, useColor: true}, + { id: AliasPath + 'Tasmota.Wifi.RSSI', name: 'Wifi-Signal', icon: 'signal-distance-variant', unit: 'dBm', offColor: MSYellow, onColor: MSYellow, useColor: true} ] }; @@ -721,6 +809,9 @@ let Service: PageEntities = 'useColor': true, 'subPage': true, 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 5, maxValue: 10}, { id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 4}, @@ -737,6 +828,9 @@ let Service: PageEntities = 'useColor': true, 'subPage': true, 'parent': Service, + 'prev': undefined, + 'next': undefined, + 'home': undefined, 'items': [ { id: AliasPath + 'Tasmota.Version', name: 'Tasmota Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true}, { id: AliasPath + 'Display.TFTVersion', name: 'TFT-Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true}, @@ -745,6 +839,669 @@ let Service: PageEntities = ] }; + + +// ********************************************************** +// ** Navigationsstruktur für Gebäude ** +// ********************************************************** + +let Level_0_Grundstueck: PageGrid = +{ + 'type': "cardGrid", + 'heading': "Grundstück", + 'useColor': true, + 'subPage': false, + 'parent': undefined, + 'prev': undefined, + 'next': undefined, + 'home': undefined, + 'items': [ + { navigate: true, id: null, targetPage: 'Level_1_Haus', name: 'Haus' ,icon: 'home', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_1_Gartenhaus', name: 'Gartenhaus' ,icon: 'storefront-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_1_Aussen', name: 'Aussen' ,icon: 'tree-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_1_Garage', name: 'Garage' ,icon: 'garage', offColor: MSRed, onColor: MSGreen} + ] +}; + + let Level_1_Haus: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Haus', + 'useColor': true, + 'subPage': true, + 'parent': Level_0_Grundstueck, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_0_Grundstueck', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_2_Erdgeschoss_1', name: 'Erdgeschoss' , icon: 'home-floor-0', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_2_Obergeschoss', name: 'Obergeschoss' , icon: 'home-floor-1', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_2_Dachgeschoss', name: 'Dachgeschoss' , icon: 'home-floor-2', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_2_Erdgeschoss_1: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Erdgeschoss (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Haus, + 'prev': undefined, + 'next': 'Level_2_Erdgeschoss_2', + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_3_Wohnzimmer', name: 'Wohnzimmer' , icon: 'sofa-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Esszimmer', name: 'Esszimmer' , icon: 'table-chair', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Buero', name: 'Büro' , icon: 'desk', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Kueche', name: 'Küche' , icon: 'silverware-variant', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Bad', name: 'Bad' , icon: 'bathtub-outline', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Kaminzimmer', name: "Kaminzimmer" , icon: "fireplace", offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Wohnzimmer: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Wohnzimmer', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Licht_1', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Sensoren_1', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Aktoren', name: 'Aktoren' , icon: 'gesture-tap', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_4_Wohnzimmer_Licht_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'WZ Licht (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': 'Level_4_Wohnzimmer_Licht_2', + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Deckenlampe_Couch', name: 'Couchtisch', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Deckenlampe_Esstisch', name: 'Esstisch', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Vitrine', name: 'Vitrine', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Stehlampe', name: 'Stehlampe', interpolateColor: true}, + ] + }; + + let Level_4_Wohnzimmer_Licht_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'WZ Licht (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': 'Level_4_Wohnzimmer_Licht_1', + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.WZ_E14_Fenster_mitte', name: 'Fenster mittig', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.WZ_E14_Fenster_rechts', name: 'Fenster rechts', interpolateColor: true}, + ] + }; + + let Level_4_Wohnzimmer_Sensoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Sensoren', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Temperatur', icon: 'thermometer', name: 'Temperatur', offColor: White, onColor: White}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Luftfeuchte', icon: 'water-percent', name: 'Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Fenster_links', offColor: MSRed, onColor: MSGreen, name: 'Fenster links'}, + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Fenster_mittig', offColor: MSRed, onColor: MSGreen, name: 'Fenster mittig'}, + ] + }; + + let Level_4_Wohnzimmer_Aktoren: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'WZ Aktoren', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sonstige_Aktoren.Steckdose_OBI', name: 'Steckdose OBI', offColor: MSRed, onColor: MSGreen }, + ] + }; + + let Level_4_Wohnzimmer_Thermostat: PageThermo = + { + 'type': 'cardThermo', + 'heading': 'WZ Thermostat', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Wohnzimmer, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [{ id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Thermostate.Thermostat_links', minValue: 50, maxValue: 300 }] + }; + + let Level_3_Esszimmer: PageGrid = + { + "type": "cardGrid", + "heading": "EG Esszimmer", + "useColor": true, + "subPage": true, + "parent": Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + "items": [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: "Licht" , icon: "lightbulb", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: "Sensoren" , icon: "sync-alert", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: "Thermostat" , icon: "thermostat", offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Buero: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Büro', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: "Licht" , icon: "lightbulb", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren_1', name: "Sensoren" , icon: "sync-alert", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Aktoren', name: "Aktoren" , icon: "gesture-tap", offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: "Thermostat" , icon: "thermostat", offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_4_Buero_Licht: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Licht', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Licht.Schreibtischlampe', interpolateColor: true}, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Licht.Deckenstrahler_Gruppe', name: 'Deckenstrahler', interpolateColor: true}, + ] + }; + + let Level_4_Buero_Sensoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Sensoren (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': 'Level_4_Buero_Sensoren_2', + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Temperatur', icon: 'thermometer', name: 'Temperatur', offColor: White, onColor: White }, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Luftfeuchte', icon: 'water-percent', name: 'Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Fenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'}, + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Bewegung', offColor: MSGreen, onColor: MSRed, name: 'Büro Bewegung', useColor: true}, + ] + }; + + let Level_4_Buero_Sensoren_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Sensoren (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_4_Buero_Sensoren_1, + 'prev': 'Level_4_Buero_Sensoren_1', + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Luftdruck', icon: 'speedometer', name: 'Luftdruck', offColor: White, onColor: White }, + ] + }; + + let Level_4_Buero_Aktoren: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'Büro Aktoren', + 'useColor': true, + 'subPage': true, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { id: 'alias.0.Haus.Erdgeschoss.Buero.Aktoren.Airbowl', name: 'Airbowl', offColor: MSRed, onColor: MSGreen }, + ] + }; + + let Level_4_Buero_Thermostat: PageThermo = + { + 'type': 'cardThermo', + 'heading': 'Büro Thermostat', + 'useColor': true, + 'subPage': false, + 'parent': Level_3_Buero, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [{ id: 'alias.0.Haus.Erdgeschoss.Buero.Thermostate.Thermostat', minValue: 50, maxValue: 300 }] + }; + + let Level_3_Kueche: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Küche', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Bad: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Küche', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_1, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_2_Erdgeschoss_2: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Erdgeschoss (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Haus, + 'prev': 'Level_2_Erdgeschoss_1', + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_3_GaesteWC', name: 'Gäste WC' , icon: 'toilet', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_Hauswirtschaftsraum', name: 'Hauswirtschaft' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_FlurVorne', name: 'Flur vorne' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_3_FlurHinten', name: 'Flur hinten' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Kaminzimmer: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Kaminzimmer', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_GaesteWC: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Gäste WC', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_Hauswirtschaftsraum: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Hauswirtschaft', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_FlurVorne: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Flur Vorne', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_3_FlurHinten: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'EG Flur Hinten', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_Erdgeschoss_2, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Haus', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, + { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, + ] + }; + + let Level_1_Gartenhaus: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Gartenhaus', + 'useColor': true, + 'subPage': true, + 'parent': Level_0_Grundstueck, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_0_Grundstueck', + 'items': [ + { id: 'alias.0.Gartenhaus.Schalter_1', name: 'Schalter 1', icon: 'power', icon2: 'power', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Schalter_2', name: 'Schalter 2', icon: 'power', icon2: 'power', offColor: HMIOff, onColor: HMIOn }, + { navigate: true, id: null, targetPage: 'Level_2_GH_Licht', name: 'Licht' , icon: 'lightbulb', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_2_GH_Aktoren_1', name: 'Aktoren' , icon: 'gesture-tap', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_2_GH_Sensoren_1', name: 'Sensoren' , icon: 'sync-alert', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_2_GH_Heizkoerper', name: 'Heizkörper' , icon: 'thermostat', offColor: HMIOff, onColor: HMIOn}, + ] + }; + + let Level_2_GH_Licht: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'Gartenhaus Licht', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_0_Grundstueck', + 'items': [ + { navigate: true, id: null, targetPage: 'Level_3_GH_Lampen_1', name: 'Flaschen' , icon: 'bottle-tonic-outline', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_3_GH_LED_Stripes', name: 'LED Stripes' , icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_3_GH_WLED', name: 'WLED' , icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn}, + { navigate: true, id: null, targetPage: 'Level_3_GH_Aussenlampen', name: 'Aussenlampen' , icon: 'coach-lamp', offColor: HMIOff, onColor: HMIOn}, + ] + }; + + let Level_3_GH_Lampen_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': 'Level_3_GH_Lampen_2', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_1', name: 'Jack Daniels 1', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_2', name: 'Jack Daniels 2', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_3', name: 'Jack Daniels 3', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_4', name: 'Jack Daniels 4', interpolateColor: true}, + ] + }; + + let Level_3_GH_Lampen_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': 'Level_3_GH_Lampen_1', + 'next': 'Level_3_GH_Lampen_3', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Chivas', name: 'Chivas Regal', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Veterano_1', name: 'Veterano 1', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Veterano_2', name: 'Veterano 2', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Glasovka', name: 'Glasovka', interpolateColor: true}, + ] + }; + + let Level_3_GH_Lampen_3: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (3)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': 'Level_3_GH_Lampen_2', + 'next': 'Level_3_GH_Lampen_4', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Kraken', name: 'Kraken', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.103', name: '103', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Havana_Club', name: 'Havana_Club', interpolateColor: true}, + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Chantre', name: 'Chantre', interpolateColor: true}, + ] + }; + + let Level_3_GH_Lampen_4: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Lampen (4)', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': 'Level_3_GH_Lampen_3', + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Flaschen.Southern_Comfort', name: 'Southern_Comfort', interpolateColor: true}, + ] + }; + + let Level_3_GH_LED_Stripes: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH LED Stripes', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.4Pin_Stripe', icon: 'led-strip-variant', name: 'Laterne links', offColor: HMIOff, onColor: HMIOn, useColor: true }, + { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.5Pin_Stripe', icon: 'led-strip-variant', name: 'Laterne rechts',offColor: HMIOff, onColor: HMIOn, useColor: true }, + { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.Bilder_Stripe', icon: 'led-strip-variant', name: 'Bilder Stripe', offColor: HMIOff, onColor: HMIOn, useColor: true}, + ] + }; + + let Level_3_GH_WLED: PageGrid = + { + 'type': 'cardGrid', + 'heading': 'WLED Stripes WZ', + 'useColor': true, + 'subPage': false, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.NSPanel_1.WLED.Example.On', name: 'Power', icon: 'power', onColor: HMIOn, offColor: HMIOff}, + { id: 'alias.0.NSPanel_1.WLED.Example.Sync', name: 'Sync', icon: 'sync', onColor: HMIOn, offColor: White}, + { id: 'alias.0.NSPanel_1.WLED.Example.Presets', icon: 'heart-outline', name: 'Presets', onColor: White, modeList: ['Preset 0', 'Add Preset']}, + { id: 'alias.0.NSPanel_1.WLED.Example.Colors', icon: 'palette', name: 'Colors', onColor: White, + modeList: ['Default', '* Color 1', '* Color Gradient', '* Colors 1&2', '* Colors Only', '* Random Cycle', 'Analogus','April Night', 'Aqua Flash', 'Atlantica', 'Aurora', + 'Beach', 'Beech', 'Blink Red', 'Breeze', 'C9', 'C9 New', 'Candy', 'Candy2', 'Cloud', + 'Cyane', 'Departure', 'Drywet', 'Fairy Reaf', 'Fire', 'Forest', 'etc' + ]}, + { id: 'alias.0.NSPanel_1.WLED.Example.Effects', icon: 'emoticon-outline', name: 'Effects', onColor: White, + modeList: ['Solid', 'Android', 'Aurora', 'Blends', 'Blink', 'Blink Rainbow', 'Bouncing Balls','Bpm', 'Breathe', 'Candle', 'Candle Multi', + 'Candy Cane', 'Chase', 'Chase 1', 'Chase 2', 'Chase 3', 'Chase Flash', 'Chase Flash Rnd', 'Chase Rainbow', 'Chase Random', + 'Chunchun', 'Colorful', 'Colorloop', 'Colortwinkles', 'Colorwaves', 'Dancing Shadows', 'etc' + ]}, + { id: 'alias.0.NSPanel_1.WLED.Example.Segments', icon: 'layers', name: 'Segments', onColor: White, modeList: ['Segment 0', 'Add Segment']}, + ] + }; + + let Level_3_GH_Aussenlampen: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Außenlampen', + 'useColor': true, + 'subPage': true, + 'parent': Level_2_GH_Licht, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Licht.Aussenbeleuchtung.Laterne_aussen_links', icon: 'coach-lamp', name: 'Laterne links', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Licht.Aussenbeleuchtung.Laterne_aussen_rechts', icon: 'coach-lamp', name: 'Laterne rechts',offColor: HMIOff, onColor: HMIOn }, + ] + }; + + let Level_2_GH_Sensoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Sensoren (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': 'Level_2_GH_Sensoren_2', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Temperatur', icon: 'thermometer', name: 'Aqara Temperatur', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Luftfeuchte', icon: 'water-percent', name: 'Aqara Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Luftdruck', icon: 'alert', name: 'Aqara Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Bewegung', offColor: MSGreen, onColor: MSRed, name: 'Aqara Bewegung', useColor: true}, + ] + }; + + let Level_2_GH_Sensoren_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Sensoren (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': 'Level_2_GH_Sensoren_1', + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Sensoren.Envy_Temperatur', icon: 'thermometer', name: 'Envy Temperatur', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Envy_Luftfeuchte', icon: 'water-percent', name: 'Envy Luftfeuchte', offColor: White, onColor: White }, + { id: 'alias.0.Gartenhaus.Sensoren.Envy_Luftqualität', icon: 'alert', name: 'Envy Luftqualität', offColor: White, onColor: White, unit: '%' }, + ] + }; + + let Level_2_GH_Aktoren_1: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Aktoren (1)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': 'Level_2_GH_Aktoren_2', + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Aktoren.Steckdose_außen', icon: 'power', name: 'Steckdose außen', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Aktoren.Luftreiniger', icon: 'air-filter', name: 'Airbowl', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Aktoren.Luefter', icon: 'fan', name: 'Lüfter', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Aktoren.Bilder_Stripe', icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn, name: 'Bilder Stripe', useColor: true}, + ] + }; + + let Level_2_GH_Aktoren_2: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Aktoren (2)', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': 'Level_2_GH_Aktoren_1', + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Aktoren.Welcome', icon: 'image-frame', name: 'Welcome', offColor: HMIOff, onColor: HMIOn }, + ] + }; + + let Level_2_GH_Heizkoerper: PageEntities = + { + 'type': 'cardEntities', + 'heading': 'GH Heizkörper', + 'useColor': true, + 'subPage': true, + 'parent': Level_1_Gartenhaus, + 'prev': undefined, + 'next': undefined, + 'home': 'Level_1_Gartenhaus', + 'items': [ + { id: 'alias.0.Gartenhaus.Heizkoerper.Brandson', icon: 'heat-wave', name: 'Brandson', offColor: HMIOff, onColor: HMIOn }, + { id: 'alias.0.Gartenhaus.Heizkoerper.Klarstein', icon: 'heat-wave', name: 'Klarstein', offColor: HMIOff, onColor: HMIOn }, + ] + }; + + let Level_1_Aussen: PageGrid = + { + export const config: Config = { panelRecvTopic: 'mqtt.0.SmartHome.NSPanel_1.tele.RESULT', // anpassen panelSendTopic: 'mqtt.0.SmartHome.NSPanel_1.cmnd.CustomSend', // anpassen @@ -760,21 +1517,22 @@ export const config: Config = { timeoutScreensaver: 20, screenSaverDoubleClick: true, locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc. - weatherEntity: 'alias.0.Wetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können + weatherEntity: 'alias.0.DasWetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können defaultOffColor: Off, defaultOnColor: On, defaultColor: Off, defaultBackgroundColor: HMIDark, //New Parameter temperatureUnit: '°C', pages: [ + Level_0_Grundstueck, Buero_Seite_1, //Beispiel-Seite WLED, //Beispiel-Seite Radiosender, //Beispiel-Seite SensorGrid, //Beispiel-Seite - //CardChartExample, //Beispiel-Seite - //CardPowerExample, //Beispiel-Seite + CardChartExample, //Beispiel-Seite + CardPowerExample, //Beispiel-Seite //SqueezeboxRPC, //Beispiel-Seite - //Sonos, //Beispiel-Seite + Sonos, //Beispiel-Seite SpotifyPremium, //Beispiel-Seite Alexa, //Beispiel-Seite Buero_Seite_2, //Beispiel-Seite @@ -796,7 +1554,8 @@ export const config: Config = { NSPanel_Infos, //Auto-Alias Service Page NSPanel_Einstellungen, //Auto-Alias Service Page - NSPanel_Firmware_Info //Auto-Alias Service Page + NSPanel_Firmware_Info, //Auto-Alias Service Page + ], button1Page: button1Page, //Beispiel-Seite auf Button 1, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, button2Page: button2Page //Beispiel-Seite auf Button 2, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, @@ -1327,6 +2086,11 @@ setState(config.panelSendTopic, 'pageType~pageStartup'); get_tasmota_status0(); get_panel_update_data(); check_updates(); +/* +setTimeout(async function () { + setState(config.panelSendTopic, 'pageType~pageStartup'); +}, 60000); +*/ //------------------Begin Update Functions @@ -1592,8 +2356,15 @@ function get_current_berry_driver_version() { if (Debug) { console.log('Requesting current berry driver version'); } + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=GetDriverVersion`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=GetDriverVersion`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=GetDriverVersion`, + + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1619,8 +2390,14 @@ function get_tasmota_status0() { if (Debug) { console.log('Requesting tasmota status0'); } + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Status0`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Status0`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Status0`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1792,8 +2569,14 @@ on({ id: config.panelRecvTopic }, async (obj) => { function update_berry_driver_version() { try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Backlog UpdateDriverVersion https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be; Restart 1`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1809,8 +2592,14 @@ function update_tft_firmware() { const tft_version: string = 'v3.7.3'; const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`; try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=FlashNextion ${desired_display_firmware_url}`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=FlashNextion ${desired_display_firmware_url}`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=FlashNextion ${desired_display_firmware_url}`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -1825,8 +2614,14 @@ function update_tft_firmware() { function update_tasmota_firmware() { try { + + let urlString = `http://${get_current_tasmota_ip_address()}/cm?cmnd=Upgrade 1`; + if (tasmota_web_admin_password != '') { + urlString = `http://${get_current_tasmota_ip_address()}/cm?user=${tasmota_web_admin_user}&password=${tasmota_web_admin_password}&cmnd=Upgrade 1`; + } + request({ - url: `http://${get_current_tasmota_ip_address()}/cm?cmnd=Upgrade 1`, + url: `${urlString}`, headers: { 'User-Agent': 'ioBroker' } @@ -2425,6 +3220,19 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean = return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + windowState; case 'motion': + + type = 'text'; + if (val === true) { + optVal = 'On'; + iconColor = GetIconColor(pageItem, true, useColors); + iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('motion-sensor'); + } else { + optVal = 'Off'; + iconColor = GetIconColor(pageItem, false, useColors); + iconId = pageItem.icon2 !== undefined ? Icons.GetIcon(pageItem.icon2) : Icons.GetIcon('motion-sensor'); + } + + return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal; case 'info': @@ -2960,9 +3768,9 @@ function GenerateThermoPage(page: PageThermo): Payload[] { + minTemp + '~' // Thermostat Min-Temperatur + maxTemp + '~' // Thermostat Max-Temperatur + stepTemp + '~' // Schritte für Soll (5°C) - + icon_res + '~' // Icons Status + + icon_res // Icons Status + findLocale('thermostat', 'Currently') + '~' // Bezeichner vor Aktueller Raumtemperatur - + findLocale('thermostat', 'State') + '~' // Bezeichner vor State + + findLocale('thermostat', 'State') + '~~' // Bezeichner vor State + config.temperatureUnit + '~' // iconTemperature dstTempTwoTempMode + destTemp2 + '~' // dstTempTwoTempMode --> Wenn Wert, dann 2 Temp + thermoPopup // PopUp @@ -3101,6 +3909,33 @@ async function createAutoMediaAlias(id: string, mediaDevice: string, adapterPlay } } } + + if (adapterPlayerInstance.startsWith('volumio')) { + if (existsObject(id) == false){ + console.log('Volumio Alias ' + id + ' existiert nicht - wird jetzt angelegt') + + let dpPath: string = adapterPlayerInstance; + try { + setObject(id, {_id: id, type: 'channel', common: {role: 'media', name:'media'}, native: {}}); + await createAliasAsync(id + '.ACTUAL', dpPath + 'playbackInfo.volume', true, { type: 'number', role: 'value.volume', name: 'ACTUAL' }); + await createAliasAsync(id + '.ALBUM', dpPath + 'playbackInfo.album', true, { type: 'string', role: 'media.album', name: 'ALBUM' }); + await createAliasAsync(id + '.ARTIST', dpPath + 'playbackInfo.artist', true, { type: 'string', role: 'media.artist', name: 'ARTIST' }); + await createAliasAsync(id + '.TITLE', dpPath + 'playbackInfo.title', true, { type: 'string', role: 'media.title', name: 'TITLE' }); + await createAliasAsync(id + '.NEXT', dpPath + 'player.next', true, { type: 'boolean', role: 'button.next', name: 'NEXT' }); + await createAliasAsync(id + '.PREV', dpPath + 'player.prev', true, { type: 'boolean', role: 'button.prev', name: 'PREV' }); + await createAliasAsync(id + '.PLAY', dpPath + 'player.play', true, { type: 'boolean', role: 'button.play', name: 'PLAY' }); + await createAliasAsync(id + '.PAUSE', dpPath + 'player.toggle', true, { type: 'boolean', role: 'button.pause', name: 'PAUSE' }); + await createAliasAsync(id + '.STOP', dpPath + 'player.stop', true, { type: 'boolean', role: 'button.stop', name: 'STOP' }); + await createAliasAsync(id + '.STATE', dpPath + 'playbackInfo.status', true, { type: 'boolean', role: 'media.state', name: 'STATE' }); + await createAliasAsync(id + '.VOLUME', dpPath + 'playbackInfo.volume', true, { type: 'number', role: 'level.volume', name: 'VOLUME' }); + await createAliasAsync(id + '.REPEAT', dpPath + 'playbackInfo.repeat', true, { type: 'number', role: 'media.mode.repeat', name: 'REPEAT' }); + await createAliasAsync(id + '.SHUFFLE', dpPath + 'queue.shuffle', true, { type: 'boolean', role: 'media.mode.shuffle', name: 'SHUFFLE' }); + await createAliasAsync(id + '.status', dpPath + 'playbackInfo.status', true, { type: 'string', role: 'media.state', name: 'status' }); + } catch (err) { + console.warn('function createAutoMediaAlias: ' + err.message); + } + } + } } } @@ -3205,6 +4040,13 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } + //Volumio + if (v2Adapter == 'volumio') { + if (name != undefined) { author = author + " [" + name + "]"; } + name = getState(vInstance + 'info.name').val; /* page.heading; + getState(id + '.TRACK').val; */ + } + let volume = getState(id + '.VOLUME').val; let iconplaypause = Icons.GetIcon('pause'); //pause let shuffle_icon = Icons.GetIcon('shuffle-variant'); //shuffle @@ -3213,6 +4055,8 @@ function GenerateMediaPage(page: PageMedia): Payload[] { if (shuffle == 'off' || shuffle == false || shuffle == 0) { shuffle_icon = Icons.GetIcon('shuffle-disabled'); //shuffle } + if (v2Adapter == 'volumio') { shuffle_icon = Icons.GetIcon('refresh'); } //Volumio: refresh playlist + //Für alle Player if (getState(id + '.STATE').val) { @@ -3232,6 +4076,16 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } } + //Ausnahme Volumio: status = string: play, pause, stop usw. + if (v2Adapter == 'volumio') { + if (getState(id + '.status').val == 'play') { + onoffbutton = 65535; + iconplaypause = Icons.GetIcon('pause'); //pause + } else { + iconplaypause = Icons.GetIcon('play'); //play + } + } + let currentSpeaker = 'kein Speaker gefunden'; if (v2Adapter == 'alexa2') { @@ -3247,7 +4101,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { } //------------------------------------------------------------------------------------------------------------- // nachfolgend alle Alexa-Devices (ist Online / Player- und Commands-Verzeichnis vorhanden) auflisten und verketten - // Wenn Konstante alexaSpeakerList mind. einen Eintrag enthält, wird die Konstante verwendet - ansonsten Alle Devices aus dem Alexa Adapter + // Wenn Konstante alexaSpeakerList mind. einen Eintrag enthält, wird die Konstante verwendet - ansonsten Alle Devices aus dem Alexa Adapter let speakerList = ''; if (page.items[0].speakerList.length > 0) { for (let i_index in page.items[0].speakerList) { @@ -3290,17 +4144,30 @@ function GenerateMediaPage(page: PageMedia): Payload[] { let playListString: string = '~~~~~~' let playListIconCol = rgb_dec565(HMIOff); if (page.items[0].playList != undefined) { + /* Volumio: get actual playlist if empty */ + if (v2Adapter == 'volumio') { + if (page.items[0].playList.length == 0) { + request({ url: `${getState(vInstance+'info.host').val}/api/listplaylists`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result) => { + try { + page.items[0].playList = JSON.parse(result); + if (Debug) console.log(page.items[0].playList); + } catch (err) { + console.log('get_volumio-playlist: ' + err.message); + } + } + ); + } + } playListIconCol = rgb_dec565(HMIOn); playListString = 'input_sel' + '~' + id + '?playlist' + '~' + Icons.GetIcon('playlist-play') + '~' + playListIconCol + '~' + - 'Playlist' + '~' + + 'PlayL ' + page.heading + '~' + 'media1~' } - //Testvariable ******************** - //InSel Playlist let trackListString: string = '~~~~~~' let trackListIconCol = rgb_dec565(HMIOff); @@ -3362,6 +4229,7 @@ function GenerateMediaPage(page: PageMedia): Payload[] { repeatIconCol = rgb_dec565(HMIOn); } } + /* Volumio todo: 2 boolean 'Repeat' + 'RepeatSingle' */ if (v2Adapter == 'spotify-premium' || v2Adapter == 'alexa2' || v2Adapter == 'sonos') { repeatButtonString = 'button' + '~' + @@ -3770,6 +4638,10 @@ function HandleButtonEvent(words): void { return; } + if (words[2] == 'bNext' || words[2] == 'bPrev' || words[2] == 'bUp' || words[2] == 'bHome' || words[2] == 'bSubNext' || words[2] == 'bSubPrev' ) { + buttonAction = words[2]; + } + if (Debug) { console.log(buttonAction); } @@ -3808,6 +4680,10 @@ function HandleButtonEvent(words): void { UnsubscribeWatcher(); GeneratePage(config.pages[pageId]); break; + case 'bSubNext': + UnsubscribeWatcher(); + GeneratePage(eval(activePage.next)); + break; case 'bPrev': pageNum = (((pageId - 1) % config.pages.length) + config.pages.length) % config.pages.length; pageId = pageNum; @@ -3826,6 +4702,10 @@ function HandleButtonEvent(words): void { GeneratePage(config.pages[pageId]); } break; + case 'bSubPrev': + UnsubscribeWatcher(); + GeneratePage(eval(activePage.prev)); + break; case 'bExit': if (config.screenSaverDoubleClick && words[2] == 'screensaver') { if (words[4] >= 2) { @@ -3855,7 +4735,11 @@ function HandleButtonEvent(words): void { console.log('bExit: ' + words[4] + ' - ' + pageId); } UnsubscribeWatcher(); - GeneratePage(config.pages[0]); + if (activePage.home != undefined) { + GeneratePage(eval(activePage.home)); + } else { + GeneratePage(config.pages[0]); + } break; case 'notifyAction': if (words[4] == 'yes') { @@ -4097,6 +4981,7 @@ function HandleButtonEvent(words): void { setIfExists(id + '.NEXT', true); break; case 'media-shuffle': + if ((findPageItem(id).adapterPlayerInstance).startsWith("volumio")) { findPageItem(id).playList = []; break; } //Volumio: empty playlist $uha-20230103 if (getState(id + '.SHUFFLE').val == 'off') { setIfExists(id + '.SHUFFLE', 'on'); } else { @@ -4146,6 +5031,7 @@ function HandleButtonEvent(words): void { switch (deviceAdapterPL) { case 'spotify-premium': let strDevicePI = pageItemPL.playList[words[4]] + console.log(strDevicePI) let playlistListString = (getState(adapterInstancePL + 'playlists.playlistListString').val).split(';'); let playlistListIds = (getState(adapterInstancePL + 'playlists.playlistListIds').val).split(';'); let playlistIndex = playlistListString.indexOf(strDevicePI); @@ -4158,6 +5044,24 @@ function HandleButtonEvent(words): void { let tempListItem = pageItemPL.playList[words[4]].split('.'); setState(adapterInstancePL + 'Echo-Devices.' + pageItemPL.mediaDevice + '.Music-Provider.' + tempListItem[0], tempListItem[1]); break; + case 'volumio': + let strDevicePL = pageItemPL.playList[words[4]]; + request({ url:`${getState(adapterInstancePL+'info.host').val}/api/commands/?cmd=playplaylist&name=${strDevicePL}`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result)=>{}); /* nothing todo @ error */ + setTimeout(async function () { + request({ url: `${getState(adapterInstancePL+'info.host').val}/api/getQueue`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result) => { + try { + const QUEUELIST = JSON.parse(result); + globalTracklist = QUEUELIST.queue; + if (Debug) { for (let i_index in QUEUELIST.queue) console.log(QUEUELIST.queue[i_index]); } + } catch (err) { + console.log('get_volumio-queue: ' + err.message); + } + } + ); + }, 2000); + break; } break; case 'mode-tracklist': @@ -4174,6 +5078,10 @@ function HandleButtonEvent(words): void { case 'alexa2': console.log('Aktuell hat alexa2 keine Tracklist') break; + case 'volumio': + request({ url:`${getState(adapterInstanceTL+'info.host').val}/api/commands/?cmd=play&N=${words[4]}`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result)=>{}); /* nothing todo @ error */ + break; } break; case 'mode-repeat': @@ -4418,27 +5326,26 @@ function GetNavigationString(pageId: number): string { console.log(pageId); } - // left navigation arrow | right navigation arrow - // X|X - // 0 = no arrow - // 1|1 = right and left navigation arrow - // 2|0 = (right) up navigation arrow - // 2|2 = (right) up navigation arrow | (left) home navigation icon - - if (activePage.subPage) - return '2|2'; + if (activePage.subPage && activePage.prev == undefined && activePage.next == undefined) { + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~button~bHome~' + Icons.GetIcon('home') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev == undefined && activePage.next != undefined) { + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~button~bSubNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev != undefined && activePage.next != undefined) { + return 'button~bSubPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bSubNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; + } else if (activePage.subPage && activePage.prev != undefined && activePage.next == undefined) { + return 'button~bSubPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bHome~' + Icons.GetIcon('home') + '~' + rgb_dec565(White) + '~~'; + } switch (pageId) { case 0: - return '1|1'; case config.pages.length - 1: - return '1|1'; + return 'button~bPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; case -1: - return '2|0'; + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + ' ~~~delete~~~~~'; case -2: - return '2|0'; + return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~delete~~~~~'; default: - return '1|1'; + return 'button~bPrev~' + Icons.GetIcon('arrow-left-bold') + '~' + rgb_dec565(White) + '~~~button~bNext~' + Icons.GetIcon('arrow-right-bold') + '~' + rgb_dec565(White) + '~~'; } } catch (err) { @@ -4447,7 +5354,7 @@ function GetNavigationString(pageId: number): string { } function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): Payload[] { - //console.log(type + ' - ' + optional + ' - ' + pageItem.id) + if (Debug) console.log(type + ' - ' + optional + ' - ' + pageItem.id); try { let out_msgs: Array = []; let id = pageItem.id @@ -5067,16 +5974,30 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): let tempItem = pageItem.playList[i].split('.'); tPlayList[i] = tempItem[1]; } - + let tempPlayList = []; for (let i = 0; i < tPlayList.length; i++) { tempPlayList[i] = formatInSelText(tPlayList[i]); } optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : '' - } + } else if (vAdapter == 'volumio') { /* Volumio: limit 900 chars */ + actualState = ''; //todo: no actual playlistname saving + let tempPlayList = []; let tempPll = 0; + for (let i = 0; i < pageItem.playList.length; i++) { + tempPll += pageItem.playList[i].length; if (tempPll > 900) break; + tempPlayList[i] = formatInSelText(pageItem.playList[i]); + } + optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : '' + } /**/ mode = 'playlist'; } else if (optional == 'tracklist') { - actualState = '' + actualState = ''; + /* Volumio: works for files */ + if (vAdapter == 'volumio') { + actualState = getState(pageItem.id + '.TITLE').val; + } else { + actualState = getState(pageItem.adapterPlayerInstance + 'player.trackName').val; + } actualState = getState(pageItem.adapterPlayerInstance + 'player.trackName').val; actualState = (actualState.replace('?','')).split(' -'); actualState = actualState[0].split(" ("); @@ -5086,6 +6007,11 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): //let trackArray = (function () { try {return JSON.parse(getState(pageItem.adapterPlayerInstance + 'player.playlist.trackListArray').val);} catch(e) {return {};}})(); for (let track_index=0; track_index < 45; track_index++) { let temp_cut_array = getAttr(globalTracklist, track_index + '.title'); + /* Volumio: @local/NAS no title -> name */ + if (temp_cut_array == undefined) { + temp_cut_array = getAttr(globalTracklist, track_index + '.name'); + } + if (Debug) console.log(temp_cut_array); if (temp_cut_array != undefined) { temp_cut_array = (temp_cut_array.replace('?','')).split(' -'); temp_cut_array = temp_cut_array[0].split(" ("); @@ -6222,7 +7148,10 @@ type Page = { items: PageItem[], useColor: boolean, subPage: boolean, - parent: Page + parent: Page, + prev: string, + next: string, + home: string }; interface PageEntities extends Page { @@ -6292,6 +7221,7 @@ type PageItem = { playList: (string[] | undefined), equalizerList: (string[] | undefined), repeatList: (string[] | undefined), + globalTracklist: (string[] | undefined), modeList: (string[] | undefined), hidePassword: (boolean | undefined), autoCreateALias: (boolean | undefined) From 393ef7d3224dcf470bd213a843c2389b678e18c0 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:46:52 +0100 Subject: [PATCH 10/16] v3.8.0 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia by @egal - Upgrade TFT 47 - Add Volumio-Tracklist to cardMedia by @egal --- ioBroker/NsPanelTs.ts | 663 ------------------------------------------ 1 file changed, 663 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 14c14f63..f2e61474 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -839,669 +839,6 @@ let Service: PageEntities = ] }; - - -// ********************************************************** -// ** Navigationsstruktur für Gebäude ** -// ********************************************************** - -let Level_0_Grundstueck: PageGrid = -{ - 'type': "cardGrid", - 'heading': "Grundstück", - 'useColor': true, - 'subPage': false, - 'parent': undefined, - 'prev': undefined, - 'next': undefined, - 'home': undefined, - 'items': [ - { navigate: true, id: null, targetPage: 'Level_1_Haus', name: 'Haus' ,icon: 'home', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_1_Gartenhaus', name: 'Gartenhaus' ,icon: 'storefront-outline', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_1_Aussen', name: 'Aussen' ,icon: 'tree-outline', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_1_Garage', name: 'Garage' ,icon: 'garage', offColor: MSRed, onColor: MSGreen} - ] -}; - - let Level_1_Haus: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'Haus', - 'useColor': true, - 'subPage': true, - 'parent': Level_0_Grundstueck, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_0_Grundstueck', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_2_Erdgeschoss_1', name: 'Erdgeschoss' , icon: 'home-floor-0', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_2_Obergeschoss', name: 'Obergeschoss' , icon: 'home-floor-1', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_2_Dachgeschoss', name: 'Dachgeschoss' , icon: 'home-floor-2', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_2_Erdgeschoss_1: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'Erdgeschoss (1)', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Haus, - 'prev': undefined, - 'next': 'Level_2_Erdgeschoss_2', - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_3_Wohnzimmer', name: 'Wohnzimmer' , icon: 'sofa-outline', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_Esszimmer', name: 'Esszimmer' , icon: 'table-chair', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_Buero', name: 'Büro' , icon: 'desk', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_Kueche', name: 'Küche' , icon: 'silverware-variant', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_Bad', name: 'Bad' , icon: 'bathtub-outline', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_Kaminzimmer', name: "Kaminzimmer" , icon: "fireplace", offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_Wohnzimmer: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Wohnzimmer', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_1, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Licht_1', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Sensoren_1', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Aktoren', name: 'Aktoren' , icon: 'gesture-tap', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Wohnzimmer_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_4_Wohnzimmer_Licht_1: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'WZ Licht (1)', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Wohnzimmer, - 'prev': undefined, - 'next': 'Level_4_Wohnzimmer_Licht_2', - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Deckenlampe_Couch', name: 'Couchtisch', interpolateColor: true}, - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Deckenlampe_Esstisch', name: 'Esstisch', interpolateColor: true}, - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Vitrine', name: 'Vitrine', interpolateColor: true}, - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.Stehlampe', name: 'Stehlampe', interpolateColor: true}, - ] - }; - - let Level_4_Wohnzimmer_Licht_2: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'WZ Licht (2)', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Wohnzimmer, - 'prev': 'Level_4_Wohnzimmer_Licht_1', - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.WZ_E14_Fenster_mitte', name: 'Fenster mittig', interpolateColor: true}, - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Licht.WZ_E14_Fenster_rechts', name: 'Fenster rechts', interpolateColor: true}, - ] - }; - - let Level_4_Wohnzimmer_Sensoren_1: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'Sensoren', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Wohnzimmer, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Temperatur', icon: 'thermometer', name: 'Temperatur', offColor: White, onColor: White}, - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Luftfeuchte', icon: 'water-percent', name: 'Luftfeuchte', offColor: White, onColor: White }, - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Fenster_links', offColor: MSRed, onColor: MSGreen, name: 'Fenster links'}, - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sensoren.Fenster_mittig', offColor: MSRed, onColor: MSGreen, name: 'Fenster mittig'}, - ] - }; - - let Level_4_Wohnzimmer_Aktoren: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'WZ Aktoren', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Wohnzimmer, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Sonstige_Aktoren.Steckdose_OBI', name: 'Steckdose OBI', offColor: MSRed, onColor: MSGreen }, - ] - }; - - let Level_4_Wohnzimmer_Thermostat: PageThermo = - { - 'type': 'cardThermo', - 'heading': 'WZ Thermostat', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Wohnzimmer, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [{ id: 'alias.0.Haus.Erdgeschoss.Wohnzimmer.Thermostate.Thermostat_links', minValue: 50, maxValue: 300 }] - }; - - let Level_3_Esszimmer: PageGrid = - { - "type": "cardGrid", - "heading": "EG Esszimmer", - "useColor": true, - "subPage": true, - "parent": Level_2_Erdgeschoss_1, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - "items": [ - { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: "Licht" , icon: "lightbulb", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: "Sensoren" , icon: "sync-alert", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: "Thermostat" , icon: "thermostat", offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_Buero: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Büro', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_1, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: "Licht" , icon: "lightbulb", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren_1', name: "Sensoren" , icon: "sync-alert", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Aktoren', name: "Aktoren" , icon: "gesture-tap", offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: "Thermostat" , icon: "thermostat", offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_4_Buero_Licht: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'Büro Licht', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Buero, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Buero.Licht.Schreibtischlampe', interpolateColor: true}, - { id: 'alias.0.Haus.Erdgeschoss.Buero.Licht.Deckenstrahler_Gruppe', name: 'Deckenstrahler', interpolateColor: true}, - ] - }; - - let Level_4_Buero_Sensoren_1: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'Büro Sensoren (1)', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Buero, - 'prev': undefined, - 'next': 'Level_4_Buero_Sensoren_2', - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Temperatur', icon: 'thermometer', name: 'Temperatur', offColor: White, onColor: White }, - { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Luftfeuchte', icon: 'water-percent', name: 'Luftfeuchte', offColor: White, onColor: White }, - { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Fenster', offColor: MSRed, onColor: MSGreen, name: 'Büro Fenster'}, - { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Bewegung', offColor: MSGreen, onColor: MSRed, name: 'Büro Bewegung', useColor: true}, - ] - }; - - let Level_4_Buero_Sensoren_2: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'Büro Sensoren (2)', - 'useColor': true, - 'subPage': true, - 'parent': Level_4_Buero_Sensoren_1, - 'prev': 'Level_4_Buero_Sensoren_1', - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Buero.Sensoren.Luftdruck', icon: 'speedometer', name: 'Luftdruck', offColor: White, onColor: White }, - ] - }; - - let Level_4_Buero_Aktoren: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'Büro Aktoren', - 'useColor': true, - 'subPage': true, - 'parent': Level_3_Buero, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { id: 'alias.0.Haus.Erdgeschoss.Buero.Aktoren.Airbowl', name: 'Airbowl', offColor: MSRed, onColor: MSGreen }, - ] - }; - - let Level_4_Buero_Thermostat: PageThermo = - { - 'type': 'cardThermo', - 'heading': 'Büro Thermostat', - 'useColor': true, - 'subPage': false, - 'parent': Level_3_Buero, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [{ id: 'alias.0.Haus.Erdgeschoss.Buero.Thermostate.Thermostat', minValue: 50, maxValue: 300 }] - }; - - let Level_3_Kueche: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Küche', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_1, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_Bad: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Küche', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_1, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_Buero_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Buero_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_2_Erdgeschoss_2: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'Erdgeschoss (2)', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Haus, - 'prev': 'Level_2_Erdgeschoss_1', - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_3_GaesteWC', name: 'Gäste WC' , icon: 'toilet', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_Hauswirtschaftsraum', name: 'Hauswirtschaft' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_FlurVorne', name: 'Flur vorne' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_3_FlurHinten', name: 'Flur hinten' , icon: 'floor-plan', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_Kaminzimmer: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Kaminzimmer', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_2, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_Kaminzimmer_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_GaesteWC: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Gäste WC', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_2, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_Hauswirtschaftsraum: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Hauswirtschaft', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_2, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_FlurVorne: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Flur Vorne', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_2, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_3_FlurHinten: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'EG Flur Hinten', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_Erdgeschoss_2, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Haus', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Licht', name: 'Licht' , icon: 'lightbulb', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Sensoren', name: 'Sensoren' , icon: 'sync-alert', offColor: MSRed, onColor: MSGreen}, - { navigate: true, id: null, targetPage: 'Level_4_GaesteWC_Thermostat', name: 'Thermostat' , icon: 'thermostat', offColor: MSRed, onColor: MSGreen}, - ] - }; - - let Level_1_Gartenhaus: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'Gartenhaus', - 'useColor': true, - 'subPage': true, - 'parent': Level_0_Grundstueck, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_0_Grundstueck', - 'items': [ - { id: 'alias.0.Gartenhaus.Schalter_1', name: 'Schalter 1', icon: 'power', icon2: 'power', offColor: HMIOff, onColor: HMIOn }, - { id: 'alias.0.Gartenhaus.Schalter_2', name: 'Schalter 2', icon: 'power', icon2: 'power', offColor: HMIOff, onColor: HMIOn }, - { navigate: true, id: null, targetPage: 'Level_2_GH_Licht', name: 'Licht' , icon: 'lightbulb', offColor: HMIOff, onColor: HMIOn}, - { navigate: true, id: null, targetPage: 'Level_2_GH_Aktoren_1', name: 'Aktoren' , icon: 'gesture-tap', offColor: HMIOff, onColor: HMIOn}, - { navigate: true, id: null, targetPage: 'Level_2_GH_Sensoren_1', name: 'Sensoren' , icon: 'sync-alert', offColor: HMIOff, onColor: HMIOn}, - { navigate: true, id: null, targetPage: 'Level_2_GH_Heizkoerper', name: 'Heizkörper' , icon: 'thermostat', offColor: HMIOff, onColor: HMIOn}, - ] - }; - - let Level_2_GH_Licht: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'Gartenhaus Licht', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Gartenhaus, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_0_Grundstueck', - 'items': [ - { navigate: true, id: null, targetPage: 'Level_3_GH_Lampen_1', name: 'Flaschen' , icon: 'bottle-tonic-outline', offColor: HMIOff, onColor: HMIOn}, - { navigate: true, id: null, targetPage: 'Level_3_GH_LED_Stripes', name: 'LED Stripes' , icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn}, - { navigate: true, id: null, targetPage: 'Level_3_GH_WLED', name: 'WLED' , icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn}, - { navigate: true, id: null, targetPage: 'Level_3_GH_Aussenlampen', name: 'Aussenlampen' , icon: 'coach-lamp', offColor: HMIOff, onColor: HMIOn}, - ] - }; - - let Level_3_GH_Lampen_1: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Lampen (1)', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_GH_Licht, - 'prev': undefined, - 'next': 'Level_3_GH_Lampen_2', - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_1', name: 'Jack Daniels 1', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_2', name: 'Jack Daniels 2', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_3', name: 'Jack Daniels 3', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Jack_Daniels_4', name: 'Jack Daniels 4', interpolateColor: true}, - ] - }; - - let Level_3_GH_Lampen_2: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Lampen (2)', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_GH_Licht, - 'prev': 'Level_3_GH_Lampen_1', - 'next': 'Level_3_GH_Lampen_3', - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Chivas', name: 'Chivas Regal', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Veterano_1', name: 'Veterano 1', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Veterano_2', name: 'Veterano 2', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Glasovka', name: 'Glasovka', interpolateColor: true}, - ] - }; - - let Level_3_GH_Lampen_3: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Lampen (3)', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_GH_Licht, - 'prev': 'Level_3_GH_Lampen_2', - 'next': 'Level_3_GH_Lampen_4', - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Kraken', name: 'Kraken', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.103', name: '103', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Havana_Club', name: 'Havana_Club', interpolateColor: true}, - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Chantre', name: 'Chantre', interpolateColor: true}, - ] - }; - - let Level_3_GH_Lampen_4: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Lampen (4)', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_GH_Licht, - 'prev': 'Level_3_GH_Lampen_3', - 'next': undefined, - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Licht.Flaschen.Southern_Comfort', name: 'Southern_Comfort', interpolateColor: true}, - ] - }; - - let Level_3_GH_LED_Stripes: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH LED Stripes', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_GH_Licht, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.4Pin_Stripe', icon: 'led-strip-variant', name: 'Laterne links', offColor: HMIOff, onColor: HMIOn, useColor: true }, - { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.5Pin_Stripe', icon: 'led-strip-variant', name: 'Laterne rechts',offColor: HMIOff, onColor: HMIOn, useColor: true }, - { id: 'alias.0.Gartenhaus.Licht.LED_Stripes.Bilder_Stripe', icon: 'led-strip-variant', name: 'Bilder Stripe', offColor: HMIOff, onColor: HMIOn, useColor: true}, - ] - }; - - let Level_3_GH_WLED: PageGrid = - { - 'type': 'cardGrid', - 'heading': 'WLED Stripes WZ', - 'useColor': true, - 'subPage': false, - 'parent': Level_2_GH_Licht, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.NSPanel_1.WLED.Example.On', name: 'Power', icon: 'power', onColor: HMIOn, offColor: HMIOff}, - { id: 'alias.0.NSPanel_1.WLED.Example.Sync', name: 'Sync', icon: 'sync', onColor: HMIOn, offColor: White}, - { id: 'alias.0.NSPanel_1.WLED.Example.Presets', icon: 'heart-outline', name: 'Presets', onColor: White, modeList: ['Preset 0', 'Add Preset']}, - { id: 'alias.0.NSPanel_1.WLED.Example.Colors', icon: 'palette', name: 'Colors', onColor: White, - modeList: ['Default', '* Color 1', '* Color Gradient', '* Colors 1&2', '* Colors Only', '* Random Cycle', 'Analogus','April Night', 'Aqua Flash', 'Atlantica', 'Aurora', - 'Beach', 'Beech', 'Blink Red', 'Breeze', 'C9', 'C9 New', 'Candy', 'Candy2', 'Cloud', - 'Cyane', 'Departure', 'Drywet', 'Fairy Reaf', 'Fire', 'Forest', 'etc' - ]}, - { id: 'alias.0.NSPanel_1.WLED.Example.Effects', icon: 'emoticon-outline', name: 'Effects', onColor: White, - modeList: ['Solid', 'Android', 'Aurora', 'Blends', 'Blink', 'Blink Rainbow', 'Bouncing Balls','Bpm', 'Breathe', 'Candle', 'Candle Multi', - 'Candy Cane', 'Chase', 'Chase 1', 'Chase 2', 'Chase 3', 'Chase Flash', 'Chase Flash Rnd', 'Chase Rainbow', 'Chase Random', - 'Chunchun', 'Colorful', 'Colorloop', 'Colortwinkles', 'Colorwaves', 'Dancing Shadows', 'etc' - ]}, - { id: 'alias.0.NSPanel_1.WLED.Example.Segments', icon: 'layers', name: 'Segments', onColor: White, modeList: ['Segment 0', 'Add Segment']}, - ] - }; - - let Level_3_GH_Aussenlampen: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Außenlampen', - 'useColor': true, - 'subPage': true, - 'parent': Level_2_GH_Licht, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Licht.Aussenbeleuchtung.Laterne_aussen_links', icon: 'coach-lamp', name: 'Laterne links', offColor: HMIOff, onColor: HMIOn }, - { id: 'alias.0.Gartenhaus.Licht.Aussenbeleuchtung.Laterne_aussen_rechts', icon: 'coach-lamp', name: 'Laterne rechts',offColor: HMIOff, onColor: HMIOn }, - ] - }; - - let Level_2_GH_Sensoren_1: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Sensoren (1)', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Gartenhaus, - 'prev': undefined, - 'next': 'Level_2_GH_Sensoren_2', - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Temperatur', icon: 'thermometer', name: 'Aqara Temperatur', offColor: White, onColor: White }, - { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Luftfeuchte', icon: 'water-percent', name: 'Aqara Luftfeuchte', offColor: White, onColor: White }, - { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Luftdruck', icon: 'alert', name: 'Aqara Luftfeuchte', offColor: White, onColor: White }, - { id: 'alias.0.Gartenhaus.Sensoren.Aqara_Bewegung', offColor: MSGreen, onColor: MSRed, name: 'Aqara Bewegung', useColor: true}, - ] - }; - - let Level_2_GH_Sensoren_2: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Sensoren (2)', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Gartenhaus, - 'prev': 'Level_2_GH_Sensoren_1', - 'next': undefined, - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Sensoren.Envy_Temperatur', icon: 'thermometer', name: 'Envy Temperatur', offColor: White, onColor: White }, - { id: 'alias.0.Gartenhaus.Sensoren.Envy_Luftfeuchte', icon: 'water-percent', name: 'Envy Luftfeuchte', offColor: White, onColor: White }, - { id: 'alias.0.Gartenhaus.Sensoren.Envy_Luftqualität', icon: 'alert', name: 'Envy Luftqualität', offColor: White, onColor: White, unit: '%' }, - ] - }; - - let Level_2_GH_Aktoren_1: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Aktoren (1)', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Gartenhaus, - 'prev': undefined, - 'next': 'Level_2_GH_Aktoren_2', - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Aktoren.Steckdose_außen', icon: 'power', name: 'Steckdose außen', offColor: HMIOff, onColor: HMIOn }, - { id: 'alias.0.Gartenhaus.Aktoren.Luftreiniger', icon: 'air-filter', name: 'Airbowl', offColor: HMIOff, onColor: HMIOn }, - { id: 'alias.0.Gartenhaus.Aktoren.Luefter', icon: 'fan', name: 'Lüfter', offColor: HMIOff, onColor: HMIOn }, - { id: 'alias.0.Gartenhaus.Aktoren.Bilder_Stripe', icon: 'led-strip-variant', offColor: HMIOff, onColor: HMIOn, name: 'Bilder Stripe', useColor: true}, - ] - }; - - let Level_2_GH_Aktoren_2: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Aktoren (2)', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Gartenhaus, - 'prev': 'Level_2_GH_Aktoren_1', - 'next': undefined, - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Aktoren.Welcome', icon: 'image-frame', name: 'Welcome', offColor: HMIOff, onColor: HMIOn }, - ] - }; - - let Level_2_GH_Heizkoerper: PageEntities = - { - 'type': 'cardEntities', - 'heading': 'GH Heizkörper', - 'useColor': true, - 'subPage': true, - 'parent': Level_1_Gartenhaus, - 'prev': undefined, - 'next': undefined, - 'home': 'Level_1_Gartenhaus', - 'items': [ - { id: 'alias.0.Gartenhaus.Heizkoerper.Brandson', icon: 'heat-wave', name: 'Brandson', offColor: HMIOff, onColor: HMIOn }, - { id: 'alias.0.Gartenhaus.Heizkoerper.Klarstein', icon: 'heat-wave', name: 'Klarstein', offColor: HMIOff, onColor: HMIOn }, - ] - }; - - let Level_1_Aussen: PageGrid = - { - export const config: Config = { panelRecvTopic: 'mqtt.0.SmartHome.NSPanel_1.tele.RESULT', // anpassen panelSendTopic: 'mqtt.0.SmartHome.NSPanel_1.cmnd.CustomSend', // anpassen From 8eb80af74499c9ccc73d725ee090ab720e5dce59 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:52:01 +0100 Subject: [PATCH 11/16] v3.8.0 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia by @egal - Upgrade TFT 47 - Add Volumio-Tracklist to cardMedia by @egal --- ioBroker/NsPanelTs_without_Examples.ts | 125 ++++++++----------------- 1 file changed, 38 insertions(+), 87 deletions(-) diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index 71f88d65..84cc88cf 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -13,7 +13,7 @@ Achtung Änderung des Sonoff ESP-Temperatursensors !!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!! ******************************************************************************* In bestimmten Situationen kommt es vor, dass sich das Panel mit FlashNextion -unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Dowengrade +unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Downgrade durchführen und FlashNextion wiederholen. ******************************************************************************* @@ -110,8 +110,9 @@ ReleaseNotes: - 01.01.2023 - v3.8.0 Add Tasmota "Web Admin Password" - 02.01.2023 - v3.8.0 Add Navigation bSubPrev and bSubNext and Subpages for bHome - 03.01.2023 - v3.8.0 Bugfix for cardThermostat - Payload (Minor) - - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia + - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia by @egal - 05.01.2023 - v3.8.0 Upgrade TFT 47 + - 06.01.2023 - v3.8.0 Add Volumio Tracklist by @egal ***************************************************************************************************************** * Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! * @@ -380,7 +381,6 @@ export const config: Config = { panelSendTopic: 'mqtt.0.SmartHome.NSPanel_1.cmnd.CustomSend', // anpassen firstScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Hourly.h0.PrecipitationProbability', ScreensaverEntityIcon: 'weather-pouring', ScreensaverEntityText: 'Regen', ScreensaverEntityUnitText: '%', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 100} }, secondScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.WindSpeed', ScreensaverEntityIcon: 'weather-windy', ScreensaverEntityText: "Wind", ScreensaverEntityUnitText: 'km/h', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 120} }, - //secondScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.WindSpeed', ScreensaverEntityIcon: 'weather-windy', ScreensaverEntityText: "Wind", ScreensaverEntityUnitText: 'km/h', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 120} }, thirdScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.UVIndex', ScreensaverEntityIcon: 'solar-power', ScreensaverEntityText: 'UV', ScreensaverEntityUnitText: '', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 9} }, fourthScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.RelativeHumidity', ScreensaverEntityIcon: 'water-percent', ScreensaverEntityText: 'Luft', ScreensaverEntityUnitText: '%', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 100, 'val_best': 65} }, alternativeScreensaverLayout: false, @@ -397,89 +397,18 @@ export const config: Config = { defaultBackgroundColor: HMIDark, //New Parameter temperatureUnit: '°C', pages: [ - Level_0_Grundstueck, - Buero_Seite_1, //Beispiel-Seite - WLED, //Beispiel-Seite - Radiosender, //Beispiel-Seite - SensorGrid, //Beispiel-Seite - CardChartExample, //Beispiel-Seite - CardPowerExample, //Beispiel-Seite - //SqueezeboxRPC, //Beispiel-Seite - Sonos, //Beispiel-Seite - SpotifyPremium, //Beispiel-Seite - Alexa, //Beispiel-Seite - Buero_Seite_2, //Beispiel-Seite - Buero_Klimaanlage, //Beispiel-Seite - Button_1, //Beispiel-Seite - Test_Licht1, //Beispiel-Seite - Test_Licht2, //Beispiel-Seite - Test_Funktionen, //Beispiel-Seite - Fenster_1, //Beispiel-Seite - Subpages_1, //Beispiel-Seite - Buero_Themostat, //Beispiel-Seite - Buero_Alarm, //Beispiel-Seite Service //Auto-Alias Service Page ], subPages: [ - Abfall, //Beispiel-Unterseite - WLAN, //Beispiel-Unterseite NSPanel_Infos, //Auto-Alias Service Page NSPanel_Einstellungen, //Auto-Alias Service Page NSPanel_Firmware_Info, //Auto-Alias Service Page - Level_1_Haus, - Level_2_Erdgeschoss_1, - Level_3_Wohnzimmer, - Level_4_Wohnzimmer_Licht_1, - Level_4_Wohnzimmer_Licht_2, - Level_4_Wohnzimmer_Sensoren_1, - Level_4_Wohnzimmer_Aktoren, - Level_4_Wohnzimmer_Thermostat, - Level_3_Esszimmer, - - Level_3_Buero, - Level_4_Buero_Licht, - Level_4_Buero_Sensoren_1, - Level_4_Buero_Sensoren_2, - Level_4_Buero_Aktoren, - Level_4_Buero_Thermostat, - Level_3_Kueche, - - Level_3_Bad, - - Level_2_Erdgeschoss_2, - Level_3_Kaminzimmer, - - Level_3_GaesteWC, - - Level_3_Hauswirtschaftsraum, - - Level_3_FlurVorne, - - Level_3_FlurHinten, - - Level_1_Gartenhaus, - Level_2_GH_Licht, - Level_3_GH_Lampen_1, - Level_3_GH_Lampen_2, - Level_3_GH_Lampen_3, - Level_3_GH_Lampen_4, - Level_3_GH_LED_Stripes, - Level_3_GH_WLED, - Level_3_GH_Aussenlampen, - Level_2_GH_Sensoren_1, - Level_2_GH_Sensoren_2, - Level_2_GH_Aktoren_1, - Level_2_GH_Aktoren_2, - Level_2_GH_Heizkoerper, - Level_1_Aussen, - - Level_1_Garage ], - button1Page: button1Page, //Beispiel-Seite auf Button 1, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, - button2Page: button2Page //Beispiel-Seite auf Button 2, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, + button1Page: null, //Beispiel-Seite auf Button 1, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, + button2Page: null //Beispiel-Seite auf Button 2, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, }; // _________________________________ Ab hier keine Konfiguration mehr _____________________________________ @@ -1042,7 +971,7 @@ function get_locales() { async function check_updates() { try { - const desired_display_firmware_version = 47; + const desired_display_firmware_version = 46; const berry_driver_version = 8; if (Debug) { @@ -1510,7 +1439,7 @@ function update_berry_driver_version() { } function update_tft_firmware() { - const tft_version: string = 'v3.8.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 { @@ -3969,6 +3898,19 @@ function HandleButtonEvent(words): void { let strDevicePL = pageItemPL.playList[words[4]]; request({ url:`${getState(adapterInstancePL+'info.host').val}/api/commands/?cmd=playplaylist&name=${strDevicePL}`, headers: {'User-Agent': 'ioBroker'} }, async (error, response, result)=>{}); /* nothing todo @ error */ + setTimeout(async function () { + request({ url: `${getState(adapterInstancePL+'info.host').val}/api/getQueue`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result) => { + try { + const QUEUELIST = JSON.parse(result); + globalTracklist = QUEUELIST.queue; + if (Debug) { for (let i_index in QUEUELIST.queue) console.log(QUEUELIST.queue[i_index]); } + } catch (err) { + console.log('get_volumio-queue: ' + err.message); + } + } + ); + }, 2000); break; } break; @@ -3986,6 +3928,10 @@ function HandleButtonEvent(words): void { case 'alexa2': console.log('Aktuell hat alexa2 keine Tracklist') break; + case 'volumio': + request({ url:`${getState(adapterInstanceTL+'info.host').val}/api/commands/?cmd=play&N=${words[4]}`, headers: {'User-Agent': 'ioBroker'} }, + async (error, response, result)=>{}); /* nothing todo @ error */ + break; } break; case 'mode-repeat': @@ -4230,13 +4176,6 @@ function GetNavigationString(pageId: number): string { console.log(pageId); } - // left navigation arrow | right navigation arrow - // X|X - // 0 = no arrow - // 1|1 = right and left navigation arrow - // 2|0 = (right) up navigation arrow - // 2|2 = (right) up navigation arrow | (left) home navigation icon - if (activePage.subPage && activePage.prev == undefined && activePage.next == undefined) { return 'button~bUp~' + Icons.GetIcon('arrow-up-bold') + '~' + rgb_dec565(White) + '~~~button~bHome~' + Icons.GetIcon('home') + '~' + rgb_dec565(White) + '~~'; } else if (activePage.subPage && activePage.prev == undefined && activePage.next != undefined) { @@ -4902,16 +4841,27 @@ function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): } /**/ mode = 'playlist'; } else if (optional == 'tracklist') { - actualState = '' + actualState = ''; + /* Volumio: works for files */ + if (vAdapter == 'volumio') { + actualState = getState(pageItem.id + '.TITLE').val; + } else { + actualState = getState(pageItem.adapterPlayerInstance + 'player.trackName').val; + } actualState = getState(pageItem.adapterPlayerInstance + 'player.trackName').val; actualState = (actualState.replace('?','')).split(' -'); actualState = actualState[0].split(" ("); actualState = formatInSelText(actualState[0]); - //Limit 900 Zeichen, danach Speicherüberlauf --> Soweit kürzen wie möglich + //Limit 900 Zeichen, danach Speicherüberlauf --> Soweit kürzen wie möglich let temp_array = []; //let trackArray = (function () { try {return JSON.parse(getState(pageItem.adapterPlayerInstance + 'player.playlist.trackListArray').val);} catch(e) {return {};}})(); for (let track_index=0; track_index < 45; track_index++) { let temp_cut_array = getAttr(globalTracklist, track_index + '.title'); + /* Volumio: @local/NAS no title -> name */ + if (temp_cut_array == undefined) { + temp_cut_array = getAttr(globalTracklist, track_index + '.name'); + } + if (Debug) console.log(temp_cut_array); if (temp_cut_array != undefined) { temp_cut_array = (temp_cut_array.replace('?','')).split(' -'); temp_cut_array = temp_cut_array[0].split(" ("); @@ -6121,6 +6071,7 @@ type PageItem = { playList: (string[] | undefined), equalizerList: (string[] | undefined), repeatList: (string[] | undefined), + globalTracklist: (string[] | undefined), modeList: (string[] | undefined), hidePassword: (boolean | undefined), autoCreateALias: (boolean | undefined) From 183e4d03cb29020aa1941842b6c8ac128e382294 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:53:45 +0100 Subject: [PATCH 12/16] v3.8.0 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia by @egal - Upgrade TFT 47 - Add Volumio-Tracklist to cardMedia by @egal --- ioBroker/NsPanelTs_without_Examples.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index 84cc88cf..f83700c9 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -390,7 +390,7 @@ export const config: Config = { timeoutScreensaver: 20, screenSaverDoubleClick: true, locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc. - weatherEntity: 'alias.0.DasWetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können + weatherEntity: 'alias.0.Wetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können defaultOffColor: Off, defaultOnColor: On, defaultColor: Off, From 0a6236b3e03ae12e83713dcf20284dca797bd52b Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:56:00 +0100 Subject: [PATCH 13/16] v3.8.0 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia by @egal - Upgrade TFT 47 - Add Volumio-Tracklist to cardMedia by @egal --- ioBroker/NsPanelTs.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index f2e61474..fd450a0e 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -854,14 +854,13 @@ export const config: Config = { timeoutScreensaver: 20, screenSaverDoubleClick: true, locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc. - weatherEntity: 'alias.0.DasWetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können + weatherEntity: 'alias.0.Wetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können defaultOffColor: Off, defaultOnColor: On, defaultColor: Off, defaultBackgroundColor: HMIDark, //New Parameter temperatureUnit: '°C', pages: [ - Level_0_Grundstueck, Buero_Seite_1, //Beispiel-Seite WLED, //Beispiel-Seite Radiosender, //Beispiel-Seite From d634ca1baca17e9e344de0406b57fbb7ab19a55b Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Fri, 6 Jan 2023 12:12:17 +0100 Subject: [PATCH 14/16] v3.8.1 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia by @egal - Upgrade TFT 47 - Add Volumio-Tracklist to cardMedia by @egal - HMI Hotfix --- ioBroker/NsPanelTs_without_Examples.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index f83700c9..7878b546 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -1,6 +1,6 @@ /*----------------------------------------------------------------------- -TypeScript v3.8.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf -- abgestimmt auf TFT 47 / v3.8.0 / BerryDriver 8 / Tasmota 12.3.1 +TypeScript v3.8.1 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf +- abgestimmt auf TFT 47 / v3.8.1 / 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) @@ -13,7 +13,7 @@ Achtung Änderung des Sonoff ESP-Temperatursensors !!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!! ******************************************************************************* In bestimmten Situationen kommt es vor, dass sich das Panel mit FlashNextion -unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Downgrade +unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Dowengrade durchführen und FlashNextion wiederholen. ******************************************************************************* @@ -110,9 +110,10 @@ ReleaseNotes: - 01.01.2023 - v3.8.0 Add Tasmota "Web Admin Password" - 02.01.2023 - v3.8.0 Add Navigation bSubPrev and bSubNext and Subpages for bHome - 03.01.2023 - v3.8.0 Bugfix for cardThermostat - Payload (Minor) - - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia by @egal + - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia - 05.01.2023 - v3.8.0 Upgrade TFT 47 - - 06.01.2023 - v3.8.0 Add Volumio Tracklist by @egal + - 06.01.2023 - v3.8.0 Add Volumio Tracklist + - 06.01.2023 - v3.8.1 HMI-Hotfix ***************************************************************************************************************** * Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! * @@ -186,7 +187,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.8.0.tft + TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.8.1.tft --------------------------------------------------------------------------------------- */ let Icons = new IconsSelector(); @@ -971,7 +972,7 @@ function get_locales() { async function check_updates() { try { - const desired_display_firmware_version = 46; + const desired_display_firmware_version = 47; const berry_driver_version = 8; if (Debug) { @@ -1439,7 +1440,7 @@ function update_berry_driver_version() { } function update_tft_firmware() { - const tft_version: string = 'v3.7.3'; + const tft_version: string = 'v3.8.1'; const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`; try { From a5e60ac313acd26996540c2dff8c6ab161383b10 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Fri, 6 Jan 2023 12:15:53 +0100 Subject: [PATCH 15/16] v3.8.1 - New Release (Breaking Changes) - Add New HMI-Navi (Breaking Changes) - Add Tasmota "Web Admin Password" (Breaking Changes) - Add Navigation bSubPrev and bSubNext and Subpages for bHome - Bugfix for cardThermostat - Payload (Minor) - Add Volumio-Player to cardMedia by @egal - Upgrade TFT 47 - Add Volumio-Tracklist to cardMedia by @egal - HMI Hotfix --- ioBroker/NsPanelTs.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index fd450a0e..1929b42c 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1,6 +1,6 @@ /*----------------------------------------------------------------------- -TypeScript v3.8.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf -- abgestimmt auf TFT 47 / v3.8.0 / BerryDriver 8 / Tasmota 12.3.1 +TypeScript v3.8.1 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf +- abgestimmt auf TFT 47 / v3.8.1 / 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) @@ -13,7 +13,7 @@ Achtung Änderung des Sonoff ESP-Temperatursensors !!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!! ******************************************************************************* In bestimmten Situationen kommt es vor, dass sich das Panel mit FlashNextion -unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Downgrade +unter Tasmota > 12.2.0 nicht flashen lässt. Für den Fall ein Tasmota Dowengrade durchführen und FlashNextion wiederholen. ******************************************************************************* @@ -110,9 +110,10 @@ ReleaseNotes: - 01.01.2023 - v3.8.0 Add Tasmota "Web Admin Password" - 02.01.2023 - v3.8.0 Add Navigation bSubPrev and bSubNext and Subpages for bHome - 03.01.2023 - v3.8.0 Bugfix for cardThermostat - Payload (Minor) - - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia by @egal + - 04.01.2023 - v3.8.0 Add Volumio-Player to cardMedia - 05.01.2023 - v3.8.0 Upgrade TFT 47 - - 06.01.2023 - v3.8.0 Add Volumio Tracklist by @egal + - 06.01.2023 - v3.8.0 Add Volumio Tracklist + - 06.01.2023 - v3.8.1 HMI-Hotfix ***************************************************************************************************************** * Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! * @@ -186,7 +187,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.8.0.tft + TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.8.1.tft --------------------------------------------------------------------------------------- */ let Icons = new IconsSelector(); @@ -1457,7 +1458,7 @@ function get_locales() { async function check_updates() { try { - const desired_display_firmware_version = 46; + const desired_display_firmware_version = 47; const berry_driver_version = 8; if (Debug) { @@ -1925,7 +1926,7 @@ function update_berry_driver_version() { } function update_tft_firmware() { - const tft_version: string = 'v3.7.3'; + const tft_version: string = 'v3.8.1'; const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`; try { From cbc256bbf9aed015d260b84d079de88a2995ddbe Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Fri, 6 Jan 2023 14:38:48 +0100 Subject: [PATCH 16/16] fixes #670 --- apps/nspanel-lovelace-ui/luibackend/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 79e227eb..5e77cc51 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -489,7 +489,7 @@ class LuiPagesGen(object): detailPage = "" if any(x in ["preset_modes", "swing_modes", "fan_modes"] for x in entity.attributes): - detailPage = "1" + detailPage = "0" 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}" self._send_mqtt_msg(command)