Dual target climate page

- Solves #909
- Partially solves #1486
- Solves #1481
- Solves #1459
- Solves #1006
- Solves #1106
This commit is contained in:
Edward Firmo
2024-01-01 22:04:51 +01:00
parent 35b0c23be8
commit f09021d859
33 changed files with 592 additions and 794 deletions

View File

@@ -14,7 +14,7 @@ substitutions:
ota_password: ${wifi_password}
ap_password: ${wifi_password}
##### DON'T CHANGE THIS ######
version: "4.2dev.3"
version: "4.2dev.4"
##############################
##### External components #####
@@ -359,6 +359,7 @@ api:
embedded_indoor_temperature: bool
temperature_unit_is_fahrenheit: bool
mui_please_confirm: string
mui_unavailable: string
screensaver_time: bool
screensaver_time_color: int[]
then:
@@ -370,6 +371,7 @@ api:
embedded_indoor_temperature: !lambda "return embedded_indoor_temperature;"
temperature_unit_is_fahrenheit: !lambda "return temperature_unit_is_fahrenheit;"
mui_please_confirm: !lambda "return mui_please_confirm;"
mui_unavailable: !lambda "return mui_unavailable;"
screensaver_time: !lambda "return screensaver_time;"
screensaver_time_color: !lambda "return screensaver_time_color;"
@@ -434,7 +436,11 @@ api:
- service: set_climate
variables:
current_temp: float
supported_features: int
supported_hvac_modes: int
target_temp: float
target_temp_high: float
target_temp_low: float
temp_step: int
total_steps: int
temp_offset: int
@@ -447,7 +453,11 @@ api:
- script.execute:
id: set_climate
current_temp: !lambda "return current_temp;"
supported_features: !lambda "return supported_features;"
supported_hvac_modes: !lambda "return supported_hvac_modes;"
target_temp: !lambda "return target_temp;"
target_temp_high: !lambda "return target_temp_high;"
target_temp_low: !lambda "return target_temp_low;"
temp_step: !lambda "return temp_step;"
total_steps: !lambda "return total_steps;"
temp_offset: !lambda "return temp_offset;"
@@ -869,6 +879,16 @@ globals:
restore_value: false
initial_value: '{"AM", "PM"}'
#### MUI strings ####
- id: mui_please_confirm_global
type: std::string
restore_value: true
initial_value: '"Please confirm"'
- id: mui_unavailable_global
type: std::string
restore_value: true
initial_value: '"Unavailable"'
##### Chips #####
- id: home_chip_font_size
type: uint
@@ -1832,6 +1852,7 @@ script:
embedded_indoor_temperature: bool
temperature_unit_is_fahrenheit: bool
mui_please_confirm: string
mui_unavailable: string
screensaver_time: bool
screensaver_time_color: int[]
then:
@@ -1852,9 +1873,9 @@ script:
id(temp_unit_fahrenheit) = temperature_unit_is_fahrenheit;
display_embedded_temp->execute();
// Confirm page
ESP_LOGV(TAG, "Setup confirm page");
display_wrapped_text->execute("confirm.title", mui_please_confirm.c_str(), 15);
// MUI strings
id(mui_please_confirm_global) = mui_please_confirm;
id(mui_unavailable_global) = mui_unavailable;
// Screen saver page (sleep)
ESP_LOGV(TAG, "Setup screensaver page");
@@ -2154,7 +2175,9 @@ script:
- id: page_confirm
mode: restart
then: # There's nothing here so far
then:
- lambda: |-
if (not id(is_uploading_tft)) display_wrapped_text->execute("confirm.title", id(mui_please_confirm_global).c_str(), 15);
- id: page_cover
mode: restart
@@ -2475,11 +2498,15 @@ script:
disp1->set_backlight_brightness(static_cast<float>(brightness) / 100.0f);
id(display_last_brightness) = brightness;
- id: set_climate
- id: set_climate #DEBUG
mode: restart
parameters:
current_temp: float
supported_features: int
supported_hvac_modes: int
target_temp: float
target_temp_high: float
target_temp_low: float
temp_step: uint
total_steps: uint
temp_offset: int
@@ -2487,43 +2514,63 @@ script:
embedded_climate: bool
then:
- lambda: |-
if (id(is_uploading_tft)) set_climate->stop();
static const char *const TAG = "script.set_climate";
ESP_LOGV(TAG, "Starting");
ESP_LOGV(TAG, " current_temp: %f", current_temp);
ESP_LOGV(TAG, " target_temp: %f", target_temp);
ESP_LOGV(TAG, " temp_step: %d", temp_step);
ESP_LOGV(TAG, " total_steps: %d", total_steps);
ESP_LOGV(TAG, " temp_offset: %i", temp_offset);
ESP_LOGV(TAG, " climate_icon: %s", climate_icon.c_str());
ESP_LOGV(TAG, " embedded_climate: %s", embedded_climate ? "True" : "False");
ESP_LOGV(TAG, " current_temp: %f", current_temp);
ESP_LOGV(TAG, " supported_features: %i", supported_features);
ESP_LOGV(TAG, " supported_hvac_modes: %i", supported_hvac_modes);
ESP_LOGV(TAG, " target_temp: %f", target_temp);
ESP_LOGV(TAG, " target_temp_high: %f", target_temp_high);
ESP_LOGV(TAG, " target_temp_low: %f", target_temp_low);
ESP_LOGV(TAG, " temp_step: %d", temp_step);
ESP_LOGV(TAG, " total_steps: %d", total_steps);
ESP_LOGV(TAG, " temp_offset: %i", temp_offset);
ESP_LOGV(TAG, " climate_icon: %s", climate_icon.c_str());
ESP_LOGV(TAG, " embedded_climate: %s", embedded_climate ? "True" : "False");
if (current_page->state == "climate") {
ESP_LOGV(TAG, "Page climate is visible");
disp1->send_command_printf("climateslider.maxval=%i", total_steps);
disp1->set_component_value("temp_offset", temp_offset);
disp1->set_component_value("temp_step", temp_step);
disp1->set_component_text_printf("current_temp", "%.1f°", current_temp);
disp1->show_component("current_temp");
disp1->show_component("current_icon");
if (target_temp > -999)
{
float slider_val = round(((10*target_temp) - temp_offset) / temp_step);
disp1->set_component_value("climateslider", slider_val);
disp1->set_component_text_printf("target_temp", "%.1f°", target_temp);
disp1->set_component_text_printf("target_icon", "%s", climate_icon.c_str());
disp1->show_component("target_icon");
disp1->show_component("target_temp");
disp1->show_component("climateslider");
disp1->show_component("decrease_temp");
disp1->show_component("increase_temp");
}
if (current_temp > -999)
disp1->set_component_text_printf("current_temp", "%.1f°", current_temp);
else
{
disp1->hide_component("target_icon");
disp1->hide_component("target_temp");
disp1->hide_component("climateslider");
disp1->hide_component("decrease_temp");
disp1->hide_component("increase_temp");
}
disp1->set_component_text_printf("current_temp", id(mui_unavailable_global).c_str());
disp1->set_component_value("hvac_modes", supported_hvac_modes);
if (supported_hvac_modes & 1) { // Heat
if (target_temp_high <= -999 and target_temp > -999) target_temp_high = target_temp;
disp1->set_component_text_printf("target_temp_high", "%.1f°", target_temp_high);
disp1->show_component("target_temp_high");
disp1->set_component_value("slider_high", round(((10*target_temp_high) - temp_offset) / temp_step));
disp1->show_component("slider_high");
} else {
disp1->hide_component("target_temp_high");
disp1->hide_component("slider_high");
}
if (supported_hvac_modes & 2) { // Cool
if (target_temp_low <= -999 and target_temp > -999) target_temp_low = target_temp;
disp1->set_component_text_printf("target_temp_low", "%.1f°", target_temp_low);
disp1->show_component("target_temp_low");
disp1->set_component_value("slider_low", round(((10*target_temp_low) - temp_offset) / temp_step));
disp1->show_component("slider_low");
} else {
disp1->hide_component("target_temp_low");
disp1->hide_component("slider_low");
}
if (supported_hvac_modes > 0) {
disp1->set_component_text_printf("target_icon", "%s", climate_icon.c_str());
disp1->show_component("target_icon");
disp1->show_component("decrease_temp");
disp1->show_component("increase_temp");
} else {
disp1->hide_component("target_icon");
disp1->hide_component("decrease_temp");
disp1->hide_component("increase_temp");
}
disp1->set_component_value("embedded", (embedded_climate) ? 1 : 0);
}
ESP_LOGV(TAG, "Finished");

Binary file not shown.

Binary file not shown.

View File

@@ -9,7 +9,7 @@ Program.s
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40,brightness_sleep=0
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
int charset=2 // 1 = International (original), 2 = CJK
//bauds=115200//Configure baudrate
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode

View File

@@ -13,53 +13,26 @@ Page boot
Events
Preinitialize Event
sendme
dim=0
dim=100
vis bt_reboot,0
sendme
dim=100
vis bt_reboot,0
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Page Exit Event
dim=0
Variable (int32) counter
Attributes
ID : 12
ID : 11
Scope: local
Value: 0
Variable (string) aux1
Attributes
ID : 13
Scope : local
Text :
Max. Text Size: 10
Variable (string) nspanelevent
Attributes
ID : 14
Scope : local
Text :
Max. Text Size: 150
Variable (string) aux2
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 10
Variable (string) aux3
Attributes
ID : 21
ID : 12
Scope : local
Text :
Max. Text Size: 10
@@ -131,7 +104,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2dev.2
Text : 4.2dev.4
Max. Text Size : 9
Text esph_version
@@ -156,7 +129,7 @@ Text bluep_version
Text baud_rate
Attributes
ID : 18
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -166,7 +139,7 @@ Text baud_rate
Text framework
Attributes
ID : 20
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -184,85 +157,44 @@ Dual-state Button bt_reboot
Text : Reboot
Max. Text Size : 6
Timer timer
Attributes
ID : 11
Scope : local
Period (ms): 65534
Enabled : yes
Events
Timer Event
counter.val++
covx counter.val,aux1.txt,0,0
covx display_mode,aux2.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
bluep_version.txt="Retry: "+aux1.txt
printh 92
prints "nspanelevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Timer wakeup_timer
Attributes
ID : 16
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
if(dim<100)
{
dimdelta=100-dim
dimdelta/=25
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
Timer tm_esphome
Attributes
ID : 17
ID : 13
Scope : local
Period (ms): 30000
Enabled : yes
Events
Timer Event
if(baud==115200)
counter.val++
if(counter.val>60)
{
bauds=921600
}else
rest
}
sendme
printh 91
prints "display_mode",0
printh 00
prints display_mode,0
printh FF FF FF
printh 91
prints "charset",0
printh 00
prints charset,0
printh FF FF FF
printh 92
prints "tft_version",0
printh 00
prints tft_version.txt,0
printh 00
printh FF FF FF
covx counter.val,aux1.txt,0,0
esph_version.txt="Retry #"+aux1.txt
sys0=counter.val%10
if(sys0==0)
{
bauds=115200
baud=115200
}
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
Timer tm_pageid
Attributes
ID : 19
Scope : local
Period (ms): 2500
Enabled : yes
Events
Timer Event
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF

View File

