diff --git a/.test/esphome_advanced.yaml b/.test/esphome_advanced.yaml index c908250..bafc3ff 100644 --- a/.test/esphome_advanced.yaml +++ b/.test/esphome_advanced.yaml @@ -5,7 +5,7 @@ substitutions: nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy" packages: - core_package: !include ../nspanel_esphome.yaml # Core package - advanced_package: !include ../nspanel_esphome_advanced.yaml - #addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml - #addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml + core_package: !include ../advanced/esphome/nspanel_esphome.yaml # Core package + advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml + #addon_climate_heat: !include ../advanced/esphome/nspanel_esphome_addon_climate_heat.yaml + #addon_climate_cool: !include ../advanced/esphome/nspanel_esphome_addon_climate_cool.yaml diff --git a/.test/esphome_advanced_climate_cool_esp_idf.yaml b/.test/esphome_advanced_climate_cool_esp_idf.yaml index 23ab672..17923a8 100644 --- a/.test/esphome_advanced_climate_cool_esp_idf.yaml +++ b/.test/esphome_advanced_climate_cool_esp_idf.yaml @@ -5,10 +5,10 @@ substitutions: nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy" packages: - core_package: !include ../nspanel_esphome.yaml # Core package - advanced_package: !include ../nspanel_esphome_advanced.yaml - #addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml - addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml + core_package: !include ../advanced/esphome/nspanel_esphome.yaml # Core package + advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml + #addon_climate_heat: !include ../advanced/esphome/nspanel_esphome_addon_climate_heat.yaml + addon_climate_cool: !include ../advanced/esphome/nspanel_esphome_addon_climate_cool.yaml esp32: framework: diff --git a/.test/esphome_advanced_climate_cool_esp_idf5.yaml b/.test/esphome_advanced_climate_cool_esp_idf5.yaml index 1e99566..e7ac077 100644 --- a/.test/esphome_advanced_climate_cool_esp_idf5.yaml +++ b/.test/esphome_advanced_climate_cool_esp_idf5.yaml @@ -5,10 +5,10 @@ substitutions: nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy" packages: - core_package: !include ../nspanel_esphome.yaml # Core package - advanced_package: !include ../nspanel_esphome_advanced.yaml - #addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml - addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml + core_package: !include ../advanced/esphome/nspanel_esphome.yaml # Core package + advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml + #addon_climate_heat: !include ../advanced/esphome/nspanel_esphome_addon_climate_heat.yaml + addon_climate_cool: !include ../advanced/esphome/nspanel_esphome_addon_climate_cool.yaml esp32: framework: diff --git a/.test/esphome_advanced_climate_heat.yaml b/.test/esphome_advanced_climate_heat.yaml index 11d69e1..7299cd1 100644 --- a/.test/esphome_advanced_climate_heat.yaml +++ b/.test/esphome_advanced_climate_heat.yaml @@ -5,7 +5,7 @@ substitutions: nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy" packages: - core_package: !include ../nspanel_esphome.yaml # Core package - advanced_package: !include ../nspanel_esphome_advanced.yaml - addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml - #addon_climate_cold: !include ../nspanel_esphome_addon_climate_cold.yaml + core_package: !include ../advanced/esphome/nspanel_esphome.yaml # Core package + advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml + addon_climate_heat: !include ../advanced/esphome/nspanel_esphome_addon_climate_heat.yaml + #addon_climate_cold: !include ../advanced/esphome/nspanel_esphome_addon_climate_cold.yaml diff --git a/.test/esphome_climate_cool.yaml b/.test/esphome_climate_cool.yaml index 128abac..15104d4 100644 --- a/.test/esphome_climate_cool.yaml +++ b/.test/esphome_climate_cool.yaml @@ -5,7 +5,7 @@ substitutions: nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy" packages: - core_package: !include ../nspanel_esphome.yaml # Core package - #advanced_package: !include ../nspanel_esphome_advanced.yaml - #addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml - addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml + core_package: !include ../advanced/esphome/nspanel_esphome.yaml # Core package + #advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml + #addon_climate_heat: !include ../advanced/esphome/nspanel_esphome_addon_climate_heat.yaml + addon_climate_cool: !include ../advanced/esphome/nspanel_esphome_addon_climate_cool.yaml diff --git a/.test/esphome_climate_heat.yaml b/.test/esphome_climate_heat.yaml index c839972..90071f3 100644 --- a/.test/esphome_climate_heat.yaml +++ b/.test/esphome_climate_heat.yaml @@ -5,7 +5,7 @@ substitutions: nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy" packages: - core_package: !include ../nspanel_esphome.yaml # Core package - #advanced_package: !include ../nspanel_esphome_advanced.yaml - addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml - #addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml + core_package: !include ../advanced/esphome/nspanel_esphome.yaml # Core package + #advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml + addon_climate_heat: !include ../advanced/esphome/nspanel_esphome_addon_climate_heat.yaml + #addon_climate_cool: !include ../advanced/esphome/nspanel_esphome_addon_climate_cool.yaml diff --git a/.test/esphome_core.yaml b/.test/esphome_core.yaml index 7eecc37..2feacfd 100644 --- a/.test/esphome_core.yaml +++ b/.test/esphome_core.yaml @@ -5,7 +5,7 @@ substitutions: nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy" packages: - core_package: !include ../nspanel_esphome.yaml # Core package - #advanced_package: !include ../nspanel_esphome_advanced.yaml - #addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml - #addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml + core_package: !include ../advanced/esphome/nspanel_esphome.yaml # Core package + #advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml + #addon_climate_heat: !include ../advanced/esphome/nspanel_esphome_addon_climate_heat.yaml + #addon_climate_cool: !include ../advanced/esphome/nspanel_esphome_addon_climate_cool.yaml diff --git a/advanced/.gitignore b/advanced/.gitignore new file mode 100644 index 0000000..db0c583 --- /dev/null +++ b/advanced/.gitignore @@ -0,0 +1,15 @@ +# Ignore Mac DS_Store files +.DS_Store +**/.DS_Store + +Nextion2Text.* +*.cmd +*.bat + +# Ignore IntelliJ IDEA project directory +.idea + +# Ignore dev folder +dev + +nspanel_esphome_prebuilt.yaml diff --git a/nspanel_esphome_addon_climate_base.yaml b/advanced/esphome/nspanel_esphome_addon_climate_base.yaml similarity index 100% rename from nspanel_esphome_addon_climate_base.yaml rename to advanced/esphome/nspanel_esphome_addon_climate_base.yaml diff --git a/nspanel_esphome_addon_climate_cool.yaml b/advanced/esphome/nspanel_esphome_addon_climate_cool.yaml similarity index 100% rename from nspanel_esphome_addon_climate_cool.yaml rename to advanced/esphome/nspanel_esphome_addon_climate_cool.yaml diff --git a/nspanel_esphome_addon_climate_heat.yaml b/advanced/esphome/nspanel_esphome_addon_climate_heat.yaml similarity index 100% rename from nspanel_esphome_addon_climate_heat.yaml rename to advanced/esphome/nspanel_esphome_addon_climate_heat.yaml diff --git a/nspanel_esphome_addon_upload_tft.yaml b/advanced/esphome/nspanel_esphome_addon_upload_tft.yaml similarity index 100% rename from nspanel_esphome_addon_upload_tft.yaml rename to advanced/esphome/nspanel_esphome_addon_upload_tft.yaml diff --git a/nspanel_esphome_advanced.yaml b/advanced/esphome/nspanel_esphome_advanced.yaml similarity index 100% rename from nspanel_esphome_advanced.yaml rename to advanced/esphome/nspanel_esphome_advanced.yaml diff --git a/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml similarity index 100% rename from nspanel_esphome_core.yaml rename to advanced/esphome/nspanel_esphome_core.yaml diff --git a/custom_configuration/nspanel_blank.HMI b/advanced/hmi/nspanel_blank.HMI similarity index 100% rename from custom_configuration/nspanel_blank.HMI rename to advanced/hmi/nspanel_blank.HMI diff --git a/custom_configuration/nspanel_blank_code/Program.s.txt b/advanced/hmi/nspanel_blank_code/Program.s.txt similarity index 100% rename from custom_configuration/nspanel_blank_code/Program.s.txt rename to advanced/hmi/nspanel_blank_code/Program.s.txt diff --git a/custom_configuration/nspanel_blank_code/blank.txt b/advanced/hmi/nspanel_blank_code/blank.txt similarity index 100% rename from custom_configuration/nspanel_blank_code/blank.txt rename to advanced/hmi/nspanel_blank_code/blank.txt diff --git a/custom_configuration/nspanel_blank_code/page0.txt b/advanced/hmi/nspanel_blank_code/page0.txt similarity index 100% rename from custom_configuration/nspanel_blank_code/page0.txt rename to advanced/hmi/nspanel_blank_code/page0.txt diff --git a/custom_configuration/nspanel_blank_code/screensaver.txt b/advanced/hmi/nspanel_blank_code/screensaver.txt similarity index 100% rename from custom_configuration/nspanel_blank_code/screensaver.txt rename to advanced/hmi/nspanel_blank_code/screensaver.txt diff --git a/nspanel_eu.HMI b/advanced/hmi/nspanel_eu.HMI similarity index 100% rename from nspanel_eu.HMI rename to advanced/hmi/nspanel_eu.HMI diff --git a/nspanel_eu_code/Program.s.txt b/advanced/hmi/nspanel_eu_code/Program.s.txt similarity index 98% rename from nspanel_eu_code/Program.s.txt rename to advanced/hmi/nspanel_eu_code/Program.s.txt index 81c87af..00cf31b 100644 --- a/nspanel_eu_code/Program.s.txt +++ b/advanced/hmi/nspanel_eu_code/Program.s.txt @@ -1,26 +1,26 @@ -Program.s - //The following code is only run once when power on, and is generally used for global variable definition and power on initialization data - int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement - int r=0,g=0,b=0 - int h=0,s=0,v=0 - int p=0,q=0,t=0,f=0 - int dimdelta=0 - int api=0 // 0 = disconnected from HA, 1 = connected to HA - int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0 - int brightness=100,brightness_dim=40 - int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape - //bauds=115200//Configure baudrate - recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode - randset 0,65535//used for touchevent sensor - printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port - if(display_mode==1) - { - lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version - } - printh 92 - prints "currentpage",0 - printh 00 - prints "",0 - printh 00 - printh FF FF FF - page 8//Power on start page boot +Program.s + //The following code is only run once when power on, and is generally used for global variable definition and power on initialization data + int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement + int r=0,g=0,b=0 + int h=0,s=0,v=0 + int p=0,q=0,t=0,f=0 + int dimdelta=0 + int api=0 // 0 = disconnected from HA, 1 = connected to HA + int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0 + int brightness=100,brightness_dim=40 + int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape + //bauds=115200//Configure baudrate + recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode + randset 0,65535//used for touchevent sensor + printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port + if(display_mode==1) + { + lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version + } + printh 92 + prints "currentpage",0 + printh 00 + prints "",0 + printh 00 + printh FF FF FF + page 8//Power on start page boot diff --git a/nspanel_eu_code/alarm.txt b/advanced/hmi/nspanel_eu_code/alarm.txt similarity index 100% rename from nspanel_eu_code/alarm.txt rename to advanced/hmi/nspanel_eu_code/alarm.txt diff --git a/nspanel_eu_code/boot.txt b/advanced/hmi/nspanel_eu_code/boot.txt similarity index 96% rename from nspanel_eu_code/boot.txt rename to advanced/hmi/nspanel_eu_code/boot.txt index 5213736..fa09988 100644 --- a/nspanel_eu_code/boot.txt +++ b/advanced/hmi/nspanel_eu_code/boot.txt @@ -1,273 +1,273 @@ -Page boot - Attributes - ID : 0 - Scope : local - Dragging : 0 - Send Component ID : disabled - Locked : no - Swide up page ID : disabled - Swide down page ID : disabled - Swide left page ID : disabled - Swide right page ID: disabled - - Events - Preinitialize Event - sendme - dim=0 - vis bt_reboot,0 - covx baud,baud_rate.txt,0,0 - baud_rate.txt+=" bps" - covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - - Touch Press Event - printh 91 - prints "touchevent",0 - printh 00 - prints rand,0 - printh FF FF FF - - Touch Release Event - printh 91 - prints "touchevent",0 - printh 00 - prints rand,0 - printh FF FF FF - - Page Exit Event - dim=0 - -Variable (int32) counter - Attributes - ID : 12 - Scope: local - Value: 0 - -Variable (string) aux1 - Attributes - ID : 13 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) nspanelevent - Attributes - ID : 14 - Scope : local - Text : - Max. Text Size: 150 - -Variable (string) aux2 - Attributes - ID : 15 - Scope : local - Text : - Max. Text Size: 10 - -Text ip_addr - Attributes - ID : 1 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Initializing... - Max. Text Size : 15 - -Text t0 - Attributes - ID : 2 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Please wait... - Max. Text Size : 15 - -Text t1 - Attributes - ID : 3 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : The process can take several seconds! - Max. Text Size : 50 - -Text tft_label - Attributes - ID : 5 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : TFT: - Max. Text Size : 4 - -Text esph_label - Attributes - ID : 6 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : ESPHome: - Max. Text Size : 8 - -Text bluep_label - Attributes - ID : 7 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Blueprint: - Max. Text Size : 10 - -Text tft_version - Attributes - ID : 8 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : 4.2dev - Max. Text Size : 9 - -Text esph_version - Attributes - ID : 9 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 9 - -Text bluep_version - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 9 - -Text baud_rate - Attributes - ID : 18 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 10 - -Text framework - Attributes - ID : 20 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 10 - -Dual-state Button bt_reboot - Attributes - ID : 4 - Scope : local - Dragging : 0 - Send Component ID: on press and release - State : unpressed - Text : Reboot - Max. Text Size : 6 - -Timer timer - Attributes - ID : 11 - Scope : local - Period (ms): 65534 - Enabled : yes - - Events - Timer Event - counter.val++ - covx counter.val,aux1.txt,0,0 - covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" - bluep_version.txt="Retry: "+aux1.txt - printh 92 - prints "nspanelevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - -Timer wakeup_timer - Attributes - ID : 16 - Scope : local - Period (ms): 50 - Enabled : yes - - Events - Timer Event - if(dim<100) - { - dimdelta=100-dim - dimdelta/=25 - if(dimdelta<1) - { - dimdelta=1 - } - dim+=dimdelta - }else - { - wakeup_timer.en=0 - } - -Timer tm_esphome - Attributes - ID : 17 - Scope : local - Period (ms): 30000 - Enabled : yes - - Events - Timer Event - if(baud==115200) - { - bauds=921600 - }else - { - bauds=115200 - } - covx baud,baud_rate.txt,0,0 - baud_rate.txt+=" bps" - -Timer tm_pageid - Attributes - ID : 19 - Scope : local - Period (ms): 2500 - Enabled : yes - - Events - Timer Event - covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - +Page boot + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + sendme + dim=0 + vis bt_reboot,0 + covx baud,baud_rate.txt,0,0 + baud_rate.txt+=" bps" + covx display_mode,aux2.txt,0,0 + nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints nspanelevent.txt,0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 91 + prints "touchevent",0 + printh 00 + prints rand,0 + printh FF FF FF + + Touch Release Event + printh 91 + prints "touchevent",0 + printh 00 + prints rand,0 + printh FF FF FF + + Page Exit Event + dim=0 + +Variable (int32) counter + Attributes + ID : 12 + Scope: local + Value: 0 + +Variable (string) aux1 + Attributes + ID : 13 + Scope : local + Text : + Max. Text Size: 10 + +Variable (string) nspanelevent + Attributes + ID : 14 + Scope : local + Text : + Max. Text Size: 150 + +Variable (string) aux2 + Attributes + ID : 15 + Scope : local + Text : + Max. Text Size: 10 + +Text ip_addr + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Initializing... + Max. Text Size : 15 + +Text t0 + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Please wait... + Max. Text Size : 15 + +Text t1 + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : The process can take several seconds! + Max. Text Size : 50 + +Text tft_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : TFT: + Max. Text Size : 4 + +Text esph_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : ESPHome: + Max. Text Size : 8 + +Text bluep_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Blueprint: + Max. Text Size : 10 + +Text tft_version + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : 4.2dev + Max. Text Size : 9 + +Text esph_version + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 9 + +Text bluep_version + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 9 + +Text baud_rate + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text framework + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Dual-state Button bt_reboot + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: on press and release + State : unpressed + Text : Reboot + Max. Text Size : 6 + +Timer timer + Attributes + ID : 11 + Scope : local + Period (ms): 65534 + Enabled : yes + + Events + Timer Event + counter.val++ + covx counter.val,aux1.txt,0,0 + covx display_mode,aux2.txt,0,0 + nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + bluep_version.txt="Retry: "+aux1.txt + printh 92 + prints "nspanelevent",0 + printh 00 + prints nspanelevent.txt,0 + printh 00 + printh FF FF FF + +Timer wakeup_timer + Attributes + ID : 16 + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + if(dim<100) + { + dimdelta=100-dim + dimdelta/=25 + if(dimdelta<1) + { + dimdelta=1 + } + dim+=dimdelta + }else + { + wakeup_timer.en=0 + } + +Timer tm_esphome + Attributes + ID : 17 + Scope : local + Period (ms): 30000 + Enabled : yes + + Events + Timer Event + if(baud==115200) + { + bauds=921600 + }else + { + bauds=115200 + } + covx baud,baud_rate.txt,0,0 + baud_rate.txt+=" bps" + +Timer tm_pageid + Attributes + ID : 19 + Scope : local + Period (ms): 2500 + Enabled : yes + + Events + Timer Event + covx display_mode,aux2.txt,0,0 + nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints nspanelevent.txt,0 + printh 00 + printh FF FF FF + diff --git a/nspanel_us_land_code/buttonpage01.txt b/advanced/hmi/nspanel_eu_code/buttonpage01.txt similarity index 100% rename from nspanel_us_land_code/buttonpage01.txt rename to advanced/hmi/nspanel_eu_code/buttonpage01.txt diff --git a/nspanel_us_land_code/buttonpage02.txt b/advanced/hmi/nspanel_eu_code/buttonpage02.txt similarity index 100% rename from nspanel_us_land_code/buttonpage02.txt rename to advanced/hmi/nspanel_eu_code/buttonpage02.txt diff --git a/nspanel_us_land_code/buttonpage03.txt b/advanced/hmi/nspanel_eu_code/buttonpage03.txt similarity index 100% rename from nspanel_us_land_code/buttonpage03.txt rename to advanced/hmi/nspanel_eu_code/buttonpage03.txt diff --git a/nspanel_us_land_code/buttonpage04.txt b/advanced/hmi/nspanel_eu_code/buttonpage04.txt similarity index 100% rename from nspanel_us_land_code/buttonpage04.txt rename to advanced/hmi/nspanel_eu_code/buttonpage04.txt diff --git a/nspanel_eu_code/climate.txt b/advanced/hmi/nspanel_eu_code/climate.txt similarity index 100% rename from nspanel_eu_code/climate.txt rename to advanced/hmi/nspanel_eu_code/climate.txt diff --git a/nspanel_eu_code/confirm.txt b/advanced/hmi/nspanel_eu_code/confirm.txt similarity index 100% rename from nspanel_eu_code/confirm.txt rename to advanced/hmi/nspanel_eu_code/confirm.txt diff --git a/nspanel_us_land_code/cover.txt b/advanced/hmi/nspanel_eu_code/cover.txt similarity index 96% rename from nspanel_us_land_code/cover.txt rename to advanced/hmi/nspanel_eu_code/cover.txt index 461625b..93114ce 100644 --- a/nspanel_us_land_code/cover.txt +++ b/advanced/hmi/nspanel_eu_code/cover.txt @@ -1,238 +1,238 @@ -Page cover - Attributes - ID : 0 - Scope : local - Dragging : 0 - Send Component ID : disabled - Locked : no - Swide up page ID : disabled - Swide down page ID : disabled - Swide left page ID : disabled - Swide right page ID: disabled - - Events - Preinitialize Event - if(api==0) - { - page home - }else - { - sendme - } - - Touch Press Event - printh 91 - prints "touchevent",0 - printh 00 - prints rand,0 - printh FF FF FF - - Touch Release Event - printh 91 - prints "touchevent",0 - printh 00 - prints rand,0 - printh FF FF FF - -Variable (string) va1 - Attributes - ID : 7 - Scope : local - Text : newtxt - Max. Text Size: 10 - -Variable (string) coversetting - Attributes - ID : 11 - Scope : local - Text : - Max. Text Size: 255 - -Variable (string) back_page - Attributes - ID : 12 - Scope : local - Text : home - Max. Text Size: 15 - -Text battery_value - Attributes - ID : 1 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 10 - -Text cover_value - Attributes - ID : 2 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 10 - -Text page_label - Attributes - ID : 3 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 25 - -Text icon_state - Attributes - ID : 9 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 10 - -Text battery_icon - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 10 - -Slider coverslider - Attributes - ID : 6 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 0 - Upper range limit: 100 - Lower range limit: 0 - - Events - Touch Release Event - covx coverslider.val,va1.txt,0,0 - cover_value.txt=va1.txt+"%" - coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+"}" - printh 92 - prints "localevent",0 - printh 00 - prints coversetting.txt,0 - printh 00 - printh FF FF FF - -Button cover_open - Attributes - ID : 4 - Scope : local - Dragging : 0 - Send Component ID: disabled - State : unpressed - Text : - Max. Text Size : 3 - - Events - Touch Press Event - printh 92 - prints "localevent",0 - printh 00 - prints "{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\"}",0 - printh 00 - printh FF FF FF - -Button cover_close - Attributes - ID : 5 - Scope : local - Dragging : 0 - Send Component ID: disabled - State : unpressed - Text : - Max. Text Size : 3 - - Events - Touch Press Event - printh 92 - prints "localevent",0 - printh 00 - prints "{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\"}",0 - printh 00 - printh FF FF FF - -Button cover_stop - Attributes - ID : 8 - Scope : local - Dragging : 0 - Send Component ID: disabled - State : unpressed - Text : - Max. Text Size : 3 - - Events - Touch Press Event - printh 92 - prints "localevent",0 - printh 00 - prints "{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\"}",0 - printh 00 - printh FF FF FF - -Button button_back - Attributes - ID : 13 - Scope : local - Dragging : 0 - Send Component ID: disabled - State : unpressed - Text :  - Max. Text Size : 3 - - Events - Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } - -Timer wakeup_timer - Attributes - ID : 14 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim