diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index a3fc2ea..98e0b65 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -6589,7 +6589,7 @@ action: - &set_entity_variable service: '{{ nextion.command.text_printf }}' data: - component: home.entity + component: home.climate_entity message: '{{ "embedded_climate" if climate == thermostat_embedded else climate }}' continue_on_error: true @@ -7370,6 +7370,7 @@ action: btn_icon: '{{ btn_icon }}' btn_label: '{{ btn_label }}' btn_bri_txt: '{{ btn_bri_txt }}' + #entity: '{{ repeat.item.entity }}' continue_on_error: true - if: '{{ item_domain in ["button","input_button","scene"] and trigger.id is match "current_state_entity" }}' then: @@ -7380,20 +7381,13 @@ action: btn_id: '{{ repeat.item.page }}.{{ repeat.item.component }}' btn_pic: '{{ nextion.pic.button.off }}' btn_bg: '{{ nextion.color.grey_dark }}' - btn_icon_font: > - {{ - repeat.item.icon_color_rgb - if is_number(repeat.item.icon_color_rgb) - else - ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+ - ((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+ - (repeat.item.icon_color_rgb[2] //(2**3)) - }} + btn_icon_font: '{{ nextion.color.grey_light }}' btn_txt_font: '{{ nextion.color.white }}' - btn_bri_font: '{{ btn_bri_font }}' + btn_bri_font: '{{ [ btn_bri_font ] if is_number(btn_bri_font) else btn_bri_font }}' btn_icon: '{{ btn_icon }}' btn_label: '{{ btn_label }}' btn_bri_txt: '{{ btn_bri_txt }}' + #entity: '{{ repeat.item.entity }}' continue_on_error: true ###### SHOW All component when page loading done ##### - if: '{{ not show_while_loading }}' diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 2f7a2bb..52956ea 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -276,7 +276,9 @@ api: ESP_LOGV("api.service.open_entity_settings_page", "page_icon_color: %i, %i, %i", page_icon_color[0], page_icon_color[1], page_icon_color[2] ); ESP_LOGV("api.service.open_entity_settings_page", "entity: %s", entity.c_str()); ESP_LOGV("api.service.open_entity_settings_page", "back_page: %s", back_page.c_str()); - id(disp1).set_component_text_printf("home.entity", "%s", entity.c_str()); + std::string cmp_entity = page.c_str() + std::string(".entity"); + ESP_LOGV("api.service.open_entity_settings_page", "cmp_entity: %s", cmp_entity.c_str()); + id(disp1).set_component_text_printf(cmp_entity.c_str(), "%s", entity.c_str()); std::string cmd_page = std::string("page ") + page.c_str(); id(disp1).send_command_printf(cmd_page.c_str()); id(disp1).set_component_text_printf("page_label", "%s", page_label.c_str()); @@ -356,12 +358,14 @@ api: btn_icon: string btn_label: string btn_bri_txt: string + #entity: string then: - lambda: |- // ESP_LOGV("nextion", "set button %s", btn_id.c_str()); std::string btnicon = btn_id.c_str() + std::string("icon"); std::string btntext = btn_id.c_str() + std::string("text"); std::string btnbri = btn_id.c_str() + std::string("bri"); + //std::string btnentity = btn_id.c_str() + std::string("entity"); id(disp1).send_command_printf("%spic.pic=%i", btn_id.c_str(), btn_pic); id(set_component_color).execute(btnicon.c_str(), btn_icon_font, btn_bg); id(set_component_color).execute(btntext.c_str(), btn_txt_font, btn_bg); @@ -372,7 +376,7 @@ api: id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str()); else id(disp1).set_component_text_printf(btnbri.c_str(), " "); - + //id(disp1).set_component_text_printf(btnentity.c_str(), "%s", entity.c_str()); ##### SERVICE TO WAKE UP THE DISPLAY ##### - service: wake_up @@ -924,6 +928,17 @@ binary_sensor: ##### START - SENSOR CONFIGURATION ##### sensor: + ##### touchevent sensor, Reset the page timeout ##### + - id: touchevent + platform: nextion + nextion_id: disp1 + component_name: touchevent + internal: true + on_value: + then: + - lambda: |- + id(page_timer)->execute(int(id(page_timeout).state)); + ##### Uptime Sensors ##### - name: ${device_name} Uptime seconds id: uptime_sec @@ -1162,14 +1177,125 @@ text_sensor: id(display_wrapped_text).execute("notification.notifi_text01", id(notification_text).state.c_str(), id(display_mode) == 2 ? 23 : 32); } } + else if (page=="media_player") + { + ESP_LOGV("text_sensor.nspanelevent", "Construct media_player page"); + id(disp1).set_component_text_printf("bt_on_off", "%s", "\uE424"); //mdi:power + id(disp1).set_component_text_printf("bt_prev", "%s", "\uE4AD"); //mdi:skip-previous + id(disp1).set_component_text_printf("bt_next", "%s", "\uE4AC"); //mdi:skip-next + id(disp1).set_component_text_printf("bt_play_pause", "%s", "\uE3E3"); //mdi:pause + id(disp1).set_component_text_printf("bt_stop", "%s", "\uE4DA"); //mdi:stop + id(disp1).set_component_text_printf("bt_mute", "%s", "\uE75E"); //mdi:volume-mute + id(disp1).set_component_text_printf("bt_vol_down", "%s", "\uE75D"); //mdi:volume-minus + id(disp1).set_component_text_printf("bt_vol_up", "%s", "\uE75C"); //mdi:volume-plus + } } - if (page=="boot") + + ##### NSPanel event - Execute actions from ESPHome - NO push to HA ##### + - name: ${device_name} NSPanel local event + platform: nextion + nextion_id: disp1 + id: disp1_local_event + component_name: localevent + internal: true + filters: + - lambda: |- + x = x.c_str(); + x.shrink_to_fit(); + return x; + on_value: + then: + - lambda: |- + ESP_LOGV("text_sensor.localevent", "Starting"); + id(page_timer)->execute(int(id(page_timeout).state)); + DynamicJsonDocument doc(256); + deserializeJson(doc, x); + std::string page = doc["page"]; + ESP_LOGV("text_sensor.localevent", "page=%s", page.c_str()); + std::string event = doc["event"]; + ESP_LOGV("text_sensor.localevent", "event=%s", event.c_str()); + std::string key = doc["key"]; + ESP_LOGV("text_sensor.localevent", "key=%s", key.c_str()); + std::string value = doc["value"]; + ESP_LOGV("text_sensor.localevent", "value=%s", value.c_str()); + std::string entity = doc["entity"]; + ESP_LOGV("text_sensor.localevent", "entity=%s", entity.c_str()); + int embedded = doc["embedded"]; + ESP_LOGV("text_sensor.localevent", "embedded=%i", embedded); + std::string service = ""; + auto ha_event = new esphome::api::CustomAPIDevice(); + ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint", + { + {"type", "generic"}, + {"page", page}, + {"event", event}, + {"value", value}, + {"entity", entity} + }); + if (event=="pagechanged") + { + ESP_LOGD("text_sensor.localevent", "New page: %s", page.c_str()); + ESP_LOGV("text_sensor.localevent", "Trigger HA event"); + ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint", + { + {"type", "page_changed"}, + {"page", page}, + {"entity", entity} + }); + ESP_LOGV("text_sensor.localevent", "Call add-ons scripts for new page"); + id(addon_climate_set_climate).execute(page=="climate" and entity=="embedded_climate"); + ESP_LOGV("text_sensor.localevent", "Publish current_page sensor"); + id(current_page).publish_state(page); + ESP_LOGV("text_sensor.localevent", "Construct new page"); + } + if (page == "climate") id(service_call_climate)->execute(entity.c_str(), key.c_str(), value.c_str(), (embedded==1)); + else if (page == "alarm") + { + std::string code_format = doc["code_format"]; + std::string code_arm_req = doc["code_arm_req"]; + std::string title = doc["mui"]; + if (code_format=="number" and (key=="disarm" or code_arm_req=="1")) + { + id(disp1).send_command_printf("page keyb_num"); + id(disp1).set_component_value("keyb_num.page_id", 23); //Calling from Alarm page + id(disp1).set_component_text_printf("keyb_num.domain", "%s", page.c_str()); + id(disp1).set_component_text_printf("keyb_num.key", "%s", key.c_str()); + id(disp1).set_component_text_printf("keyb_num.value", "%s", value.c_str()); + id(disp1).set_component_text_printf("keyb_num.entity", "%s", entity.c_str()); + id(disp1).set_component_text_printf("keyb_num.title", "%s", title.c_str()); + } + else id(service_call_alarm_control_panel)->execute(entity.c_str(), key.c_str(), code_format.c_str(), ""); + } + else if (page == "keyb_num") + { + std::string base_domain = doc["base_domain"]; + if (base_domain == "alarm") + { + std::string code_format = doc["code_format"]; + std::string pin = doc["pin"]; + id(service_call_alarm_control_panel)->execute(entity.c_str(), key.c_str(), code_format.c_str(), pin.c_str()); + } + else if (base_domain == "" or base_domain.empty()) base_domain = "home"; + id(disp1).send_command_printf("page %s", base_domain.c_str()); + } + else if (page == "light") id(ha_call_service)->execute("light.turn_on", key.c_str(), value.c_str(), entity.c_str()); + else if (page == "cover") + { + if (key == "position") id(ha_call_service)->execute("cover.set_cover_position", key.c_str(), value.c_str(), entity.c_str()); + else id(ha_call_service)->execute((std::string("cover.") + key.c_str()), "", "", entity.c_str()); + } + else if (page == "fan") + { + if (key == "stop" or value == "0") id(ha_call_service)->execute("fan.turn_off", "", "", entity.c_str()); + else id(ha_call_service)->execute("fan.turn_on", key.c_str(), value.c_str(), entity.c_str()); + } + else if (page=="boot") { // Detect display mode - Need review if (doc.containsKey("display_mode")) { std::string display_mode_str = doc["display_mode"]; - ESP_LOGV("text_sensor.nspanelevent", "display_mode: %s", display_mode_str.c_str()); + ESP_LOGV("text_sensor.localevent", "display_mode: %s", display_mode_str.c_str()); float display_mode_float = stof(display_mode_str); if (display_mode_float > 0) id(display_mode) = int(display_mode_float); } @@ -1183,9 +1309,9 @@ text_sensor: id(check_versions).execute(); // Detect timeout - if (component=="timeout") + if (event=="timeout") { - ESP_LOGV("text_sensor.nspanelevent", "Trigger boot timeout event"); + ESP_LOGV("text_sensor.localevent", "Trigger boot timeout event"); ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint", { {"type", "boot"}, @@ -1194,82 +1320,13 @@ text_sensor: }); if (stof(value) >= 5) { - ESP_LOGV("text_sensor.nspanelevent", "Jump to wakeup page: %i", id(wakeup_page_id)); + ESP_LOGV("text_sensor.localevent", "Jump to wakeup page: %i", id(wakeup_page_id)); id(disp1).send_command_printf("page %i", id(wakeup_page_id)); } } } - ##### NSPanel event - Execute actions from ESPHome - NO push to HA ##### - - name: ${device_name} NSPanel local event - platform: nextion - nextion_id: disp1 - id: disp1_local_event - component_name: localevent - internal: True - filters: - - lambda: |- - x = x.c_str(); - x.shrink_to_fit(); - return x; - on_value: - then: - - lambda: |- - id(page_timer)->execute(int(id(page_timeout).state)); - DynamicJsonDocument doc(1024); - deserializeJson(doc, x); - std::string domain = doc["domain"]; - std::string key = doc["key"]; - std::string value = doc["value"]; - std::string entity = doc["entity"]; - int embedded = doc["embedded"]; - std::string service = ""; - ESP_LOGV("text_sensor.localevent", "domain=%s", domain.c_str()); - ESP_LOGV("text_sensor.localevent", "key=%s", key.c_str()); - ESP_LOGV("text_sensor.localevent", "value=%s", value.c_str()); - ESP_LOGV("text_sensor.localevent", "entity=%s", entity.c_str()); - ESP_LOGV("text_sensor.localevent", "embedded=%i", embedded); - if (domain == "climate") id(service_call_climate)->execute(entity.c_str(), key.c_str(), value.c_str(), (embedded==1)); - else if (domain == "alarm") - { - std::string code_format = doc["code_format"]; - std::string code_arm_req = doc["code_arm_req"]; - std::string title = doc["mui"]; - if (code_format=="number" and (key=="disarm" or code_arm_req=="1")) - { - id(disp1).send_command_printf("page keyb_num"); - id(disp1).set_component_value("keyb_num.page_id", 23); //Calling from Alarm page - id(disp1).set_component_text_printf("keyb_num.domain", "%s", domain.c_str()); - id(disp1).set_component_text_printf("keyb_num.key", "%s", key.c_str()); - id(disp1).set_component_text_printf("keyb_num.value", "%s", value.c_str()); - id(disp1).set_component_text_printf("keyb_num.entity", "%s", entity.c_str()); - id(disp1).set_component_text_printf("keyb_num.title", "%s", title.c_str()); - } - else id(service_call_alarm_control_panel)->execute(entity.c_str(), key.c_str(), code_format.c_str(), ""); - } - else if (domain == "keyb_num") - { - std::string base_domain = doc["base_domain"]; - if (base_domain == "alarm") - { - std::string code_format = doc["code_format"]; - std::string pin = doc["pin"]; - id(service_call_alarm_control_panel)->execute(entity.c_str(), key.c_str(), code_format.c_str(), pin.c_str()); - } - else if (base_domain == "" or base_domain.empty()) base_domain = "home"; - id(disp1).send_command_printf("page %s", base_domain.c_str()); - } - else if (domain == "light") id(ha_call_service)->execute("light.turn_on", key.c_str(), value.c_str(), entity.c_str()); - else if (domain == "cover") - { - if (key == "position") id(ha_call_service)->execute("cover.set_cover_position", key.c_str(), value.c_str(), entity.c_str()); - else id(ha_call_service)->execute((std::string("cover.") + key.c_str()), "", "", entity.c_str()); - } - else if (domain == "fan") - { - if (key == "stop" or value == "0") id(ha_call_service)->execute("fan.turn_off", "", "", entity.c_str()); - else id(ha_call_service)->execute("fan.turn_on", key.c_str(), value.c_str(), entity.c_str()); - } + ESP_LOGV("text_sensor.localevent", "Finished"); ##### touchevent sensor, Reset the page timeout ##### - id: disp1_touchevent @@ -1278,11 +1335,11 @@ text_sensor: #name: ${device_name} touchevent component_name: touchevent internal: true - #filters: - # - lambda: |- - # x = x.c_str(); - # x.shrink_to_fit(); - # return x; + filters: + - lambda: |- + x = x.c_str(); + x.shrink_to_fit(); + return x; on_value: then: - lambda: |- @@ -1498,6 +1555,7 @@ display: on_setup: then: - lambda: |- + ESP_LOGV("display.disp1", "Starting"); id(disp1).send_command_printf("page 8"); id(disp1).set_component_text_printf("boot.esph_version", "%s", "${version}"); // ### esphome-version ### id(disp1).show_component("bt_reboot"); diff --git a/nspanel_esphome_addon_climate_cool.yaml b/nspanel_esphome_addon_climate_cool.yaml index 2c40ba1..5f627a1 100644 --- a/nspanel_esphome_addon_climate_cool.yaml +++ b/nspanel_esphome_addon_climate_cool.yaml @@ -77,9 +77,9 @@ script: then: - lambda: |- ESP_LOGV("script.addon_climate_update_page_home", "Starting"); - // Update home.entity variable - ESP_LOGV("script.addon_climate_update_page_home", "Update home.entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); - id(disp1).set_component_text_printf("home.entity", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); + // Update home.climate_entity variable + ESP_LOGV("script.addon_climate_update_page_home", "Update home.climate_entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); + id(disp1).set_component_text_printf("home.climate_entity", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); // Update chips if (id(is_embedded_thermostat)) { diff --git a/nspanel_esphome_addon_climate_heat.yaml b/nspanel_esphome_addon_climate_heat.yaml index c4350c8..9a6fc2c 100644 --- a/nspanel_esphome_addon_climate_heat.yaml +++ b/nspanel_esphome_addon_climate_heat.yaml @@ -77,9 +77,9 @@ script: then: - lambda: |- ESP_LOGV("script.addon_climate_update_page_home", "Starting"); - // Update home.entity variable - ESP_LOGV("script.addon_climate_update_page_home", "Update home.entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); - id(disp1).set_component_text_printf("home.entity", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); + // Update home.climate_entity variable + ESP_LOGV("script.addon_climate_update_page_home", "Update home.climate_entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); + id(disp1).set_component_text_printf("home.climate_entity", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); // Update chips if (id(is_embedded_thermostat)) { diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index b249602..e9efeb2 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu.tft b/nspanel_eu.tft index ac3a2e6..887d1ec 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 38c65b6..8662cd9 100644 --- a/nspanel_eu_code/Program.s.txt +++ b/nspanel_eu_code/Program.s.txt @@ -11,6 +11,7 @@ Program.s 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) { diff --git a/nspanel_eu_code/alarm.txt b/nspanel_eu_code/alarm.txt index d5c57cb..54b27b6 100644 --- a/nspanel_eu_code/alarm.txt +++ b/nspanel_eu_code/alarm.txt @@ -18,7 +18,7 @@ Page alarm page home }else { - lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -33,7 +33,7 @@ Page alarm } Touch Press Event - lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -42,7 +42,7 @@ Page alarm printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -50,9 +50,6 @@ Page alarm printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) lastclick Attributes ID : 3 @@ -77,7 +74,7 @@ Variable (string) code_format Variable (string) entity Attributes ID : 30 - Scope : local + Scope : global Text : Max. Text Size: 100 @@ -315,7 +312,7 @@ Hotspot bt_home bt_home_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -339,7 +336,7 @@ Hotspot bt_away bt_away_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -363,7 +360,7 @@ Hotspot bt_night bt_night_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -387,7 +384,7 @@ Hotspot bt_vacat bt_vacat_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -411,7 +408,7 @@ Hotspot bt_bypass bt_bypass_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -435,7 +432,7 @@ Hotspot bt_disarm bt_disarm_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_eu_code/boot.txt b/nspanel_eu_code/boot.txt index dce2681..391677a 100644 --- a/nspanel_eu_code/boot.txt +++ b/nspanel_eu_code/boot.txt @@ -12,16 +12,16 @@ Page boot Events Preinitialize Event + vis bt_reboot,0 dim=100 covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints nspanelevent.txt,0 printh 00 printh FF FF FF - vis bt_reboot,0 Variable (int32) counter Attributes @@ -162,7 +162,7 @@ Timer timer counter.val++ covx counter.val,aux1.txt,0,0 covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + 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 diff --git a/nspanel_eu_code/climate.txt b/nspanel_eu_code/climate.txt index 14fbd65..51a558a 100644 --- a/nspanel_eu_code/climate.txt +++ b/nspanel_eu_code/climate.txt @@ -13,9 +13,9 @@ Page climate Events Preinitialize Event dim=brightness - if(api==1||home.entity.txt=="embedded_climate") + if(api==1||entity.txt=="embedded_climate") { - climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -34,14 +34,13 @@ Page climate vis button05,0 vis button06,0 vis button07,0 - page_label.txt=home.entity.txt }else { page home } Touch Press Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -50,7 +49,7 @@ Page climate printh FF FF FF Touch Release Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -63,7 +62,7 @@ Page climate { timer01.en=0 covx temp_number.val,va1.txt,0,0 - climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -71,7 +70,6 @@ Page climate printh 00 printh FF FF FF } - home.entity.txt="" Variable (string) va1 Attributes @@ -138,6 +136,13 @@ Variable (string) va2 Text : Max. Text Size: 10 +Variable (string) entity + Attributes + ID : 49 + Scope : global + Text : + Max. Text Size: 100 + Text current_temp Attributes ID : 3 @@ -370,7 +375,7 @@ Slider climateslider Events Touch Press Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -387,7 +392,7 @@ Slider climateslider covx va0.val,va1.txt,0,0 target_temp.txt+="."+va1.txt timer01.en=1 - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -482,7 +487,7 @@ Hotspot button01 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -500,7 +505,7 @@ Hotspot button02 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -518,7 +523,7 @@ Hotspot button03 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -536,7 +541,7 @@ Hotspot button04 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -554,7 +559,7 @@ Hotspot button05 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -572,7 +577,7 @@ Hotspot button06 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -590,7 +595,7 @@ Hotspot button07 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -607,7 +612,7 @@ Hotspot button08 Events Touch Press Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -616,7 +621,7 @@ Hotspot button08 printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -633,7 +638,7 @@ Hotspot button09 Events Touch Press Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -642,7 +647,7 @@ Hotspot button09 printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -674,7 +679,7 @@ Timer timer01 timer01.en=0 covx embedded.val,va2.txt,0,0 covx temp_number.val,va1.txt,0,0 - climatesetting.txt="{\"domain\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + climatesetting.txt="{\"page\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_eu_code/cover.txt b/nspanel_eu_code/cover.txt index 1a8db51..5975617 100644 --- a/nspanel_eu_code/cover.txt +++ b/nspanel_eu_code/cover.txt @@ -18,18 +18,17 @@ Page cover page home }else { - coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 prints coversetting.txt,0 printh 00 printh FF FF FF - page_label.txt=home.entity.txt } Touch Press Event - coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -38,7 +37,7 @@ Page cover printh FF FF FF Touch Release Event - coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -46,9 +45,6 @@ Page cover printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) va1 Attributes ID : 7 @@ -70,6 +66,13 @@ Variable (string) back_page Text : home Max. Text Size: 15 +Variable (string) entity + Attributes + ID : 14 + Scope : global + Text : + Max. Text Size: 100 + Text battery_value Attributes ID : 1 @@ -134,7 +137,7 @@ Slider coverslider Touch Release Event covx coverslider.val,va1.txt,0,0 cover_value.txt=va1.txt+"%" - coversetting.txt="{\"domain\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -154,7 +157,7 @@ Button cover_open Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -174,7 +177,7 @@ Button cover_close Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -194,7 +197,7 @@ Button cover_stop Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_eu_code/fan.txt b/nspanel_eu_code/fan.txt index 27327a3..a5b78eb 100644 --- a/nspanel_eu_code/fan.txt +++ b/nspanel_eu_code/fan.txt @@ -18,18 +18,17 @@ Page fan page home }else { - fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 prints fansetting.txt,0 printh 00 printh FF FF FF - page_label.txt=home.entity.txt } Touch Press Event - fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -38,7 +37,7 @@ Page fan printh FF FF FF Touch Release Event - fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -46,9 +45,6 @@ Page fan printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) fansetting Attributes ID : 7 @@ -70,6 +66,13 @@ Variable (string) va0 Text : Max. Text Size: 10 +Variable (string) entity + Attributes + ID : 16 + Scope : global + Text : + Max. Text Size: 100 + Text fan_value Attributes ID : 1 @@ -269,7 +272,7 @@ Button button_off sys0=100*fanslider.val/fanslider.maxval covx sys0,va0.txt,0,0 fan_value.txt=va0.txt+"%" - fansetting.txt="{\"domain\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -350,7 +353,7 @@ Timer timer0 sys0=100*fanslider.val/fanslider.maxval covx sys0,va0.txt,0,0 fan_value.txt=va0.txt+"%" - fansetting.txt="{\"domain\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_eu_code/home.txt b/nspanel_eu_code/home.txt index 607d307..f88583c 100644 --- a/nspanel_eu_code/home.txt +++ b/nspanel_eu_code/home.txt @@ -44,7 +44,7 @@ Variable (string) lastclick Text : Max. Text Size: 100 -Variable (string) entity +Variable (string) climate_entity Attributes ID : 46 Scope : global @@ -383,7 +383,6 @@ Text bt_alarm Touch Release Event if(api==1) { - entity.txt="" page alarm } @@ -447,7 +446,7 @@ Hotspot jump_climate Events Touch Press Event - if(entity.txt=="") + if(climate_entity.txt=="") { lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" printh 92 @@ -458,11 +457,12 @@ Hotspot jump_climate printh FF FF FF }else { + climate.entity.txt=climate_entity.txt page climate } Touch Release Event - if(entity.txt=="") + if(climate_entity.txt=="") { lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" printh 92 diff --git a/nspanel_eu_code/keyb_num.txt b/nspanel_eu_code/keyb_num.txt index 54fefee..0b191a2 100644 --- a/nspanel_eu_code/keyb_num.txt +++ b/nspanel_eu_code/keyb_num.txt @@ -296,7 +296,7 @@ Button benter Events Touch Release Event - aux.txt="{\"domain\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}" + aux.txt="{\"page\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_eu_code/light.txt b/nspanel_eu_code/light.txt index 766b785..a1a16b0 100644 --- a/nspanel_eu_code/light.txt +++ b/nspanel_eu_code/light.txt @@ -18,7 +18,7 @@ Page light page home }else { - lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -43,11 +43,10 @@ Page light vis temp_button,0 vis color_touch,0 vis color_button,0 - page_label.txt=home.entity.txt } Touch Press Event - lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -56,7 +55,7 @@ Page light printh FF FF FF Touch Release Event - lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -64,9 +63,6 @@ Page light printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (int32) rgb565 Attributes ID : 22 @@ -114,6 +110,13 @@ Variable (string) back_page Text : home Max. Text Size: 15 +Variable (string) entity + Attributes + ID : 33 + Scope : global + Text : + Max. Text Size: 100 + Number ring Attributes ID : 4 @@ -387,7 +390,7 @@ Picture colorwheel covx r,va1.txt,0,0 covx g,va2.txt,0,0 covx b,va3.txt,0,0 - lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -413,7 +416,7 @@ Slider lightslider covx lightslider.val,va1.txt,0,0 light_value.txt=va1.txt+"%" light_value_2.txt=va1.txt+"%" - lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -436,7 +439,7 @@ Slider tempslider covx tempslider.val,va1.txt,0,0 temp_value.txt=va1.txt temp_value_2.txt=va1.txt - lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_eu_code/media_player.txt b/nspanel_eu_code/media_player.txt index e69de29..9fb1367 100644 --- a/nspanel_eu_code/media_player.txt +++ b/nspanel_eu_code/media_player.txt @@ -0,0 +1,265 @@ +Page media_player + 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 + dim=brightness + if(api==0) + { + page home + }else + { + lastclick.txt="{\"page\": \"media_player\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + } + + Touch Press Event + lastclick.txt="{\"page\": \"media_player\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"media_player\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Variable (string) back_page + Attributes + ID : 3 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (string) entity + Attributes + ID : 4 + Scope : global + Text : + Max. Text Size: 100 + +Variable (string) lastclick + Attributes + ID : 21 + Scope : local + Text : + Max. Text Size: 255 + +Text page_label + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Media Player + Max. Text Size : 25 + +Text icon_state + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 10 + +Text vol_text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : 35% + Max. Text Size : 10 + +Text bt_vol_down + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text bt_vol_up + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text bt_mute + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text time_current + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : 2:15 + Max. Text Size : 10 + +Text time_total + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : 7:29 + Max. Text Size : 10 + +Text track + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Music name + Max. Text Size : 50 + +Text artist + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Artist name + Max. Text Size : 50 + +Text bt_prev + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_play_pause + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_stop + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_next + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_on_off + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Progress Bar time_progress + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Value : 34 + +Slider vol_slider + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 35 + Upper range limit: 100 + Lower range limit: 0 + +Button button_back + Attributes + ID : 5 + 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 + } + diff --git a/nspanel_eu_code/weather01.txt b/nspanel_eu_code/weather01.txt index a9af4ea..5212213 100644 --- a/nspanel_eu_code/weather01.txt +++ b/nspanel_eu_code/weather01.txt @@ -27,18 +27,18 @@ Page weather01 } Touch Press Event - printh 92 + printh 91 prints "touchevent",0 printh 00 - prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + prints rand,0 printh 00 printh FF FF FF Touch Release Event - printh 92 + printh 91 prints "touchevent",0 printh 00 - prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + prints rand,0 printh 00 printh FF FF FF diff --git a/nspanel_us.HMI b/nspanel_us.HMI index e20f440..56053d2 100644 Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 594b4dd..c77a3f4 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 3548a25..ae6897a 100644 --- a/nspanel_us_code/Program.s.txt +++ b/nspanel_us_code/Program.s.txt @@ -11,6 +11,7 @@ Program.s int display_mode=2 // 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) { diff --git a/nspanel_us_code/alarm.txt b/nspanel_us_code/alarm.txt index d5c57cb..f474c30 100644 --- a/nspanel_us_code/alarm.txt +++ b/nspanel_us_code/alarm.txt @@ -18,7 +18,7 @@ Page alarm page home }else { - lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -33,7 +33,7 @@ Page alarm } Touch Press Event - lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -42,7 +42,7 @@ Page alarm printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -50,9 +50,6 @@ Page alarm printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) lastclick Attributes ID : 3 @@ -315,7 +312,7 @@ Hotspot bt_home bt_home_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -339,7 +336,7 @@ Hotspot bt_away bt_away_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -363,7 +360,7 @@ Hotspot bt_night bt_night_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -387,7 +384,7 @@ Hotspot bt_vacat bt_vacat_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -411,7 +408,7 @@ Hotspot bt_bypass bt_bypass_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -435,7 +432,7 @@ Hotspot bt_disarm bt_disarm_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_code/boot.txt b/nspanel_us_code/boot.txt index dce2681..391677a 100644 --- a/nspanel_us_code/boot.txt +++ b/nspanel_us_code/boot.txt @@ -12,16 +12,16 @@ Page boot Events Preinitialize Event + vis bt_reboot,0 dim=100 covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints nspanelevent.txt,0 printh 00 printh FF FF FF - vis bt_reboot,0 Variable (int32) counter Attributes @@ -162,7 +162,7 @@ Timer timer counter.val++ covx counter.val,aux1.txt,0,0 covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + 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 diff --git a/nspanel_us_code/climate.txt b/nspanel_us_code/climate.txt index 7f7247f..f6b1ffa 100644 --- a/nspanel_us_code/climate.txt +++ b/nspanel_us_code/climate.txt @@ -13,9 +13,9 @@ Page climate Events Preinitialize Event dim=brightness - if(api==1||home.entity.txt=="embedded_climate") + if(api==1||entity.txt=="embedded_climate") { - climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -34,14 +34,13 @@ Page climate vis button05,0 vis button06,0 vis button07,0 - page_label.txt=home.entity.txt }else { page home } Touch Press Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -50,7 +49,7 @@ Page climate printh FF FF FF Touch Release Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -63,7 +62,7 @@ Page climate { timer01.en=0 covx temp_number.val,va1.txt,0,0 - climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -71,7 +70,6 @@ Page climate printh 00 printh FF FF FF } - home.entity.txt="" Variable (string) va1 Attributes @@ -138,6 +136,13 @@ Variable (string) va2 Text : Max. Text Size: 10 +Variable (string) entity + Attributes + ID : 49 + Scope : global + Text : + Max. Text Size: 100 + Text current_temp Attributes ID : 3 @@ -370,7 +375,7 @@ Slider climateslider Events Touch Press Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -387,7 +392,7 @@ Slider climateslider covx va0.val,va1.txt,0,0 target_temp.txt+="."+va1.txt timer01.en=1 - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -482,7 +487,7 @@ Hotspot button01 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -500,7 +505,7 @@ Hotspot button02 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -518,7 +523,7 @@ Hotspot button03 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -536,7 +541,7 @@ Hotspot button04 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -554,7 +559,7 @@ Hotspot button05 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -572,7 +577,7 @@ Hotspot button06 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -590,7 +595,7 @@ Hotspot button07 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -607,7 +612,7 @@ Hotspot button08 Events Touch Press Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -616,7 +621,7 @@ Hotspot button08 printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -633,7 +638,7 @@ Hotspot button09 Events Touch Press Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -642,7 +647,7 @@ Hotspot button09 printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -674,7 +679,7 @@ Timer timer01 timer01.en=0 covx embedded.val,va2.txt,0,0 covx temp_number.val,va1.txt,0,0 - climatesetting.txt="{\"domain\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + climatesetting.txt="{\"page\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_code/cover.txt b/nspanel_us_code/cover.txt index 1a8db51..5975617 100644 --- a/nspanel_us_code/cover.txt +++ b/nspanel_us_code/cover.txt @@ -18,18 +18,17 @@ Page cover page home }else { - coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 prints coversetting.txt,0 printh 00 printh FF FF FF - page_label.txt=home.entity.txt } Touch Press Event - coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -38,7 +37,7 @@ Page cover printh FF FF FF Touch Release Event - coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -46,9 +45,6 @@ Page cover printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) va1 Attributes ID : 7 @@ -70,6 +66,13 @@ Variable (string) back_page Text : home Max. Text Size: 15 +Variable (string) entity + Attributes + ID : 14 + Scope : global + Text : + Max. Text Size: 100 + Text battery_value Attributes ID : 1 @@ -134,7 +137,7 @@ Slider coverslider Touch Release Event covx coverslider.val,va1.txt,0,0 cover_value.txt=va1.txt+"%" - coversetting.txt="{\"domain\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -154,7 +157,7 @@ Button cover_open Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -174,7 +177,7 @@ Button cover_close Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -194,7 +197,7 @@ Button cover_stop Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_code/fan.txt b/nspanel_us_code/fan.txt index 27327a3..a5b78eb 100644 --- a/nspanel_us_code/fan.txt +++ b/nspanel_us_code/fan.txt @@ -18,18 +18,17 @@ Page fan page home }else { - fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 prints fansetting.txt,0 printh 00 printh FF FF FF - page_label.txt=home.entity.txt } Touch Press Event - fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -38,7 +37,7 @@ Page fan printh FF FF FF Touch Release Event - fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -46,9 +45,6 @@ Page fan printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) fansetting Attributes ID : 7 @@ -70,6 +66,13 @@ Variable (string) va0 Text : Max. Text Size: 10 +Variable (string) entity + Attributes + ID : 16 + Scope : global + Text : + Max. Text Size: 100 + Text fan_value Attributes ID : 1 @@ -269,7 +272,7 @@ Button button_off sys0=100*fanslider.val/fanslider.maxval covx sys0,va0.txt,0,0 fan_value.txt=va0.txt+"%" - fansetting.txt="{\"domain\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -350,7 +353,7 @@ Timer timer0 sys0=100*fanslider.val/fanslider.maxval covx sys0,va0.txt,0,0 fan_value.txt=va0.txt+"%" - fansetting.txt="{\"domain\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_code/home.txt b/nspanel_us_code/home.txt index 423f75b..d691536 100644 --- a/nspanel_us_code/home.txt +++ b/nspanel_us_code/home.txt @@ -44,7 +44,7 @@ Variable (string) lastclick Text : Max. Text Size: 100 -Variable (string) entity +Variable (string) climate_entity Attributes ID : 46 Scope : global @@ -383,7 +383,6 @@ Text bt_alarm Touch Release Event if(api==1) { - entity.txt="" page alarm } @@ -447,7 +446,7 @@ Hotspot jump_climate Events Touch Press Event - if(entity.txt=="") + if(climate_entity.txt=="") { lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" printh 92 @@ -458,11 +457,12 @@ Hotspot jump_climate printh FF FF FF }else { + climate.entity.txt=climate_entity.txt page climate } Touch Release Event - if(entity.txt=="") + if(climate_entity.txt=="") { lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" printh 92 diff --git a/nspanel_us_code/keyb_num.txt b/nspanel_us_code/keyb_num.txt index d911ac8..2c8bd0d 100644 --- a/nspanel_us_code/keyb_num.txt +++ b/nspanel_us_code/keyb_num.txt @@ -296,7 +296,7 @@ Button benter Events Touch Release Event - aux.txt="{\"domain\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}" + aux.txt="{\"page\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_code/light.txt b/nspanel_us_code/light.txt index 766b785..a1a16b0 100644 --- a/nspanel_us_code/light.txt +++ b/nspanel_us_code/light.txt @@ -18,7 +18,7 @@ Page light page home }else { - lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -43,11 +43,10 @@ Page light vis temp_button,0 vis color_touch,0 vis color_button,0 - page_label.txt=home.entity.txt } Touch Press Event - lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -56,7 +55,7 @@ Page light printh FF FF FF Touch Release Event - lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -64,9 +63,6 @@ Page light printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (int32) rgb565 Attributes ID : 22 @@ -114,6 +110,13 @@ Variable (string) back_page Text : home Max. Text Size: 15 +Variable (string) entity + Attributes + ID : 33 + Scope : global + Text : + Max. Text Size: 100 + Number ring Attributes ID : 4 @@ -387,7 +390,7 @@ Picture colorwheel covx r,va1.txt,0,0 covx g,va2.txt,0,0 covx b,va3.txt,0,0 - lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -413,7 +416,7 @@ Slider lightslider covx lightslider.val,va1.txt,0,0 light_value.txt=va1.txt+"%" light_value_2.txt=va1.txt+"%" - lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -436,7 +439,7 @@ Slider tempslider covx tempslider.val,va1.txt,0,0 temp_value.txt=va1.txt temp_value_2.txt=va1.txt - lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_land.HMI b/nspanel_us_land.HMI index 4e0fa33..666b500 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 ff59cda..5443a57 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 ec8dfba..6bb5244 100644 --- a/nspanel_us_land_code/Program.s.txt +++ b/nspanel_us_land_code/Program.s.txt @@ -11,6 +11,7 @@ Program.s int display_mode=3 // 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) { diff --git a/nspanel_us_land_code/alarm.txt b/nspanel_us_land_code/alarm.txt index d5c57cb..54b27b6 100644 --- a/nspanel_us_land_code/alarm.txt +++ b/nspanel_us_land_code/alarm.txt @@ -18,7 +18,7 @@ Page alarm page home }else { - lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -33,7 +33,7 @@ Page alarm } Touch Press Event - lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -42,7 +42,7 @@ Page alarm printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -50,9 +50,6 @@ Page alarm printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) lastclick Attributes ID : 3 @@ -77,7 +74,7 @@ Variable (string) code_format Variable (string) entity Attributes ID : 30 - Scope : local + Scope : global Text : Max. Text Size: 100 @@ -315,7 +312,7 @@ Hotspot bt_home bt_home_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -339,7 +336,7 @@ Hotspot bt_away bt_away_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -363,7 +360,7 @@ Hotspot bt_night bt_night_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -387,7 +384,7 @@ Hotspot bt_vacat bt_vacat_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -411,7 +408,7 @@ Hotspot bt_bypass bt_bypass_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -435,7 +432,7 @@ Hotspot bt_disarm bt_disarm_icon.pco=0 Touch Release Event - lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_land_code/boot.txt b/nspanel_us_land_code/boot.txt index dce2681..391677a 100644 --- a/nspanel_us_land_code/boot.txt +++ b/nspanel_us_land_code/boot.txt @@ -12,16 +12,16 @@ Page boot Events Preinitialize Event + vis bt_reboot,0 dim=100 covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints nspanelevent.txt,0 printh 00 printh FF FF FF - vis bt_reboot,0 Variable (int32) counter Attributes @@ -162,7 +162,7 @@ Timer timer counter.val++ covx counter.val,aux1.txt,0,0 covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" + 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 diff --git a/nspanel_us_land_code/climate.txt b/nspanel_us_land_code/climate.txt index 14fbd65..51a558a 100644 --- a/nspanel_us_land_code/climate.txt +++ b/nspanel_us_land_code/climate.txt @@ -13,9 +13,9 @@ Page climate Events Preinitialize Event dim=brightness - if(api==1||home.entity.txt=="embedded_climate") + if(api==1||entity.txt=="embedded_climate") { - climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -34,14 +34,13 @@ Page climate vis button05,0 vis button06,0 vis button07,0 - page_label.txt=home.entity.txt }else { page home } Touch Press Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -50,7 +49,7 @@ Page climate printh FF FF FF Touch Release Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -63,7 +62,7 @@ Page climate { timer01.en=0 covx temp_number.val,va1.txt,0,0 - climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -71,7 +70,6 @@ Page climate printh 00 printh FF FF FF } - home.entity.txt="" Variable (string) va1 Attributes @@ -138,6 +136,13 @@ Variable (string) va2 Text : Max. Text Size: 10 +Variable (string) entity + Attributes + ID : 49 + Scope : global + Text : + Max. Text Size: 100 + Text current_temp Attributes ID : 3 @@ -370,7 +375,7 @@ Slider climateslider Events Touch Press Event - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -387,7 +392,7 @@ Slider climateslider covx va0.val,va1.txt,0,0 target_temp.txt+="."+va1.txt timer01.en=1 - climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -482,7 +487,7 @@ Hotspot button01 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -500,7 +505,7 @@ Hotspot button02 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -518,7 +523,7 @@ Hotspot button03 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -536,7 +541,7 @@ Hotspot button04 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -554,7 +559,7 @@ Hotspot button05 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -572,7 +577,7 @@ Hotspot button06 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -590,7 +595,7 @@ Hotspot button07 Events Touch Release Event covx embedded.val,va2.txt,0,0 - lastclick.txt="{\"domain\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 @@ -607,7 +612,7 @@ Hotspot button08 Events Touch Press Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -616,7 +621,7 @@ Hotspot button08 printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button08\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -633,7 +638,7 @@ Hotspot button09 Events Touch Press Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -642,7 +647,7 @@ Hotspot button09 printh FF FF FF Touch Release Event - lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"climate\", \"component\": \"button09\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -674,7 +679,7 @@ Timer timer01 timer01.en=0 covx embedded.val,va2.txt,0,0 covx temp_number.val,va1.txt,0,0 - climatesetting.txt="{\"domain\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\", \"embedded\": "+va2.txt+"}" + climatesetting.txt="{\"page\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\", \"embedded\": "+va2.txt+"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_land_code/cover.txt b/nspanel_us_land_code/cover.txt index 1a8db51..5975617 100644 --- a/nspanel_us_land_code/cover.txt +++ b/nspanel_us_land_code/cover.txt @@ -18,18 +18,17 @@ Page cover page home }else { - coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 prints coversetting.txt,0 printh 00 printh FF FF FF - page_label.txt=home.entity.txt } Touch Press Event - coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -38,7 +37,7 @@ Page cover printh FF FF FF Touch Release Event - coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -46,9 +45,6 @@ Page cover printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) va1 Attributes ID : 7 @@ -70,6 +66,13 @@ Variable (string) back_page Text : home Max. Text Size: 15 +Variable (string) entity + Attributes + ID : 14 + Scope : global + Text : + Max. Text Size: 100 + Text battery_value Attributes ID : 1 @@ -134,7 +137,7 @@ Slider coverslider Touch Release Event covx coverslider.val,va1.txt,0,0 cover_value.txt=va1.txt+"%" - coversetting.txt="{\"domain\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -154,7 +157,7 @@ Button cover_open Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -174,7 +177,7 @@ Button cover_close Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -194,7 +197,7 @@ Button cover_stop Events Touch Press Event - coversetting.txt="{\"domain\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + coversetting.txt="{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_land_code/fan.txt b/nspanel_us_land_code/fan.txt index 27327a3..a5b78eb 100644 --- a/nspanel_us_land_code/fan.txt +++ b/nspanel_us_land_code/fan.txt @@ -18,18 +18,17 @@ Page fan page home }else { - fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 prints fansetting.txt,0 printh 00 printh FF FF FF - page_label.txt=home.entity.txt } Touch Press Event - fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -38,7 +37,7 @@ Page fan printh FF FF FF Touch Release Event - fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -46,9 +45,6 @@ Page fan printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (string) fansetting Attributes ID : 7 @@ -70,6 +66,13 @@ Variable (string) va0 Text : Max. Text Size: 10 +Variable (string) entity + Attributes + ID : 16 + Scope : global + Text : + Max. Text Size: 100 + Text fan_value Attributes ID : 1 @@ -269,7 +272,7 @@ Button button_off sys0=100*fanslider.val/fanslider.maxval covx sys0,va0.txt,0,0 fan_value.txt=va0.txt+"%" - fansetting.txt="{\"domain\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -350,7 +353,7 @@ Timer timer0 sys0=100*fanslider.val/fanslider.maxval covx sys0,va0.txt,0,0 fan_value.txt=va0.txt+"%" - fansetting.txt="{\"domain\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+", \"entity\": \""+home.entity.txt+"\"}" + fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_land_code/home.txt b/nspanel_us_land_code/home.txt index 211bd17..459781a 100644 --- a/nspanel_us_land_code/home.txt +++ b/nspanel_us_land_code/home.txt @@ -44,7 +44,7 @@ Variable (string) lastclick Text : Max. Text Size: 100 -Variable (string) entity +Variable (string) climate_entity Attributes ID : 46 Scope : global @@ -383,7 +383,6 @@ Text bt_alarm Touch Release Event if(api==1) { - entity.txt="" page alarm } @@ -447,7 +446,7 @@ Hotspot jump_climate Events Touch Press Event - if(entity.txt=="") + if(climate_entity.txt=="") { lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" printh 92 @@ -458,11 +457,12 @@ Hotspot jump_climate printh FF FF FF }else { + climate.entity.txt=climate_entity.txt page climate } Touch Release Event - if(entity.txt=="") + if(climate_entity.txt=="") { lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" printh 92 diff --git a/nspanel_us_land_code/keyb_num.txt b/nspanel_us_land_code/keyb_num.txt index 54fefee..0b191a2 100644 --- a/nspanel_us_land_code/keyb_num.txt +++ b/nspanel_us_land_code/keyb_num.txt @@ -296,7 +296,7 @@ Button benter Events Touch Release Event - aux.txt="{\"domain\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}" + aux.txt="{\"page\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_land_code/light.txt b/nspanel_us_land_code/light.txt index 766b785..a1a16b0 100644 --- a/nspanel_us_land_code/light.txt +++ b/nspanel_us_land_code/light.txt @@ -18,7 +18,7 @@ Page light page home }else { - lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -43,11 +43,10 @@ Page light vis temp_button,0 vis color_touch,0 vis color_button,0 - page_label.txt=home.entity.txt } Touch Press Event - lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -56,7 +55,7 @@ Page light printh FF FF FF Touch Release Event - lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 @@ -64,9 +63,6 @@ Page light printh 00 printh FF FF FF - Page Exit Event - home.entity.txt="" - Variable (int32) rgb565 Attributes ID : 22 @@ -114,6 +110,13 @@ Variable (string) back_page Text : home Max. Text Size: 15 +Variable (string) entity + Attributes + ID : 33 + Scope : global + Text : + Max. Text Size: 100 + Number ring Attributes ID : 4 @@ -387,7 +390,7 @@ Picture colorwheel covx r,va1.txt,0,0 covx g,va2.txt,0,0 covx b,va3.txt,0,0 - lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -413,7 +416,7 @@ Slider lightslider covx lightslider.val,va1.txt,0,0 light_value.txt=va1.txt+"%" light_value_2.txt=va1.txt+"%" - lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 @@ -436,7 +439,7 @@ Slider tempslider covx tempslider.val,va1.txt,0,0 temp_value.txt=va1.txt temp_value_2.txt=va1.txt - lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+entity.txt+"\"}" printh 92 prints "localevent",0 printh 00 diff --git a/nspanel_us_land_code/media_player.txt b/nspanel_us_land_code/media_player.txt new file mode 100644 index 0000000..9fb1367 --- /dev/null +++ b/nspanel_us_land_code/media_player.txt @@ -0,0 +1,265 @@ +Page media_player + 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 + dim=brightness + if(api==0) + { + page home + }else + { + lastclick.txt="{\"page\": \"media_player\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + } + + Touch Press Event + lastclick.txt="{\"page\": \"media_player\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"media_player\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Variable (string) back_page + Attributes + ID : 3 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (string) entity + Attributes + ID : 4 + Scope : global + Text : + Max. Text Size: 100 + +Variable (string) lastclick + Attributes + ID : 21 + Scope : local + Text : + Max. Text Size: 255 + +Text page_label + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Media Player + Max. Text Size : 25 + +Text icon_state + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 10 + +Text vol_text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : 35% + Max. Text Size : 10 + +Text bt_vol_down + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text bt_vol_up + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text bt_mute + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text time_current + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : 2:15 + Max. Text Size : 10 + +Text time_total + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : 7:29 + Max. Text Size : 10 + +Text track + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Music name + Max. Text Size : 50 + +Text artist + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Artist name + Max. Text Size : 50 + +Text bt_prev + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_play_pause + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_stop + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_next + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_on_off + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Progress Bar time_progress + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Value : 34 + +Slider vol_slider + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 35 + Upper range limit: 100 + Lower range limit: 0 + +Button button_back + Attributes + ID : 5 + 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 + } + diff --git a/nspanel_us_land_code/weather01.txt b/nspanel_us_land_code/weather01.txt index 3091b90..6220a28 100644 --- a/nspanel_us_land_code/weather01.txt +++ b/nspanel_us_land_code/weather01.txt @@ -27,18 +27,18 @@ Page weather01 } Touch Press Event - printh 92 + printh 91 prints "touchevent",0 printh 00 - prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + prints rand,0 printh 00 printh FF FF FF Touch Release Event - printh 92 + printh 91 prints "touchevent",0 printh 00 - prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + prints rand,0 printh 00 printh FF FF FF