@@ -19,7 +19,6 @@ Page climate
vis target_high,0
vis target_low,0
vis current_temp,0
vis current_icon,0
vis slider_high,0
vis slider_low,0
vis button01,0
@@ -50,80 +49,80 @@ Page climate
Variable (string) va1
Attributes
ID : 25
ID : 24
Scope : local
Text :
Max. Text Size: 10
Variable (string) climatesetting
Attributes
ID : 26
ID : 25
Scope : local
Text :
Max. Text Size: 255
Variable (string) lastclick
Attributes
ID : 27
ID : 26
Scope : local
Text :
Max. Text Size: 255
Variable (int32) temp_offset
Attributes
ID : 29
ID : 28
Scope: local
Value: 0
Variable (int32) temp_step
Attributes
ID : 30
ID : 29
Scope: local
Value: 0
Variable (int32) temp_number
Attributes
ID : 34
ID : 33
Scope: local
Value: 0
Variable (int32) va0
Attributes
ID : 35
ID : 34
Scope: local
Value: 0
Variable (int32) embedded
Attributes
ID : 36
ID : 35
Scope: global
Value: 0
Variable (string) va2
Attributes
ID : 37
ID : 36
Scope : local
Text :
Max. Text Size: 10
Variable (string) click_comp
Attributes
ID : 39
ID : 38
Scope : local
Text :
Max. Text Size: 8
Variable (int32) single_slider
Variable (int32) active_slider
Attributes
ID : 43
ID : 42
Scope: local
Value: 1
Variable (int32) active_slider
Variable (int32) hvac_mode
Attributes
ID : 44
Scope: local
Value: 1
Value: 0
Text current_temp
Attributes
@@ -133,7 +132,7 @@ Text current_temp
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Max. Text Size : 25
Text page_label
Attributes
@@ -145,7 +144,7 @@ Text page_label
Text :
Max. Text Size : 100
Text current_icon
Text target_icon
Attributes
ID : 8
Scope : local
@@ -155,7 +154,7 @@ Text current_icon
Text :
Max. Text Size : 10
Text target_icon
Text value01_icon
Attributes
ID : 9
Scope : local
@@ -165,19 +164,9 @@ Text target_icon
Text :
Max. Text Size : 10
Text value01_icon
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Text value01
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -187,7 +176,7 @@ Text value01
Text value02_icon
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -197,7 +186,7 @@ Text value02_icon
Text value02
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -207,7 +196,7 @@ Text value02
Text value03_icon
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -217,7 +206,7 @@ Text value03_icon
Text value03
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -227,7 +216,7 @@ Text value03
Text value04_icon
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -237,7 +226,7 @@ Text value04_icon
Text value04
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -247,7 +236,7 @@ Text value04
Text button01
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -268,7 +257,7 @@ Text button01
Text button02
Attributes
ID : 19
ID : 18
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -289,7 +278,7 @@ Text button02
Text button03
Attributes
ID : 20
ID : 19
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -310,7 +299,7 @@ Text button03
Text button04
Attributes
ID : 21
ID : 20
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -331,7 +320,7 @@ Text button04
Text button05
Attributes
ID : 22
ID : 21
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -352,7 +341,7 @@ Text button05
Text button06
Attributes
ID : 23
ID : 22
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -373,7 +362,7 @@ Text button06
Text button07
Attributes
ID : 24
ID : 23
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -394,7 +383,7 @@ Text button07
Text button08
Attributes
ID : 31
ID : 30
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -422,7 +411,7 @@ Text button08
Text button09
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -450,7 +439,7 @@ Text button09
Text target_high
Attributes
ID : 33
ID : 32
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -460,7 +449,7 @@ Text target_high
Text target_low
Attributes
ID : 45
ID : 43
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -480,6 +469,10 @@ Slider slider_high
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_low.val=slider_high.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -491,7 +484,7 @@ Slider slider_high
Slider slider_low
Attributes
ID : 42
ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -501,6 +494,10 @@ Slider slider_low
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_high.val=slider_low.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -512,7 +509,7 @@ Slider slider_low
Button button_back
Attributes
ID : 38
ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -586,7 +583,7 @@ Timer swipestore
Timer timer01
Attributes
ID : 28
ID : 27
Scope : local
Period (ms): 1000
Enabled : no
@@ -606,7 +603,7 @@ Timer timer01
Timer click_timer
Attributes
ID : 40
ID : 39
Scope : local
Period (ms): 800
Enabled : no
@@ -624,7 +621,7 @@ Timer click_timer
Timer wakeup_timer
Attributes
ID : 41
ID : 40
Scope : local
Period (ms): 100
Enabled : yes

Binary file not shown.

Binary file not shown.

View File

@@ -9,7 +9,7 @@ Program.s
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40,brightness_sleep=0
int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape
int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
int charset=2 // 1 = International (original), 2 = CJK
//bauds=115200//Configure baudrate
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode

View File

@@ -13,53 +13,23 @@ Page boot
Events
Preinitialize Event
sendme
dim=0
dim=100
vis bt_reboot,0
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Page Exit Event
dim=0
Variable (int32) counter
Attributes
ID : 12
ID : 11
Scope: local
Value: 0
Variable (string) aux1
Attributes
ID : 13
Scope : local
Text :
Max. Text Size: 10
Variable (string) nspanelevent
Attributes
ID : 14
Scope : local
Text :
Max. Text Size: 150
Variable (string) aux2
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 10
Variable (string) aux3
Attributes
ID : 21
ID : 12
Scope : local
Text :
Max. Text Size: 10
@@ -131,7 +101,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2dev.2
Text : 4.2dev.4
Max. Text Size : 9
Text esph_version
@@ -156,7 +126,7 @@ Text bluep_version
Text baud_rate
Attributes
ID : 18
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -166,7 +136,7 @@ Text baud_rate
Text framework
Attributes
ID : 20
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -184,85 +154,44 @@ Dual-state Button bt_reboot
Text : Reboot
Max. Text Size : 6
Timer timer
Attributes
ID : 11
Scope : local
Period (ms): 65534
Enabled : yes
Events
Timer Event
counter.val++
covx counter.val,aux1.txt,0,0
covx display_mode,aux2.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
bluep_version.txt="Retry: "+aux1.txt
printh 92
prints "nspanelevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Timer wakeup_timer
Attributes
ID : 16
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
if(dim<100)
{
dimdelta=100-dim
dimdelta/=25
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
Timer tm_esphome
Attributes
ID : 17
ID : 13
Scope : local
Period (ms): 30000
Enabled : yes
Events
Timer Event
if(baud==115200)
counter.val++
if(counter.val>60)
{
bauds=921600
}else
rest
}
sendme
printh 91
prints "display_mode",0
printh 00
prints display_mode,0
printh FF FF FF
printh 91
prints "charset",0
printh 00
prints charset,0
printh FF FF FF
printh 92
prints "tft_version",0
printh 00
prints tft_version.txt,0
printh 00
printh FF FF FF
covx counter.val,aux1.txt,0,0
esph_version.txt="Retry #"+aux1.txt
sys0=counter.val%10
if(sys0==0)
{
bauds=115200
baud=115200
}
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
Timer tm_pageid
Attributes
ID : 19
Scope : local
Period (ms): 2500
Enabled : yes
Events
Timer Event
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF

