Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui

This commit is contained in:
Johannes Braun
2022-11-27 00:16:06 +01:00
37 changed files with 1180 additions and 2136 deletions

View File

@@ -12,85 +12,6 @@
│ - // fix touch offset
│ - lcd_dev fffb 0002 0000 0020
│ - page pageStartup
├── cardAlarm.txt
│ @@ -479,15 +479,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -511,15 +511,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -650,39 +650,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //text arm1
│ spstr strCommand.txt,arm1.txt,"~",3
│ if(arm1.txt!="")
│ {
│ vis arm1,1
│ }
├── cardChart.txt
│ @@ -175,16 +175,16 @@
│ Send Component ID : disabled
@@ -101,7 +22,7 @@
│ Events
│ Touch Press Event
│ - tSend.txt="event,buttonPress2,cardChart,"
│ - if(bPrev.txt=="?")
│ - if(bPrev.txt=="")
│ + tSend.txt="event,buttonPress2,cardPower,"
│ + if(bNext.txt=="")
│ {
@@ -111,7 +32,7 @@
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -207,16 +207,16 @@
│ @@ -207,15 +207,15 @@
│ Send Component ID : disabled
│ State : unpressed
│ Text : 
@@ -120,534 +41,14 @@
│ Events
│ Touch Press Event
│ - tSend.txt="event,buttonPress2,cardChart,"
│ - if(bPrev.txt=="?")
│ + tSend.txt="event,buttonPress2,cardAlarm,"
+ if(bPrev.txt=="")
if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -409,39 +409,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // extract color
│ 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
├── cardEntities.txt
│ @@ -530,15 +530,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardEntities,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -562,15 +562,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardEntities,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -1232,39 +1232,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // get Type
│ spstr strCommand.txt,type1.txt,"~",3
│ // get internal name
│ spstr strCommand.txt,entn1.txt,"~",4
│ if(type1.txt=="delete"||type1.txt=="")
│ {
├── cardGrid.txt
│ @@ -468,15 +468,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardGrid,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -500,15 +500,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardGrid,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -659,39 +659,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // get Type
│ spstr strCommand.txt,type1.txt,"~",3
│ // get internal name
│ spstr strCommand.txt,entn1.txt,"~",4
│ if(type1.txt=="delete"||type1.txt=="")
│ {
├── cardMedia.txt
│ @@ -444,15 +444,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardMedia,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -476,15 +476,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardMedia,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -607,39 +607,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //entity name
│ spstr strCommand.txt,entn.txt,"~",3
│ //icon
│ spstr strCommand.txt,tIcon.txt,"~",4
│ //icon farbe
│ spstr strCommand.txt,tTmp.txt,"~",5
├── cardPower.txt
│ @@ -343,15 +343,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardPower,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -375,15 +375,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -565,39 +565,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // icon color home
│ spstr strCommand.txt,tTmp.txt,"~",3
│ covx tTmp.txt,t1.pco,0,0
│ // icon home
│ spstr strCommand.txt,t1.txt,"~",4
│ // text home
├── cardQR.txt
│ @@ -184,15 +184,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardQR,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -216,15 +216,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -456,39 +456,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //text qrcode
│ spstr strCommand.txt,vaQR.txt,"~",3
│ // get Type
│ spstr strCommand.txt,type1.txt,"~",4
│ // get internal name
│ spstr strCommand.txt,entn1.txt,"~",5
├── cardThermo.txt
│ @@ -291,15 +291,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardThermo,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -323,15 +323,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardThermo,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -904,39 +904,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //entity name
│ spstr strCommand.txt,entn.txt,"~",3
│ //currentTemp
│ spstr strCommand.txt,tCurTemp.txt,"~",4
│ //dstTemp
│ spstr strCommand.txt,tTmp.txt,"~",5
├── pageStartup.txt
│ @@ -173,15 +173,15 @@
│ Max. Text Size : 10
@@ -666,6 +67,126 @@
│ crcputs sys0,2
│ crcputs tSend.txt,0
│ //send cmd
├── popupFan.txt
│ @@ -619,14 +619,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupInSel.txt
│ @@ -893,14 +893,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupLight.txt
│ @@ -682,14 +682,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupNotify.txt
│ @@ -437,14 +437,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupShutter.txt
│ @@ -671,14 +671,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupThermo.txt
│ @@ -942,14 +942,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── screensaver.txt
│ @@ -351,15 +351,15 @@
│ Text tTime

View File

@@ -14,85 +14,6 @@
│ + // fix touch offset (Removed for US version)
│ + //lcd_dev fffb 0002 0000 0020
│ page pageStartup
├── cardAlarm.txt
│ @@ -479,15 +479,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -511,15 +511,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -650,39 +650,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //text arm1
│ spstr strCommand.txt,arm1.txt,"~",3
│ if(arm1.txt!="")
│ {
│ vis arm1,1
│ }
├── cardChart.txt
│ @@ -175,16 +175,16 @@
│ Send Component ID : disabled
@@ -103,7 +24,7 @@
│ Events
│ Touch Press Event
│ - tSend.txt="event,buttonPress2,cardChart,"
│ - if(bPrev.txt=="?")
│ - if(bPrev.txt=="")
│ + tSend.txt="event,buttonPress2,cardPower,"
│ + if(bNext.txt=="")
│ {
@@ -113,7 +34,7 @@
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -207,16 +207,16 @@
│ @@ -207,15 +207,15 @@
│ Send Component ID : disabled
│ State : unpressed
│ Text : 
@@ -122,16 +43,14 @@
│ Events
│ Touch Press Event
│ - tSend.txt="event,buttonPress2,cardChart,"
│ - if(bPrev.txt=="?")
│ + tSend.txt="event,buttonPress2,cardAlarm,"
+ if(bPrev.txt=="")
if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -309,14 +309,25 @@
│ }
│ }else
@@ -157,51 +76,6 @@
│ Dragging : 0
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ @@ -409,39 +420,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // extract color
│ 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
├── cardEntities.txt
│ @@ -61,14 +61,24 @@
│ vis tIcon4,0
@@ -387,7 +261,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ State : unpressed
│ @@ -517,28 +596,53 @@
│ @@ -517,14 +596,39 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
@@ -427,38 +301,6 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardEntities,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -562,15 +666,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardEntities,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -681,14 +785,39 @@
│ crcputs tSend.txt,0
│ //send cmd
@@ -667,50 +509,6 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ @@ -1232,39 +1469,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // get Type
│ spstr strCommand.txt,type1.txt,"~",3
│ // get internal name
│ spstr strCommand.txt,entn1.txt,"~",4
│ if(type1.txt=="delete"||type1.txt=="")
│ {
│ @@ -1854,14 +2091,163 @@
│ covx tTmp.txt,sys0,0,0
│ hSlider4.minval=sys0
@@ -875,401 +673,6 @@
│ //command format pageType,specialPageName
│ //write name of speical page to tId
│ spstr strCommand.txt,tId.txt,"~",1
├── cardGrid.txt
│ @@ -468,15 +468,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardGrid,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -500,15 +500,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardGrid,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -659,39 +659,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // get Type
│ spstr strCommand.txt,type1.txt,"~",3
│ // get internal name
│ spstr strCommand.txt,entn1.txt,"~",4
│ if(type1.txt=="delete"||type1.txt=="")
│ {
├── cardMedia.txt
│ @@ -444,15 +444,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardMedia,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -476,15 +476,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardMedia,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -607,39 +607,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //entity name
│ spstr strCommand.txt,entn.txt,"~",3
│ //icon
│ spstr strCommand.txt,tIcon.txt,"~",4
│ //icon farbe
│ spstr strCommand.txt,tTmp.txt,"~",5
├── cardPower.txt
│ @@ -343,15 +343,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardPower,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -375,15 +375,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -565,39 +565,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ // icon color home
│ spstr strCommand.txt,tTmp.txt,"~",3
│ covx tTmp.txt,t1.pco,0,0
│ // icon home
│ spstr strCommand.txt,t1.txt,"~",4
│ // text home
├── cardQR.txt
│ @@ -184,15 +184,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardQR,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -216,15 +216,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardAlarm,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -456,39 +456,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //text qrcode
│ spstr strCommand.txt,vaQR.txt,"~",3
│ // get Type
│ spstr strCommand.txt,type1.txt,"~",4
│ // get internal name
│ spstr strCommand.txt,entn1.txt,"~",5
├── cardThermo.txt
│ @@ -291,15 +291,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardThermo,"
│ - if(bNext.txt=="?")
│ + if(bNext.txt=="")
│ {
│ tSend.txt+="bHome"
│ }else
│ {
│ tSend.txt+="bNext"
│ }
│ //send calc crc
│ @@ -323,15 +323,15 @@
│ State : unpressed
│ Text : 
│ Max. Text Size : 10
│ Events
│ Touch Press Event
│ tSend.txt="event,buttonPress2,cardThermo,"
│ - if(bPrev.txt=="?")
│ + if(bPrev.txt=="")
│ {
│ tSend.txt+="bUp"
│ }else
│ {
│ tSend.txt+="bPrev"
│ }
│ //send calc crc
│ @@ -904,39 +904,39 @@
│ tsw mSwipeUp,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,1
│ tsw mSwipeUp,0
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bPrev,1
│ tsw mSwipePrev,0
│ tsw mSwipeUp,1
│ - bPrev.txt="?"
│ + bPrev.txt=""
│ }
│ spstr tId.txt,tTmp.txt,"|",1
│ if(tTmp.txt=="0")
│ {
│ vis bNext,0
│ tsw mSwipeNext,0
│ }
│ if(tTmp.txt=="1")
│ {
│ vis bNext,1
│ tsw mSwipeNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ if(tTmp.txt=="2")
│ {
│ vis bNext,1
│ - bNext.txt="?"
│ + bNext.txt=""
│ }
│ //entity name
│ spstr strCommand.txt,entn.txt,"~",3
│ //currentTemp
│ spstr strCommand.txt,tCurTemp.txt,"~",4
│ //dstTemp
│ spstr strCommand.txt,tTmp.txt,"~",5
├── pageStartup.txt
│ @@ -118,15 +118,15 @@
│ Text tMsg3
@@ -1305,3 +708,123 @@
│ crcputs sys0,2
│ crcputs tSend.txt,0
│ //send cmd
├── popupFan.txt
│ @@ -619,14 +619,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupInSel.txt
│ @@ -893,14 +893,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupLight.txt
│ @@ -682,14 +682,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupNotify.txt
│ @@ -437,14 +437,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupShutter.txt
│ @@ -671,14 +671,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }
├── popupThermo.txt
│ @@ -942,14 +942,18 @@
│ {
│ page cardQR
│ }
│ if(tId.txt=="cardPower")
│ {
│ page cardPower
│ }
│ + if(tId.txt=="cardChart")
│ + {
│ + page cardChart
│ + }
│ }
│ // end of user code
│ udelete payloadLength-1
│ bufferPos=0
│ }
│ }
│ }

