From 5ef5823cb4bfb32e4c569c593b6178d78c24d571 Mon Sep 17 00:00:00 2001 From: joBr99 Date: Sun, 9 Oct 2022 16:57:00 +0000 Subject: [PATCH 1/5] sync (add nextion2text) --- HMI/US/portrait/diff-eu-version.txt | 104 +---------------- HMI/US/portrait/diff-filtered.txt | 105 +----------------- .../portrait/n2t-out-visual/cardEntities.txt | 5 + HMI/US/portrait/n2t-out-visual/cardGrid.txt | 5 + .../n2t-out-visual/nspanel_US_P_Stats.txt | 14 +-- .../portrait/n2t-out-visual/pageStartup.txt | 5 + HMI/US/portrait/n2t-out/cardEntities.txt | 5 + HMI/US/portrait/n2t-out/cardGrid.txt | 5 + HMI/US/portrait/n2t-out/pageStartup.txt | 5 + 9 files changed, 39 insertions(+), 214 deletions(-) diff --git a/HMI/US/portrait/diff-eu-version.txt b/HMI/US/portrait/diff-eu-version.txt index c9571c1b..7cda9500 100644 --- a/HMI/US/portrait/diff-eu-version.txt +++ b/HMI/US/portrait/diff-eu-version.txt @@ -368,7 +368,7 @@ │ Disable release event after dragging: 0 │ Send Component ID : disabled │ -│ @@ -1826,26 +2059,174 @@ +│ @@ -1826,14 +2059,163 @@ │ covx tTmp.txt,sys0,0,0 │ hSlider4.minval=sys0 │ //third value is max value @@ -532,73 +532,6 @@ │ //command format pageType,specialPageName │ //write name of speical page to tId │ spstr strCommand.txt,tId.txt,"~",1 -│ //save second arg if there's one -│ spstr strCommand.txt,tTmp.txt,"~",2 -│ //save third arg if there's one -│ spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 -│ - spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 -│ //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... -│ udelete payloadLength-1 -│ bufferPos=0 -│ if(tId.txt=="pageStartup") -│ { -│ page pageStartup -│ } -│ @@ -1887,18 +2268,14 @@ -│ { -│ page cardAlarm -│ } -│ if(tId.txt=="cardQR") -│ { -│ page cardQR -│ } -│ - if(tId.txt=="cardPower") -│ - { -│ - page cardPower -│ - } -│ } -│ if(tInstruction.txt=="time") -│ { -│ // get set time to global variable -│ spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 -│ } -│ if(tInstruction.txt=="date") -├── cardGrid.txt -│ @@ -789,15 +789,14 @@ -│ //command format pageType,specialPageName -│ //write name of speical page to tId -│ spstr strCommand.txt,tId.txt,"~",1 -│ //save second arg if there's one -│ spstr strCommand.txt,tTmp.txt,"~",2 -│ //save third arg if there's one -│ spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 -│ - spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 -│ //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... -│ udelete payloadLength-1 -│ bufferPos=0 -│ if(tId.txt=="pageStartup") -│ { -│ page pageStartup -│ } -│ @@ -839,18 +838,14 @@ -│ { -│ page cardAlarm -│ } -│ if(tId.txt=="cardQR") -│ { -│ page cardQR -│ } -│ - if(tId.txt=="cardPower") -│ - { -│ - page cardPower -│ - } -│ } -│ if(tInstruction.txt=="time") -│ { -│ // get set time to global variable -│ spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 -│ } -│ if(tInstruction.txt=="date") ├── pageIcons.txt │ @@ -15,15 +15,15 @@ │ Scope : global @@ -652,41 +585,6 @@ │ crcputs sys0,2 │ crcputs tSend.txt,0 │ //send cmd -│ @@ -302,15 +302,14 @@ -│ //command format pageType,specialPageName -│ //write name of speical page to tId -│ spstr strCommand.txt,tId.txt,"~",1 -│ //save second arg if there's one -│ spstr strCommand.txt,tTmp.txt,"~",2 -│ //save third arg if there's one -│ spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 -│ - spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 -│ //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... -│ udelete payloadLength-1 -│ bufferPos=0 -│ if(tId.txt=="cardThermo") -│ { -│ page cardThermo -│ } -│ @@ -347,18 +346,14 @@ -│ { -│ page cardAlarm -│ } -│ if(tId.txt=="cardQR") -│ { -│ page cardQR -│ } -│ - if(tId.txt=="cardPower") -│ - { -│ - page cardPower -│ - } -│ } -│ // end of user code -│ udelete payloadLength-1 -│ bufferPos=0 -│ } -│ } -│ } ├── popupFan.txt │┄ ordering differences only │ @@ -78,31 +78,31 @@ diff --git a/HMI/US/portrait/diff-filtered.txt b/HMI/US/portrait/diff-filtered.txt index 717415ef..f8b68aa0 100644 --- a/HMI/US/portrait/diff-filtered.txt +++ b/HMI/US/portrait/diff-filtered.txt @@ -1,72 +1,4 @@ -+++ /dev/fd/62 2022-10-08 22:48:53.818299279 +0000 -+,26 +2059,174 @@ -+ //save second arg if there's one -+ spstr strCommand.txt,tTmp.txt,"~",2 -+ //save third arg if there's one -+ spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 -+ spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 -+ //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... -+ udelete payloadLength-1 -+ bufferPos=0 -+ if(tId.txt=="pageStartup") -+ { -+ page pageStartup -+ } -+,18 +2268,14 @@ -+ { -+ page cardAlarm -+ } -+ if(tId.txt=="cardQR") -+ { -+ page cardQR -+ } -+ if(tId.txt=="cardPower") -+ { -+ page cardPower -+ } -+ } -+ if(tInstruction.txt=="time") -+ { -+ // get set time to global variable -+ spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 -+ } -+ if(tInstruction.txt=="date") -+rdGrid.txt -+15 +789,14 @@ -+ //command format pageType,specialPageName -+ //write name of speical page to tId -+ spstr strCommand.txt,tId.txt,"~",1 -+ //save second arg if there's one -+ spstr strCommand.txt,tTmp.txt,"~",2 -+ //save third arg if there's one -+ spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 -+ spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 -+ //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... -+ udelete payloadLength-1 -+ bufferPos=0 -+ if(tId.txt=="pageStartup") -+ { -+ page pageStartup -+ } -+18 +838,14 @@ -+ { -+ page cardAlarm -+ } -+ if(tId.txt=="cardQR") -+ { -+ page cardQR -+ } -+ if(tId.txt=="cardPower") -+ { -+ page cardPower -+ } -+ } -+ if(tInstruction.txt=="time") -+ { -+ // get set time to global variable -+ spstr strCommand.txt,pageIcons.vaTime.txt,"~",1 -+ } -+ if(tInstruction.txt=="date") ++++ /dev/fd/62 2022-10-09 16:56:54.880530529 +0000 +geIcons.txt +5 +15,15 @@ + Scope : global @@ -85,41 +17,6 @@ + Scope : global + Dragging : 0 + Disable release event after dragging: 0 -+15 +302,14 @@ -+ //command format pageType,specialPageName -+ //write name of speical page to tId -+ spstr strCommand.txt,tId.txt,"~",1 -+ //save second arg if there's one -+ spstr strCommand.txt,tTmp.txt,"~",2 -+ //save third arg if there's one -+ spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 -+ spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 -+ //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... -+ udelete payloadLength-1 -+ bufferPos=0 -+ if(tId.txt=="cardThermo") -+ { -+ page cardThermo -+ } -+18 +346,14 @@ -+ { -+ page cardAlarm -+ } -+ if(tId.txt=="cardQR") -+ { -+ page cardQR -+ } -+ if(tId.txt=="cardPower") -+ { -+ page cardPower -+ } -+ } -+ // end of user code -+ udelete payloadLength-1 -+ bufferPos=0 -+ } -+ } -+ } +reensaver.txt +5 +71,15 @@ +ime diff --git a/HMI/US/portrait/n2t-out-visual/cardEntities.txt b/HMI/US/portrait/n2t-out-visual/cardEntities.txt index 9542040c..0085fd9a 100644 --- a/HMI/US/portrait/n2t-out-visual/cardEntities.txt +++ b/HMI/US/portrait/n2t-out-visual/cardEntities.txt @@ -3369,6 +3369,7 @@ Timer tmSerial spstr strCommand.txt,tTmp.txt,"~",2 //save third arg if there's one spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 + spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... udelete payloadLength-1 bufferPos=0 @@ -3418,6 +3419,10 @@ Timer tmSerial { page cardQR } + if(tId.txt=="cardPower") + { + page cardPower + } } if(tInstruction.txt=="time") { diff --git a/HMI/US/portrait/n2t-out-visual/cardGrid.txt b/HMI/US/portrait/n2t-out-visual/cardGrid.txt index f7c48888..66afc6f1 100644 --- a/HMI/US/portrait/n2t-out-visual/cardGrid.txt +++ b/HMI/US/portrait/n2t-out-visual/cardGrid.txt @@ -1238,6 +1238,7 @@ Timer tmSerial spstr strCommand.txt,tTmp.txt,"~",2 //save third arg if there's one spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 + spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... udelete payloadLength-1 bufferPos=0 @@ -1287,6 +1288,10 @@ Timer tmSerial { page cardQR } + if(tId.txt=="cardPower") + { + page cardPower + } } if(tInstruction.txt=="time") { diff --git a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt index 448cbcbd..06f08baf 100644 --- a/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt +++ b/HMI/US/portrait/n2t-out-visual/nspanel_US_P_Stats.txt @@ -20,8 +20,8 @@ popupNotify 146 Unique line(s) of event code pageStartup 19 Component(s) - 167 Line(s) of event code - 122 Unique line(s) of event code + 172 Line(s) of event code + 125 Unique line(s) of event code popupShutter 25 Component(s) 394 Line(s) of event code @@ -36,8 +36,8 @@ cardPower 292 Unique line(s) of event code cardGrid 42 Component(s) - 469 Line(s) of event code - 278 Unique line(s) of event code + 474 Line(s) of event code + 281 Unique line(s) of event code cardQR 32 Component(s) 409 Line(s) of event code @@ -60,11 +60,11 @@ cardThermo 306 Unique line(s) of event code cardEntities 77 Component(s) - 1354 Line(s) of event code - 605 Unique line(s) of event code + 1359 Line(s) of event code + 608 Unique line(s) of event code Total 15 Page(s) 494 Component(s) - 5952 Line(s) of event code + 5967 Line(s) of event code 1620 Unique line(s) of event code diff --git a/HMI/US/portrait/n2t-out-visual/pageStartup.txt b/HMI/US/portrait/n2t-out-visual/pageStartup.txt index 278005fb..f0854003 100644 --- a/HMI/US/portrait/n2t-out-visual/pageStartup.txt +++ b/HMI/US/portrait/n2t-out-visual/pageStartup.txt @@ -601,6 +601,7 @@ Timer tmSerial spstr strCommand.txt,tTmp.txt,"~",2 //save third arg if there's one spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 + spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... udelete payloadLength-1 bufferPos=0 @@ -645,6 +646,10 @@ Timer tmSerial { page cardQR } + if(tId.txt=="cardPower") + { + page cardPower + } } // end of user code udelete payloadLength-1 diff --git a/HMI/US/portrait/n2t-out/cardEntities.txt b/HMI/US/portrait/n2t-out/cardEntities.txt index ad433d8a..2f14381c 100644 --- a/HMI/US/portrait/n2t-out/cardEntities.txt +++ b/HMI/US/portrait/n2t-out/cardEntities.txt @@ -2223,6 +2223,7 @@ Timer tmSerial spstr strCommand.txt,tTmp.txt,"~",2 //save third arg if there's one spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 + spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... udelete payloadLength-1 bufferPos=0 @@ -2272,6 +2273,10 @@ Timer tmSerial { page cardQR } + if(tId.txt=="cardPower") + { + page cardPower + } } if(tInstruction.txt=="time") { diff --git a/HMI/US/portrait/n2t-out/cardGrid.txt b/HMI/US/portrait/n2t-out/cardGrid.txt index 6e87d7b0..a88bb892 100644 --- a/HMI/US/portrait/n2t-out/cardGrid.txt +++ b/HMI/US/portrait/n2t-out/cardGrid.txt @@ -793,6 +793,7 @@ Timer tmSerial spstr strCommand.txt,tTmp.txt,"~",2 //save third arg if there's one spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 + spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... udelete payloadLength-1 bufferPos=0 @@ -842,6 +843,10 @@ Timer tmSerial { page cardQR } + if(tId.txt=="cardPower") + { + page cardPower + } } if(tInstruction.txt=="time") { diff --git a/HMI/US/portrait/n2t-out/pageStartup.txt b/HMI/US/portrait/n2t-out/pageStartup.txt index 9c83c682..f3abf5c2 100644 --- a/HMI/US/portrait/n2t-out/pageStartup.txt +++ b/HMI/US/portrait/n2t-out/pageStartup.txt @@ -306,6 +306,7 @@ Timer tmSerial spstr strCommand.txt,tTmp.txt,"~",2 //save third arg if there's one spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3 + spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4 //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ... udelete payloadLength-1 bufferPos=0 @@ -350,6 +351,10 @@ Timer tmSerial { page cardQR } + if(tId.txt=="cardPower") + { + page cardPower + } } // end of user code udelete payloadLength-1 From a3da26057c2845b28caf7da79687cb61b8c808d4 Mon Sep 17 00:00:00 2001 From: Armilar <102996011+Armilar@users.noreply.github.com> Date: Sun, 9 Oct 2022 20:28:59 +0200 Subject: [PATCH 2/5] v3.4.0.6 - id in payload for 'ct' is missing #509 --- ioBroker/NsPanelTs.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 0e32fbdc..9b81d5d6 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -3489,6 +3489,7 @@ function GenerateDetailPage(type: string, pageItem: PageItem): Payload[] { out_msgs.push({ payload: 'entityUpdateDetail' + '~' //entityUpdateDetail + + id + '~' + icon + '~' //iconId + iconColor + '~' //iconColor + switchVal + '~' //buttonState From 81e008b37db2297c97d4956fe07e5b5cd893308c Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 9 Oct 2022 21:18:58 +0200 Subject: [PATCH 3/5] Update pages.py --- apps/nspanel-lovelace-ui/luibackend/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 96a48568..3dea7ce2 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -586,7 +586,7 @@ class LuiPagesGen(object): command = f"entityUpd~{heading}~{navigation}" for idx, item in enumerate(items): entity = apis.ha_api.get_entity(item.entityId) - icon_color = self.get_entity_color(entity) + icon_color = self.get_entity_color(entity, overwrite=item.colorOverride) device_class = entity.attributes.get("device_class", "") icon = get_icon(item.entityId.split(".")[0], state=entity.state, device_class=device_class, overwrite=item.iconOverride) speed = 0 From 63508f947c50048319f5e231abbd9e8a67fd2520 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 12 Oct 2022 19:23:12 +0200 Subject: [PATCH 4/5] test for #512 --- apps/nspanel-lovelace-ui/luibackend/pages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 3dea7ce2..08ddaf51 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -400,7 +400,9 @@ class LuiPagesGen(object): dest_temp2 = "" if dest_temp is None: dest_temp = get_attr_safe(entity, "target_temp_high", 0) - dest_temp2 = int(get_attr_safe(entity, "target_temp_low", 0)*10) + dest_temp2 = get_attr_safe(entity, "target_temp_low", None) + if dest_temp2 != None and dest_temp2 != "null": + dest_temp2 = int(dest_temp2*10) dest_temp = int(dest_temp*10) hvac_action = get_attr_safe(entity, "hvac_action", "") From f0b02a3d4dc1af6acbcbc593503d7c7b763db754 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 15 Oct 2022 13:24:06 +0200 Subject: [PATCH 5/5] fix for #512 --- apps/nspanel-lovelace-ui/luibackend/pages.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 08ddaf51..55f527c3 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -403,6 +403,8 @@ class LuiPagesGen(object): dest_temp2 = get_attr_safe(entity, "target_temp_low", None) if dest_temp2 != None and dest_temp2 != "null": dest_temp2 = int(dest_temp2*10) + else: + dest_temp2 = "" dest_temp = int(dest_temp*10) hvac_action = get_attr_safe(entity, "hvac_action", "")