View File

@@ -19,7 +19,6 @@ Page climate
vis target_high,0
vis target_low,0
vis current_temp,0
vis current_icon,0
vis slider_high,0
vis slider_low,0
vis button01,0
@@ -50,80 +49,80 @@ Page climate
Variable (string) va1
Attributes
ID : 25
ID : 24
Scope : local
Text :
Max. Text Size: 10
Variable (string) climatesetting
Attributes
ID : 26
ID : 25
Scope : local
Text :
Max. Text Size: 255
Variable (string) lastclick
Attributes
ID : 27
ID : 26
Scope : local
Text :
Max. Text Size: 255
Variable (int32) temp_offset
Attributes
ID : 29
ID : 28
Scope: local
Value: 0
Variable (int32) temp_step
Attributes
ID : 30
ID : 29
Scope: local
Value: 1
Variable (int32) temp_number
Attributes
ID : 34
ID : 33
Scope: local
Value: 0
Variable (int32) va0
Attributes
ID : 35
ID : 34
Scope: local
Value: 0
Variable (int32) embedded
Attributes
ID : 36
ID : 35
Scope: global
Value: 0
Variable (string) va2
Attributes
ID : 37
ID : 36
Scope : local
Text :
Max. Text Size: 10
Variable (string) click_comp
Attributes
ID : 39
ID : 38
Scope : local
Text :
Max. Text Size: 8
Variable (int32) single_slider
Variable (int32) active_slider
Attributes
ID : 43
ID : 42
Scope: local
Value: 1
Variable (int32) active_slider
Variable (int32) hvac_mode
Attributes
ID : 44
Scope: local
Value: 1
Value: 0
Text current_temp
Attributes
@@ -133,7 +132,7 @@ Text current_temp
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Max. Text Size : 25
Text page_label
Attributes
@@ -145,7 +144,7 @@ Text page_label
Text :
Max. Text Size : 100
Text current_icon
Text target_icon
Attributes
ID : 8
Scope : local
@@ -155,7 +154,7 @@ Text current_icon
Text :
Max. Text Size : 10
Text target_icon
Text value01_icon
Attributes
ID : 9
Scope : local
@@ -165,19 +164,9 @@ Text target_icon
Text :
Max. Text Size : 10
Text value01_icon
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Text value01
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -187,7 +176,7 @@ Text value01
Text value02_icon
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -197,7 +186,7 @@ Text value02_icon
Text value02
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -207,7 +196,7 @@ Text value02
Text value03_icon
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -217,7 +206,7 @@ Text value03_icon
Text value03
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -227,7 +216,7 @@ Text value03
Text value04_icon
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -237,7 +226,7 @@ Text value04_icon
Text value04
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -247,7 +236,7 @@ Text value04
Text button01
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -268,7 +257,7 @@ Text button01
Text button02
Attributes
ID : 19
ID : 18
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -289,7 +278,7 @@ Text button02
Text button03
Attributes
ID : 20
ID : 19
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -310,7 +299,7 @@ Text button03
Text button04
Attributes
ID : 21
ID : 20
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -331,7 +320,7 @@ Text button04
Text button05
Attributes
ID : 22
ID : 21
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -352,7 +341,7 @@ Text button05
Text button06
Attributes
ID : 23
ID : 22
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -373,7 +362,7 @@ Text button06
Text button07
Attributes
ID : 24
ID : 23
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -394,7 +383,7 @@ Text button07
Text button08
Attributes
ID : 31
ID : 30
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -422,7 +411,7 @@ Text button08
Text button09
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -450,7 +439,7 @@ Text button09
Text target_high
Attributes
ID : 33
ID : 32
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -460,7 +449,7 @@ Text target_high
Text target_low
Attributes
ID : 45
ID : 43
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -480,7 +469,7 @@ Slider slider_high
Events
Touch Release Event
if(single_slider.val==1)
if(hvac_mode.val!=3)
{
slider_low.val=slider_high.val
}
@@ -495,7 +484,7 @@ Slider slider_high
Slider slider_low
Attributes
ID : 42
ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -505,7 +494,7 @@ Slider slider_low
Events
Touch Release Event
if(single_slider.val==1)
if(hvac_mode.val!=3)
{
slider_high.val=slider_low.val
}
@@ -520,7 +509,7 @@ Slider slider_low
Button button_back
Attributes
ID : 38
ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -594,7 +583,7 @@ Timer swipestore
Timer timer01
Attributes
ID : 28
ID : 27
Scope : local
Period (ms): 1000
Enabled : no
@@ -614,7 +603,7 @@ Timer timer01
Timer click_timer
Attributes
ID : 40
ID : 39
Scope : local
Period (ms): 800
Enabled : no
@@ -632,7 +621,7 @@ Timer click_timer
Timer wakeup_timer
Attributes
ID : 41
ID : 40
Scope : local
Period (ms): 100
Enabled : yes

Binary file not shown.

Binary file not shown.

View File

@@ -9,7 +9,7 @@ Program.s
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40,brightness_sleep=0
int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape
int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
int charset=2 // 1 = International (original), 2 = CJK
//bauds=115200//Configure baudrate
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode

View File

