Compare commits
144 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c90677d99 | ||
|
|
fe65530eb5 | ||
|
|
72e59947b6 | ||
|
|
8869eb2f67 | ||
|
|
c7c54261cb | ||
|
|
27185ea88c | ||
|
|
bfe2c65bfd | ||
|
|
45dafc3d0d | ||
|
|
c9c31bba57 | ||
|
|
485e5cc8d2 | ||
|
|
175c927ee8 | ||
|
|
df976b0a90 | ||
|
|
220b5fb02b | ||
|
|
a0a0d16af7 | ||
|
|
f97b298d00 | ||
|
|
6feba8a56d | ||
|
|
0ff61a2e4a | ||
|
|
aee6e7bb57 | ||
|
|
602a58cc40 | ||
|
|
5e45641687 | ||
|
|
8b2beec50c | ||
|
|
3278de673a | ||
|
|
3cf5fb3eeb | ||
|
|
d53a34b83f | ||
|
|
e4f0dba8fa | ||
|
|
3ea33a6dfa | ||
|
|
6b11ffb7cf | ||
|
|
3047204272 | ||
|
|
61af338a96 | ||
|
|
729414944b | ||
|
|
22dbd2814b | ||
|
|
44836d1e4d | ||
|
|
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 | ||
|
|
3211f44770 | ||
|
|
bd5b1303f2 | ||
|
|
8ff0cad379 | ||
|
|
fdcd37c6d0 | ||
|
|
6a464325d7 | ||
|
|
3af0c20670 | ||
|
|
7ee10d4ca6 | ||
|
|
884c8d91e6 | ||
|
|
07b8e99b01 | ||
|
|
d74b70f864 | ||
|
|
e70fcd54eb | ||
|
|
ea5b80e3b8 | ||
|
|
b5cd83240f | ||
|
|
7d241d1400 | ||
|
|
ee2e1d53d2 | ||
|
|
36e0344345 | ||
|
|
eb6eebfd46 | ||
|
|
0de7850c39 | ||
|
|
5f1d2b9d10 | ||
|
|
0abd5531cb | ||
|
|
0fdcd088ec | ||
|
|
29df75263b | ||
|
|
5035b89956 | ||
|
|
9de5abff25 | ||
|
|
a113e0cd43 | ||
|
|
a2f5e69b76 | ||
|
|
0e41a87659 | ||
|
|
f6a6a7adb0 | ||
|
|
8abfee7b54 | ||
|
|
70038014a2 | ||
|
|
268c6a7e23 | ||
|
|
133165e79e | ||
|
|
99f2b2815d | ||
|
|
d6f0958652 | ||
|
|
6704e320da | ||
|
|
d0d09b93a4 | ||
|
|
155ab33086 | ||
|
|
55ed836400 | ||
|
|
6ac6a25803 | ||
|
|
26844cd290 | ||
|
|
7dc0f49809 | ||
|
|
71cd913135 | ||
|
|
dfa3ee901a | ||
|
|
f7131aaca0 | ||
|
|
fefb1374fd | ||
|
|
8f5165bd1b | ||
|
|
94a51da6fe | ||
|
|
e422a158ca | ||
|
|
b43d83291b | ||
|
|
e751938cdd | ||
|
|
b8321807dc | ||
|
|
3a42c12c00 | ||
|
|
d552fb458b | ||
|
|
a7b96d8582 | ||
|
|
18f188bb32 | ||
|
|
f44d3fd8d1 | ||
|
|
a0b8697a4f | ||
|
|
de8f463968 | ||
|
|
6642a46a04 | ||
|
|
0b856cbb83 | ||
|
|
e41c02e883 | ||
|
|
6f3dc4a010 | ||
|
|
d46eecc57c | ||
|
|
7223103905 | ||
|
|
547338c5b1 | ||
|
|
811aca8cfa | ||
|
|
0465a9eb8b | ||
|
|
45907e1ce5 | ||
|
|
3ff82ef8cd | ||
|
|
5f6cc373fe | ||
|
|
4801f6c6b9 | ||
|
|
02b4f6e178 | ||
|
|
b0161d41f8 | ||
|
|
d1702ccacf | ||
|
|
281be927a7 | ||
|
|
c352047991 | ||
|
|
c058fd4fb1 | ||
|
|
e4e5cb0f51 | ||
|
|
da611e384a | ||
|
|
5292bbff8b | ||
|
|
a22311c4e8 | ||
|
|
0d250fb56b | ||
|
|
5ba5d2fb08 | ||
|
|
51170c514d |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
# Ignore Mac DS_Store files
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
|
||||
# Ignore IntelliJ IDEA project directory
|
||||
.idea
|
||||
|
||||
Binary file not shown.
12377
nspanel_blueprint.yaml
12377
nspanel_blueprint.yaml
File diff suppressed because it is too large
Load Diff
@@ -107,12 +107,22 @@ uart:
|
||||
baud_rate: 115200
|
||||
id: tf_uart
|
||||
|
||||
###### REBOOT BUTTON #####
|
||||
##### START - BUTTON CONFIGURATION #####
|
||||
button:
|
||||
###### REBOOT BUTTON #####
|
||||
- platform: restart
|
||||
name: ${device_name} Restart
|
||||
id: restart_nspanel
|
||||
|
||||
##### UPDATE TFT DISPLAY #####
|
||||
- platform: template
|
||||
name: ${device_name} Update TFT display
|
||||
icon: mdi:file-sync
|
||||
id: tft_update
|
||||
entity_category: config
|
||||
on_press:
|
||||
- delay: 16ms
|
||||
- lambda: id(disp1).upload_tft();
|
||||
|
||||
##### START - API CONFIGURATION #####
|
||||
api:
|
||||
@@ -161,7 +171,7 @@ api:
|
||||
- lambda: 'id(disp1).set_component_value(component.c_str(), message);'
|
||||
|
||||
##### Service to send a command "hide componente" directly to the display #####
|
||||
- service: send_command_hide
|
||||
- service: send_command_hide ### unused ###
|
||||
variables:
|
||||
component: string
|
||||
then:
|
||||
@@ -170,7 +180,7 @@ api:
|
||||
- lambda: 'id(disp1).hide_component(component.c_str());'
|
||||
|
||||
##### Service to send a command "show componente" directly to the display #####
|
||||
- service: send_command_show
|
||||
- service: send_command_show ### unused ###
|
||||
variables:
|
||||
component: string
|
||||
then:
|
||||
@@ -178,6 +188,13 @@ api:
|
||||
switch.is_on: nextion_init
|
||||
- lambda: 'id(disp1).show_component(component.c_str());'
|
||||
|
||||
##### Service to send a command "show ALL componente" directly to the display #####
|
||||
- service: send_command_show_all ### unused ###
|
||||
then:
|
||||
- wait_until:
|
||||
switch.is_on: nextion_init
|
||||
- lambda: 'id(disp1).show_component("255");'
|
||||
|
||||
##### Service to send a command "font color" directly to the display #####
|
||||
- service: send_command_font_color
|
||||
variables:
|
||||
@@ -229,6 +246,16 @@ api:
|
||||
id(notification_text).publish_state("");
|
||||
- switch.turn_off: notification_unread
|
||||
|
||||
##### Service to set entity-information for settings-page(s)
|
||||
- service: set_settings_entity
|
||||
variables:
|
||||
entity: string
|
||||
then:
|
||||
- wait_until:
|
||||
switch.is_on: nextion_init
|
||||
- lambda: |-
|
||||
id(settings_entity).publish_state(entity.c_str());
|
||||
|
||||
##### Service to play a rtttl tones #####
|
||||
# Example tones : https://codebender.cc/sketch:109888#RTTTL%20Songs.ino
|
||||
- service: play_rtttl
|
||||
@@ -338,18 +365,13 @@ binary_sensor:
|
||||
|
||||
###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY#####
|
||||
- platform: gpio
|
||||
# name: ${device_name} Left Button
|
||||
name: ${device_name} Left Button
|
||||
id: left_button
|
||||
pin:
|
||||
number: 14
|
||||
inverted: true
|
||||
on_click:
|
||||
- min_length: 50ms
|
||||
max_length: 1000ms
|
||||
then:
|
||||
- binary_sensor.template.publish:
|
||||
id: left_button_short
|
||||
state: ON
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
@@ -365,50 +387,17 @@ binary_sensor:
|
||||
switch.is_on: relay_1
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=105");
|
||||
- delay: 500ms
|
||||
- binary_sensor.template.publish:
|
||||
id: left_button_short
|
||||
state: OFF
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
|
||||
ESP_LOGD("nspanel", "settingspage -> no press");
|
||||
} else {
|
||||
// ESP_LOGD("nspanel", "release button");
|
||||
id(disp1_lastclick_general).set_state("pressbuttonleft",true,true);
|
||||
}
|
||||
on_release:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
|
||||
ESP_LOGD("nspanel", "settingspage -> no release");
|
||||
} else {
|
||||
// ESP_LOGD("nspanel", "release button");
|
||||
id(disp1_lastclick_general).set_state("releasebuttonleft",true,true);
|
||||
}
|
||||
|
||||
- platform: template
|
||||
name: ${device_name} Left Button
|
||||
id: left_button_short
|
||||
lambda: |-
|
||||
return {};
|
||||
|
||||
|
||||
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
|
||||
- platform: gpio
|
||||
# name: ${device_name} Right Button
|
||||
name: ${device_name} Right Button
|
||||
id: right_button
|
||||
pin:
|
||||
number: 27
|
||||
inverted: true
|
||||
on_click:
|
||||
- min_length: 50ms
|
||||
max_length: 1000ms
|
||||
then:
|
||||
- binary_sensor.template.publish:
|
||||
id: right_button_short
|
||||
state: ON
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
@@ -424,40 +413,24 @@ binary_sensor:
|
||||
switch.is_on: relay_2
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=106");
|
||||
- delay: 500ms
|
||||
- binary_sensor.template.publish:
|
||||
id: right_button_short
|
||||
state: OFF
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
|
||||
ESP_LOGD("nspanel", "settingspage -> no press");
|
||||
} else {
|
||||
// ESP_LOGD("nspanel", "release button");
|
||||
id(disp1_lastclick_general).set_state("pressbuttonright",true,true);
|
||||
}
|
||||
on_release:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
|
||||
ESP_LOGD("nspanel", "settingspage -> no release");
|
||||
} else {
|
||||
// ESP_LOGD("nspanel", "release button");
|
||||
id(disp1_lastclick_general).set_state("releasebuttonright",true,true);
|
||||
}
|
||||
|
||||
- platform: template
|
||||
name: ${device_name} Right Button
|
||||
id: right_button_short
|
||||
lambda: |-
|
||||
return {};
|
||||
##### JUMP PAGE TO SETTING PAGE #####
|
||||
- platform: nextion
|
||||
name: $device_name setting page
|
||||
page_id: 0
|
||||
component_id: 53
|
||||
internal: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at least 1s #LONG Press
|
||||
then:
|
||||
- lambda: 'id(disp1).send_command_printf("page settings");'
|
||||
|
||||
##### Restart NSPanel Button - Setting Page #####
|
||||
- platform: nextion
|
||||
name: ${device_name} Restart
|
||||
page_id: 7
|
||||
component_id: 8
|
||||
component_id: 15
|
||||
internal: true
|
||||
on_click:
|
||||
- button.press: restart_nspanel
|
||||
@@ -475,7 +448,7 @@ binary_sensor:
|
||||
- platform: nextion
|
||||
name: ${device_name} Sleep Modus
|
||||
page_id: 7
|
||||
component_id: 3
|
||||
component_id: 16
|
||||
internal: true
|
||||
on_click:
|
||||
- switch.toggle: sleep_modus
|
||||
@@ -504,6 +477,14 @@ sensor:
|
||||
- platform: wifi_signal
|
||||
name: ${device_name} RSSI
|
||||
update_interval: 60s
|
||||
on_value:
|
||||
- if:
|
||||
condition:
|
||||
wifi.connected:
|
||||
then:
|
||||
- lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\U0000E5A8");
|
||||
else:
|
||||
- lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\U0000FFFF");
|
||||
|
||||
##### INTERNAL TEMPERATURE SENSOR, ADC VALUE #####
|
||||
- platform: adc
|
||||
@@ -616,6 +597,10 @@ text_sensor:
|
||||
name: ${device_name} Notification Text
|
||||
id: notification_text
|
||||
|
||||
- platform: template
|
||||
name: ${device_name} Settings Entity
|
||||
id: settings_entity
|
||||
|
||||
##### last click sensor, the main action variable - push to HA #####
|
||||
- platform: nextion
|
||||
nextion_id: disp1
|
||||
@@ -800,16 +785,6 @@ switch:
|
||||
restore_state: false
|
||||
optimistic: true
|
||||
|
||||
##### UPDATE TFT DISPLAY #####
|
||||
- platform: template
|
||||
name: ${device_name} Update TFT display
|
||||
id: tft_update
|
||||
entity_category: config
|
||||
turn_on_action:
|
||||
- delay: 16ms
|
||||
- lambda: id(disp1).upload_tft();
|
||||
- switch.turn_off: tft_update
|
||||
|
||||
##### PHYSICAL SWITCH 1 #####
|
||||
- platform: gpio
|
||||
name: ${device_name} Relay 1
|
||||
@@ -950,11 +925,11 @@ display:
|
||||
on_setup:
|
||||
then:
|
||||
- lambda: id(disp1).send_command_printf("page 8");
|
||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.1.0"); ### esphome-version ###
|
||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2"); ### esphome-version ###
|
||||
- wait_until:
|
||||
api.connected
|
||||
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
|
||||
- delay: 0.5s
|
||||
- delay: 1s
|
||||
- number.set:
|
||||
id: display_brightness
|
||||
value: !lambda 'return id(display_brightness_global);'
|
||||
@@ -967,7 +942,7 @@ display:
|
||||
- lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
||||
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global));
|
||||
- lambda: id(disp1).set_component_value("settings.a02", id(sleep_modus_global) == 1);
|
||||
- delay: 0.5s
|
||||
- delay: 1s
|
||||
- switch.template.publish:
|
||||
id: nextion_init
|
||||
state: on
|
||||
@@ -988,4 +963,3 @@ script:
|
||||
ESP_LOGD("nspanel", "timer->home");
|
||||
id(disp1).send_command_printf("page 0");
|
||||
}
|
||||
|
||||
|
||||
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