diff --git a/ReleaseNotes.md b/ReleaseNotes.md index d516118..c8c10d8 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -33,7 +33,7 @@ Since in this update lots of input to the blueprint changed, we highly recommend 5. The network settings was moved to under `networks` on the `wifi` session. If you are using advanced/custom settings for Wi-Fi on ESPHome, you may have to update to follow the new format. 6. The sensor "Uptime" is deprecated. It was replaced by "Last started" sensor, which makes it more readable to humans on Home Assistant interface. Thanks to @WZYProjects (#986) for the new sensor.
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/282c1ea2-2919-4f40-a413-6fe572a155ce) - +7. Service `qr_code` is deprecated. It was replaced by service `qrcode` which can be used for changing the QRcode value even when the QRcode page is not visible (usefull when using dynamic Wi-Fi credentials).   ## Overview of all changes diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 6ac386f..6ab4944 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -3588,6 +3588,8 @@ variables: set_entity: 'esphome.{{ nspanel_name }}_set_entity' set_climate: 'esphome.{{ nspanel_name }}_set_climate' global_settings: 'esphome.{{ nspanel_name }}_global_settings' + page_home_settings: 'esphome.{{ nspanel_name }}_page_home_settings' + qrcode: 'esphome.{{ nspanel_name }}_qrcode' alarm_settings: 'esphome.{{ nspanel_name }}_alarm_settings' icon: domain: @@ -5503,10 +5505,10 @@ variables: color_rgb: "on": !input 'home_button04_icon_color01' "off": !input 'home_button04_icon_color02' - - icon: !input 'home_button05_icon' #E432 - color_rgb: - "on": !input 'home_button05_icon_color' - "off": "" # NOT IN USE + #- icon: !input 'home_button05_icon' #E432 + # color_rgb: + # "on": !input 'home_button05_icon_color' + # "off": "" # NOT IN USE #- icon: !input 'home_button06_icon' #EDCF # color_rgb: # "on": !input 'home_button06_icon_color' @@ -5564,7 +5566,6 @@ variables: icon: power #e424 color: "off" #'35921' component: button07 - qrcode_enabled: !input 'qrcode_enabled' ###### SYNC SETTINGS ##### delay_value: !input 'delay' @@ -6331,12 +6332,70 @@ action: relay2: icon: !input 'relay02_icon' #E3A8 icon_color_rgb: !input 'relay02_icon_color' - - &variables_bt_entities + + - &variables-home_buttons variables: bt_entities: enabled: !input 'entitypages_enabled' icon: !input 'home_button06_icon' #EDCF color_rgb: !input 'home_button06_icon_color' + bt_qrcode: + enabled: !input 'qrcode_enabled' + icon: !input 'home_button05_icon' #E432 + color_rgb: !input 'home_button05_icon_color' + title: !input 'qrcode_label' + qrcode: !input 'qrcode_value' + + - service: '{{ nextion.command.page_home_settings }}' + data: + qrcode: '{{ bt_qrcode.enabled }}' + qrcode_icon: > + {{ + all_icons[bt_qrcode.icon.split(":")[1]] | default(bt_qrcode.icon + if bt_qrcode.icon is string + else all_icons["format-list-bulleted-square"]) + }} + qrcode_icon_color: > + {{ + bt_qrcode.color_rgb + if is_number(bt_qrcode.color_rgb) + else + ((bt_qrcode.color_rgb[0] //(2**3)) *(2**11))+ + ((bt_qrcode.color_rgb[1] //(2**2)) *(2**5))+ + (bt_qrcode.color_rgb[2] //(2**3)) + }} + entities_pages: '{{ bt_entities.enabled }}' + entities_pages_icon: > + {{ + all_icons[bt_entities.icon.split(":")[1]] | default(bt_entities.icon + if bt_entities.icon is string + else all_icons["format-list-bulleted-square"]) + }} + entities_pages_icon_color: > + {{ + bt_entities.color_rgb + if is_number(bt_entities.color_rgb) + else + ((bt_entities.color_rgb[0] //(2**3)) *(2**11))+ + ((bt_entities.color_rgb[1] //(2**2)) *(2**5))+ + (bt_entities.color_rgb[2] //(2**3)) + }} + alarm_state: > + {{ + states(alarm) | default("") + if alarm is string and alarm | length > 0 + else "" + }} + continue_on_error: true + - *delay-default + + - service: '{{ nextion.command.qrcode }}' + data: + title: '{{ bt_qrcode.title }}' + qrcode: '{{ bt_qrcode.qrcode }}' + show: false + continue_on_error: true + - *delay-default - service: '{{ nextion.command.global_settings }}' data: @@ -6391,28 +6450,6 @@ action: }} embedded_climate: '{{ embedded_climate }}' wakeup_page: '{{ wakeup_page }}' - alarm_state: > - {{ - states(alarm) | default("") - if alarm is string and alarm | length > 0 - else "" - }} - entities_pages: '{{ bt_entities.enabled }}' - entities_pages_icon: > - {{ - all_icons[bt_entities.icon.split(":")[1]] | default(bt_entities.icon - if bt_entities.icon is string - else all_icons["format-list-bulleted-square"]) - }} - entities_pages_icon_color: > - {{ - bt_entities.color_rgb - if is_number(bt_entities.color_rgb) - else - ((bt_entities.color_rgb[0] //(2**3)) *(2**11))+ - ((bt_entities.color_rgb[1] //(2**2)) *(2**5))+ - (bt_entities.color_rgb[2] //(2**3)) - }} continue_on_error: true - *delay-default @@ -6959,43 +6996,6 @@ action: message: '{{ set_button04_icon_font }}' continue_on_error: true - ###### QR Code - Icon ###### - - *delay-default - - if: '{{ qrcode_enabled == true }}' - then: # Display QR code icon - ### ICON Font Color ### - - service: '{{ nextion.command.font_color }}' - data: - component: home.button05_icon - message: > - {{ - page_home.buttons[4].color_rgb.on - if is_number(page_home.buttons[4].color_rgb.on) - else - ((page_home.buttons[4].color_rgb.on[0] //(2**3)) *(2**11))+ - ((page_home.buttons[4].color_rgb.on[1] //(2**2)) *(2**5))+ - (page_home.buttons[4].color_rgb.on[2] //(2**3)) - }} - continue_on_error: true - ### ICON Font ### - - *delay-default - - service: '{{ nextion.command.text_printf }}' - data: - component: home.button05_icon - message: > - {{ - all_icons[page_home.buttons[4].icon.split(":")[1]] | default(page_home.buttons[4].icon - if page_home.buttons[4].icon is string - else all_icons.unknown) - }} - continue_on_error: true - else: # Display blank icon - - service: '{{ nextion.command.text_printf }}' - data: - component: home.button05_icon - message: '{{ all_icons.blank }}' - continue_on_error: true - ## BUTTON PAGES 01 - 04 ## - alias: Button pages conditions: '{{ nspanel_event.page in page.buttonpages }}' @@ -8451,27 +8451,6 @@ action: message: '{{ states(notification_label) | default(mui[language].unavailable) if notification_label is string else mui[language].unavailable }}' continue_on_error: true - ## PAGE QR Code ## - - alias: QRCode page - conditions: '{{ nspanel_event.page == page.qrcode }}' - sequence: - - variables: - qrcode_label: !input 'qrcode_label' - qrcode_value: !input 'qrcode_value' - - if: '{{ qrcode_label | length > 0 }}' - then: - - service: '{{ nextion.command.text_printf }}' - data: - component: 'qrcode_label' - message: '{{ qrcode_label }}' - continue_on_error: true - - *delay-default - - service: '{{ nextion.command.text_printf }}' - data: - component: 'qrcode_value' - message: '{{ qrcode_value }}' - continue_on_error: true - ##### NSPanel event ##### - alias: NSPanel Event conditions: @@ -8737,17 +8716,6 @@ action: back_page: '{{ page.home }}' continue_on_error: true - - alias: Jump to QR code page - conditions: - - '{{ qrcode_enabled == true }}' - - '{{ nspanel_event.page == page.home }}' - - '{{ nspanel_event.component == "button05" }}' - sequence: - - service: '{{ nextion.command.printf }}' - data: - cmd: 'page {{ page.qrcode }}' - continue_on_error: true - - alias: Jump to notification page conditions: - '{{ nspanel_event.page == page.home }}' diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 2a8534a..1466346 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -294,15 +294,16 @@ api: rtttl: !lambda 'return song_str;' # Service to show a QR code on the display (ex. for WiFi password) - - service: qr_code + - service: qrcode variables: - qrdata: string + title: string + qrcode: string + show: bool then: - - wait_until: - binary_sensor.is_on: nextion_init - lambda: |- - id(disp1).send_command_printf("page qrcode"); - id(disp1).set_component_text_printf("qrcode.qrcode_value", "%s", qrdata.c_str()); + id(disp1).set_component_text_printf("qrcode.qrcode_label", "%s", title.c_str()); + id(disp1).set_component_text_printf("qrcode.qrcode_value", "%s", qrcode.c_str()); + if (show) id(disp1).send_command_printf("page qrcode"); #### Service to set climate state #### - service: set_climate @@ -444,10 +445,6 @@ api: time_color: int embedded_climate: bool wakeup_page: int - alarm_state: string - entities_pages: bool - entities_pages_icon: string - entities_pages_icon_color: int then: ## Logs - lambda: if (${verbose_log}) ESP_LOGD("service.global_settings", "Starting"); @@ -465,10 +462,6 @@ api: ESP_LOGD("service.global_settings", "time_color: %i", time_color); ESP_LOGD("service.global_settings", "embedded_climate: %i", (embedded_climate) ? 1 : 0); ESP_LOGD("service.global_settings", "wakeup_page: %i", wakeup_page); - ESP_LOGD("service.global_settings", "alarm_state: %s", alarm_state.c_str()); - ESP_LOGD("service.global_settings", "entities_pages: %i", (entities_pages) ? 1 : 0); - ESP_LOGD("service.global_settings", "entities_pages_icon: %s", entities_pages_icon.c_str()); - ESP_LOGD("service.global_settings", "entities_pages_icon_color: %i", entities_pages_icon_color); } ## Relays @@ -494,19 +487,6 @@ api: embedded_climate: !lambda return embedded_climate; #- lambda: id(is_embedded_thermostat) = embedded_climate; - ## Entities pages button - - lambda: |- - if (${verbose_log}) ESP_LOGD("service.global_settings", "Entities pages button - Start"); - id(disp1).send_command_printf("is_entities=%i", (entities_pages) ? 1 : 0); - id(disp1).set_component_text_printf("home.bt_entities", "%s", entities_pages_icon.c_str()); - id(disp1).set_component_font_color("home.bt_entities", entities_pages_icon_color); - - ## Alarm button - - lambda: |- - if (${verbose_log}) ESP_LOGD("service.global_settings", "Alarm button - Start"); - id(disp1).send_command_printf("is_alarm=%i", (alarm_state=="" or alarm_state.empty()) ? 0 : 1); - id(update_alarm_icon)->execute("home.bt_alarm", alarm_state.c_str()); - ## Wakeup page - lambda: |- if (${verbose_log}) ESP_LOGD("service.global_settings", "Wakeup page - Start"); @@ -524,6 +504,52 @@ api: - lambda: if (${verbose_log}) ESP_LOGD("service.global_settings", "Finished"); + #### Service to populate the page Home ##### + - service: page_home_settings + variables: + qrcode: bool + qrcode_icon: string + qrcode_icon_color: int + entities_pages: bool + entities_pages_icon: string + entities_pages_icon_color: int + alarm_state: string + then: + ## Logs + - lambda: if (${verbose_log}) ESP_LOGD("service.page_home_settings", "Starting"); + - lambda: |- + if (${verbose_log}) + { + ESP_LOGD("service.page_home_settings", "qrcode: %i", (qrcode) ? 1 : 0); + ESP_LOGD("service.page_home_settings", "qrcode_icon: %s", qrcode_icon.c_str()); + ESP_LOGD("service.page_home_settings", "qrcode_icon_color: %i", qrcode_icon_color); + ESP_LOGD("service.page_home_settings", "entities_pages: %i", (entities_pages) ? 1 : 0); + ESP_LOGD("service.page_home_settings", "entities_pages_icon: %s", entities_pages_icon.c_str()); + ESP_LOGD("service.page_home_settings", "entities_pages_icon_color: %i", entities_pages_icon_color); + ESP_LOGD("service.page_home_settings", "alarm_state: %s", alarm_state.c_str()); + } + ## QRCode button + - lambda: |- + if (${verbose_log}) ESP_LOGD("service.page_home_settings", "QRcode button - Start"); + id(disp1).send_command_printf("is_qrcode=%i", (qrcode) ? 1 : 0); + id(disp1).set_component_text_printf("home.bt_qrcode", "%s", qrcode_icon.c_str()); + id(disp1).set_component_font_color("home.bt_qrcode", qrcode_icon_color); + + ## Entities pages button + - lambda: |- + if (${verbose_log}) ESP_LOGD("service.page_home_settings", "Entities pages button - Start"); + id(disp1).send_command_printf("is_entities=%i", (entities_pages) ? 1 : 0); + id(disp1).set_component_text_printf("home.bt_entities", "%s", entities_pages_icon.c_str()); + id(disp1).set_component_font_color("home.bt_entities", entities_pages_icon_color); + + ## Alarm button + - lambda: |- + if (${verbose_log}) ESP_LOGD("service.page_home_settings", "Alarm button - Start"); + id(disp1).send_command_printf("is_alarm=%i", (alarm_state=="" or alarm_state.empty()) ? 0 : 1); + id(update_alarm_icon)->execute("home.bt_alarm", alarm_state.c_str()); + + - lambda: if (${verbose_log}) ESP_LOGD("service.page_home_settings", "Finished"); + #### Service to populate the alarm settings page ##### - service: alarm_settings variables: diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index f8d8fc1..a06be5b 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 8a377a9..0dc6433 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_eu_code/Program.s.txt b/nspanel_eu_code/Program.s.txt index 913f002..903a6ce 100644 --- a/nspanel_eu_code/Program.s.txt +++ b/nspanel_eu_code/Program.s.txt @@ -5,7 +5,7 @@ Program.s int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA - int is_alarm=0,is_entities=0 + int is_alarm=0,is_entities=0,is_qrcode=0 bauds=115200//Configure baudrat recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port diff --git a/nspanel_eu_code/home.txt b/nspanel_eu_code/home.txt index ea71269..7778f55 100644 --- a/nspanel_eu_code/home.txt +++ b/nspanel_eu_code/home.txt @@ -23,6 +23,7 @@ Page home printh FF FF FF vis bt_entities,is_entities vis bt_alarm,is_alarm + vis bt_qrcode,is_qrcode Variable (int32) brightness Attributes @@ -50,14 +51,14 @@ Variable (int32) sleepmodus Variable (string) lastclick Attributes - ID : 52 + ID : 51 Scope : local Text : Max. Text Size: 100 Variable (string) entity Attributes - ID : 53 + ID : 52 Scope : global Text : Max. Text Size: 100 @@ -342,7 +343,7 @@ Text button04_icon Text : Max. Text Size : 10 -Text button05_icon +Text bt_qrcode Attributes ID : 42 Scope : global @@ -352,6 +353,10 @@ Text button05_icon Text : Max. Text Size : 10 + Events + Touch Release Event + page qrcode + Text bt_entities Attributes ID : 43 @@ -389,7 +394,7 @@ Text bt_alarm Text meridiem Attributes - ID : 51 + ID : 50 Scope : global Dragging : 0 Send Component ID : disabled @@ -538,26 +543,9 @@ Hotspot button04 printh 00 printh FF FF FF -Hotspot button05 - Attributes - ID : 49 - Scope : local - Dragging : 0 - Send Component ID: disabled - - Events - Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - Hotspot settings_click Attributes - ID : 50 + ID : 49 Scope : local Dragging : 0 Send Component ID: disabled @@ -613,7 +601,7 @@ Timer sleeptimer Timer settings_timer Attributes - ID : 54 + ID : 53 Scope : local Period (ms): 1000 Enabled : no diff --git a/nspanel_eu_code/qrcode.txt b/nspanel_eu_code/qrcode.txt index 8fc2ff0..66ce761 100644 --- a/nspanel_eu_code/qrcode.txt +++ b/nspanel_eu_code/qrcode.txt @@ -13,18 +13,12 @@ Page qrcode Events Preinitialize Event dim=home.brightness.val - if(api==0) - { - page home - }else - { - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - } + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF Touch Press Event printh 92 @@ -45,7 +39,7 @@ Page qrcode Text qrcode_label Attributes ID : 4 - Scope : local + Scope : global Dragging : 0 Send Component ID : disabled Associated Keyboard: none @@ -55,7 +49,7 @@ Text qrcode_label QR Code qrcode_value Attributes ID : 5 - Scope : local + Scope : global Dragging : 0 Send Component ID: disabled Text : diff --git a/nspanel_us.HMI b/nspanel_us.HMI index 54e4405..58d92c1 100644 Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 501dd60..3c16bf5 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_code/Program.s.txt b/nspanel_us_code/Program.s.txt index ce09ade..15d58dd 100644 --- a/nspanel_us_code/Program.s.txt +++ b/nspanel_us_code/Program.s.txt @@ -5,7 +5,7 @@ Program.s int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA - int is_alarm=0,is_entities=0 + int is_alarm=0,is_entities=0,is_qrcode=0 bauds=115200//Configure baudrat recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port diff --git a/nspanel_us_code/home.txt b/nspanel_us_code/home.txt index 8ad070d..6b13ea0 100644 --- a/nspanel_us_code/home.txt +++ b/nspanel_us_code/home.txt @@ -23,6 +23,7 @@ Page home printh FF FF FF vis bt_entities,is_entities vis bt_alarm,is_alarm + vis bt_qrcode,is_qrcode Variable (int32) brightness Attributes @@ -50,14 +51,14 @@ Variable (int32) sleepmodus Variable (string) lastclick Attributes - ID : 52 + ID : 51 Scope : local Text : Max. Text Size: 100 Variable (string) entity Attributes - ID : 53 + ID : 52 Scope : global Text : Max. Text Size: 100 @@ -342,7 +343,7 @@ Text button04_icon Text : Max. Text Size : 10 -Text button05_icon +Text bt_qrcode Attributes ID : 42 Scope : global @@ -352,6 +353,10 @@ Text button05_icon Text : Max. Text Size : 10 + Events + Touch Release Event + page qrcode + Text bt_entities Attributes ID : 43 @@ -389,7 +394,7 @@ Text bt_alarm Text meridiem Attributes - ID : 51 + ID : 50 Scope : global Dragging : 0 Send Component ID : disabled @@ -538,26 +543,9 @@ Hotspot button04 printh 00 printh FF FF FF -Hotspot button05 - Attributes - ID : 49 - Scope : local - Dragging : 0 - Send Component ID: disabled - - Events - Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - Hotspot settings_click Attributes - ID : 50 + ID : 49 Scope : local Dragging : 0 Send Component ID: disabled @@ -613,7 +601,7 @@ Timer sleeptimer Timer settings_timer Attributes - ID : 54 + ID : 53 Scope : local Period (ms): 1000 Enabled : no diff --git a/nspanel_us_code/qrcode.txt b/nspanel_us_code/qrcode.txt index 8fc2ff0..66ce761 100644 --- a/nspanel_us_code/qrcode.txt +++ b/nspanel_us_code/qrcode.txt @@ -13,18 +13,12 @@ Page qrcode Events Preinitialize Event dim=home.brightness.val - if(api==0) - { - page home - }else - { - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - } + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF Touch Press Event printh 92 @@ -45,7 +39,7 @@ Page qrcode Text qrcode_label Attributes ID : 4 - Scope : local + Scope : global Dragging : 0 Send Component ID : disabled Associated Keyboard: none @@ -55,7 +49,7 @@ Text qrcode_label QR Code qrcode_value Attributes ID : 5 - Scope : local + Scope : global Dragging : 0 Send Component ID: disabled Text : diff --git a/nspanel_us_land.HMI b/nspanel_us_land.HMI index 407d494..d84a3af 100644 Binary files a/nspanel_us_land.HMI and b/nspanel_us_land.HMI differ diff --git a/nspanel_us_land.tft b/nspanel_us_land.tft index 44405ff..e314874 100644 Binary files a/nspanel_us_land.tft and b/nspanel_us_land.tft differ diff --git a/nspanel_us_land_code/Program.s.txt b/nspanel_us_land_code/Program.s.txt index e41bc3e..41c7fc5 100644 --- a/nspanel_us_land_code/Program.s.txt +++ b/nspanel_us_land_code/Program.s.txt @@ -5,7 +5,7 @@ Program.s int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA - int is_alarm=0,is_entities=0 + int is_alarm=0,is_entities=0,is_qrcode=0 bauds=115200//Configure baudrat recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port diff --git a/nspanel_us_land_code/home.txt b/nspanel_us_land_code/home.txt index 5891213..438873d 100644 --- a/nspanel_us_land_code/home.txt +++ b/nspanel_us_land_code/home.txt @@ -23,6 +23,7 @@ Page home printh FF FF FF vis bt_entities,is_entities vis bt_alarm,is_alarm + vis bt_qrcode,is_qrcode vis left_bt_text,0 vis right_bt_text,0 @@ -52,14 +53,14 @@ Variable (int32) sleepmodus Variable (string) lastclick Attributes - ID : 52 + ID : 51 Scope : local Text : Max. Text Size: 100 Variable (string) entity Attributes - ID : 53 + ID : 52 Scope : global Text : Max. Text Size: 100 @@ -344,7 +345,7 @@ Text button04_icon Text : Max. Text Size : 10 -Text button05_icon +Text bt_qrcode Attributes ID : 42 Scope : global @@ -354,6 +355,10 @@ Text button05_icon Text : Max. Text Size : 10 + Events + Touch Release Event + page qrcode + Text bt_entities Attributes ID : 43 @@ -391,7 +396,7 @@ Text bt_alarm Text meridiem Attributes - ID : 51 + ID : 50 Scope : global Dragging : 0 Send Component ID : disabled @@ -540,26 +545,9 @@ Hotspot button04 printh 00 printh FF FF FF -Hotspot button05 - Attributes - ID : 49 - Scope : local - Dragging : 0 - Send Component ID: disabled - - Events - Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - Hotspot settings_click Attributes - ID : 50 + ID : 49 Scope : local Dragging : 0 Send Component ID: disabled @@ -615,7 +603,7 @@ Timer sleeptimer Timer settings_timer Attributes - ID : 54 + ID : 53 Scope : local Period (ms): 1000 Enabled : no diff --git a/nspanel_us_land_code/qrcode.txt b/nspanel_us_land_code/qrcode.txt index 8fc2ff0..66ce761 100644 --- a/nspanel_us_land_code/qrcode.txt +++ b/nspanel_us_land_code/qrcode.txt @@ -13,18 +13,12 @@ Page qrcode Events Preinitialize Event dim=home.brightness.val - if(api==0) - { - page home - }else - { - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - } + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF Touch Press Event printh 92 @@ -45,7 +39,7 @@ Page qrcode Text qrcode_label Attributes ID : 4 - Scope : local + Scope : global Dragging : 0 Send Component ID : disabled Associated Keyboard: none @@ -55,7 +49,7 @@ Text qrcode_label QR Code qrcode_value Attributes ID : 5 - Scope : local + Scope : global Dragging : 0 Send Component ID: disabled Text :