View File

@@ -1,83 +1,4 @@
+++ /dev/fd/62 2022-11-23 21:49:00.416099064 +0000
+rdAlarm.txt
+15 +479,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardAlarm,"
+ if(bNext.txt=="?")
+ if(bNext.txt=="")
+ {
+ tSend.txt+="bHome"
+ }else
+ {
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+15 +511,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardAlarm,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ {
+ tSend.txt+="bUp"
+ }else
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+39 +650,39 @@
+ tsw mSwipeUp,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ //text arm1
+ spstr strCommand.txt,arm1.txt,"~",3
+ if(arm1.txt!="")
+ {
+ vis arm1,1
+ }
+++ /dev/fd/62 2022-11-26 21:54:17.076103274 +0000
+rdChart.txt
+16 +175,16 @@
+ Send Component ID : disabled
@@ -88,7 +9,7 @@
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardChart,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ tSend.txt="event,buttonPress2,cardPower,"
+ if(bNext.txt=="")
+ {
@@ -98,7 +19,7 @@
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+16 +207,16 @@
+15 +207,15 @@
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
@@ -107,7 +28,6 @@
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardChart,"
+ if(bPrev.txt=="?")
+ tSend.txt="event,buttonPress2,cardAlarm,"
+ if(bPrev.txt=="")
+ {
@@ -116,7 +36,6 @@
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+14 +309,25 @@
+ }
+ }else
@@ -142,520 +61,123 @@
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+
+39 +420,39 @@
+ tsw mSwipeUp,0
+ }
+ if(tTmp.txt=="1")
+pupFan.txt
+14 +619,18 @@
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ page cardQR
+ }
+ if(tTmp.txt=="2")
+ if(tId.txt=="cardPower")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ page cardPower
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ if(tId.txt=="cardChart")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ page cardChart
+ }
+ if(tTmp.txt=="1")
+ }
+ // end of user code
+ udelete payloadLength-1
+ bufferPos=0
+ }
+ }
+ }
+pupInSel.txt
+14 +893,18 @@
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ page cardQR
+ }
+ if(tTmp.txt=="2")
+ if(tId.txt=="cardPower")
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ page cardPower
+ }
+ // extract color
+ 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
+28 +596,53 @@
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardEntities,"
+ if(bNext.txt=="?")
+ if(bNext.txt=="")
+ {
+ tSend.txt+="bHome"
+ }else
+ {
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+15 +666,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardEntities,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ {
+ tSend.txt+="bUp"
+ }else
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+,39 +1469,39 @@
+ tsw mSwipeUp,0
+ }
+ if(tTmp.txt=="1")
+ if(tId.txt=="cardChart")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ page cardChart
+ }
+ if(tTmp.txt=="2")
+ }
+ // end of user code
+ udelete payloadLength-1
+ bufferPos=0
+ }
+ }
+ }
+pupLight.txt
+14 +682,18 @@
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ page cardQR
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ if(tId.txt=="cardPower")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ page cardPower
+ }
+ if(tTmp.txt=="1")
+ if(tId.txt=="cardChart")
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ page cardChart
+ }
+ if(tTmp.txt=="2")
+ }
+ // end of user code
+ udelete payloadLength-1
+ bufferPos=0
+ }
+ }
+ }
+pupNotify.txt
+14 +437,18 @@
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ page cardQR
+ }
+ // get Type
+ spstr strCommand.txt,type1.txt,"~",3
+ // get internal name
+ spstr strCommand.txt,entn1.txt,"~",4
+ if(type1.txt=="delete"||type1.txt=="")
+ if(tId.txt=="cardPower")
+ {
+rdGrid.txt
+15 +468,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardGrid,"
+ if(bNext.txt=="?")
+ if(bNext.txt=="")
+ {
+ tSend.txt+="bHome"
+ }else
+ {
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+15 +500,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardGrid,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ {
+ tSend.txt+="bUp"
+ }else
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+39 +659,39 @@
+ tsw mSwipeUp,0
+ page cardPower
+ }
+ if(tTmp.txt=="1")
+ if(tId.txt=="cardChart")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ page cardChart
+ }
+ if(tTmp.txt=="2")
+ }
+ // end of user code
+ udelete payloadLength-1
+ bufferPos=0
+ }
+ }
+ }
+pupShutter.txt
+14 +671,18 @@
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ page cardQR
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ if(tId.txt=="cardPower")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ page cardPower
+ }
+ if(tTmp.txt=="1")
+ if(tId.txt=="cardChart")
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ page cardChart
+ }
+ if(tTmp.txt=="2")
+ }
+ // end of user code
+ udelete payloadLength-1
+ bufferPos=0
+ }
+ }
+ }
+pupThermo.txt
+14 +942,18 @@
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ page cardQR
+ }
+ // get Type
+ spstr strCommand.txt,type1.txt,"~",3
+ // get internal name
+ spstr strCommand.txt,entn1.txt,"~",4
+ if(type1.txt=="delete"||type1.txt=="")
+ if(tId.txt=="cardPower")
+ {
+rdMedia.txt
+15 +444,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardMedia,"
+ if(bNext.txt=="?")
+ if(bNext.txt=="")
+ {
+ tSend.txt+="bHome"
+ }else
+ {
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+15 +476,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardMedia,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ {
+ tSend.txt+="bUp"
+ }else
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+39 +607,39 @@
+ tsw mSwipeUp,0
+ page cardPower
+ }
+ if(tTmp.txt=="1")
+ if(tId.txt=="cardChart")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ page cardChart
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ //entity name
+ spstr strCommand.txt,entn.txt,"~",3
+ //icon
+ spstr strCommand.txt,tIcon.txt,"~",4
+ //icon farbe
+ spstr strCommand.txt,tTmp.txt,"~",5
+rdPower.txt
+15 +343,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardPower,"
+ if(bNext.txt=="?")
+ if(bNext.txt=="")
+ {
+ tSend.txt+="bHome"
+ }else
+ {
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+15 +375,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardAlarm,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ {
+ tSend.txt+="bUp"
+ }else
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+39 +565,39 @@
+ tsw mSwipeUp,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ // icon color home
+ spstr strCommand.txt,tTmp.txt,"~",3
+ covx tTmp.txt,t1.pco,0,0
+ // icon home
+ spstr strCommand.txt,t1.txt,"~",4
+ // text home
+rdQR.txt
+15 +184,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardQR,"
+ if(bNext.txt=="?")
+ if(bNext.txt=="")
+ {
+ tSend.txt+="bHome"
+ }else
+ {
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+15 +216,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardAlarm,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ {
+ tSend.txt+="bUp"
+ }else
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+39 +456,39 @@
+ tsw mSwipeUp,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ //text qrcode
+ spstr strCommand.txt,vaQR.txt,"~",3
+ // get Type
+ spstr strCommand.txt,type1.txt,"~",4
+ // get internal name
+ spstr strCommand.txt,entn1.txt,"~",5
+rdThermo.txt
+15 +291,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardThermo,"
+ if(bNext.txt=="?")
+ if(bNext.txt=="")
+ {
+ tSend.txt+="bHome"
+ }else
+ {
+ tSend.txt+="bNext"
+ }
+ //send calc crc
+15 +323,15 @@
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,cardThermo,"
+ if(bPrev.txt=="?")
+ if(bPrev.txt=="")
+ {
+ tSend.txt+="bUp"
+ }else
+ {
+ tSend.txt+="bPrev"
+ }
+ //send calc crc
+39 +904,39 @@
+ tsw mSwipeUp,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,1
+ tsw mSwipeUp,0
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bPrev,1
+ tsw mSwipePrev,0
+ tsw mSwipeUp,1
+ bPrev.txt="?"
+ bPrev.txt=""
+ }
+ spstr tId.txt,tTmp.txt,"|",1
+ if(tTmp.txt=="0")
+ {
+ vis bNext,0
+ tsw mSwipeNext,0
+ }
+ if(tTmp.txt=="1")
+ {
+ vis bNext,1
+ tsw mSwipeNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ if(tTmp.txt=="2")
+ {
+ vis bNext,1
+ bNext.txt="?"
+ bNext.txt=""
+ }
+ //entity name
+ spstr strCommand.txt,entn.txt,"~",3
+ //currentTemp
+ spstr strCommand.txt,tCurTemp.txt,"~",4
+ //dstTemp
+ spstr strCommand.txt,tTmp.txt,"~",5
+ }
+ // end of user code
+ udelete payloadLength-1
+ bufferPos=0
+ }
+ }
+ }

View File

@@ -1015,7 +1015,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -1069,7 +1069,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -1237,14 +1237,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -1256,12 +1256,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3

View File

@@ -281,7 +281,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bHome"
}else
@@ -335,7 +335,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -573,14 +573,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -592,12 +592,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",3

View File

@@ -1056,7 +1056,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -1110,7 +1110,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -2189,14 +2189,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -2208,12 +2208,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3

View File

@@ -858,7 +858,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -912,7 +912,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -1109,14 +1109,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -1128,12 +1128,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3

View File

@@ -829,7 +829,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -883,7 +883,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -1043,14 +1043,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -1062,12 +1062,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3

View File

@@ -802,7 +802,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -856,7 +856,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -1075,14 +1075,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -1094,12 +1094,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3

View File

@@ -339,7 +339,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -393,7 +393,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -759,14 +759,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -778,12 +778,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3

View File

@@ -635,7 +635,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -689,7 +689,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -1628,14 +1628,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -1647,12 +1647,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3

View File

