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

@@ -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