@@ -13,53 +13,26 @@ Page boot
Events
Preinitialize Event
sendme
dim=0
dim=100
vis bt_reboot,0
sendme
dim=100
vis bt_reboot,0
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Page Exit Event
dim=0
Variable (int32) counter
Attributes
ID : 12
ID : 11
Scope: local
Value: 0
Variable (string) aux1
Attributes
ID : 13
Scope : local
Text :
Max. Text Size: 10
Variable (string) nspanelevent
Attributes
ID : 14
Scope : local
Text :
Max. Text Size: 150
Variable (string) aux2
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 10
Variable (string) aux3
Attributes
ID : 21
ID : 12
Scope : local
Text :
Max. Text Size: 10
@@ -131,7 +104,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2dev.2
Text : 4.2dev.4
Max. Text Size : 9
Text esph_version
@@ -156,7 +129,7 @@ Text bluep_version
Text baud_rate
Attributes
ID : 18
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -166,7 +139,7 @@ Text baud_rate
Text framework
Attributes
ID : 20
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -184,85 +157,44 @@ Dual-state Button bt_reboot
Text : Reboot
Max. Text Size : 6
Timer timer
Attributes
ID : 11
Scope : local
Period (ms): 65534
Enabled : yes
Events
Timer Event
counter.val++
covx counter.val,aux1.txt,0,0
covx display_mode,aux2.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
bluep_version.txt="Retry: "+aux1.txt
printh 92
prints "nspanelevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Timer wakeup_timer
Attributes
ID : 16
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
if(dim<100)
{
dimdelta=100-dim
dimdelta/=25
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
Timer tm_esphome
Attributes
ID : 17
ID : 13
Scope : local
Period (ms): 30000
Enabled : yes
Events
Timer Event
if(baud==115200)
counter.val++
if(counter.val>60)
{
bauds=921600
}else
rest
}
sendme
printh 91
prints "display_mode",0
printh 00
prints display_mode,0
printh FF FF FF
printh 91
prints "charset",0
printh 00
prints charset,0
printh FF FF FF
printh 92
prints "tft_version",0
printh 00
prints tft_version.txt,0
printh 00
printh FF FF FF
covx counter.val,aux1.txt,0,0
esph_version.txt="Retry #"+aux1.txt
sys0=counter.val%10
if(sys0==0)
{
bauds=115200
baud=115200
}
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
Timer tm_pageid
Attributes
ID : 19
Scope : local
Period (ms): 2500
Enabled : yes
Events
Timer Event
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF

View File

@@ -19,7 +19,6 @@ Page climate
vis target_high,0
vis target_low,0
vis current_temp,0
vis current_icon,0
vis slider_high,0
vis slider_low,0
vis button01,0
@@ -50,80 +49,80 @@ Page climate
Variable (string) va1
Attributes
ID : 25
ID : 24
Scope : local
Text :
Max. Text Size: 10
Variable (string) climatesetting
Attributes
ID : 26
ID : 25
Scope : local
Text :
Max. Text Size: 255
Variable (string) lastclick
Attributes
ID : 27
ID : 26
Scope : local
Text :
Max. Text Size: 255
Variable (int32) temp_offset
Attributes
ID : 29
ID : 28
Scope: local
Value: 0
Variable (int32) temp_step
Attributes
ID : 30
ID : 29
Scope: local
Value: 0
Variable (int32) temp_number
Attributes
ID : 34
ID : 33
Scope: local
Value: 0
Variable (int32) va0
Attributes
ID : 35
ID : 34
Scope: local
Value: 0
Variable (int32) embedded
Attributes
ID : 36
ID : 35
Scope: global
Value: 0
Variable (string) va2
Attributes
ID : 37
ID : 36
Scope : local
Text :
Max. Text Size: 10
Variable (string) click_comp
Attributes
ID : 39
ID : 38
Scope : local
Text :
Max. Text Size: 8
Variable (int32) single_slider
Variable (int32) active_slider
Attributes
ID : 43
ID : 42
Scope: local
Value: 1
Variable (int32) active_slider
Variable (int32) hvac_mode
Attributes
ID : 44
Scope: local
Value: 1
Value: 0
Text current_temp
Attributes
@@ -133,7 +132,7 @@ Text current_temp
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Max. Text Size : 25
Text page_label
Attributes
@@ -145,7 +144,7 @@ Text page_label
Text :
Max. Text Size : 100
Text current_icon
Text target_icon
Attributes
ID : 8
Scope : local
@@ -155,7 +154,7 @@ Text current_icon
Text :
Max. Text Size : 10
Text target_icon
Text value01_icon
Attributes
ID : 9
Scope : local
@@ -165,19 +164,9 @@ Text target_icon
Text :
Max. Text Size : 10
Text value01_icon
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Text value01
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -187,7 +176,7 @@ Text value01
Text value02_icon
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -197,7 +186,7 @@ Text value02_icon
Text value02
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -207,7 +196,7 @@ Text value02
Text value03_icon
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -217,7 +206,7 @@ Text value03_icon
Text value03
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -227,7 +216,7 @@ Text value03
Text value04_icon
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -237,7 +226,7 @@ Text value04_icon
Text value04
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -247,7 +236,7 @@ Text value04
Text button01
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -268,7 +257,7 @@ Text button01
Text button02
Attributes
ID : 19
ID : 18
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -289,7 +278,7 @@ Text button02
Text button03
Attributes
ID : 20
ID : 19
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -310,7 +299,7 @@ Text button03
Text button04
Attributes
ID : 21
ID : 20
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -331,7 +320,7 @@ Text button04
Text button05
Attributes
ID : 22
ID : 21
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -352,7 +341,7 @@ Text button05
Text button06
Attributes
ID : 23
ID : 22
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -373,7 +362,7 @@ Text button06
Text button07
Attributes
ID : 24
ID : 23
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -394,7 +383,7 @@ Text button07
Text button08
Attributes
ID : 31
ID : 30
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -422,7 +411,7 @@ Text button08
Text button09
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -450,7 +439,7 @@ Text button09
Text target_high
Attributes
ID : 33
ID : 32
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -460,7 +449,7 @@ Text target_high
Text target_low
Attributes
ID : 45
ID : 43
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -480,6 +469,10 @@ Slider slider_high
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_low.val=slider_high.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -491,7 +484,7 @@ Slider slider_high
Slider slider_low
Attributes
ID : 42
ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -501,6 +494,10 @@ Slider slider_low
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_high.val=slider_low.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -512,7 +509,7 @@ Slider slider_low
Button button_back
Attributes
ID : 38
ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -586,7 +583,7 @@ Timer swipestore
Timer timer01
Attributes
ID : 28
ID : 27
Scope : local
Period (ms): 1000
Enabled : no
@@ -606,7 +603,7 @@ Timer timer01
Timer click_timer
Attributes
ID : 40
ID : 39
Scope : local
Period (ms): 800
Enabled : no
@@ -624,7 +621,7 @@ Timer click_timer
Timer wakeup_timer
Attributes
ID : 41
ID : 40
Scope : local
Period (ms): 100
Enabled : yes