@@ -6,77 +6,77 @@ pageIcons
7 Component(s)
0 Line(s) of event code
0 Unique line(s) of event code
popupShutter
25 Component(s)
394 Line(s) of event code
216 Unique line(s) of event code
popupLight
28 Component(s)
408 Line(s) of event code
225 Unique line(s) of event code
cardGrid
42 Component(s)
494 Line(s) of event code
286 Unique line(s) of event code
404 Line(s) of event code
223 Unique line(s) of event code
pageTest
22 Component(s)
67 Line(s) of event code
64 Unique line(s) of event code
21 Component(s)
66 Line(s) of event code
63 Unique line(s) of event code
popupNotify
19 Component(s)
253 Line(s) of event code
164 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
cardChart
31 Component(s)
452 Line(s) of event code
293 Unique line(s) of event code
popupInSel
34 Component(s)
533 Line(s) of event code
259 Unique line(s) of event code
popupFan
27 Component(s)
351 Line(s) of event code
204 Unique line(s) of event code
popupShutter
25 Component(s)
398 Line(s) of event code
218 Unique line(s) of event code
296 Unique line(s) of event code
cardGrid
42 Component(s)
494 Line(s) of event code
288 Unique line(s) of event code
cardEntities
65 Component(s)
1169 Line(s) of event code
532 Unique line(s) of event code
cardPower
43 Component(s)
439 Line(s) of event code
297 Unique line(s) of event code
299 Unique line(s) of event code
popupFan
27 Component(s)
347 Line(s) of event code
202 Unique line(s) of event code
cardQR
32 Component(s)
425 Line(s) of event code
244 Unique line(s) of event code
cardAlarm
40 Component(s)
443 Line(s) of event code
263 Unique line(s) of event code
cardMedia
34 Component(s)
425 Line(s) of event code
224 Unique line(s) of event code
popupThermo
44 Component(s)
515 Line(s) of event code
272 Unique line(s) of event code
popupInSel
34 Component(s)
529 Line(s) of event code
257 Unique line(s) of event code
cardThermo
53 Component(s)
612 Line(s) of event code
318 Unique line(s) of event code
screensaver
45 Component(s)
400 Line(s) of event code
296 Unique line(s) of event code
cardQR
32 Component(s)
425 Line(s) of event code
242 Unique line(s) of event code
cardAlarm
40 Component(s)
443 Line(s) of event code
261 Unique line(s) of event code
cardMedia
34 Component(s)
425 Line(s) of event code
222 Unique line(s) of event code
popupThermo
44 Component(s)
519 Line(s) of event code
274 Unique line(s) of event code
cardThermo
53 Component(s)
612 Line(s) of event code
316 Unique line(s) of event code
cardEntities
65 Component(s)
1169 Line(s) of event code
530 Unique line(s) of event code
Total
18 Page(s)
610 Component(s)
7586 Line(s) of event code
1952 Unique line(s) of event code
609 Component(s)
7561 Line(s) of event code
1954 Unique line(s) of event code

View File

@@ -280,8 +280,8 @@ Button b13
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 215
y coordinate : 243
x coordinate : 129
y coordinate : 216
Width : 100
Height : 50
Effect : load
@@ -308,42 +308,6 @@ Button b13
Touch Press Event
page popupThermo
Button b14
Attributes
ID : 21
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 100
y coordinate : 193
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 1
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : chart
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardChart
Button b2
Attributes
ID : 13

View File

@@ -914,10 +914,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -1277,10 +1277,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -1035,10 +1035,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -670,10 +670,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -984,10 +984,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -1372,10 +1372,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -483,7 +483,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -515,7 +515,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -654,14 +654,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -673,12 +673,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3

View File

@@ -180,7 +180,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bHome"
}else
@@ -212,7 +212,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardChart,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -413,14 +413,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -432,12 +432,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",3

View File

@@ -534,7 +534,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -566,7 +566,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -1236,14 +1236,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -1255,12 +1255,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3

View File

@@ -472,7 +472,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -504,7 +504,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -663,14 +663,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -682,12 +682,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3

View File

@@ -448,7 +448,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -480,7 +480,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -611,14 +611,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -630,12 +630,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3

View File

@@ -347,7 +347,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -379,7 +379,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -569,14 +569,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -588,12 +588,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3

View File

@@ -188,7 +188,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -220,7 +220,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -460,14 +460,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -479,12 +479,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3

View File

