Compare commits
96 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
787f337220 | ||
|
|
44aaea74ec | ||
|
|
4a346ce2d2 | ||
|
|
4ead4382a2 | ||
|
|
1e64e134f9 | ||
|
|
68190ece4b | ||
|
|
81d0bcf304 | ||
|
|
94364d711e | ||
|
|
2953942fbd | ||
|
|
51173352d2 | ||
|
|
1bec2b1160 | ||
|
|
4921453a1b | ||
|
|
95a4447eeb | ||
|
|
350b3f4ca7 | ||
|
|
a8172a1b06 | ||
|
|
df10d09736 | ||
|
|
4f31326b8e | ||
|
|
f0e557b5e4 | ||
|
|
80d19b1da1 | ||
|
|
df0855862f | ||
|
|
d23fe9616c | ||
|
|
76fee43d3b | ||
|
|
e8fd5e2020 | ||
|
|
89faeb3ec1 | ||
|
|
a006af2654 | ||
|
|
4ea23c7cf5 | ||
|
|
1e7ead8e46 | ||
|
|
d88290474e | ||
|
|
75f17f0d3e | ||
|
|
8a21f88df9 | ||
|
|
5a01431670 | ||
|
|
7c90677d99 | ||
|
|
fe65530eb5 | ||
|
|
ecd806b1c5 | ||
|
|
72e59947b6 | ||
|
|
8869eb2f67 | ||
|
|
c7c54261cb | ||
|
|
27185ea88c | ||
|
|
bfe2c65bfd | ||
|
|
45dafc3d0d | ||
|
|
c9c31bba57 | ||
|
|
485e5cc8d2 | ||
|
|
175c927ee8 | ||
|
|
4392bf251b | ||
|
|
9616ea4c8f | ||
|
|
2a9162e809 | ||
|
|
df976b0a90 | ||
|
|
220b5fb02b | ||
|
|
a0a0d16af7 | ||
|
|
f97b298d00 | ||
|
|
6feba8a56d | ||
|
|
0ff61a2e4a | ||
|
|
aee6e7bb57 | ||
|
|
602a58cc40 | ||
|
|
5e45641687 | ||
|
|
8b2beec50c | ||
|
|
3278de673a | ||
|
|
3cf5fb3eeb | ||
|
|
d53a34b83f | ||
|
|
e4f0dba8fa | ||
|
|
3ea33a6dfa | ||
|
|
6b11ffb7cf | ||
|
|
3047204272 | ||
|
|
61af338a96 | ||
|
|
729414944b | ||
|
|
22dbd2814b | ||
|
|
44836d1e4d | ||
|
|
881c50dd1f | ||
|
|
ce7dfb1423 | ||
|
|
c45bd4057f | ||
|
|
3401340563 | ||
|
|
7f7d496beb | ||
|
|
c7ec9f97b7 | ||
|
|
3c58a29e73 | ||
|
|
7fd5658630 | ||
|
|
81f6783ca1 | ||
|
|
cf430fc1a8 | ||
|
|
7f6c9c696b | ||
|
|
7580a38b4f | ||
|
|
14532444bc | ||
|
|
f2a424027d | ||
|
|
f038eaed87 | ||
|
|
3f00773927 | ||
|
|
7e63a4cb18 | ||
|
|
e6fd475947 | ||
|
|
1869f8023d | ||
|
|
860f5ddbba | ||
|
|
218ef94c9c | ||
|
|
730e0acd99 | ||
|
|
c8afa129b5 | ||
|
|
ee0c21128d | ||
|
|
1aed46b71f | ||
|
|
4e38a928fc | ||
|
|
d58ba87dbb | ||
|
|
640e245cf8 | ||
|
|
f056dace88 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
|||||||
# Ignore Mac DS_Store files
|
# Ignore Mac DS_Store files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
|
|
||||||
|
# Ignore IntelliJ IDEA project directory
|
||||||
|
.idea
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -49,15 +49,19 @@ wifi:
|
|||||||
password: ${wifi_password}
|
password: ${wifi_password}
|
||||||
|
|
||||||
##### Functionality for the Nextion display #####
|
##### Functionality for the Nextion display #####
|
||||||
external_components:
|
# external_components:
|
||||||
- source: github://pr#2956
|
# - source: github://pr#2956
|
||||||
components: [nextion]
|
# components: [nextion]
|
||||||
refresh: 1h
|
# refresh: 1h
|
||||||
|
|
||||||
##### ESPHOME CONFIGURATION #####
|
##### ESPHOME CONFIGURATION #####
|
||||||
esphome:
|
esphome:
|
||||||
name: ${device_name}
|
name: ${device_name}
|
||||||
min_version: 2022.10.2
|
min_version: 2022.10.2
|
||||||
|
on_boot:
|
||||||
|
priority: 601
|
||||||
|
then:
|
||||||
|
- lambda: id(disp1).send_command_printf("DRAKJHSUYDGBNCJHGJKSHBDN");
|
||||||
|
|
||||||
##### TYPE OF ESP BOARD #####
|
##### TYPE OF ESP BOARD #####
|
||||||
esp32:
|
esp32:
|
||||||
@@ -302,6 +306,41 @@ api:
|
|||||||
id(disp1).set_component_text_printf("target_temp", "%.1f°", value);
|
id(disp1).set_component_text_printf("target_temp", "%.1f°", value);
|
||||||
id(display_target_temp).publish_state(value);
|
id(display_target_temp).publish_state(value);
|
||||||
|
|
||||||
|
#### Service to set the buttons ####
|
||||||
|
- service: set_button
|
||||||
|
variables:
|
||||||
|
btn_id: string
|
||||||
|
btn_pic: int
|
||||||
|
btn_bg: int
|
||||||
|
btn_icon_font: int
|
||||||
|
btn_txt_font: int
|
||||||
|
btn_bri_font: int
|
||||||
|
btn_icon: string
|
||||||
|
btn_label: string
|
||||||
|
btn_bri_txt: string
|
||||||
|
then:
|
||||||
|
- wait_until:
|
||||||
|
switch.is_on: nextion_init
|
||||||
|
- lambda: |-
|
||||||
|
// ESP_LOGD("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");
|
||||||
|
id(disp1).send_command_printf("%spic.pic=%i", btn_id.c_str(), btn_pic);
|
||||||
|
id(disp1).set_component_background_color(btnicon.c_str(), btn_bg);
|
||||||
|
id(disp1).set_component_background_color(btntext.c_str(), btn_bg);
|
||||||
|
id(disp1).set_component_background_color(btnbri.c_str(), btn_bg);
|
||||||
|
id(disp1).set_component_font_color(btnicon.c_str(), btn_icon_font);
|
||||||
|
id(disp1).set_component_font_color(btntext.c_str(), btn_txt_font);
|
||||||
|
id(disp1).set_component_font_color(btnbri.c_str(), btn_bri_font);
|
||||||
|
id(disp1).set_component_text_printf(btnicon.c_str(), "%s", btn_icon.c_str());
|
||||||
|
id(disp1).set_component_text_printf(btntext.c_str(), "%s", btn_label.c_str());
|
||||||
|
// id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
|
||||||
|
if (strcmp(btn_bri_txt.c_str(), "0") != 0) {
|
||||||
|
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(), " ");
|
||||||
|
}
|
||||||
|
|
||||||
##### START - GLOBALS CONFIGURATION #####
|
##### START - GLOBALS CONFIGURATION #####
|
||||||
globals:
|
globals:
|
||||||
@@ -380,13 +419,15 @@ binary_sensor:
|
|||||||
api.connected:
|
api.connected:
|
||||||
then:
|
then:
|
||||||
- switch.toggle: relay_1
|
- switch.toggle: relay_1
|
||||||
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=51");
|
|
||||||
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=98");
|
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: relay_1
|
switch.is_on: relay_1
|
||||||
then:
|
then:
|
||||||
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=105");
|
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=78");
|
||||||
|
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000E3A5");
|
||||||
|
else:
|
||||||
|
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=77");
|
||||||
|
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000FFFF");
|
||||||
|
|
||||||
|
|
||||||
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
|
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
|
||||||
@@ -406,19 +447,21 @@ binary_sensor:
|
|||||||
api.connected:
|
api.connected:
|
||||||
then:
|
then:
|
||||||
- switch.toggle: relay_2
|
- switch.toggle: relay_2
|
||||||
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=51");
|
|
||||||
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=98");
|
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: relay_2
|
switch.is_on: relay_2
|
||||||
then:
|
then:
|
||||||
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=106");
|
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=78");
|
||||||
|
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000E3A8");
|
||||||
|
else:
|
||||||
|
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=77");
|
||||||
|
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000FFFF");
|
||||||
|
|
||||||
##### JUMP PAGE TO SETTING PAGE #####
|
##### JUMP PAGE TO SETTING PAGE #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: $device_name setting page
|
name: $device_name setting page
|
||||||
page_id: 0
|
page_id: 0
|
||||||
component_id: 53
|
component_id: 52
|
||||||
internal: true
|
internal: true
|
||||||
on_multi_click:
|
on_multi_click:
|
||||||
- timing:
|
- timing:
|
||||||
@@ -430,7 +473,7 @@ binary_sensor:
|
|||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: ${device_name} Restart
|
name: ${device_name} Restart
|
||||||
page_id: 7
|
page_id: 7
|
||||||
component_id: 15
|
component_id: 13
|
||||||
internal: true
|
internal: true
|
||||||
on_click:
|
on_click:
|
||||||
- button.press: restart_nspanel
|
- button.press: restart_nspanel
|
||||||
@@ -439,7 +482,7 @@ binary_sensor:
|
|||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: ${device_name} Restart
|
name: ${device_name} Restart
|
||||||
page_id: 8
|
page_id: 8
|
||||||
component_id: 5
|
component_id: 4
|
||||||
internal: true
|
internal: true
|
||||||
on_click:
|
on_click:
|
||||||
- button.press: restart_nspanel
|
- button.press: restart_nspanel
|
||||||
@@ -448,7 +491,7 @@ binary_sensor:
|
|||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: ${device_name} Sleep Modus
|
name: ${device_name} Sleep Modus
|
||||||
page_id: 7
|
page_id: 7
|
||||||
component_id: 16
|
component_id: 14
|
||||||
internal: true
|
internal: true
|
||||||
on_click:
|
on_click:
|
||||||
- switch.toggle: sleep_modus
|
- switch.toggle: sleep_modus
|
||||||
@@ -925,7 +968,7 @@ display:
|
|||||||
on_setup:
|
on_setup:
|
||||||
then:
|
then:
|
||||||
- lambda: id(disp1).send_command_printf("page 8");
|
- lambda: id(disp1).send_command_printf("page 8");
|
||||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2"); ### esphome-version ###
|
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2.2"); ### esphome-version ###
|
||||||
- wait_until:
|
- wait_until:
|
||||||
api.connected
|
api.connected
|
||||||
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
|
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
|
||||||
|
|||||||
BIN
nspanel_eu.HMI
BIN
nspanel_eu.HMI
Binary file not shown.
BIN
nspanel_eu.tft
BIN
nspanel_eu.tft
Binary file not shown.
BIN
nspanel_us.HMI
BIN
nspanel_us.HMI
Binary file not shown.
BIN
nspanel_us.tft
BIN
nspanel_us.tft
Binary file not shown.
Reference in New Issue
Block a user