Binary file not shown.

View File

@@ -10,7 +10,7 @@ Program.s
int is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40,brightness_sleep=0
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
int charset=2 // 1 = International (original), 2 = CJK
int charset=1 // 1 = International (original), 2 = CJK
//bauds=115200//Configure baudrate
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port

View File

@@ -104,7 +104,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2dev.3
Text : 4.2dev.4
Max. Text Size : 9
Text esph_version

View File

@@ -19,7 +19,6 @@ Page climate
vis target_high,0
vis target_low,0
vis current_temp,0
vis current_icon,0
vis slider_high,0
vis slider_low,0
vis button01,0
@@ -50,80 +49,80 @@ Page climate
Variable (string) va1
Attributes
ID : 25
ID : 24
Scope : local
Text :
Max. Text Size: 10
Variable (string) climatesetting
Attributes
ID : 26
ID : 25
Scope : local
Text :
Max. Text Size: 255
Variable (string) lastclick
Attributes
ID : 27
ID : 26
Scope : local
Text :
Max. Text Size: 255
Variable (int32) temp_offset
Attributes
ID : 29
ID : 28
Scope: local
Value: 0
Variable (int32) temp_step
Attributes
ID : 30
ID : 29
Scope: local
Value: 0
Variable (int32) temp_number
Attributes
ID : 34
ID : 33
Scope: local
Value: 0
Variable (int32) va0
Attributes
ID : 35
ID : 34
Scope: local
Value: 0
Variable (int32) embedded
Attributes
ID : 36
ID : 35
Scope: global
Value: 0
Variable (string) va2
Attributes
ID : 37
ID : 36
Scope : local
Text :
Max. Text Size: 10
Variable (string) click_comp
Attributes
ID : 39
ID : 38
Scope : local
Text :
Max. Text Size: 8
Variable (int32) single_slider
Variable (int32) active_slider
Attributes
ID : 43
ID : 42
Scope: local
Value: 1
Variable (int32) active_slider
Variable (int32) hvac_mode
Attributes
ID : 44
Scope: local
Value: 1
Value: 0
Text current_temp
Attributes
@@ -133,7 +132,7 @@ Text current_temp
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Max. Text Size : 25
Text page_label
Attributes
@@ -145,7 +144,7 @@ Text page_label
Text :
Max. Text Size : 100
Text current_icon
Text target_icon
Attributes
ID : 8
Scope : local
@@ -155,7 +154,7 @@ Text current_icon
Text :
Max. Text Size : 10
Text target_icon
Text value01_icon
Attributes
ID : 9
Scope : local
@@ -165,19 +164,9 @@ Text target_icon
Text :
Max. Text Size : 10
Text value01_icon
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Text value01
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -187,7 +176,7 @@ Text value01
Text value02_icon
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -197,7 +186,7 @@ Text value02_icon
Text value02
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -207,7 +196,7 @@ Text value02
Text value03_icon
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -217,7 +206,7 @@ Text value03_icon
Text value03
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -227,7 +216,7 @@ Text value03
Text value04_icon
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -237,7 +226,7 @@ Text value04_icon
Text value04
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -247,7 +236,7 @@ Text value04
Text button01
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -268,7 +257,7 @@ Text button01
Text button02
Attributes
ID : 19
ID : 18
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -289,7 +278,7 @@ Text button02
Text button03
Attributes
ID : 20
ID : 19
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -310,7 +299,7 @@ Text button03
Text button04
Attributes
ID : 21
ID : 20
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -331,7 +320,7 @@ Text button04
Text button05
Attributes
ID : 22
ID : 21
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -352,7 +341,7 @@ Text button05
Text button06
Attributes
ID : 23
ID : 22
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -373,7 +362,7 @@ Text button06
Text button07
Attributes
ID : 24
ID : 23
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -394,7 +383,7 @@ Text button07
Text button08
Attributes
ID : 31
ID : 30
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -422,7 +411,7 @@ Text button08
Text button09
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -450,7 +439,7 @@ Text button09
Text target_high
Attributes
ID : 33
ID : 32
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -460,7 +449,7 @@ Text target_high
Text target_low
Attributes
ID : 45
ID : 43
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -480,6 +469,10 @@ Slider slider_high
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_low.val=slider_high.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -491,7 +484,7 @@ Slider slider_high
Slider slider_low
Attributes
ID : 42
ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -501,6 +494,10 @@ Slider slider_low
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_high.val=slider_low.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -512,7 +509,7 @@ Slider slider_low
Button button_back
Attributes
ID : 38
ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -586,7 +583,7 @@ Timer swipestore
Timer timer01
Attributes
ID : 28
ID : 27
Scope : local
Period (ms): 1000
Enabled : no
@@ -606,7 +603,7 @@ Timer timer01
Timer click_timer
Attributes
ID : 40
ID : 39
Scope : local
Period (ms): 800
Enabled : no
@@ -624,7 +621,7 @@ Timer click_timer
Timer wakeup_timer
Attributes
ID : 41
ID : 40
Scope : local
Period (ms): 100
Enabled : yes

Binary file not shown.

View File

@@ -101,7 +101,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2dev.3
Text : 4.2dev.4
Max. Text Size : 9
Text esph_version

View File