@@ -295,7 +295,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bNext.txt=="?")
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
@@ -327,7 +327,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="?")
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
@@ -908,14 +908,14 @@ Timer tmSerial
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt="?"
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt="?"
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
@@ -927,12 +927,12 @@ Timer tmSerial
{
vis bNext,1
tsw mSwipeNext,1
bNext.txt="?"
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt="?"
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3

View File

@@ -135,20 +135,6 @@ Button b13
Touch Press Event
page popupThermo
Button b14
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : chart
Max. Text Size : 10
Events
Touch Press Event
page cardChart
Button b2
Attributes
Scope : local

View File

@@ -623,10 +623,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -897,10 +897,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -686,10 +686,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -441,10 +441,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -675,10 +675,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -946,10 +946,6 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -341,7 +341,7 @@ class LuiPagesGen(object):
elif entityType == "input_text":
entityTypePanel = "text"
value = entity.state
elif entityType in [input_select", "select"]:
elif entityType in ["input_select", "select"]:
entityTypePanel = "input_sel"
value = entity.state
elif entityType == "vacuum":

View File

@@ -1,6 +1,6 @@
/*-----------------------------------------------------------------------
TypeScript v3.5.0.5 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 43 / v3.5.0 / BerryDriver 4 / Tasmota 12.2.0
TypeScript v3.6.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 45 / v3.6.0 / BerryDriver 4 / Tasmota 12.2.0
@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)
@@ -12,7 +12,6 @@ Icons unter: https://htmlpreview.github.io/?https://github.com/jobr99/Generate-H
Achtung Änderung des Sonoff ESP-Temperatursensors
!!! Bitte "SetOption146 1" in der Tasmota-Console ausführen !!!
*******************************************************************************
ReleaseNotes:
Bugfixes und Erweiterungen:
- cardQR (für Gäste WLAN)
@@ -69,7 +68,21 @@ ReleaseNotes:
- 04.11.2022 - v3.5.0.5 Create Auto-Alias for Service Pages
- 07.11.2022 - v3.5.0.5 Create Auto-Alias for Alexa2, Spotify-Premium, Sonos
- 08.11.2022 - v3.5.0.5 Create Auto-Alias for Wheather-Forcast (Screensaver Big-Icon)
- 07.10.2022 - v3.6.0 Upgrade TFT 45
- 09.11.2022 - v3.6.0 Add new Alias-DeviceTyp cie (control colors with XY)
- 16.11.2022 - v3.6.0 Control Relay 1 + 2 via Datapoints
- 17.11.2022 - v3.6.0 Add Datapoint to Control Screensaver-Dimmode
- 17.11.2022 - v3.6.0 Change to Page after bExit
- 18.11.2022 - v3.6.0 Add cardChart by fumanchi (only on DEV)
- 24.11.2022 - v3.6.0 Add Background Color Switch via DP
- 26.11.2022 - v3.6.0 Add cardMedia Colors
- 26.11.2022 - v3.6.0 Add cardThermostat Popup
Todo's for 3.6.0.1
- XX.11.2022 - v3.6.0.1 Add Fan
- XX.11.2022 - v3.6.0.1 Add In_Sel PopUp
- 26.11.2022 - v3.6.0.1 Add cardChart on PROD (implemented but working with v3.6.1 --> next TFT)
*****************************************************************************************************************
* Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! *
*****************************************************************************************************************
@@ -142,7 +155,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.5.0.tft
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.6.0.tft
---------------------------------------------------------------------------------------
*/
let Icons = new IconsSelector();
@@ -150,7 +163,7 @@ let timeoutSlider: any;
let manually_Update = false;
const autoCreateAlias = true; //Für diese Option muss der Haken in setObjects in deiner javascript.X. Instanz gesetzt sein.
const NSPanel_Path = '0_userdata.0.NSPanel.1.';
const NSPanel_Path = '0_userdata.0.NSPanel.EMU.';
const NSPanel_Alarm_Path = '0_userdata.0.NSPanel.'; //Neuer Pfad für gemeinsame Nutzung durch mehrere Panels (bei Nutzung der cardAlarm)
let AliasPath: string = 'alias.0.' + NSPanel_Path.substring(13, NSPanel_Path.length);
@@ -197,6 +210,9 @@ const colorScale10: RGB = { red: 248, green: 105, blue: 107 };
//Screensaver Default Theme Colors
const scbackground: RGB = { red: 0, green: 0, blue: 0};
const scbackgroundInd1: RGB = { red: 255, green: 0, blue: 0};
const scbackgroundInd2: RGB = { red: 121, green: 222, blue: 121};
const scbackgroundInd3: RGB = { red: 255, green: 255, blue: 0};
const sctime: RGB = { red: 255, green: 255, blue: 255};
const sctimeAMPM: RGB = { red: 255, green: 255, blue: 255};
const scdate: RGB = { red: 255, green: 255, blue: 255};
@@ -255,6 +271,22 @@ let Test_Licht1: PageEntities =
]
};
//Only DEV --> Test
let ChartDemo: PageChart =
{
"type": "cardChart",
"heading": "Charts Demo",
"useColor": true,
"subPage": false,
"parent": undefined,
"items": [<PageItem>{
id: 'alias.0.NSPanel_1.cardChart',
yAxis: 'Gas [kWh]',
yAxisTicks: [2,4,6,8,10,12,14],
onColor: Yellow
}]
};
let CardPowerExample: PagePower =
{
"type": "cardPower",
@@ -263,7 +295,7 @@ let CardPowerExample: PagePower =
"subPage": false,
"parent": undefined,
"items": [
<PageItem>{ id: "alias.0.NSPanel_1.Power.PowerCard" },
<PageItem>{ id: 'alias.0.NSPanel_1.Power.PowerCard' },
]
};
@@ -382,18 +414,6 @@ let Subpages_1: PageEntities =
"items": [<PageItem>{ id: "alias.0.NSPanel_1.Guest_Wifi", hidePassword: true }]
};
let ChartDemo: PageChart =
{
"type": "cardChart",
"heading": "ChartsDmo",
"useColor": true,
"subPage": false,
"parent": undefined,
"yAxis": "Gas [kWh]",
"yAxisTicks": [2,4,6,8,10,12,14],
"items": [<PageItem>{ id: "0_userdata.0.NSPanel_1.TDSF.gas", onColor: {red:156, green:56, blue:86}}]
};
let Buero_Seite_2: PageGrid =
{
"type": "cardGrid",
@@ -434,8 +454,8 @@ let Alexa: PageMedia =
'items': [<PageItem>{
id: AliasPath + 'Media.PlayerAlexa',
adapterPlayerInstance: 'alexa2.0.',
mediaDevice: 'G0XXXXXXXXXXXXXX', //Hier eigenes Device (Alexa-Seriennummer) auswählen
speakerList: ['Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche','Echo Spot Buero'], //anpassen an eigene Alexa's
mediaDevice: 'G0XXXXXXXXXXXXXX',
speakerList: ['Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche','Echo Spot Buero'],
autoCreateALias : true
}]
};
@@ -450,7 +470,7 @@ let Sonos: PageMedia =
'items': [<PageItem>{
id: AliasPath + 'Media.PlayerSonos',
adapterPlayerInstance: "sonos.0.",
mediaDevice: "192_168_1_212", //IP der eigenen Sonos anpassen
mediaDevice: "192_168_1_212",
speakerList: ['Terrasse'],
autoCreateALias : true
}]
@@ -466,7 +486,10 @@ let SpotifyPremium: PageMedia =
"items": [<PageItem>{
id: AliasPath + 'Media.PlayerSpotifyPremium',
adapterPlayerInstance: "spotify-premium.0.",
speakerList: ['LENOVO-W11-01','Terrasse','Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche','Echo Spot Buero'], //anpassen
speakerList: ['LENOVO-W11-01','Terrasse','Überall','Gartenhaus','Esszimmer','Heimkino','Echo Dot Küche','Echo Spot Buero'],
colorMediaIcon: colorSpotify,
colorMediaArtist: Yellow,
colorMediaTitle: Yellow,
autoCreateALias : true
}]
};
@@ -480,7 +503,7 @@ let SqueezeboxRPC: PageMedia =
"parent": undefined,
"items": [<PageItem>{
id: "alias.0.Media.LMS.SqueezePlay",
adapterPlayerInstance: "squeezeboxrpc.0.Players.SqueezePlay.", //Player anpassen
adapterPlayerInstance: "squeezeboxrpc.0.Players.SqueezePlay.",
speakerList: ['SqueezePlay']
}]
};
@@ -502,7 +525,18 @@ let Buero_Klimaanlage: PageThermo =
"useColor": true,
"subPage": false,
"parent": undefined,
"items": [<PageItem>{ id: "alias.0.NSPanel_1.TestKlimaanlage", minValue: 50, maxValue: 250}]
"items": [<PageItem>{
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'],
icon: 'fan',
setThermoAlias: ['MODE1','MODE2','MODE3'],
//setThermoDestTemp2: 'ACTUAL2'
}]
};
let Buero_Alarm: PageAlarm =
@@ -616,8 +650,8 @@ let Service: PageEntities =
};
export const config: Config = {
panelRecvTopic: 'mqtt.0.SmartHome.NSPanel_1.tele.RESULT', // anpassen
panelSendTopic: 'mqtt.0.SmartHome.NSPanel_1.cmnd.CustomSend', // anpassen
panelRecvTopic: 'mqtt.0.SmartHome.NSPanel_EMU.tele.RESULT', // anpassen
panelSendTopic: 'mqtt.0.SmartHome.NSPanel_EMU.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} },
thirdScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.UVIndex', ScreensaverEntityIcon: 'solar-power', ScreensaverEntityText: 'UV', ScreensaverEntityUnitText: '', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 9} },
@@ -630,19 +664,19 @@ export const config: Config = {
dimmode: 20,
active: 100, //Standard-Brightness TFT
screenSaverDoubleClick: true,
locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc.
timeFormat: '%H:%M', // currently not used
dateFormat: '%A, %d. %B %Y', // currently not used
weatherEntity: 'alias.0.Wetter', // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können --> oder autoCreateAlias auf true
locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc.
timeFormat: '%H:%M', // currently not used
dateFormat: '%A, %d. %B %Y', // currently not used
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: Black, //New Parameter
temperatureUnit: '°C',
pages: [
//SqueezeboxRPC, //Beispiel-Seite
Buero_Seite_1, //Beispiel-Seite
CardPowerExample, //Beispiel-Seite
//SqueezeboxRPC, //Beispiel-Seite
Sonos, //Beispiel-Seite
SpotifyPremium, //Beispiel-Seite
Alexa, //Beispiel-Seite
@@ -656,7 +690,7 @@ export const config: Config = {
Subpages_1, //Beispiel-Seite
Buero_Themostat, //Beispiel-Seite
Buero_Alarm, //Beispiel-Seite
ChartDemo, //Beispiel-Seite
Service //Auto-Alias Service Page
],
subPages: [
@@ -677,6 +711,82 @@ const request = require('request');
let useMediaEvents: boolean = false;
let timeoutMedia: any;
var bgColorScrSaver: number = 0;
//switch BackgroundColors for Screensaver Indicators
async function Init_Screensaver_Backckground_Color_Switch() {
if (existsState(NSPanel_Path + 'ScreensaverInfo.bgColorIndicator') == false ) {
await createStateAsync(NSPanel_Path + 'ScreensaverInfo.bgColorIndicator', 0, true, { type: 'number' });
}
}
Init_Screensaver_Backckground_Color_Switch();
on({id: [].concat(String(NSPanel_Path) + 'ScreensaverInfo.bgColorIndicator'), change: "ne"}, async function (obj) {
try {
bgColorScrSaver = obj.state.val;
if (bgColorScrSaver < 4) {
HandleScreensaverUpdate();
}
} catch (err) {
console.warn(err.message);
}
});
//go to Page X after bExit
async function Init_bExit_Page_Change() {
if (existsState(NSPanel_Path + 'ScreensaverInfo.bExitPage') == false ) {
await createStateAsync(NSPanel_Path + 'ScreensaverInfo.bExitPage', null, true, { type: 'number' });
}
}
Init_bExit_Page_Change();
//Dimmode über Trigger über BWM
async function Init_Dimmode_Trigger() {
if (existsState(NSPanel_Path + 'ScreensaverInfo.Trigger_Dimmode') == false ) {
await createStateAsync(NSPanel_Path + 'ScreensaverInfo.Trigger_Dimmode', false, true, { type: 'boolean' });
}
}
Init_Dimmode_Trigger();
on({id: [].concat(String(NSPanel_Path) + 'ScreensaverInfo.Trigger_Dimmode'), change: "ne"}, async function (obj) {
try {
if (obj.state.val) {
SendToPanel({ payload: 'dimmode~' + 100 + '~' + config.active + '~' + rgb_dec565(config.defaultBackgroundColor) });
} else {
InitDimmode();
}
} catch (err) {
console.warn(err.message);
}
});
//switch Relays 1 + 2 with DP's
async function Init_Relays() {
if (existsState(NSPanel_Path + 'Relay.1') == false ||
existsState(NSPanel_Path + 'Relay.2') == false) {
await createStateAsync(NSPanel_Path + 'Relay.1', true, { type: 'boolean' });
await createStateAsync(NSPanel_Path + 'Relay.2', true, { type: 'boolean' });
}
}
Init_Relays();
on({id: [].concat(String(NSPanel_Path) + 'Relay.1').concat(String(NSPanel_Path) + 'Relay.2'), change: "ne"}, async function (obj) {
try {
let Button = obj.id.split('.');
require("request")((['http://',get_current_tasmota_ip_address(),'/cm?cmnd=Power',Button[Button.length - 1],' ',(obj.state ? obj.state.val : "")].join(''))).on("error", function (err) {console.error(err.message);});
} catch (err) {
console.warn(err.message);
}
});
on({id: [].concat(config.mrIcon1ScreensaverEntity.ScreensaverEntity).concat(config.mrIcon2ScreensaverEntity.ScreensaverEntity), change: "ne"}, async function (obj) {
if (obj.id.substring(0,4) == 'mqtt') {
let Button = obj.id.split('.');
if (getState(NSPanel_Path + 'Relay.' + Button[Button.length - 1].substring(5,6)).val != obj.state.val) {
await setStateAsync(NSPanel_Path + 'Relay.' + Button[Button.length - 1].substring(5,6), obj.state.val == 'ON' ? true : false);
}
}
});
// Create atomatically Wheather-Alias, if exists accuweather.0. and is not exists Config-Wheather-Alias
async function CreateWeatherAlias () {
@@ -1055,7 +1165,7 @@ function get_locales() {
async function check_updates() {
try {
const desired_display_firmware_version = 43;
const desired_display_firmware_version = 45;
const berry_driver_version = 4;
if (Debug) {
@@ -1504,7 +1614,7 @@ function update_berry_driver_version() {
}
function update_tft_firmware() {
const tft_version: string = 'v3.5.0';
const tft_version: string = 'v3.6.0';
const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`;
try {
request({
@@ -1700,7 +1810,7 @@ function GeneratePage(page: Page): void {
case 'cardPower':
SendToPanel(GeneratePowerPage(<PagePower>page));
break;
case 'cardChart':
case 'cardChart':
SendToPanel(GenerateChartPage(<PageChart>page));
break;
}
@@ -1711,7 +1821,7 @@ function GeneratePage(page: Page): void {
function HandleHardwareButton(method: string): void {
try {
let page: (PageThermo | PageMedia | PageAlarm | PageEntities | PageGrid | PageQR | PagePower);
let page: (PageThermo | PageMedia | PageAlarm | PageEntities | PageGrid | PageQR | PagePower | PageChart);
if (config.button1Page !== null && method == 'button1') {
page = config.button1Page;
pageId = -1;
@@ -1796,6 +1906,12 @@ function GeneratePageElements(page: Page): string {
case 'cardQR':
maxItems = 1;
break;
case 'cardPower':
maxItems = 1;
break;
case 'cardChart':
maxItems = 1;
break;
case 'cardEntities':
if (getState(NSPanel_Path + 'NSPanel_Version').val == 'eu') {
maxItems = 4;
@@ -1953,6 +2069,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
case 'cie':
case 'rgbSingle':
type = 'light';
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('lightbulb');
@@ -2539,26 +2656,37 @@ function GenerateThermoPage(page: PageThermo): Payload[] {
}
}
let destTemp2 = ''
if (page.items[0].setThermoDestTemp2 != undefined) {
destTemp2 = getState(id + '.' + page.items[0].setThermoDestTemp2).val;
}
let thermoPopup = 0
if (page.items[0].popupThermoMode1 != undefined) {
thermoPopup = 1;
}
let icon_res = bt[0] + bt[1] + bt[2] + bt[3] + bt[4] + bt[5] + bt[6] + bt[7];
out_msgs.push({
payload: 'entityUpd~'
+ name + '~' // Heading
+ GetNavigationString(pageId) + '~' // Page Navigation
+ id + '~' // internalNameEntity
+ currentTemp + config.temperatureUnit + '~' // Ist-Temperatur (String)
+ destTemp + '~' // Soll-Temperatur (numerisch ohne Komma)
+ statusStr + '~' // Mode
+ minTemp + '~' // Thermostat Min-Temperatur
+ maxTemp + '~' // Thermostat Max-Temperatur
+ stepTemp + '~' // Schritte für Soll (5°C)
+ icon_res // Icons Status
+ findLocale('thermostat', 'Currently') + '~' // Bezeichner vor Aktueller Raumtemperatur
+ findLocale('thermostat', 'State') + '~' // Bezeichner vor
+ '~' // Bezeichner vor HVAC -- Gibt es nicht mehr
+ config.temperatureUnit + '~' // Bezeichner hinter Solltemp
+ '' + '~' // iconTemperature dstTempTwoTempMode
+ '' // dstTempTwoTempMode
+ name + '~' // Heading
+ GetNavigationString(pageId) + '~' // Page Navigation
+ id + '~' // internalNameEntity
+ currentTemp + config.temperatureUnit + '~' // Ist-Temperatur (String)
+ destTemp + '~' // Soll-Temperatur (numerisch ohne Komma)
+ statusStr + '~' // Mode
+ minTemp + '~' // Thermostat Min-Temperatur
+ maxTemp + '~' // Thermostat Max-Temperatur
+ stepTemp + '~' // Schritte für Soll (5°C)
+ icon_res + '~' // Icons Status
+ findLocale('thermostat', 'Currently') + '~' // Bezeichner vor Aktueller Raumtemperatur
+ findLocale('thermostat', 'State') + '~' // Bezeichner vor State
+ config.temperatureUnit + '~' // iconTemperature dstTempTwoTempMode
+ destTemp2 + '~' // dstTempTwoTempMode --> Wenn Wert, dann 2 Temp
+ thermoPopup // PopUp
});
}
@@ -2840,14 +2968,21 @@ function GenerateMediaPage(page: PageMedia): Payload[] {
speakerList = speakerList.substring(0, speakerList.length - 1);
//--------------------------------------------------------------------------------------------------------------
let colMediaIcon = (page.items[0].colorMediaIcon != undefined) ? page.items[0].colorMediaIcon : White;
let colMediaTitle = (page.items[0].colorMediaTitle != undefined) ? page.items[0].colorMediaTitle : White;
let colMediaArtist = (page.items[0].colorMediaArtist != undefined) ? page.items[0].colorMediaArtist : White;
out_msgs.push({
payload: 'entityUpd~' + //entityUpd
name + '~' + //heading
GetNavigationString(pageId) + '~' + //navigation
id + '~' + //internalNameEntiy
media_icon + '~' + //icon
rgb_dec565(colMediaIcon) + '~' + //iconColor
title + '~' + //title
rgb_dec565(colMediaTitle) + '~' + //titleColor
author + '~' + //author
rgb_dec565(colMediaArtist) + '~' + //authorColor
volume + '~' + //volume
iconplaypause + '~' + //playpauseicon
currentSpeaker + '~' + //currentSpeaker
@@ -3124,21 +3259,21 @@ function GenerateChartPage(page: PageChart): Payload[] {
let out_msgs: Array<Payload> = [];
out_msgs.push({ payload: 'pageType~cardChart' });
let heading = page.heading !== undefined ? page.heading : "chart..."
let heading = page.heading !== undefined ? page.heading : "Chart..."
let txt = getState(id).val
let txt = getState(id + '.ACTUAL').val
//entityUpd~Chart Demo~1|1~6666~Gas [kWh]~20:40:60:80:100~10~7^2:00~7~6^4:00~6~7^6:00~0~7^8:00~5~1^10:00~1~10^12:00~5~6^14:00~8
out_msgs.push({
payload: 'entityUpd~' + //entityUpd
heading + '~' + //heading
GetNavigationString(pageId) + '~' + //navigation
rgb_dec565(page.items[0].onColor) + '~' + //color
page.yAxis + '~' +
page.yAxisTicks.join(':') + '~' +
txt
payload: 'entityUpd~' + //entityUpd
heading + '~' + //heading
GetNavigationString(pageId) + '~' + //navigation
rgb_dec565(page.items[0].onColor) + '~' + //color
page.items[0].yAxis + '~' +
page.items[0].yAxisTicks.join(':') + '~' +
txt
});
//entityUpd,<heading>,<navigation>,<color>,<yAxisLabel>,<yAxisTic>:[<yAxisTic>]*[~<Value[:xAxisLabel]?>]*
return out_msgs
} catch (err) {
@@ -3236,10 +3371,15 @@ function HandleButtonEvent(words): void {
break;
case 'bExit':
if (config.screenSaverDoubleClick && words[2] == 'screensaver') {
if (words[4] == 2) {
if (words[4] >= 2) {
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyHeading', '');
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyText', '');
GeneratePage(config.pages[pageId]);
if (existsObject(NSPanel_Path + 'ScreensaverInfo.bExitPage') && getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val != null) {
GeneratePage(config.pages[getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val]);
} else {
console.log('3')
GeneratePage(config.pages[pageId]);
}
}
} else {
if (Debug) {
@@ -3247,7 +3387,11 @@ function HandleButtonEvent(words): void {
}
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyHeading', '');
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyText', '');
GeneratePage(activePage);
if (existsObject(NSPanel_Path + 'ScreensaverInfo.bExitPage') && getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val != null) {
GeneratePage(config.pages[getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val]);
} else {
GeneratePage(config.pages[activePage]);
}
}
break;
case 'notifyAction':
@@ -3574,6 +3718,22 @@ function HandleButtonEvent(words): void {
}
break;
case 'mode-modus1':
let pageItemT1 = findPageItem(id);
console.log(id + '.' + pageItemT1.setThermoAlias[0] + ' - ' + 'mode-modus1' + ' - ' + words[4]);
setIfExists(id + '.' + pageItemT1.setThermoAlias[0], pageItemT1.popupThermoMode1[parseInt(words[4])]);
break;
case 'mode-modus2':
let pageItemT2 = findPageItem(id);
console.log(id + '.' + pageItemT2.setThermoAlias[1] + ' - ' + 'mode-modus2' + ' - ' + words[4]);
setIfExists(id + '.' + pageItemT2.setThermoAlias[1], pageItemT2.popupThermoMode2[parseInt(words[4])]);
break;
case 'mode-modus3':
let pageItemT3 = findPageItem(id);
console.log(id + '.' + pageItemT3.setThermoAlias[2] + ' - ' + 'mode-modus3' + ' - ' + words[4])
setIfExists(id + '.' + pageItemT3.setThermoAlias[2], pageItemT3.popupThermoMode3[parseInt(words[4])]);
break;
case 'number-set':
setIfExists(id + '.SET', parseInt(words[4])) ? true : setIfExists(id + '.ACTUAL', parseInt(words[4]));
break;
@@ -3663,11 +3823,12 @@ function GetNavigationString(pageId: number): string {
// left navigation arrow | right navigation arrow
// X|X
// 0 = no arrow
// 1 = right or left navigation arrow
// 2 = up navigation 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 '1|0';
return '2|2';
switch (pageId) {
case 0:
@@ -4117,6 +4278,52 @@ function GenerateDetailPage(type: string, pageItem: PageItem): Payload[] {
+ tilt_pos //{tilt_pos}")
});
}
if (type == 'popupThermo') {
console.log('popupThermo');
let vIcon = (pageItem.icon != undefined) ? pageItem.icon : 'fan';
let mode1 = (pageItem.popupThermoMode1 != undefined) ? pageItem.popupThermoMode1.join('?') : '';
let mode2 = (pageItem.popupThermoMode2 != undefined) ? pageItem.popupThermoMode2.join('?') : '';
let mode3 = (pageItem.popupThermoMode3 != undefined) ? pageItem.popupThermoMode3.join('?') : '';
let payloadParameters1 = '~~~~'
if (pageItem.popupThermoMode1 != undefined) {
RegisterDetailEntityWatcher(pageItem.id + "." + pageItem.setThermoAlias[0], pageItem, type);
payloadParameters1 = pageItem.popUpThermoName[0] + '~' //{heading}~ Mode 1
+ 'modus1' + '~' //{id}~ Mode 1
+ getState(pageItem.id + "." + pageItem.setThermoAlias[0]).val + '~' //{ACTUAL}~ Mode 1
+ mode1 + '~' //{possible values} Mode 1 (1-n)
}
let payloadParameters2 = '~~~~'
if (pageItem.popupThermoMode2 != undefined) {
RegisterDetailEntityWatcher(pageItem.id + "." + pageItem.setThermoAlias[1], pageItem, type);
payloadParameters2 = pageItem.popUpThermoName[1] + '~' //{heading}~ Mode 2
+ 'modus2' + '~' //{id}~ Mode 2
+ getState(pageItem.id + "." + pageItem.setThermoAlias[1]).val + '~' //{ACTUAL}~ Mode 2
+ mode2 + '~' //{possible values}
}
let payloadParameters3 = '~~~~'
if (pageItem.popupThermoMode3 != undefined) {
RegisterDetailEntityWatcher(pageItem.id + "." + pageItem.setThermoAlias[2], pageItem, type);
payloadParameters3 = pageItem.popUpThermoName[2] + '~' //{heading}~ Mode 3
+ 'modus3' + '~' //{id}~ Mode 3
+ getState(pageItem.id + "." + pageItem.setThermoAlias[2]).val + '~' //{ACTUAL}~ Mode 3
+ mode3 //{possible values} Mode 3 (1-n)
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' //entityUpdateDetail
+ id + '~' //{entity_id}
+ Icons.GetIcon(vIcon) + '~' //{icon_id}~
+ 11487 + '~' //{icon_color}~
+ payloadParameters1
+ payloadParameters2
+ payloadParameters3
});
}
}
return out_msgs;
@@ -4582,8 +4789,20 @@ function HandleScreensaverColors(): void {
}
}
let scrSvrBGCol: any;
if (bgColorScrSaver == 0) {
scrSvrBGCol = rgb_dec565(scbackground);
} else if (bgColorScrSaver == 1) {
scrSvrBGCol = rgb_dec565(scbackgroundInd1);
} else if (bgColorScrSaver == 2) {
scrSvrBGCol = rgb_dec565(scbackgroundInd2);
} else if (bgColorScrSaver == 3) {
scrSvrBGCol = rgb_dec565(scbackgroundInd3);
}
let payloadString = 'color' + '~' +
rgb_dec565(scbackground) + '~' + //background
scrSvrBGCol + '~' + //background
rgb_dec565(sctime) + '~' + //time
rgb_dec565(sctimeAMPM) + '~' + //timeAMPM~
rgb_dec565(scdate) + '~' + //date~
@@ -4798,7 +5017,7 @@ on({ id: config.panelRecvTopic.substring(0, config.panelRecvTopic.length - 'RESU
await setStateAsync(NSPanel_Path + 'Sensor.Time', <iobJS.State>{ val: Tasmota_Sensor.Time, ack: true });
await setStateAsync(NSPanel_Path + 'Sensor.TempUnit', <iobJS.State>{ val: '°' + Tasmota_Sensor.TempUnit, ack: true });
await setStateAsync(NSPanel_Path + 'Sensor.ANALOG.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ANALOG.Temperature1), ack: true });
//await setStateAsync(NSPanel_Path + 'Sensor.ANALOG.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ANALOG.Temperature1), ack: true });
await setStateAsync(NSPanel_Path + 'Sensor.ESP32.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ESP32.Temperature), ack: true });
if (autoCreateAlias) {
@@ -4965,7 +5184,7 @@ type Page = {
items: PageItem[],
useColor: boolean,
subPage: boolean,
parent: Page,
parent: Page
};
interface PageEntities extends Page {
@@ -5003,6 +5222,11 @@ interface PagePower extends Page {
items: PageItem[],
}
interface PageChart extends Page {
type: 'cardChart',
items: PageItem[],
}
type PageItem = {
id: string,
icon: (string | undefined),
@@ -5029,6 +5253,17 @@ type PageItem = {
speakerList: (string[] | undefined),
hidePassword: (boolean | undefined),
autoCreateALias: (boolean | undefined)
colorMediaIcon: (RGB | undefined),
colorMediaArtist: (RGB | undefined),
colorMediaTitle: (RGB | undefined),
popupThermoMode1: (string[] | undefined),
popupThermoMode2: (string[] | undefined),
popupThermoMode3: (string[] | undefined),
popUpThermoName: (string[] | undefined),
setThermoAlias: (string[] | undefined),
setThermoDestTemp2: (string | undefined),
yAxis: (string | undefined),
yAxisTicks: (number[] | undefined),
}
type DimMode = {

View File

@@ -1,6 +1,6 @@
/*-----------------------------------------------------------------------
TypeScript v3.5.0.5 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 43 / v3.5.0 / BerryDriver 4 / Tasmota 12.2.0
TypeScript v3.6.0 zur Steuerung des SONOFF NSPanel mit dem ioBroker by @Armilar/@Sternmiere/@Britzelpuf
- abgestimmt auf TFT 45 / v3.6.0 / BerryDriver 4 / Tasmota 12.2.0
@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)
@@ -68,7 +68,21 @@ ReleaseNotes:
- 04.11.2022 - v3.5.0.5 Create Auto-Alias for Service Pages
- 07.11.2022 - v3.5.0.5 Create Auto-Alias for Alexa2, Spotify-Premium, Sonos
- 08.11.2022 - v3.5.0.5 Create Auto-Alias for Wheather-Forcast (Screensaver Big-Icon)
- 07.10.2022 - v3.6.0 Upgrade TFT 45
- 09.11.2022 - v3.6.0 Add new Alias-DeviceTyp cie (control colors with XY)
- 16.11.2022 - v3.6.0 Control Relay 1 + 2 via Datapoints
- 17.11.2022 - v3.6.0 Add Datapoint to Control Screensaver-Dimmode
- 17.11.2022 - v3.6.0 Change to Page after bExit
- 18.11.2022 - v3.6.0 Add cardChart by fumanchi (only on DEV)
- 24.11.2022 - v3.6.0 Add Background Color Switch via DP
- 26.11.2022 - v3.6.0 Add cardMedia Colors
- 26.11.2022 - v3.6.0 Add cardThermostat Popup
Todo's for 3.6.0.1
- XX.11.2022 - v3.6.0.1 Add Fan
- XX.11.2022 - v3.6.0.1 Add In_Sel PopUp
- 26.11.2022 - v3.6.0.1 Add cardChart on PROD (implemented but working with v3.6.1 --> next TFT)
*****************************************************************************************************************
* Falls Aliase durch das Skript erstellt werden sollen, muss in der JavaScript Instanz "setObect" gesetzt sein! *
*****************************************************************************************************************
@@ -141,7 +155,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.5.0.tft
TFT EU STABLE Version : FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-v3.6.0.tft
---------------------------------------------------------------------------------------
*/
let Icons = new IconsSelector();
@@ -196,6 +210,9 @@ const colorScale10: RGB = { red: 248, green: 105, blue: 107 };
//Screensaver Default Theme Colors
const scbackground: RGB = { red: 0, green: 0, blue: 0};
const scbackgroundInd1: RGB = { red: 255, green: 0, blue: 0};
const scbackgroundInd2: RGB = { red: 121, green: 222, blue: 121};
const scbackgroundInd3: RGB = { red: 255, green: 255, blue: 0};
const sctime: RGB = { red: 255, green: 255, blue: 255};
const sctimeAMPM: RGB = { red: 255, green: 255, blue: 255};
const scdate: RGB = { red: 255, green: 255, blue: 255};
@@ -236,11 +253,79 @@ const swWindy: RGB = { red: 150, green: 150, blue: 150};
let vwIconColor = [];
//-- Anfang der Variablen für Seitengestaltung -- Aliase erforderlich ----------------
//-- Anfang der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich ----------------
//-- ENDE der Beispiele für Seitengestaltung -- Selbstdefinierte Aliase erforderlich ------------------
//-- ENDE der Variablen für Seitengestaltung -- Aliase erforderlich ------------------
/********************************************************************************************************** */
//Service Pages mit Auto-Alias (Nachfolgende Seiten werden mit Alias automatisch angelegt)
/********************************************************************************************************** */
let Service: PageEntities =
{
"type": "cardEntities",
"heading": "NSPanel Service",
"useColor": true,
"subPage": false,
"parent": undefined,
"items": [
<PageItem>{ id: AliasPath + 'autoUpdate', name: "Auto-Updates" ,icon: "update", offColor: MSRed, onColor: MSGreen},
<PageItem>{ navigate: true, id: "NSPanel_Infos", icon: "information-outline", onColor: White, name: "NSPanel Infos"},
<PageItem>{ navigate: true, id: "NSPanel_Firmware_Info", icon: "update", onColor: White, name: "Firmware Infos"},
<PageItem>{ 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": [
<PageItem>{ id: AliasPath + 'Tasmota.Hardware', name: 'Hardware', icon: 'memory', offColor: MSYellow, onColor: MSYellow, useColor: true},
<PageItem>{ id: AliasPath + 'Sensor.ESP32.Temperature', name: "ESP Temperatur", icon: "thermometer", unit: "°C", offColor: MSYellow, onColor: MSYellow, useColor: true},
<PageItem>{ id: AliasPath + 'Tasmota.Uptime', name: "Uptime", icon: "timeline-clock-outline", offColor: MSYellow, onColor: MSYellow, useColor: true},
<PageItem>{ id: AliasPath + 'Tasmota.Wifi.RSSI', name: "Wifi-Signal", icon: "signal-distance-variant", unit: "dBm", offColor: MSYellow, onColor: MSYellow, useColor: true}
]
};
//Subpage 2 von Subpages_2
let NSPanel_Einstellungen: PageEntities =
{
'type': 'cardEntities',
'heading': 'Screensaver',
'useColor': true,
'subPage': true,
'parent': Service,
'items': [
<PageItem>{ id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 5, maxValue: 10},
<PageItem>{ id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 4},
<PageItem>{ id: AliasPath + 'Dimmode.hourDay', name: 'Stunde Tag', icon: 'sun-clock', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 23},
<PageItem>{ id: AliasPath + 'Dimmode.hourNight', name: 'Stunde Nacht', icon: 'sun-clock-outline', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 23}
]
};
//Subpage 3 von Subpages_2
let NSPanel_Firmware_Info: PageEntities =
{
'type': 'cardEntities',
'heading': 'Firmware-Updates',
'useColor': true,
'subPage': true,
'parent': Service,
'items': [
<PageItem>{ id: AliasPath + 'Tasmota.Version', name: 'Tasmota Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true},
<PageItem>{ id: AliasPath + 'Display.TFTVersion', name: 'TFT-Firmware', offColor: MSYellow, onColor: MSYellow, useColor: true},
<PageItem>{ id: AliasPath + 'Display.BerryDriver', name: 'Berry-Treiber', offColor: MSYellow, onColor: MSYellow, useColor: true},
<PageItem>{ id: AliasPath + 'Display.Model', name: 'NSPanel Version', offColor: MSYellow, onColor: MSYellow, useColor: true}
]
};
export const config: Config = {
panelRecvTopic: 'mqtt.0.SmartHome.NSPanel_1.tele.RESULT', // anpassen
@@ -251,28 +336,50 @@ export const config: Config = {
fourthScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.RelativeHumidity', ScreensaverEntityIcon: 'water-percent', ScreensaverEntityText: 'Luft', ScreensaverEntityUnitText: '%', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 100, 'val_best': 65} },
alternativeScreensaverLayout: false,
autoWeatherColorScreensaverLayout: true,
mrIcon1ScreensaverEntity: { ScreensaverEntity: null, ScreensaverEntityIcon: 'light-switch', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: Off },
mrIcon2ScreensaverEntity: { ScreensaverEntity: null, ScreensaverEntityIcon: 'lightbulb', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: Off },
mrIcon1ScreensaverEntity: { ScreensaverEntity: 'mqtt.0.SmartHome.NSPanel_1.stat.POWER1', ScreensaverEntityIcon: 'light-switch', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: HMIOff },
mrIcon2ScreensaverEntity: { ScreensaverEntity: 'mqtt.0.SmartHome.NSPanel_1.stat.POWER2', ScreensaverEntityIcon: 'lightbulb', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: HMIOff },
timeoutScreensaver: 20,
dimmode: 20,
active: 100, //Standard-Brightness TFT
screenSaverDoubleClick: true,
locale: 'de-DE', // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc.
timeFormat: '%H:%M', // currently not used
dateFormat: '%A, %d. %B %Y', // currently not used
timeFormat: '%H:%M', // currently not used
dateFormat: '%A, %d. %B %Y', // currently not used
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: Black, //New Parameter
defaultBackgroundColor: Black, //New Parameter
temperatureUnit: '°C',
pages: [
Buero_Seite_1, //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
],
button1Page: null, //Beispiel-Seite auf Button 1, 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,
};
@@ -282,6 +389,82 @@ const request = require('request');
let useMediaEvents: boolean = false;
let timeoutMedia: any;
var bgColorScrSaver: number = 0;
//switch BackgroundColors for Screensaver Indicators
async function Init_Screensaver_Backckground_Color_Switch() {
if (existsState(NSPanel_Path + 'ScreensaverInfo.bgColorIndicator') == false ) {
await createStateAsync(NSPanel_Path + 'ScreensaverInfo.bgColorIndicator', 0, true, { type: 'number' });
}
}
Init_Screensaver_Backckground_Color_Switch();
on({id: [].concat(String(NSPanel_Path) + 'ScreensaverInfo.bgColorIndicator'), change: "ne"}, async function (obj) {
try {
bgColorScrSaver = obj.state.val;
if (bgColorScrSaver < 4) {
HandleScreensaverUpdate();
}
} catch (err) {
console.warn(err.message);
}
});
//go to Page X after bExit
async function Init_bExit_Page_Change() {
if (existsState(NSPanel_Path + 'ScreensaverInfo.bExitPage') == false ) {
await createStateAsync(NSPanel_Path + 'ScreensaverInfo.bExitPage', null, true, { type: 'number' });
}
}
Init_bExit_Page_Change();
//Dimmode über Trigger über BWM
async function Init_Dimmode_Trigger() {
if (existsState(NSPanel_Path + 'ScreensaverInfo.Trigger_Dimmode') == false ) {
await createStateAsync(NSPanel_Path + 'ScreensaverInfo.Trigger_Dimmode', false, true, { type: 'boolean' });
}
}
Init_Dimmode_Trigger();
on({id: [].concat(String(NSPanel_Path) + 'ScreensaverInfo.Trigger_Dimmode'), change: "ne"}, async function (obj) {
try {
if (obj.state.val) {
SendToPanel({ payload: 'dimmode~' + 100 + '~' + config.active + '~' + rgb_dec565(config.defaultBackgroundColor) });
} else {
InitDimmode();
}
} catch (err) {
console.warn(err.message);
}
});
//switch Relays 1 + 2 with DP's
async function Init_Relays() {
if (existsState(NSPanel_Path + 'Relay.1') == false ||
existsState(NSPanel_Path + 'Relay.2') == false) {
await createStateAsync(NSPanel_Path + 'Relay.1', true, { type: 'boolean' });
await createStateAsync(NSPanel_Path + 'Relay.2', true, { type: 'boolean' });
}
}
Init_Relays();
on({id: [].concat(String(NSPanel_Path) + 'Relay.1').concat(String(NSPanel_Path) + 'Relay.2'), change: "ne"}, async function (obj) {
try {
let Button = obj.id.split('.');
require("request")((['http://',get_current_tasmota_ip_address(),'/cm?cmnd=Power',Button[Button.length - 1],' ',(obj.state ? obj.state.val : "")].join(''))).on("error", function (err) {console.error(err.message);});
} catch (err) {
console.warn(err.message);
}
});
on({id: [].concat(config.mrIcon1ScreensaverEntity.ScreensaverEntity).concat(config.mrIcon2ScreensaverEntity.ScreensaverEntity), change: "ne"}, async function (obj) {
if (obj.id.substring(0,4) == 'mqtt') {
let Button = obj.id.split('.');
if (getState(NSPanel_Path + 'Relay.' + Button[Button.length - 1].substring(5,6)).val != obj.state.val) {
await setStateAsync(NSPanel_Path + 'Relay.' + Button[Button.length - 1].substring(5,6), obj.state.val == 'ON' ? true : false);
}
}
});
// Create atomatically Wheather-Alias, if exists accuweather.0. and is not exists Config-Wheather-Alias
async function CreateWeatherAlias () {
@@ -660,7 +843,7 @@ function get_locales() {
async function check_updates() {
try {
const desired_display_firmware_version = 43;
const desired_display_firmware_version = 45;
const berry_driver_version = 4;
if (Debug) {
@@ -1109,7 +1292,7 @@ function update_berry_driver_version() {
}
function update_tft_firmware() {
const tft_version: string = 'v3.5.0';
const tft_version: string = 'v3.6.0';
const desired_display_firmware_url = `http://nspanel.pky.eu/lovelace-ui/github/nspanel-${tft_version}.tft`;
try {
request({
@@ -1305,6 +1488,9 @@ function GeneratePage(page: Page): void {
case 'cardPower':
SendToPanel(GeneratePowerPage(<PagePower>page));
break;
case 'cardChart':
SendToPanel(GenerateChartPage(<PageChart>page));
break;
}
} catch (err) {
console.warn('function GeneratePage: ' + err.message);
@@ -1313,7 +1499,7 @@ function GeneratePage(page: Page): void {
function HandleHardwareButton(method: string): void {
try {
let page: (PageThermo | PageMedia | PageAlarm | PageEntities | PageGrid | PageQR | PagePower);
let page: (PageThermo | PageMedia | PageAlarm | PageEntities | PageGrid | PageQR | PagePower | PageChart);
if (config.button1Page !== null && method == 'button1') {
page = config.button1Page;
pageId = -1;
@@ -1398,6 +1584,12 @@ function GeneratePageElements(page: Page): string {
case 'cardQR':
maxItems = 1;
break;
case 'cardPower':
maxItems = 1;
break;
case 'cardChart':
maxItems = 1;
break;
case 'cardEntities':
if (getState(NSPanel_Path + 'NSPanel_Version').val == 'eu') {
maxItems = 4;
@@ -1555,6 +1747,7 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
return '~' + type + '~' + pageItem.id + '~' + iconId + '~' + iconColor + '~' + name + '~' + optVal;
case 'cie':
case 'rgbSingle':
type = 'light';
iconId = pageItem.icon !== undefined ? Icons.GetIcon(pageItem.icon) : Icons.GetIcon('lightbulb');
@@ -2141,26 +2334,37 @@ function GenerateThermoPage(page: PageThermo): Payload[] {
}
}
let destTemp2 = ''
if (page.items[0].setThermoDestTemp2 != undefined) {
destTemp2 = getState(id + '.' + page.items[0].setThermoDestTemp2).val;
}
let thermoPopup = 0
if (page.items[0].popupThermoMode1 != undefined) {
thermoPopup = 1;
}
let icon_res = bt[0] + bt[1] + bt[2] + bt[3] + bt[4] + bt[5] + bt[6] + bt[7];
out_msgs.push({
payload: 'entityUpd~'
+ name + '~' // Heading
+ GetNavigationString(pageId) + '~' // Page Navigation
+ id + '~' // internalNameEntity
+ currentTemp + config.temperatureUnit + '~' // Ist-Temperatur (String)
+ destTemp + '~' // Soll-Temperatur (numerisch ohne Komma)
+ statusStr + '~' // Mode
+ minTemp + '~' // Thermostat Min-Temperatur
+ maxTemp + '~' // Thermostat Max-Temperatur
+ stepTemp + '~' // Schritte für Soll (5°C)
+ icon_res // Icons Status
+ findLocale('thermostat', 'Currently') + '~' // Bezeichner vor Aktueller Raumtemperatur
+ findLocale('thermostat', 'State') + '~' // Bezeichner vor
+ '~' // Bezeichner vor HVAC -- Gibt es nicht mehr
+ config.temperatureUnit + '~' // Bezeichner hinter Solltemp
+ '' + '~' // iconTemperature dstTempTwoTempMode
+ '' // dstTempTwoTempMode
+ name + '~' // Heading
+ GetNavigationString(pageId) + '~' // Page Navigation
+ id + '~' // internalNameEntity
+ currentTemp + config.temperatureUnit + '~' // Ist-Temperatur (String)
+ destTemp + '~' // Soll-Temperatur (numerisch ohne Komma)
+ statusStr + '~' // Mode
+ minTemp + '~' // Thermostat Min-Temperatur
+ maxTemp + '~' // Thermostat Max-Temperatur
+ stepTemp + '~' // Schritte für Soll (5°C)
+ icon_res + '~' // Icons Status
+ findLocale('thermostat', 'Currently') + '~' // Bezeichner vor Aktueller Raumtemperatur
+ findLocale('thermostat', 'State') + '~' // Bezeichner vor State
+ config.temperatureUnit + '~' // iconTemperature dstTempTwoTempMode
+ destTemp2 + '~' // dstTempTwoTempMode --> Wenn Wert, dann 2 Temp
+ thermoPopup // PopUp
});
}
@@ -2442,14 +2646,21 @@ function GenerateMediaPage(page: PageMedia): Payload[] {
speakerList = speakerList.substring(0, speakerList.length - 1);
//--------------------------------------------------------------------------------------------------------------
let colMediaIcon = (page.items[0].colorMediaIcon != undefined) ? page.items[0].colorMediaIcon : White;
let colMediaTitle = (page.items[0].colorMediaTitle != undefined) ? page.items[0].colorMediaTitle : White;
let colMediaArtist = (page.items[0].colorMediaArtist != undefined) ? page.items[0].colorMediaArtist : White;
out_msgs.push({
payload: 'entityUpd~' + //entityUpd
name + '~' + //heading
GetNavigationString(pageId) + '~' + //navigation
id + '~' + //internalNameEntiy
media_icon + '~' + //icon
rgb_dec565(colMediaIcon) + '~' + //iconColor
title + '~' + //title
rgb_dec565(colMediaTitle) + '~' + //titleColor
author + '~' + //author
rgb_dec565(colMediaArtist) + '~' + //authorColor
volume + '~' + //volume
iconplaypause + '~' + //playpauseicon
currentSpeaker + '~' + //currentSpeaker
@@ -2718,6 +2929,36 @@ function GeneratePowerPage(page: PagePower): Payload[] {
}
}
function GenerateChartPage(page: PageChart): Payload[] {
try {
activePage = page;
let id = page.items[0].id
let out_msgs: Array<Payload> = [];
out_msgs.push({ payload: 'pageType~cardChart' });
let heading = page.heading !== undefined ? page.heading : "Chart..."
let txt = getState(id + '.ACTUAL').val
//entityUpd~Chart Demo~1|1~6666~Gas [kWh]~20:40:60:80:100~10~7^2:00~7~6^4:00~6~7^6:00~0~7^8:00~5~1^10:00~1~10^12:00~5~6^14:00~8
out_msgs.push({
payload: 'entityUpd~' + //entityUpd
heading + '~' + //heading
GetNavigationString(pageId) + '~' + //navigation
rgb_dec565(page.items[0].onColor) + '~' + //color
page.items[0].yAxis + '~' +
page.items[0].yAxisTicks.join(':') + '~' +
txt
});
return out_msgs
} catch (err) {
console.warn('function GenerateChartPage: ' + err.message);
}
}
function setIfExists(id: string, value: any, type: string | null = null): boolean {
try {
if (type === null) {
@@ -2808,10 +3049,15 @@ function HandleButtonEvent(words): void {
break;
case 'bExit':
if (config.screenSaverDoubleClick && words[2] == 'screensaver') {
if (words[4] == 2) {
if (words[4] >= 2) {
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyHeading', '');
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyText', '');
GeneratePage(config.pages[pageId]);
if (existsObject(NSPanel_Path + 'ScreensaverInfo.bExitPage') && getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val != null) {
GeneratePage(config.pages[getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val]);
} else {
console.log('3')
GeneratePage(config.pages[pageId]);
}
}
} else {
if (Debug) {
@@ -2819,7 +3065,11 @@ function HandleButtonEvent(words): void {
}
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyHeading', '');
setIfExists(NSPanel_Path + 'ScreensaverInfo.popupNotifyText', '');
GeneratePage(activePage);
if (existsObject(NSPanel_Path + 'ScreensaverInfo.bExitPage') && getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val != null) {
GeneratePage(config.pages[getState(NSPanel_Path + 'ScreensaverInfo.bExitPage').val]);
} else {
GeneratePage(config.pages[activePage]);
}
}
break;
case 'notifyAction':
@@ -3146,6 +3396,22 @@ function HandleButtonEvent(words): void {
}
break;
case 'mode-modus1':
let pageItemT1 = findPageItem(id);
console.log(id + '.' + pageItemT1.setThermoAlias[0] + ' - ' + 'mode-modus1' + ' - ' + words[4]);
setIfExists(id + '.' + pageItemT1.setThermoAlias[0], pageItemT1.popupThermoMode1[parseInt(words[4])]);
break;
case 'mode-modus2':
let pageItemT2 = findPageItem(id);
console.log(id + '.' + pageItemT2.setThermoAlias[1] + ' - ' + 'mode-modus2' + ' - ' + words[4]);
setIfExists(id + '.' + pageItemT2.setThermoAlias[1], pageItemT2.popupThermoMode2[parseInt(words[4])]);
break;
case 'mode-modus3':
let pageItemT3 = findPageItem(id);
console.log(id + '.' + pageItemT3.setThermoAlias[2] + ' - ' + 'mode-modus3' + ' - ' + words[4])
setIfExists(id + '.' + pageItemT3.setThermoAlias[2], pageItemT3.popupThermoMode3[parseInt(words[4])]);
break;
case 'number-set':
setIfExists(id + '.SET', parseInt(words[4])) ? true : setIfExists(id + '.ACTUAL', parseInt(words[4]));
break;
@@ -3235,11 +3501,12 @@ function GetNavigationString(pageId: number): string {
// left navigation arrow | right navigation arrow
// X|X
// 0 = no arrow
// 1 = right or left navigation arrow
// 2 = up navigation 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 '1|0';
return '2|2';
switch (pageId) {
case 0:
@@ -3689,6 +3956,52 @@ function GenerateDetailPage(type: string, pageItem: PageItem): Payload[] {
+ tilt_pos //{tilt_pos}")
});
}
if (type == 'popupThermo') {
console.log('popupThermo');
let vIcon = (pageItem.icon != undefined) ? pageItem.icon : 'fan';
let mode1 = (pageItem.popupThermoMode1 != undefined) ? pageItem.popupThermoMode1.join('?') : '';
let mode2 = (pageItem.popupThermoMode2 != undefined) ? pageItem.popupThermoMode2.join('?') : '';
let mode3 = (pageItem.popupThermoMode3 != undefined) ? pageItem.popupThermoMode3.join('?') : '';
let payloadParameters1 = '~~~~'
if (pageItem.popupThermoMode1 != undefined) {
RegisterDetailEntityWatcher(pageItem.id + "." + pageItem.setThermoAlias[0], pageItem, type);
payloadParameters1 = pageItem.popUpThermoName[0] + '~' //{heading}~ Mode 1
+ 'modus1' + '~' //{id}~ Mode 1
+ getState(pageItem.id + "." + pageItem.setThermoAlias[0]).val + '~' //{ACTUAL}~ Mode 1
+ mode1 + '~' //{possible values} Mode 1 (1-n)
}
let payloadParameters2 = '~~~~'
if (pageItem.popupThermoMode2 != undefined) {
RegisterDetailEntityWatcher(pageItem.id + "." + pageItem.setThermoAlias[1], pageItem, type);
payloadParameters2 = pageItem.popUpThermoName[1] + '~' //{heading}~ Mode 2
+ 'modus2' + '~' //{id}~ Mode 2
+ getState(pageItem.id + "." + pageItem.setThermoAlias[1]).val + '~' //{ACTUAL}~ Mode 2
+ mode2 + '~' //{possible values}
}
let payloadParameters3 = '~~~~'
if (pageItem.popupThermoMode3 != undefined) {
RegisterDetailEntityWatcher(pageItem.id + "." + pageItem.setThermoAlias[2], pageItem, type);
payloadParameters3 = pageItem.popUpThermoName[2] + '~' //{heading}~ Mode 3
+ 'modus3' + '~' //{id}~ Mode 3
+ getState(pageItem.id + "." + pageItem.setThermoAlias[2]).val + '~' //{ACTUAL}~ Mode 3
+ mode3 //{possible values} Mode 3 (1-n)
}
out_msgs.push({
payload: 'entityUpdateDetail' + '~' //entityUpdateDetail
+ id + '~' //{entity_id}
+ Icons.GetIcon(vIcon) + '~' //{icon_id}~
+ 11487 + '~' //{icon_color}~
+ payloadParameters1
+ payloadParameters2
+ payloadParameters3
});
}
}
return out_msgs;
@@ -4154,8 +4467,20 @@ function HandleScreensaverColors(): void {
}
}
let scrSvrBGCol: any;
if (bgColorScrSaver == 0) {
scrSvrBGCol = rgb_dec565(scbackground);
} else if (bgColorScrSaver == 1) {
scrSvrBGCol = rgb_dec565(scbackgroundInd1);
} else if (bgColorScrSaver == 2) {
scrSvrBGCol = rgb_dec565(scbackgroundInd2);
} else if (bgColorScrSaver == 3) {
scrSvrBGCol = rgb_dec565(scbackgroundInd3);
}
let payloadString = 'color' + '~' +
rgb_dec565(scbackground) + '~' + //background
scrSvrBGCol + '~' + //background
rgb_dec565(sctime) + '~' + //time
rgb_dec565(sctimeAMPM) + '~' + //timeAMPM~
rgb_dec565(scdate) + '~' + //date~
@@ -4370,7 +4695,7 @@ on({ id: config.panelRecvTopic.substring(0, config.panelRecvTopic.length - 'RESU
await setStateAsync(NSPanel_Path + 'Sensor.Time', <iobJS.State>{ val: Tasmota_Sensor.Time, ack: true });
await setStateAsync(NSPanel_Path + 'Sensor.TempUnit', <iobJS.State>{ val: '°' + Tasmota_Sensor.TempUnit, ack: true });
await setStateAsync(NSPanel_Path + 'Sensor.ANALOG.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ANALOG.Temperature1), ack: true });
//await setStateAsync(NSPanel_Path + 'Sensor.ANALOG.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ANALOG.Temperature1), ack: true });
await setStateAsync(NSPanel_Path + 'Sensor.ESP32.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ESP32.Temperature), ack: true });
if (autoCreateAlias) {
@@ -4537,7 +4862,7 @@ type Page = {
items: PageItem[],
useColor: boolean,
subPage: boolean,
parent: Page,
parent: Page
};
interface PageEntities extends Page {
@@ -4575,6 +4900,11 @@ interface PagePower extends Page {
items: PageItem[],
}
interface PageChart extends Page {
type: 'cardChart',
items: PageItem[],
}
type PageItem = {
id: string,
icon: (string | undefined),
@@ -4601,6 +4931,17 @@ type PageItem = {
speakerList: (string[] | undefined),
hidePassword: (boolean | undefined),
autoCreateALias: (boolean | undefined)
colorMediaIcon: (RGB | undefined),
colorMediaArtist: (RGB | undefined),
colorMediaTitle: (RGB | undefined),
popupThermoMode1: (string[] | undefined),
popupThermoMode2: (string[] | undefined),
popupThermoMode3: (string[] | undefined),
popUpThermoName: (string[] | undefined),
setThermoAlias: (string[] | undefined),
setThermoDestTemp2: (string | undefined),
yAxis: (string | undefined),
yAxisTicks: (number[] | undefined),
}
type DimMode = {
@@ -4635,10 +4976,10 @@ type Config = {
defaultOnColor: RGB,
defaultOffColor: RGB,
defaultBackgroundColor: RGB,
pages: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower)[],
subPages: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower)[],
button1Page: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower | null),
button2Page: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower | null),
pages: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower | PageChart)[],
subPages: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower | PageChart)[],
button1Page: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower | PageChart | null),
button2Page: (PageThermo | PageMedia | PageAlarm | PageQR | PageEntities | PageGrid | PagePower | PageChart | null),
}
type ScreenSaverElement = {