@@ -19,7 +19,6 @@ Page climate
vis target_high,0
vis target_low,0
vis current_temp,0
vis current_icon,0
vis slider_high,0
vis slider_low,0
vis button01,0
@@ -50,80 +49,80 @@ Page climate
Variable (string) va1
Attributes
ID : 25
ID : 24
Scope : local
Text :
Max. Text Size: 10
Variable (string) climatesetting
Attributes
ID : 26
ID : 25
Scope : local
Text :
Max. Text Size: 255
Variable (string) lastclick
Attributes
ID : 27
ID : 26
Scope : local
Text :
Max. Text Size: 255
Variable (int32) temp_offset
Attributes
ID : 29
ID : 28
Scope: local
Value: 0
Variable (int32) temp_step
Attributes
ID : 30
ID : 29
Scope: local
Value: 1
Variable (int32) temp_number
Attributes
ID : 34
ID : 33
Scope: local
Value: 0
Variable (int32) va0
Attributes
ID : 35
ID : 34
Scope: local
Value: 0
Variable (int32) embedded
Attributes
ID : 36
ID : 35
Scope: global
Value: 0
Variable (string) va2
Attributes
ID : 37
ID : 36
Scope : local
Text :
Max. Text Size: 10
Variable (string) click_comp
Attributes
ID : 39
ID : 38
Scope : local
Text :
Max. Text Size: 8
Variable (int32) single_slider
Variable (int32) active_slider
Attributes
ID : 43
ID : 42
Scope: local
Value: 1
Variable (int32) active_slider
Variable (int32) hvac_mode
Attributes
ID : 44
Scope: local
Value: 1
Value: 0
Text current_temp
Attributes
@@ -133,7 +132,7 @@ Text current_temp
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Max. Text Size : 25
Text page_label
Attributes
@@ -145,7 +144,7 @@ Text page_label
Text :
Max. Text Size : 100
Text current_icon
Text target_icon
Attributes
ID : 8
Scope : local
@@ -155,7 +154,7 @@ Text current_icon
Text :
Max. Text Size : 10
Text target_icon
Text value01_icon
Attributes
ID : 9
Scope : local
@@ -165,19 +164,9 @@ Text target_icon
Text :
Max. Text Size : 10
Text value01_icon
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Text value01
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -187,7 +176,7 @@ Text value01
Text value02_icon
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -197,7 +186,7 @@ Text value02_icon
Text value02
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -207,7 +196,7 @@ Text value02
Text value03_icon
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -217,7 +206,7 @@ Text value03_icon
Text value03
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -227,7 +216,7 @@ Text value03
Text value04_icon
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -237,7 +226,7 @@ Text value04_icon
Text value04
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -247,7 +236,7 @@ Text value04
Text button01
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -268,7 +257,7 @@ Text button01
Text button02
Attributes
ID : 19
ID : 18
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -289,7 +278,7 @@ Text button02
Text button03
Attributes
ID : 20
ID : 19
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -310,7 +299,7 @@ Text button03
Text button04
Attributes
ID : 21
ID : 20
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -331,7 +320,7 @@ Text button04
Text button05
Attributes
ID : 22
ID : 21
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -352,7 +341,7 @@ Text button05
Text button06
Attributes
ID : 23
ID : 22
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -373,7 +362,7 @@ Text button06
Text button07
Attributes
ID : 24
ID : 23
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -394,7 +383,7 @@ Text button07
Text button08
Attributes
ID : 31
ID : 30
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -422,7 +411,7 @@ Text button08
Text button09
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -450,7 +439,7 @@ Text button09
Text target_high
Attributes
ID : 33
ID : 32
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -460,7 +449,7 @@ Text target_high
Text target_low
Attributes
ID : 45
ID : 43
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -480,7 +469,7 @@ Slider slider_high
Events
Touch Release Event
if(single_slider.val==1)
if(hvac_mode.val!=3)
{
slider_low.val=slider_high.val
}
@@ -495,7 +484,7 @@ Slider slider_high
Slider slider_low
Attributes
ID : 42
ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -505,7 +494,7 @@ Slider slider_low
Events
Touch Release Event
if(single_slider.val==1)
if(hvac_mode.val!=3)
{
slider_high.val=slider_low.val
}
@@ -520,7 +509,7 @@ Slider slider_low
Button button_back
Attributes
ID : 38
ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -594,7 +583,7 @@ Timer swipestore
Timer timer01
Attributes
ID : 28
ID : 27
Scope : local
Period (ms): 1000
Enabled : no
@@ -614,7 +603,7 @@ Timer timer01
Timer click_timer
Attributes
ID : 40
ID : 39
Scope : local
Period (ms): 800
Enabled : no
@@ -632,7 +621,7 @@ Timer click_timer
Timer wakeup_timer
Attributes
ID : 41
ID : 40
Scope : local
Period (ms): 100
Enabled : yes

Binary file not shown.

View File

@@ -9,7 +9,7 @@ Program.s
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40,brightness_sleep=0
int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape
int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
int charset=1 // 1 = International (original), 2 = CJK
//bauds=115200//Configure baudrate
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode

View File

@@ -13,53 +13,26 @@ Page boot
Events
Preinitialize Event
sendme
dim=0
dim=100
vis bt_reboot,0
sendme
dim=100
vis bt_reboot,0
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Page Exit Event
dim=0
Variable (int32) counter
Attributes
ID : 12
ID : 11
Scope: local
Value: 0
Variable (string) aux1
Attributes
ID : 13
Scope : local
Text :
Max. Text Size: 10
Variable (string) nspanelevent
Attributes
ID : 14
Scope : local
Text :
Max. Text Size: 150
Variable (string) aux2
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 10
Variable (string) aux3
Attributes
ID : 21
ID : 12
Scope : local
Text :
Max. Text Size: 10
@@ -131,7 +104,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2dev.2
Text : 4.2dev.4
Max. Text Size : 9
Text esph_version
@@ -156,7 +129,7 @@ Text bluep_version
Text baud_rate
Attributes
ID : 18
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -166,7 +139,7 @@ Text baud_rate
Text framework
Attributes
ID : 20
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -184,85 +157,44 @@ Dual-state Button bt_reboot
Text : Reboot
Max. Text Size : 6
Timer timer
Attributes
ID : 11
Scope : local
Period (ms): 65534
Enabled : yes
Events
Timer Event
counter.val++
covx counter.val,aux1.txt,0,0
covx display_mode,aux2.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
bluep_version.txt="Retry: "+aux1.txt
printh 92
prints "nspanelevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF
Timer wakeup_timer
Attributes
ID : 16
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
if(dim<100)
{
dimdelta=100-dim
dimdelta/=25
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
Timer tm_esphome
Attributes
ID : 17
ID : 13
Scope : local
Period (ms): 30000
Enabled : yes
Events
Timer Event
if(baud==115200)
counter.val++
if(counter.val>60)
{
bauds=921600
}else
rest
}
sendme
printh 91
prints "display_mode",0
printh 00
prints display_mode,0
printh FF FF FF
printh 91
prints "charset",0
printh 00
prints charset,0
printh FF FF FF
printh 92
prints "tft_version",0
printh 00
prints tft_version.txt,0
printh 00
printh FF FF FF
covx counter.val,aux1.txt,0,0
esph_version.txt="Retry #"+aux1.txt
sys0=counter.val%10
if(sys0==0)
{
bauds=115200
baud=115200
}
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
Timer tm_pageid
Attributes
ID : 19
Scope : local
Period (ms): 2500
Enabled : yes
Events
Timer Event
covx display_mode,aux2.txt,0,0
covx charset,aux3.txt,0,0
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF

View File

@@ -19,7 +19,6 @@ Page climate
vis target_high,0
vis target_low,0
vis current_temp,0
vis current_icon,0
vis slider_high,0
vis slider_low,0
vis button01,0
@@ -50,80 +49,80 @@ Page climate
Variable (string) va1
Attributes
ID : 25
ID : 24
Scope : local
Text :
Max. Text Size: 10
Variable (string) climatesetting
Attributes
ID : 26
ID : 25
Scope : local
Text :
Max. Text Size: 255
Variable (string) lastclick
Attributes
ID : 27
ID : 26
Scope : local
Text :
Max. Text Size: 255
Variable (int32) temp_offset
Attributes
ID : 29
ID : 28
Scope: local
Value: 0
Variable (int32) temp_step
Attributes
ID : 30
ID : 29
Scope: local
Value: 0
Variable (int32) temp_number
Attributes
ID : 34
ID : 33
Scope: local
Value: 0
Variable (int32) va0
Attributes
ID : 35
ID : 34
Scope: local
Value: 0
Variable (int32) embedded
Attributes
ID : 36
ID : 35
Scope: global
Value: 0
Variable (string) va2
Attributes
ID : 37
ID : 36
Scope : local
Text :
Max. Text Size: 10
Variable (string) click_comp
Attributes
ID : 39
ID : 38
Scope : local
Text :
Max. Text Size: 8
Variable (int32) single_slider
Variable (int32) active_slider
Attributes
ID : 43
ID : 42
Scope: local
Value: 1
Variable (int32) active_slider
Variable (int32) hvac_mode
Attributes
ID : 44
Scope: local
Value: 1
Value: 0
Text current_temp
Attributes
@@ -133,7 +132,7 @@ Text current_temp
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Max. Text Size : 25
Text page_label
Attributes
@@ -145,7 +144,7 @@ Text page_label
Text :
Max. Text Size : 100
Text current_icon
Text target_icon
Attributes
ID : 8
Scope : local
@@ -155,7 +154,7 @@ Text current_icon
Text :
Max. Text Size : 10
Text target_icon
Text value01_icon
Attributes
ID : 9
Scope : local
@@ -165,19 +164,9 @@ Text target_icon
Text :
Max. Text Size : 10
Text value01_icon
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text :
Max. Text Size : 10
Text value01
Attributes
ID : 11
ID : 10
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -187,7 +176,7 @@ Text value01
Text value02_icon
Attributes
ID : 12
ID : 11
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -197,7 +186,7 @@ Text value02_icon
Text value02
Attributes
ID : 13
ID : 12
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -207,7 +196,7 @@ Text value02
Text value03_icon
Attributes
ID : 14
ID : 13
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -217,7 +206,7 @@ Text value03_icon
Text value03
Attributes
ID : 15
ID : 14
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -227,7 +216,7 @@ Text value03
Text value04_icon
Attributes
ID : 16
ID : 15
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -237,7 +226,7 @@ Text value04_icon
Text value04
Attributes
ID : 17
ID : 16
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -247,7 +236,7 @@ Text value04
Text button01
Attributes
ID : 18
ID : 17
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -268,7 +257,7 @@ Text button01
Text button02
Attributes
ID : 19
ID : 18
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -289,7 +278,7 @@ Text button02
Text button03
Attributes
ID : 20
ID : 19
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -310,7 +299,7 @@ Text button03
Text button04
Attributes
ID : 21
ID : 20
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -331,7 +320,7 @@ Text button04
Text button05
Attributes
ID : 22
ID : 21
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -352,7 +341,7 @@ Text button05
Text button06
Attributes
ID : 23
ID : 22
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -373,7 +362,7 @@ Text button06
Text button07
Attributes
ID : 24
ID : 23
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -394,7 +383,7 @@ Text button07
Text button08
Attributes
ID : 31
ID : 30
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -422,7 +411,7 @@ Text button08
Text button09
Attributes
ID : 32
ID : 31
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -450,7 +439,7 @@ Text button09
Text target_high
Attributes
ID : 33
ID : 32
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -460,7 +449,7 @@ Text target_high
Text target_low
Attributes
ID : 45
ID : 43
Scope : local
Dragging : 0
Send Component ID : on press and release
@@ -480,6 +469,10 @@ Slider slider_high
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_low.val=slider_high.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -491,7 +484,7 @@ Slider slider_high
Slider slider_low
Attributes
ID : 42
ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -501,6 +494,10 @@ Slider slider_low
Events
Touch Release Event
if(hvac_mode.val!=3)
{
slider_high.val=slider_low.val
}
temp_number.val=slider_high.val*temp_step.val
temp_number.val+=temp_offset.val
va0.val=temp_number.val/10
@@ -512,7 +509,7 @@ Slider slider_low
Button button_back
Attributes
ID : 38
ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -586,7 +583,7 @@ Timer swipestore
Timer timer01
Attributes
ID : 28
ID : 27
Scope : local
Period (ms): 1000
Enabled : no
@@ -606,7 +603,7 @@ Timer timer01
Timer click_timer
Attributes
ID : 40
ID : 39
Scope : local
Period (ms): 800
Enabled : no
@@ -624,7 +621,7 @@ Timer click_timer
Timer wakeup_timer
Attributes
ID : 41
ID : 40
Scope : local
Period (ms): 100
Enabled : yes