563 Commits

Author SHA1 Message Date
Edward Firmo
e667aa2c82 Merge pull request #2090 from Blackymas/beta
v4.3.7 - Quick Fix for Captive Portal Compile Error
2024-04-25 18:38:42 +02:00
Edward Firmo
33b966c356 Merge pull request #2089 from Blackymas/dev
v4.3.7 to beta
2024-04-25 17:08:07 +02:00
GitHub Actions
1325055d13 Pre-built firmware update: 8833784908 2024-04-25 13:57:28 +00:00
Edward Firmo
9ea9f626dd Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-25 15:40:49 +02:00
Edward Firmo
7d2db5e606 Quick Fix for Captive Portal Compile Error
Solves #2088
2024-04-25 15:40:39 +02:00
GitHub Actions
0af27acb91 Pre-built firmware update: 8833476658 2024-04-25 13:36:03 +00:00
Edward Firmo
0497417939 Don't try to stop captive portal
Solves #2088
2024-04-25 15:26:27 +02:00
Edward Firmo
7b406d85f1 Remove redundant info from climate dump config 2024-04-25 14:48:52 +02:00
Edward Firmo
7ffaba6ef1 Merge pull request #2085 from Blackymas/beta
Lint
2024-04-25 08:19:37 +02:00
Edward Firmo
ddf92517b8 Merge pull request #2084 from Blackymas/dev
Lint
2024-04-25 08:18:48 +02:00
Edward Firmo
7f260a3108 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-25 08:16:18 +02:00
Edward Firmo
ea603a46c7 Lint 2024-04-25 08:16:15 +02:00
Edward Firmo
5987abae14 Merge pull request #2083 from Blackymas/beta
v4.3.6 - Critical Fixes for Custom Buttons
2024-04-25 08:12:29 +02:00
Edward Firmo
e9a35a4aec Merge pull request #2082 from Blackymas/dev
v4.3.6 to beta
2024-04-25 07:41:53 +02:00
GitHub Actions
ead60e7a82 Pre-built firmware update: 8827382086 2024-04-25 05:27:01 +00:00
Edward Firmo
35dc8aa3b5 Climate shows relays assignment on dump config 2024-04-25 07:17:19 +02:00
Edward Firmo
43fd89a679 Update ReleaseNotes.md 2024-04-25 07:06:12 +02:00
Edward Firmo
720e5c3a15 Fix opening embedded thermostat in a button
Solves #2067
2024-04-25 07:01:11 +02:00
Edward Firmo
02c8168667 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-25 06:52:55 +02:00
Edward Firmo
c37d2695a7 Fix custom buttons for domains other than lights
Solves #2080
Solves #2081
2024-04-25 06:52:53 +02:00
Edward Firmo
96986dcecd Merge pull request #2078 from Blackymas/beta
v4.3.5 - Experimenting with Bluetooth Capabilities
2024-04-24 23:56:09 +02:00
Edward Firmo
450810a222 Merge pull request #2077 from Blackymas/dev
v4.3.5 to beta
2024-04-24 23:02:33 +02:00
GitHub Actions
6331f247b5 Pre-built firmware update: 8822106317 2024-04-24 19:28:36 +00:00
Edward Firmo
c9338404ba Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-24 21:18:01 +02:00
Edward Firmo
db578c34bf Bump to v4.3.5 2024-04-24 21:17:49 +02:00
GitHub Actions
3e51445c62 Pre-built firmware update: 8821960718 2024-04-24 19:17:36 +00:00
Edward Firmo
eac6dd1cf7 Prepare references for release 2024-04-24 21:06:48 +02:00
Edward Firmo
1d247db8e8 Experimenting with Bluetooth Capabilities 2024-04-24 21:02:46 +02:00
Edward Firmo
c0d9d70c58 Expand light modes detection
Tentatively solves #2072
2024-04-24 20:48:34 +02:00
Edward Firmo
61bdaf0fa3 Extend max button name length to 14 chars 2024-04-24 15:53:16 +02:00
Edward Firmo
c4b91b8ea0 Manage indoor temp and weather icon as buttons
Solves #2056
2024-04-24 15:46:11 +02:00
Edward Firmo
72d4cd4b01 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-24 15:17:17 +02:00
Edward Firmo
bd4a8d5946 Set default delay before each esphome call
Default set to 10ms
This is to minimize the serial buffer overflow issue
2024-04-24 15:17:11 +02:00
GitHub Actions
163e28c6fd Pre-built firmware update: 8814684647 2024-04-24 10:08:01 +00:00
Edward Firmo
9063030ba2 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-24 11:58:22 +02:00
Edward Firmo
fe26e30a06 Simplify page load
To reduce the chances of a serial buffer overflow
2024-04-24 11:58:19 +02:00
GitHub Actions
85e207914c Pre-built firmware update: 8814096845 2024-04-24 09:22:26 +00:00
Edward Firmo
baef06fadf Round up temperature step
Partially solves #2063
2024-04-24 11:13:02 +02:00
Edward Firmo
79253683f9 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-24 11:00:15 +02:00
Edward Firmo
1c43b8a874 Display embedded temperature in F or C accordingly
Partially solves #2063
2024-04-24 11:00:06 +02:00
GitHub Actions
fdae613124 Pre-built firmware update: 8813464340 2024-04-24 08:36:07 +00:00
Edward Firmo
4e329cb58c Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-24 10:26:31 +02:00
Edward Firmo
0654a54730 Fix icon colors on home page 2024-04-24 10:26:11 +02:00
GitHub Actions
376a9c2c0b Pre-built firmware update: 8781452204 2024-04-22 09:16:29 +00:00
Edward Firmo
29baa6c808 Create nspanel_esphome_addon_ble_tracker.yaml 2024-04-22 11:07:33 +02:00
Edward Firmo
e20c4d2af2 Lint 2024-04-22 10:15:30 +02:00
Edward Firmo
6278cd739e Lint 2024-04-22 10:14:38 +02:00
Edward Firmo
edd1d3fdb8 Lint 2024-04-22 10:13:26 +02:00
Edward Firmo
1cbb5c17d7 Lint 2024-04-22 10:12:44 +02:00
Edward Firmo
075ec9f7fb Lint 2024-04-22 10:07:20 +02:00
Edward Firmo
66c5e58c02 New Add-on: BLE Tracker
Solves #1946
Helps with #1983
2024-04-22 10:01:10 +02:00
GitHub Actions
403f69c25c Pre-built firmware update: 8743062476 2024-04-18 18:48:49 +00:00
Edward Firmo
6021afc0f4 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-18 20:39:16 +02:00
Edward Firmo
d0152de676 Move dependences from matrix 2024-04-18 20:39:06 +02:00
GitHub Actions
78cf4333f1 Pre-built firmware update: 8742907264 2024-04-18 18:36:01 +00:00
Edward Firmo
fcc1b54b6c Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-18 20:26:03 +02:00
Edward Firmo
d106243bd5 Generates individual md5 files 2024-04-18 20:25:28 +02:00
GitHub Actions
a44b1750ba Pre-built firmware update: 8742721298 2024-04-18 18:20:34 +00:00
Edward Firmo
9cdaca8371 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-18 20:06:20 +02:00
Edward Firmo
0c634cfc55 Add combined tests 2024-04-18 20:06:10 +02:00
Edward Firmo
52be1226e5 Use IDF5 2024-04-18 19:59:47 +02:00
Edward Firmo
8be27ae04b Add climate tests 2024-04-18 19:57:40 +02:00
Edward Firmo
4b049312da Add Bluetooth Proxy tests 2024-04-18 19:55:20 +02:00
GitHub Actions
246f301490 Pre-built firmware update: 8742420637 2024-04-18 17:54:34 +00:00
Edward Firmo
6c10d13a28 Use latest actions versions 2024-04-18 19:45:18 +02:00
Edward Firmo
2b7287e89d Lint 2024-04-18 19:43:03 +02:00
Edward Firmo
8026ee1846 Use custom yamllint rules 2024-04-18 19:39:18 +02:00
Edward Firmo
2f26b759da Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-18 19:32:21 +02:00
Edward Firmo
da98f9570d Optimize tests 2024-04-18 19:32:10 +02:00
GitHub Actions
02b0b25cae Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-18 17:28:21 +00:00
Edward Firmo
e3605eab5d Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-18 19:17:45 +02:00
Edward Firmo
5c867d1653 Test deeper with Arduino and IDF v5 2024-04-18 19:17:41 +02:00
GitHub Actions
822b6dab97 Pre-built firmware for NSPanel - Correct call to ap_captive_portal.end() 2024-04-18 16:55:56 +00:00
Edward Firmo
5206898c98 Correct call to ap_captive_portal.end() 2024-04-18 18:44:20 +02:00
Edward Firmo
5274b97551 Lint 2024-04-18 18:41:32 +02:00
Edward Firmo
544b2bc9cf Introducing "Add-on: Bluetooth Proxy"
Supports:
- #1983
- #1946
- #1815
2024-04-18 18:34:49 +02:00
Edward Firmo
c9be4d2422 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-18 12:35:22 +02:00
Edward Firmo
a5092a5939 Stop unnecessary services before TFT upload with pre-built versions 2024-04-18 12:35:20 +02:00
GitHub Actions
62bd8eed17 Pre-built firmware for NSPanel - Add id for BLE tests 2024-04-18 01:59:15 +00:00
Edward Firmo
6276551560 Add id for BLE tests 2024-04-18 03:48:41 +02:00
GitHub Actions
ca10827074 Pre-built firmware for NSPanel - Replace watchdog by dump_config 2024-04-18 01:35:46 +00:00
Edward Firmo
ddea304d1b Replace watchdog by dump_config 2024-04-18 03:25:06 +02:00
Edward Firmo
85d6abae93 Flag display as disconnected during upload
To prevent Blueprint sending data
2024-04-17 10:06:29 +02:00
Edward Firmo
6c2c9ab5bd Introduces "icons" library 2024-04-17 09:40:02 +02:00
Edward Firmo
acf96d4f30 Stop Bluetooth before TFT upload
Helps with:
- #1983
- #1946
- #1815
2024-04-17 09:39:38 +02:00
Edward Firmo
a6f62a053c Use send_command from Nextion 2024-04-16 11:03:20 +02:00
Edward Firmo
94d51c4b49 Use PSRAM with Nextion Upload TFT
Helps with the following:
- #1983
- #1946
- #1815
2024-04-16 10:55:29 +02:00
GitHub Actions
7da53ef510 Pre-built firmware for NSPanel - Remove psram code when psram is not included 2024-04-13 06:20:19 +00:00
Edward Firmo
8a60a15682 Remove psram code when psram is not included 2024-04-13 02:06:13 +02:00
Edward Firmo
e265acfcf1 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-13 02:04:36 +02:00
Edward Firmo
40eae7c065 ESPHome version support on Blueprint side 2024-04-12 10:25:55 +02:00
GitHub Actions
2f562cdd72 Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-12 08:08:11 +00:00
Edward Firmo
d1d0a124b1 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-12 09:59:04 +02:00
Edward Firmo
d59361f937 Report ESPHome version on event call
This will allow version based blueprint
2024-04-12 09:58:50 +02:00
GitHub Actions
f0f64738ef Pre-built firmware for NSPanel - Remove CONFIG_LWIP_MAX_SOCKETS 2024-04-12 07:45:34 +00:00
Edward Firmo
2a0f92d548 Remove CONFIG_LWIP_MAX_SOCKETS
This was breaking `web_server`
Solves #2050
2024-04-12 09:36:21 +02:00
Edward Firmo
60078bd680 Prepares for MdiIcons library 2024-04-12 09:32:01 +02:00
Edward Firmo
3b2a6b7554 Merge pull request #2045 from Blackymas/beta
v4.3.4 - Urgent Fix for Home Screen Interaction
2024-04-10 16:39:03 +02:00
Edward Firmo
f76eccd06d Merge pull request #2044 from Blackymas/dev
Updated compatibility table
2024-04-10 16:34:01 +02:00
Edward Firmo
359c9ed4f0 Updated compatibility table 2024-04-10 16:31:45 +02:00
Edward Firmo
2378e171d0 Merge pull request #2041 from Blackymas/dev
v4.3.4 to beta
2024-04-10 16:29:02 +02:00
GitHub Actions
53aeb3e1ec Pre-built firmware for NSPanel 2024-04-10 14:21:41 +00:00
Edward Firmo
f93c4d8d47 Update validate_esphome_beta.yml 2024-04-10 16:02:54 +02:00
Edward Firmo
a4fb6324d4 Remove unused reference 2024-04-10 15:55:11 +02:00
Edward Firmo
89f95899a1 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-10 15:49:00 +02:00
Edward Firmo
ba1e074bf8 Bump to v4.3.4
Solves #2040
2024-04-10 15:48:38 +02:00
GitHub Actions
0529e39c31 Pre-built firmware for NSPanel - Fix climate page not opening with click on internal temp 2024-04-10 13:44:08 +00:00
Edward Firmo
178b940b46 Fix climate page not opening with click on internal temp
Solves #2040
2024-04-10 15:34:49 +02:00
Edward Firmo
dcde6ce3fb Merge pull request #2039 from Blackymas/beta
Update Python validation
2024-04-10 13:05:35 +02:00
Edward Firmo
3f28641903 Merge pull request #2038 from Blackymas/dev
Update Python validation
2024-04-10 13:04:35 +02:00
Edward Firmo
9cb230fd5f Update validate_python.yml 2024-04-10 13:02:25 +02:00
Edward Firmo
1cdd417340 Update validate_python.yml 2024-04-10 13:00:18 +02:00
Edward Firmo
77f9cf66f1 Update validate_python.yml 2024-04-10 12:58:51 +02:00
Edward Firmo
b5784187ae Replace python validation 2024-04-10 12:56:18 +02:00
Edward Firmo
94ad0211e0 Update .flake8 2024-04-10 12:51:52 +02:00
Edward Firmo
706864a4da Allow to 200 char per line 2024-04-10 12:42:58 +02:00
Edward Firmo
b07f88b5db Merge pull request #2036 from Blackymas/beta
v4.3.3 - Enhancing Flexibility and User Experience
2024-04-10 11:42:59 +02:00
Edward Firmo
f3a67bb3d3 Merge pull request #2037 from Blackymas/dev
Update timezone list
2024-04-10 11:07:45 +02:00
GitHub Actions
d3ec9a2a2f Pre-built firmware for NSPanel - Update timezone list 2024-04-10 08:53:22 +00:00
Edward Firmo
9babe8984d Update timezone list 2024-04-10 10:44:20 +02:00
Edward Firmo
4ad2619108 Lint 2024-04-10 10:26:55 +02:00
Edward Firmo
36d0027845 Ignore dev folder 2024-04-10 10:24:18 +02:00
Edward Firmo
9e52f7f39d Merge pull request #2035 from Blackymas/dev
Update beta with latest minor changes
2024-04-10 10:15:42 +02:00
Edward Firmo
86d5859045 Merge pull request #2034 from MichaelHeimann/dev
Update blueprint doc with timezone description
2024-04-10 10:11:39 +02:00
Edward Firmo
47fb10ed1b Add link to v4.3.2 2024-04-10 10:10:40 +02:00
MichaelHeimann
9e5fb231cb Update blueprint.md Advanced Section
removed ## at the end of the section header
2024-04-10 09:56:20 +02:00
MichaelHeimann
4cb526b8cc Update blueprint.md with Advanced Settings section
not complete, but a start
2024-04-10 09:51:48 +02:00
MichaelHeimann
9ac00037ae Update blueprint.md Hardware button visibility pages
add Hardware Buttons - Visibility Pages
2024-04-10 09:47:30 +02:00
MichaelHeimann
1e90d63b94 Update blueprint.md Entities States (3 is now 4) 2024-04-10 09:42:48 +02:00
MichaelHeimann
bed4c7dad0 Update blueprint doc with timezone description 2024-04-10 09:27:55 +02:00
Edward Firmo
4ad14d5e0f Merge pull request #2033 from Blackymas/dev
v4.3.3 to beta
2024-04-10 09:02:22 +02:00
Edward Firmo
dc8fdbc44e Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-10 08:21:14 +02:00
Edward Firmo
64489159ac Update timezone list 2024-04-10 08:18:14 +02:00
GitHub Actions
6acd5c945b Pre-built firmware for NSPanel - Bump version to 4.3.3 2024-04-10 06:06:45 +00:00
Edward Firmo
fc0f727d83 Bump version to 4.3.3
Getting prepared for a release
2024-04-10 07:57:43 +02:00
Edward Firmo
bc590b9ccf Internal Temperature Reporting Fix After Sleep
Solves #2030
2024-04-09 15:50:00 +02:00
Edward Firmo
a3c707b4e3 Do not clean internal temp when constructing Home page
Solves #2030
2024-04-09 15:43:17 +02:00
Edward Firmo
6f4e1f610f Timezone Selector Added to Blueprint
Solves #2029
2024-04-09 13:54:53 +02:00
Edward Firmo
99a86408a2 Fix timezone split
Solves #2029
2024-04-09 13:34:44 +02:00
Edward Firmo
34889bac3b Merge pull request #2029 from MichaelHeimann/patch-1
Update nspanel_blueprint.yaml
2024-04-09 12:39:56 +02:00
MichaelHeimann
4477fe9e50 Update nspanel_blueprint.yaml
fixes "Error: TypeError: '>' not supported between instances of 'list' and 'int'"
2024-04-09 11:54:44 +02:00
Edward Firmo
94018819f0 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-09 11:44:40 +02:00
Edward Firmo
c7f7e0c7c3 v4.3.3 release notes 2024-04-09 11:44:37 +02:00
GitHub Actions
ff6a21df39 Pre-built firmware for NSPanel - Simplify climate show logic 2024-04-09 08:28:10 +00:00
Edward Firmo
2f45083db5 Simplify climate show logic
Improves #2021
2024-04-09 10:16:18 +02:00
Edward Firmo
cd4fef6870 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-09 10:10:38 +02:00
Edward Firmo
c64132d7b5 Do not show climate page when using internal temperature sensor
Solves #2021
2024-04-09 10:10:35 +02:00
Edward Firmo
376d91aa5a Use initial_value for fw_url
It should be available together with the component
2024-04-09 08:30:29 +02:00
GitHub Actions
b8d8252c19 Pre-built firmware for NSPanel - Merge component nspanel_ha_blueprint_upload_tft into nspanel_ha_blueprint 2024-04-09 06:17:29 +00:00
Edward Firmo
75c35399f1 Add prebuilt to yamlscan on ESPHome validation 2024-04-09 08:13:01 +02:00
Edward Firmo
694ab4f98f Merge component nspanel_ha_blueprint_upload_tft into nspanel_ha_blueprint 2024-04-09 08:08:33 +02:00
Edward Firmo
896f86ddab Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-09 07:56:11 +02:00
Edward Firmo
12837077da Move rgbTo565 to header file
For IDF 5 compatibility
2024-04-09 07:56:06 +02:00
GitHub Actions
70c11efd96 Pre-built firmware for NSPanel - Review components files 2024-04-08 22:02:48 +00:00
Edward Firmo
10e0a47b6f Review components files 2024-04-08 23:47:16 +02:00
Edward Firmo
88cca0d1bf Allow for longer string to Home page values
Solves #2020
2024-04-08 21:23:08 +02:00
Edward Firmo
c727fcd17b Rebuild Home page with automation reload
This will rebuild some components on the Home page when the automation settings changes.
This also adds support to mdi:void which will plot empty/blank icon.
Solves #1992
Solves #2018
Solves #2019
2024-04-08 21:13:20 +02:00
Edward Firmo
6be727d4af Move UtilitiesGroups to PSRAM 2024-04-08 20:36:23 +02:00
GitHub Actions
3a2dd23f86 Pre-built firmware for NSPanel - Report pre-built installed packages on watchdog 2024-04-08 14:23:02 +00:00
Edward Firmo
e1e157a2b8 Report pre-built installed packages on watchdog
Helps with #2024
2024-04-08 16:04:55 +02:00
Edward Firmo
c6d4929a53 Make timezone customization obsolete
Helps with #2024
2024-04-08 16:01:47 +02:00
Edward Firmo
ca7dcd92a9 Fix input identation 2024-04-08 15:52:54 +02:00
Edward Firmo
593f05feb9 Remember timezone on boot
Supports #2024
2024-04-08 15:47:57 +02:00
GitHub Actions
b30ba76960 Pre-built firmware for NSPanel - Timezone support on Blueprint 2024-04-08 12:15:23 +00:00
Edward Firmo
c98f50543d Timezone support on Blueprint
Still pending the code on ESPHome to store for when WiFi is out
Pending API doc.
I haven't merged this in another service for now to not break the API, but this should be done for v4.4.0

Solves #2024
2024-04-08 14:05:57 +02:00
GitHub Actions
019efade79 Pre-built firmware for NSPanel - Rename to lower case 2024-04-07 21:41:14 +00:00
Edward Firmo
a96ac51ed6 Rename to lower case 2024-04-07 23:32:11 +02:00
Edward Firmo
ea6b8bc1b3 Force rename 2024-04-07 23:31:48 +02:00
Edward Firmo
bf508ae8cb Starts customization after code_scan
To reduce total test time
2024-04-07 23:19:37 +02:00
Edward Firmo
610563f80d Trigger action with changes to wall display 2024-04-07 23:16:43 +02:00
Edward Firmo
cc787deba0 Rename to all lower case 2024-04-07 23:14:47 +02:00
GitHub Actions
05a4b1363b Pre-built firmware for NSPanel 2024-04-07 21:11:49 +00:00
Edward Firmo
113984a7e3 Run prebuild right after code_scan 2024-04-07 22:55:49 +02:00
Edward Firmo
314a0a8eab Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-04-07 22:54:14 +02:00
Edward Firmo
d75d559a1e Merge prebuilts task 2024-04-07 22:54:02 +02:00
GitHub Actions
e4b00d5e71 Pre-built firmware for NSPanel - Fix packages order 2024-04-07 20:47:24 +00:00
Edward Firmo
e98a6a45a3 Fix packages order
Adds to #2024
2024-04-07 22:36:58 +02:00
Edward Firmo
6f432a54fd Generate MD5 for wall_display.bin 2024-04-07 22:23:54 +02:00
GitHub Actions
0eb8654663 Pre-built firmware for NSPanel 2024-04-07 20:01:38 +00:00
Edward Firmo
d368cb2239 Add config param to build in ESP-IDF
Adds to #2024
2024-04-07 20:00:06 +02:00
Edward Firmo
9920d23477 Move builds to actions
Adds to #2024
2024-04-07 19:51:57 +02:00
Edward Firmo
93b3281e6e Use const in for loop 2024-04-07 19:49:53 +02:00
Edward Firmo
03b993a83c add md5 files
Adds to #2024
2024-04-07 19:43:35 +02:00
Edward Firmo
8bb708b448 Cleanup bin from esphome folder
Relates to #2024
2024-04-07 19:20:37 +02:00
Edward Firmo
185c6f5d65 Lint 2024-04-07 19:19:27 +02:00
Edward Firmo
674c3d909d Add build flags
Adds to #2024
2024-04-07 19:17:19 +02:00
Edward Firmo
fba844f261 Add NSPanel_HA_Blueprint model to device models
Adds to #2024
2024-04-07 19:10:17 +02:00
Edward Firmo
2f697923cc Make add mac global
Complements #2024
2024-04-07 19:08:24 +02:00
Edward Firmo
5fbae3128f Merge pull request #2024 from MichaelHeimann/Blackymas-urls
Update prebuilt
2024-04-07 18:53:15 +02:00
Edward Firmo
d1b973847e Lint 2024-04-07 18:37:24 +02:00
Edward Firmo
c58dbc3516 Add build flags 2024-04-07 18:33:31 +02:00
Edward Firmo
61aa97f64e Don't include mac address code when not prebuilt 2024-04-07 18:30:58 +02:00
Edward Firmo
0ca7b9fcc7 Build firmware on actions 2024-04-07 18:19:33 +02:00
Edward Firmo
1718d9d6cf Split Wall_Display from NSPANEL_HA_BLUEPRINT 2024-04-07 18:15:50 +02:00
Edward Firmo
aafbc722fd Add build flags 2024-04-07 17:49:46 +02:00
MichaelHeimann
41b2dc0d58 Update nspanel_esphome_prebuilt.yaml 2024-04-07 16:48:52 +02:00
MichaelHeimann
25885620b6 Add files via upload 2024-04-07 16:48:23 +02:00
MichaelHeimann
b66d78bcbd Update nspanel_blueprint.yaml 2024-04-07 16:42:47 +02:00
MichaelHeimann
c0e34f284d Update nspanel_blueprint.yaml
support manual configured AND prebuilt nspanels
2024-04-05 23:37:55 +02:00
MichaelHeimann
a5ab52653c Update nspanel_blueprint.yaml
change project model to Wall_Display
2024-04-05 17:58:29 +02:00
MichaelHeimann
5db3f59679 Add files via upload 2024-04-05 17:25:13 +02:00
MichaelHeimann
96b0e0a6c6 Add files via upload
make fw update actually use fw_url textfield
2024-04-05 17:08:43 +02:00
MichaelHeimann
fddaf9bc6e Add files via upload
add text entry field for fw
2024-04-05 16:57:27 +02:00
MichaelHeimann
2542386c2d Add files via upload
create md5 URL by adding .md5 to firmware url
make firmware url non-internal
2024-04-05 16:37:34 +02:00
Edward Firmo
140cbdd409 Enables PSRAM
Supports #1983
Supports #1946
Supports #1815

Could support esphome/feature-requests#2369
2024-04-05 00:54:51 +02:00
MichaelHeimann
3bb4bdd49f redo device_name suffix generation 2024-04-04 14:11:52 +02:00
MichaelHeimann
a78a282b41 Merge pull request #2 from Blackymas/main
pull from head
2024-04-04 14:10:14 +02:00
Edward Firmo
0e6853f3bf Lint 2024-04-04 14:08:53 +02:00
Edward Firmo
b0d4d22404 Page title when opening details from custom buttons (home page)
Solves #1909
2024-04-04 13:56:26 +02:00
MichaelHeimann
d09680b87c Update nspanel_esphome_core.yaml 2024-04-04 13:41:58 +02:00
Edward Firmo
9b3f64835d Custom buttons toggle entities when no details supported
Solves #1844
2024-04-04 13:35:26 +02:00
MichaelHeimann
d9d7e66bbf Update nspanel_esphome_core.yaml 2024-04-04 12:14:28 +02:00
MichaelHeimann
49170c1b6a Update nspanel_esphome_core.yaml 2024-04-04 12:11:26 +02:00
MichaelHeimann
8a80839aec Update nspanel_esphome_prebuilt.yaml
remove captive portal for space reasons (doesn't work anyways)
2024-04-04 12:00:13 +02:00
MichaelHeimann
4ede301ffa Update nspanel_esphome_prebuilt.yaml 2024-04-04 11:58:20 +02:00
MichaelHeimann
54b87d3d6a Update nspanel_esphome_core.yaml 2024-04-04 11:13:32 +02:00
MichaelHeimann
53113a26d9 Add files via upload
update to 4.3.2
2024-04-04 10:20:34 +02:00
Edward Firmo
7eed2adcc6 Language based bytes per char
Solves #2000
2024-04-04 09:45:52 +02:00
Edward Firmo
6632404c4d Merge pull request #2014 from Blackymas/beta
Fix yaml identation
2024-04-04 06:57:19 +02:00
Edward Firmo
f46ea5dc14 Merge pull request #2013 from Blackymas/dev
Fix yaml identation
2024-04-04 06:49:39 +02:00
Edward Firmo
6e0137bcec Fix yaml identation
Solves #2012
2024-04-04 06:48:44 +02:00
MichaelHeimann
59f9b1ffb5 Update nspanel_esphome_core.yaml 2024-04-03 20:32:22 +02:00
MichaelHeimann
1f835c5a48 Update nspanel_esphome_core.yaml
'name_add_mac_suffix' was not declared error
2024-04-03 20:25:01 +02:00
MichaelHeimann
f2eabcf059 Merge pull request #1 from Blackymas/main
update to 4.3.2
2024-04-03 18:49:50 +02:00
MichaelHeimann
2e802607bb Update nspanel_esphome_core.yaml
try to make the device name respect name_add_mac_suffix
2024-04-03 18:28:20 +02:00
Edward Firmo
29c5e8eea5 Merge pull request #2010 from Blackymas/beta
v4.3.2 - Enhancements and Critical Fixes for a Seamless Experience
2024-04-03 17:58:44 +02:00
Edward Firmo
d0fe64fd67 Merge pull request #2009 from Blackymas/dev
v4.3.2 - Enhancements and Critical Fixes for a Seamless Experience
2024-04-03 17:57:29 +02:00
Edward Firmo
c20f88a3ee v4.3.2 - Enhancements and Critical Fixes for a Seamless Experience 2024-04-03 17:56:03 +02:00
Edward Firmo
fdec06482d Merge pull request #2008 from Blackymas/dev
Use components from beta
2024-04-03 17:05:16 +02:00
Edward Firmo
913d43959b Use components from beta 2024-04-03 16:31:26 +02:00
Edward Firmo
e40aa6d1ca Merge pull request #2007 from Blackymas/dev
v4.3.2b1
2024-04-03 15:07:07 +02:00
MichaelHeimann
235a5b2970 Update nspanel_blueprint.yaml
different name to make it distinguisable
2024-04-03 15:04:31 +02:00
MichaelHeimann
c9d2f0d846 Update nspanel_blueprint.yaml
prebuilt nspanel yaml has projectname NSPanel_HA_Blueprint, so default esp32dev won't show the prebuilt panels
2024-04-03 15:02:25 +02:00
Edward Firmo
bedd30c68f Lint 2024-04-03 14:44:26 +02:00
Edward Firmo
18e9458a57 Bump to v4.3.2b1 2024-04-03 14:41:01 +02:00
Edward Firmo
e61f78fdcf Update ReleaseNotes.md 2024-04-03 14:30:25 +02:00
Edward Firmo
22e655d0e3 Swipe Functionality Restored on Button and Home Pages
Solves #1980
Solves #1994
2024-04-03 14:30:05 +02:00
Edward Firmo
3b12a95ae0 Fix for Missing Titles and Icons on Detailed Entities Pages
Solves #1978
2024-04-03 14:26:34 +02:00
Edward Firmo
a2870f9080 Fix detailed page icon & title
Solves #1978
2024-04-03 14:20:40 +02:00
Edward Firmo
b044561e11 Select display model based on installed TFT 2024-04-03 11:37:34 +02:00
Edward Firmo
2b00485249 Update US Land
Solves #1994
2024-04-03 10:38:36 +02:00
Edward Firmo
bf2ce54279 Align swipe engine with entity pages
Solves #1994
2024-04-03 10:36:15 +02:00
Edward Firmo
58c158a426 Reviewed swipe engine
Solves #1994
2024-04-03 10:18:31 +02:00
Edward Firmo
f3100081a4 REvised swipe engine on home page
Prepares for #1994
2024-04-03 10:04:05 +02:00
Edward Firmo
2580eeb668 Enhanced TFT Update Reliability in ESPHome Nextion Component 2024-04-03 09:49:14 +02:00
MichaelHeimann
5cdadc79ce new version based on 4.3.1
with 
- climate_heat and 
- psram
2024-04-03 01:01:42 +02:00
MichaelHeimann
e49657230d Update nspanel_esphome_prebuilt.yaml
enable climate_heat
2024-04-03 00:53:03 +02:00
MichaelHeimann
0b0e0a4982 Update nspanel_esphome_prebuilt.yaml
now, since ota_http doesn't follow http 302s ..
2024-04-03 00:39:30 +02:00
MichaelHeimann
0248a825e1 Update nspanel_esphome_prebuilt.yaml 2024-04-03 00:34:09 +02:00
MichaelHeimann
720f640ec0 Update nspanel_esphome_prebuilt.yaml 2024-04-03 00:24:43 +02:00
Edward Firmo
4e421bdc23 Immediate Brightness Adjustment from Home Assistant Fixed
Solves #2006
2024-04-02 09:43:16 +02:00
Edward Firmo
7fc9214667 Change brightness when adjusted to a different value
Solves #2006
2024-04-02 09:39:27 +02:00
MichaelHeimann
072e1c6bd5 Update nspanel_esphome_prebuilt.yaml 2024-04-02 03:26:22 +02:00
MichaelHeimann
aad0c3daf1 Update nspanel_esphome_prebuilt.yaml 2024-04-02 02:40:28 +02:00
MichaelHeimann
383d5d3d52 Add files via upload 2024-04-02 02:20:40 +02:00
MichaelHeimann
60c9bfc072 Update nspanel_esphome_prebuilt.bin.md5 2024-04-02 02:20:06 +02:00
MichaelHeimann
2d895f8ae8 Update nspanel_esphome_prebuilt.yaml
http download for firmware
psram
2024-04-02 02:00:42 +02:00
MichaelHeimann
6f9090a866 Update nspanel_esphome_prebuilt.bin.md5 2024-04-02 00:58:52 +02:00
MichaelHeimann
0fccde0385 Add files via upload 2024-04-01 02:00:43 +02:00
MichaelHeimann
410d4b789d add md5_url tp nspanel_esphome_prebuilt.yaml 2024-04-01 01:09:15 +02:00
Edward Firmo
887c3155c2 Refining watchdog 2024-04-01 00:53:18 +02:00
Edward Firmo
87d292496a Return with watchdog
Helps with #2001
2024-04-01 00:29:15 +02:00
Edward Firmo
f0d1b9a7aa Performance improvements - Chips triggers
Helps with #1977
Helps with #2001
2024-04-01 00:11:11 +02:00
Edward Firmo
c7bfe4096a Performance improvement - Home page values triggering
Solves #1977
Hopefully solves #2001
2024-04-01 00:05:33 +02:00
Edward Firmo
8531a49621 Performance improvements - Reduce triggers when line ref down't change signal
Solves #1977
2024-03-31 23:51:30 +02:00
Edward Firmo
6a93083eb7 Lint 2024-03-31 21:29:33 +02:00
Edward Firmo
2393834ae8 Performance improvements & watchdog prep 2024-03-31 21:26:48 +02:00
Edward Firmo
0e089b292b Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-31 19:14:37 +02:00
Edward Firmo
89bda1e0c4 Always process panel's events
Regardless if the panel's name sensor is available
2024-03-31 19:12:59 +02:00
Edward Firmo
a7574100f0 Enhancements and Critical Fixes for a Seamless Experience 2024-03-31 16:03:01 +02:00
Edward Firmo
29effe36f8 Mention change on Release Notes
Solves #2003
Solves #1928
Solves #1949
Solves #1904
Solves #1933
2024-03-31 15:58:17 +02:00
Edward Firmo
af055283f7 Merge pull request #2003 from colincachia/main
Fix typo
2024-03-31 15:49:45 +02:00
Edward Firmo
e5c6f25181 Automatic Update for Weather Icon at Sunrise and Sunset
Solves #1971
2024-03-31 11:54:11 +02:00
Edward Firmo
530697642e Fix for Numeric Button Page Labels Not Displaying
Solves #1961
2024-03-31 11:50:42 +02:00
Edward Firmo
684e6e24a5 Enhanced Version Mismatch Notifications for Comprehensive System Compatibility
Solves #1966
Solves #1968
2024-03-31 11:46:35 +02:00
Edward Firmo
9d48e766b3 Custom Binary State Entities for Hardware Button Status Display Enhancement
Solves #1959
Solves #1973
2024-03-31 11:38:45 +02:00
Edward Firmo
c281a037c2 Documentation Update for "Folder-Watcher" Engine Use
Solves #1974
2024-03-31 11:31:36 +02:00
Edward Firmo
1718bd55f6 Documentation Improvement for TFT Upload Process
Solves #1969
2024-03-31 11:20:09 +02:00
Edward Firmo
c51ca1bd06 Enhanced Temperature Measurement Strategy
Solves #1918
2024-03-31 11:14:34 +02:00
Edward Firmo
41aa61c76e Close Icon Visibility Enhancement
Solves #1984
2024-03-31 11:00:19 +02:00
Edward Firmo
77d7d7ee23 Utilities Dashboard Performance Bug Resolved
Solves #1964
2024-03-31 10:57:00 +02:00
Edward Firmo
2fd5881c66 Device Reboot Issue on Wake Up Resolved
Solves #1976
2024-03-31 10:50:30 +02:00
Edward Firmo
f03f825df8 Alarm Control with Hardware Button Enhancement
Solves #1995
2024-03-31 10:41:13 +02:00
Edward Firmo
d039c04a95 Hebrew Translation Text Reversal Fix
Solves #1999
2024-03-31 10:35:29 +02:00
Edward Firmo
ff6e524548 Documentation Updates for Arduino References
Solves #1997
2024-03-31 10:33:44 +02:00
Edward Firmo
565df092d4 Expanded Wake-Up Sensor Support
Solves #1998
2024-03-31 10:28:00 +02:00
Edward Firmo
c6f692b0f9 Added more device classes to wake-up sensor
Solves #1998
2024-03-31 09:32:21 +02:00
Edward Firmo
acba8b053e Remove json component 2024-03-30 23:16:59 +01:00
Colin Cachia
840554ae8e Merge pull request #1 from colincachia/colincachia-pr-1
Fix mini typo
2024-03-30 18:51:22 +01:00
Colin Cachia
2eeda11841 Fix mini typo
Most probably, due to a copy/paste incident, the description of one of the items is incorrect
2024-03-30 18:50:20 +01:00
MichaelHeimann
f6f032ae22 add prebuilt firmware 2024-03-30 01:46:06 +01:00
MichaelHeimann
f304a5c078 Delete prebuilt/firmware.bin 2024-03-30 01:42:39 +01:00
MichaelHeimann
41c320a3d6 add prebuild firmware.bin 2024-03-30 01:41:02 +01:00
MichaelHeimann
bf0aa0f8fb Create nspanel_esphome_prebuilt.bin.md5 2024-03-30 01:39:37 +01:00
Edward Firmo
c3d55a284e Clean-up new json 2024-03-29 21:53:47 +01:00
Edward Firmo
ae05f133e1 Move webserver to core package
This is reverting back from cJson to ArduinoJson as that was adding to memory consumption when webserver was used (quite common), reducing the benefits of a lighter library.
2024-03-29 21:42:26 +01:00
Edward Firmo
c74eabbe95 Do not evaluate vars before conditions are met
Helps with #1977
2024-03-29 20:28:27 +01:00
Edward Firmo
cbd341a784 Merge pull request #1997 from andythomas/docs240329at
Update docs, look for references to Arduino.
2024-03-29 20:18:53 +01:00
Edward Firmo
67892fb6ed Merge pull request #1999 from leranp/dev
Text Reverese for Hebrew translation
2024-03-29 20:18:39 +01:00
Edward Firmo
63dd57d7f3 Reorg conditions
Helps with #1977
2024-03-29 20:15:35 +01:00
Edward Firmo
5d102472a1 Cleanup trigger's conditions
Helps with #1977
2024-03-29 20:03:48 +01:00
Edward Firmo
e1dd490d4f Cleanup trigger conditions
Helps #1977
2024-03-29 19:59:56 +01:00
Edward Firmo
6c52b16ed1 Fix missing links 2024-03-29 19:42:19 +01:00
Edward Firmo
27b458ae2c Reduce trigger for to 1s
Helps #1977
2024-03-29 19:35:10 +01:00
Edward Firmo
f964620f57 Fix indentation for numeric list
To not break the display as a list.
2024-03-29 19:17:26 +01:00
Andy Thomas
a00e87b147 markdown lint 2024-03-29 17:01:42 +01:00
leranp
cb1f214179 Update nspanel_blueprint.yaml 2024-03-29 17:48:01 +03:00
Andy Thomas
ab04f7a86d Markdown lint 2024-03-29 11:28:49 +01:00
Andy Thomas
ea5e349d7a Update install.md 2024-03-29 10:32:05 +01:00
Andy Thomas
653b525bf0 Update howto.md 2024-03-29 10:14:26 +01:00
Andy Thomas
a665abd22c Update error_initializing.md 2024-03-29 10:07:18 +01:00
Andy Thomas
cccbdd96fd Update different_version.md 2024-03-29 09:57:53 +01:00
Andy Thomas
ea459c8bf4 Update customization.md 2024-03-29 09:51:01 +01:00
Andy Thomas
386d39d85a Update addon_climate.md 2024-03-29 09:33:04 +01:00
Edward Firmo
37cf913c0b Open details with short click on alarm_control_panel entity
Solves #1995
2024-03-29 09:25:11 +01:00
Edward Firmo
48f60c7f99 Reduce refresh rate on utilities page values
Solves #1967
2024-03-29 09:02:01 +01:00
Edward Firmo
ec74ebcc79 Fix parameter entity for entity_details_show
Solves #1987
2024-03-27 16:45:30 +01:00
Edward Firmo
c2ad0e9669 RGB color via localevent
Solves #1963
Solves #1991
2024-03-27 14:24:39 +01:00
Edward Firmo
04ae094baf remove delays on utilities page load 2024-03-27 09:16:40 +01:00
Edward Firmo
b85883993f resetUtilitiesGroups on page load 2024-03-27 09:15:57 +01:00
Edward Firmo
39d41914f4 Utilities update only value changed 2024-03-26 20:17:48 +01:00
Edward Firmo
5df7602fc8 Fix to Utilities pages values 2024-03-26 20:05:19 +01:00
Edward Firmo
ccecd91f6f Utilities page caching
Helps with #1977
2024-03-26 18:58:58 +01:00
Edward Firmo
53781082e6 Use CONFIG_ESP32_REV_MIN_3 (experimental)
#1815
2024-03-26 14:18:43 +01:00
Edward Firmo
071007124b Enable PSRAM (experimental)
Please see the following discussions:
- #1983
- #1946
- #1815
2024-03-26 13:34:54 +01:00
Edward Firmo
dd844d1d3c Prepare for service utilities_group_refresh 2024-03-26 09:37:04 +01:00
Edward Firmo
fe7eae4191 Increase movement rate of cursor lines on utilities page
To compensate the lower refresh rate and keep the same speed, although it might look a bit odd. To be tested.
Helps with #1964
2024-03-25 21:16:10 +01:00
Edward Firmo
801324744c Lint 2024-03-25 21:06:29 +01:00
Edward Firmo
e338d130e5 Lint 2024-03-25 21:03:56 +01:00
Edward Firmo
47d8425683 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-25 20:13:43 +01:00
Edward Firmo
844cc0ec4e Reduce refresh rate on utilities pages lines
From 20Hz to 6.7Hz.
Helps with #1964
2024-03-25 20:13:22 +01:00
Edward Firmo
c27a097a5d Increase "close" button size
Solves #1984
2024-03-25 20:02:05 +01:00
Edward Firmo
efdd18995d Merge pull request #1985 from andythomas/docs240324at
adjust docs for #1918
2024-03-25 19:52:44 +01:00
Edward Firmo
82ceca57a7 add sliding_window_moving_average to adc (temp) sensor
Solves #1918
2024-03-25 19:51:45 +01:00
Edward Firmo
942bd84874 Clean-up 2024-03-25 19:49:53 +01:00
Andy Thomas
cf4b2b8f3c adjust docs for #1918
Less noise requires slightly modified parameters for the heating system.
2024-03-25 13:07:32 +01:00
Edward Firmo
808db53981 Fix line break 2024-03-23 17:37:19 +01:00
Edward Firmo
d62623eef7 Use DNS for manual ip
Solves #1969
2024-03-23 14:16:19 +01:00
Edward Firmo
eb640fb09d Use DNS for manual ip
Solves #1969
2024-03-23 14:12:33 +01:00
Edward Firmo
7e9118a3ce Input "Nextion TFT File Folder" description
Solves #1974
2024-03-23 14:02:21 +01:00
Edward Firmo
f7459b0148 Lint 2024-03-23 13:17:04 +01:00
Edward Firmo
5f5b7cb36c Merge pull request #1973 from lafriks-fork/feat/hw_button_state_entity
Allow to specify entity for HW button state status
2024-03-23 13:10:47 +01:00
Lauris BH
1c61acbb63 Update as per review 2024-03-23 14:03:41 +02:00
Edward Firmo
9b2f7bd2b8 Rebuild versioning notifications
Solves #1759
2024-03-23 11:14:45 +01:00
Lauris BH
dd9e0ec79e Fix linting error and update description 2024-03-23 11:18:47 +02:00
Edward Firmo
a012b17653 Support to numeric button page label
Solves #1961
2024-03-23 00:38:00 +01:00
Edward Firmo
4d7e4da594 Update the weather info when sun entity changes
Solves #1971
This also adds a new sun entity selector to the inputs.
2024-03-23 00:14:55 +01:00
Lauris BH
d5a0bde06c Allow to specify entity for HW button state status 2024-03-23 01:01:12 +02:00
Edward Firmo
7db6e4598d Fix is_uploading_tft name 2024-03-22 12:25:06 +01:00
Edward Firmo
3fb8343246 Ignore Nextion events while uploading
Helps with #1946
2024-03-22 11:25:30 +01:00
Edward Firmo
d2b924b355 Disable all services while upload
A service call still possible, but the services won't do anything.
Helps with #1946
2024-03-22 11:21:50 +01:00
Edward Firmo
dbf57053db Split wakeup_page_id from back_page_id
Solves #1947 and makes the whole wake-up engine more reliable.
2024-03-22 10:45:35 +01:00
Edward Firmo
d35c2a77ba Lint 2024-03-22 10:18:48 +01:00
Edward Firmo
64b72ca2d5 Send pre-defined chip color on boot
This solves #1928 as the pre-defined color will always be used when defined, and also helps with #1949 as it will prevent sending the color on every change when a pre-defined color is used.
2024-03-22 10:05:18 +01:00
Edward Firmo
6d5af5a6e0 Input: Hardware Buttons - Always Show Bar
Solves #1933
2024-03-22 09:39:58 +01:00
Edward Firmo
69bf13326c Move chips vars to main variables area 2024-03-21 22:16:45 +01:00
Edward Firmo
72fa7abb2a Lint 2024-03-21 22:04:26 +01:00
Edward Firmo
772ede7f48 Reduced calls to home page components
Solves #1949
2024-03-21 20:17:52 +01:00
Edward Firmo
1b8c1265e9 Return with delays between service calls
Helps with #1949
2024-03-20 22:50:15 +01:00
Edward Firmo
fddf3bda9f Light page hidden components rearrangement 2024-03-20 22:23:11 +01:00
Edward Firmo
ad8cc7788b Change button bar state when relay changes with local control
Solves #1904
2024-03-20 20:31:20 +01:00
Edward Firmo
a3f54d5c43 Lint 2024-03-20 20:09:59 +01:00
Edward Firmo
828a07a636 Use components from dev 2024-03-20 20:05:35 +01:00
Edward Firmo
5e5476f6e2 Reduce number of calls to Nextion - Relay and buttons bars
Helps with #1949
2024-03-20 19:46:47 +01:00
Edward Firmo
231c9aa426 Set back_page_id to page Home
Solves #1945
2024-03-20 19:28:23 +01:00
Edward Firmo
7455df28e8 Remove json component 2024-03-20 19:21:31 +01:00
Edward Firmo
e263047b15 Merge pull request #1940 from Blackymas/beta
v4.3.1 - Ensuring Compatibility with ESPHome v2024.3.0 and Enhancing Stability
2024-03-20 09:11:21 +01:00
Edward Firmo
a85f6fb6c3 Merge pull request #1939 from Blackymas/dev
Use components from `main`
2024-03-20 09:10:19 +01:00
Edward Firmo
fc9017b3c6 Merge pull request #1938 from Blackymas/beta
v4.3.1 - Ensuring Compatibility with ESPHome v2024.3.0 and Enhancing Stability
2024-03-20 09:09:33 +01:00
Edward Firmo
98aae56235 Use components from main 2024-03-20 09:09:21 +01:00
Edward Firmo
ff9de5bf26 Merge pull request #1937 from Blackymas/dev
v4.3.1 to beta
2024-03-20 08:45:39 +01:00
Edward Firmo
2f47ffc42b Bump to v4.3.1 2024-03-20 08:42:32 +01:00
Edward Firmo
6af2ddac99 Use nspanel_ha_blueprint component from beta 2024-03-19 15:44:18 +01:00
Edward Firmo
a647c69f53 Bump to v4.3.1b2 2024-03-19 15:43:00 +01:00
Edward Firmo
e2c639a32d Move reboot button control to on_touch
So save a few more bytes of memory
2024-03-19 15:32:41 +01:00
Edward Firmo
7a18b75204 Merge pull request #1935 from Blackymas/dev
v4.3.1b1
2024-03-19 15:02:58 +01:00
Edward Firmo
e0415c35cd Remove bluetooth_proxy from customizations
It will exceed memory
2024-03-19 14:10:22 +01:00
Edward Firmo
7fda931f67 Remove pre-build test for now 2024-03-19 14:07:53 +01:00
Edward Firmo
b1412f1d12 Use new get_ip_addresses() from ESPHome v2024.3.0 2024-03-19 13:28:11 +01:00
Edward Firmo
94782bf9fc Add relay_settings to refresh_hardware_buttons_bars verbose logs 2024-03-19 13:22:20 +01:00
Edward Firmo
3dbf577a92 Use component nspanel_ha_blueprint from dev
To update page list
2024-03-19 13:16:35 +01:00
Edward Firmo
ce43a31242 Refresh hw btn bar state if state changed
Solves #1933
2024-03-19 11:15:15 +01:00
Edward Firmo
cc756fda35 hw_button_state service to control buttons individually
Solves #1934
2024-03-19 11:13:55 +01:00
Edward Firmo
f28a02fd5d Remove .bin files 2024-03-19 09:52:13 +01:00
Edward Firmo
5f850ae6a3 Remove pre-build test & build for now
PR#5586 is quite active and breaking this. Waiting until it is more stable.
2024-03-19 09:51:27 +01:00
Edward Firmo
4e7bbef1a0 Bump to v4.3.1b1 2024-03-18 23:58:56 +01:00
Edward Firmo
447a07c65b Move page Boot to pos 0 2024-03-18 23:51:09 +01:00
Edward Firmo
480848558f Release notes v4.3.1 2024-03-18 23:14:33 +01:00
Edward Firmo
8f52de210c Delay on all loops
To avoid serial buffer overflow
2024-03-18 18:57:05 +01:00
Edward Firmo
54a4e7775f Exit notification page with notification clear
Solves #1931
2024-03-18 18:55:02 +01:00
Edward Firmo
9059b20773 Do not save built firmware when using beta 2024-03-18 14:49:49 +01:00
Edward Firmo
8226ea6a5b Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-18 10:10:38 +01:00
Edward Firmo
3f39dbcad8 Use Nextion native components replacing command contruction 2024-03-18 10:10:35 +01:00
GitHub Actions
56813c795b Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-17 21:19:10 +00:00
Edward Firmo
9c807f288d Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-17 22:08:21 +01:00
Edward Firmo
271362511f Use ADC sampling
Use esphome/esphome#6330 to enable sampling on adc sensor and smooth the data.
Solves #1918
2024-03-17 22:07:48 +01:00
GitHub Actions
7fca55361c Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-17 21:05:53 +00:00
Edward Firmo
16b5ce4b0b Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-17 21:56:13 +01:00
Edward Firmo
114ea35e55 Adjust boot delays 2024-03-17 21:56:10 +01:00
Edward Firmo
a9dae8fd08 Fix line movement when value is between -1 and +1
Solves #1926
2024-03-17 21:54:24 +01:00
GitHub Actions
27bd854bd5 Pre-built firmware for NSPanel - Boot page increased spacing on versions labels 2024-03-17 19:31:38 +00:00
Edward Firmo
ac3be262fd Boot page increased spacing on versions labels 2024-03-17 20:21:38 +01:00
GitHub Actions
01e99b2f72 Pre-built firmware for NSPanel - Remove debug logs 2024-03-17 13:47:13 +00:00
Edward Firmo
9cd8f6121f Remove debug logs 2024-03-17 14:37:27 +01:00
Edward Firmo
d28ab920c8 Disable boot timer when all info is available 2024-03-17 14:35:59 +01:00
GitHub Actions
9e6fb6eb85 Pre-built firmware for NSPanel - Fix boot progress calcs 2024-03-17 09:59:59 +00:00
Edward Firmo
0d4293b6e4 Fix boot progress calcs 2024-03-17 10:50:09 +01:00
Edward Firmo
59d4c09857 Update customizations 2024-03-17 10:47:46 +01:00
GitHub Actions
05f7932d04 Pre-built firmware for NSPanel - Fix on customizations 2024-03-17 01:36:31 +00:00
Edward Firmo
05bb498e34 Fix page_changed on customizations 2024-03-17 02:26:44 +01:00
Edward Firmo
79573eb541 Fix incorrect call to utilities page on boot 2024-03-17 02:03:47 +01:00
Edward Firmo
4a52b06704 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-17 01:55:01 +01:00
Edward Firmo
bac85239d0 Fix var name tft_version 2024-03-17 01:54:57 +01:00
GitHub Actions
218c551c3e Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-17 00:35:58 +00:00
Edward Firmo
153a906215 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-17 01:25:03 +01:00
Edward Firmo
efee51ea3d Add boot progress bar 2024-03-17 01:24:59 +01:00
GitHub Actions
3d1baba9cb Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-16 10:38:17 +00:00
Edward Firmo
7e00837d8b Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-16 11:28:02 +01:00
Edward Firmo
fb8448fb7d TFT version engine 2024-03-16 11:27:59 +01:00
Edward Firmo
7829382653 Fix line breaks 2024-03-15 23:36:12 +01:00
GitHub Actions
61c2c93c40 Pre-built firmware for NSPanel - Use for device_name sensor 2024-03-15 21:43:01 +00:00
Edward Firmo
2e4b7f2a87 Use ${name} for device_name sensor
Solves #1907
2024-03-15 22:33:06 +01:00
Edward Firmo
55ed3775d1 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-15 22:13:58 +01:00
Edward Firmo
fc53bfc8d8 Send boot settings only when boot event is detected 2024-03-15 22:13:54 +01:00
GitHub Actions
cd19e9174b Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-15 16:33:55 +00:00
Edward Firmo
1179f94ae2 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-15 17:23:55 +01:00
Edward Firmo
7ce40bc4b7 Clean-up 2024-03-15 17:23:51 +01:00
GitHub Actions
37232e19a0 Pre-built firmware for NSPanel - Reorg refresh_hardware_buttons_bars 2024-03-15 14:20:39 +00:00
Edward Firmo
afbeb7a816 Reorg refresh_hardware_buttons_bars
To save a couple of bytes of RAM
2024-03-15 15:10:40 +01:00
GitHub Actions
9db404c099 Pre-built firmware for NSPanel - Allows change brightness when sleeping 2024-03-15 09:58:09 +00:00
Edward Firmo
45c5453c2f Allows change brightness when sleeping
Solves #1919
2024-03-15 10:48:31 +01:00
Edward Firmo
28eb2d064e Clean-up
No functionality changed
2024-03-15 10:33:07 +01:00
Edward Firmo
c1f4eef816 Show hardware button bars on all pages 2024-03-15 10:31:45 +01:00
GitHub Actions
8603bb9687 Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-15 00:52:39 +00:00
Edward Firmo
5f2045ff95 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-15 01:42:00 +01:00
Edward Firmo
904937f06f Clean-up 2024-03-15 01:36:20 +01:00
GitHub Actions
40a75fe4fe Pre-built firmware for NSPanel - Do not show hidden chips with page refresh 2024-03-15 00:33:46 +00:00
Edward Firmo
9e14c2f5d8 Do not show hidden chips with page refresh
Solves #1915
2024-03-15 01:23:41 +01:00
GitHub Actions
3980458fcc Pre-built firmware for NSPanel - Add to events 2024-03-14 21:55:04 +00:00
Edward Firmo
c0a0d2b96b Add device_name to events 2024-03-14 22:41:41 +01:00
Edward Firmo
79363673d3 Replace sendme by current_page text sensor
Solves #1900
2024-03-14 22:38:22 +01:00
Edward Firmo
ce04dd7b99 Use update_bitwise_setting for Expose Relay Fallback Switch
Solves #1914
2024-03-14 13:36:20 +01:00
Edward Firmo
0dc3d86d2e Utilities Page - Cursor Width
Solves #1910
2024-03-14 11:33:10 +01:00
GitHub Actions
fe27f8c619 Pre-built firmware for NSPanel - Do not update indoortemp when embedded temp changes 2024-03-14 10:07:02 +00:00
Edward Firmo
0be79ea5c4 Do not update indoortemp when embedded temp changes
Solves #1911
2024-03-14 10:56:56 +01:00
Edward Firmo
6e57b20edf Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-14 10:15:09 +01:00
Edward Firmo
6b3fe0cf84 Update and improve RTTTL Play docs and examples
Solves #1912
Solves #1901
2024-03-14 10:15:06 +01:00
GitHub Actions
8be3f8a177 Pre-built firmware for NSPanel - Rebuild esphome::api::CustomAPIDevice declarations 2024-03-13 23:35:40 +00:00
Edward Firmo
57fee3c1c6 Rebuild esphome::api::CustomAPIDevice declarations
To reduce chances of a memory leak
2024-03-14 00:23:48 +01:00
Edward Firmo
82341613df Move up link to start-up issues
Solves #1908
2024-03-14 00:18:02 +01:00
Edward Firmo
5bc1e7db96 Control hw button bars locally
Solves #1904
2024-03-14 00:11:36 +01:00
GitHub Actions
bd7c6590f7 Pre-built firmware for NSPanel - Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-13 20:59:46 +00:00
Edward Firmo
16097a5c1d Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-13 21:48:38 +01:00
Edward Firmo
b00798b6ae Move ap to advanced
There's no use for this without `web_server` and `captive_portal`, so let's save some memory.
2024-03-13 21:48:27 +01:00
GitHub Actions
05edda7ceb Pre-built firmware for NSPanel - Add documentation about duplicated entities 2024-03-13 20:47:23 +00:00
Edward Firmo
acb3b7f82e Add documentation about duplicated entities
Solves #1905
2024-03-13 21:35:04 +01:00
Edward Firmo
dd6dd172e2 Use blueprint status to set api variable on TFT 2024-03-13 21:25:58 +01:00
Edward Firmo
1d95198312 Bump to v4.3.1d1 2024-03-13 21:17:53 +01:00
Edward Firmo
585d3142ae Consider value 0 as a "on" state for sensors
Solves #1902
2024-03-13 21:16:40 +01:00
Edward Firmo
953d0b6139 Remove filter for sensor only in the home page values 2024-03-13 21:03:06 +01:00
Edward Firmo
4f21cb442a Update wifi icon when connection changes 2024-03-13 20:17:49 +01:00
Edward Firmo
f49aadd51e Fix component name on entitypage03 icon01
Solves #1902
2024-03-13 19:21:22 +01:00
Edward Firmo
72f74ddbe4 Alignment entities pages
Solves #1903
2024-03-13 11:33:55 +01:00
Edward Firmo
c6be70c7f2 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-13 09:45:00 +01:00
Edward Firmo
9151358284 Add entitypages_show_entities_icons input
Solves #1885
2024-03-13 09:41:50 +01:00
GitHub Actions
d90c180d91 Pre-built firmware for NSPanel - Fix test for temp_units 2024-03-13 08:32:11 +00:00
Edward Firmo
1fb11564d6 Fix test for temp_units
Solves #1834
2024-03-13 09:21:54 +01:00
Edward Firmo
fc2bd3d40b Twice the limits for entities values on CJK
Hopefully solves #1884
2024-03-13 09:18:44 +01:00
Edward Firmo
b02f3c080a Do not show page index when only 1 page
Solves #1883
2024-03-13 08:53:26 +01:00
Edward Firmo
bfe27f0693 Remove default labels on utilities
Solves #1899
2024-03-13 08:38:34 +01:00
Edward Firmo
4ff219075e Merge pull request #1893 from Blackymas/beta
Lint
2024-03-12 16:46:43 +01:00
Edward Firmo
0e8c98e798 Merge pull request #1892 from Blackymas/dev
Lint
2024-03-12 16:45:34 +01:00
Edward Firmo
6fd55ce65d Lint 2024-03-12 16:41:15 +01:00
Edward Firmo
5288cf68b6 Lint 2024-03-12 16:38:51 +01:00
Edward Firmo
e3fb149b58 Use newer python 2024-03-12 16:30:54 +01:00
Edward Firmo
7422704fcc Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-12 16:26:47 +01:00
Edward Firmo
358c363077 Don't test automatically on main 2024-03-12 16:26:34 +01:00
Edward Firmo
427604712d Merge pull request #1890 from Blackymas/beta
v4.3 - Welcome to Framework ESP-IDF, an Utilities Dashboard and Enhanced Localization
2024-03-12 16:17:31 +01:00
Edward Firmo
083ed5bc61 Merge pull request #1889 from Blackymas/dev
v4.3.0 release prep
2024-03-12 16:10:06 +01:00
GitHub Actions
0c83264750 Pre-built firmware for NSPanel - Use components from 2024-03-12 15:08:43 +00:00
Edward Firmo
8af43c2bcc Use components from main 2024-03-12 15:59:02 +01:00
Edward Firmo
33fd9dfd38 Merge pull request #1888 from Blackymas/beta
v4.3 - Welcome to Framework ESP-IDF, an Utilities Dashboard and Enhanced Localization
2024-03-12 15:58:54 +01:00
Edward Firmo
619c18fddc Merge pull request #1887 from Blackymas/dev
v4.3.0 to beta
2024-03-12 15:49:31 +01:00
GitHub Actions
b26f10fc03 Pre-built firmware for NSPanel - Getting prepared for release 2024-03-12 14:25:05 +00:00
Edward Firmo
04d7be368c Getting prepared for release 2024-03-12 12:06:35 +01:00
Edward Firmo
b41caf73be Bump to v4.3.0
Getting ready for releasing
2024-03-12 11:54:53 +01:00
Edward Firmo
edd3e3532d Fix Relay 02 - Chip Icon selector 2024-03-12 11:40:14 +01:00
Edward Firmo
9bd6b4504d Merge pull request #1882 from Blackymas/dev
v4.3.0b3
2024-03-11 23:07:08 +01:00
Edward Firmo
45994f3c0b Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-11 23:00:27 +01:00
Edward Firmo
d61e71a605 Prevents showing "None" when unit_of_mesurement is not available
Solves #1877
2024-03-11 23:00:13 +01:00
GitHub Actions
356d799f92 Pre-built firmware for NSPanel - notification_show minor optimization 2024-03-11 21:59:33 +00:00
Edward Firmo
c8bb294e5e notification_show minor optimization 2024-03-11 22:49:43 +01:00
Edward Firmo
5ab53b794e Support multi-line for bug description 2024-03-11 22:40:02 +01:00
Edward Firmo
8af0802c2d Merge branch 'beta' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-11 22:34:05 +01:00
Edward Firmo
2fb273a4cf Bump to v4.3.0b3 2024-03-11 22:28:03 +01:00
Edward Firmo
e39489e6ad Move notification buttons engine to ESPHome
Solves #1881
Improves #1501
2024-03-11 22:20:36 +01:00
Edward Firmo
1045ce1860 Fix label filter on utilities page
Solves #1877
2024-03-11 21:33:15 +01:00
GitHub Actions
8342532536 Pre-built firmware for NSPanel - Fix invalid call to 2024-03-11 17:58:28 +00:00
Edward Firmo
92940d82f2 Fix invalid call to fan.oscillate
Solves #1873
2024-03-11 18:43:44 +01:00
GitHub Actions
4545174cf1 Pre-built firmware for NSPanel - Merge pull request #1878 from Blackymas/dev 2024-03-10 22:43:08 +00:00
Edward Firmo
e9aa032f66 Compile pre-built on dev only 2024-03-10 23:37:22 +01:00
Edward Firmo
8191762c51 Merge pull request #1878 from Blackymas/dev
v4.3.0b2
2024-03-10 23:33:39 +01:00
Edward Firmo
299633ebf9 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-10 23:32:59 +01:00
Edward Firmo
1e3ba659cf Merge branch 'beta' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-10 23:32:00 +01:00
GitHub Actions
c8686cc379 Pre-built firmware for NSPanel - Bump to v4.3.0b2 2024-03-10 22:30:36 +00:00
Edward Firmo
f2f137789d Bump to v4.3.0b2 2024-03-10 23:20:26 +01:00
Edward Firmo
8b45ec7a85 Rebuild utilities page constructor
Solves #1877
2024-03-10 23:13:57 +01:00
Edward Firmo
79a82f764a Do not show QR code icon when disabled
Solves #1876
2024-03-10 22:33:27 +01:00
GitHub Actions
e79dad99c8 Pre-built firmware for NSPanel - Merge pull request #1874 from Blackymas/dev 2024-03-10 19:37:28 +00:00
Edward Firmo
9b0faffbf2 Merge pull request #1874 from Blackymas/dev
v4.3.0b1
2024-03-10 20:28:00 +01:00
Edward Firmo
9da0744d80 lint 2024-03-10 20:18:10 +01:00
Edward Firmo
599d05ec7d Merge branch 'beta' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-03-10 20:13:41 +01:00
Edward Firmo
0b6d8e0fd1 bump to v4.3.0b1 2024-03-10 20:06:14 +01:00
Edward Firmo
19ecf80f45 Add pics of utilities page 2024-03-10 19:48:37 +01:00
Edward Firmo
78ee28bc6d Home Assistant icon is shown in red 2024-03-10 19:18:21 +01:00
GitHub Actions
191d1227b9 Pre-built firmware for NSPanel - Rebuilt fan.oscillate call 2024-03-10 13:04:18 +00:00
Edward Firmo
10f928a92d Rebuilt fan.oscillate call
Hopefully solves #1873
2024-03-10 13:54:32 +01:00
Edward Firmo
78f5804730 Cleaning logs 2024-03-09 13:51:33 +01:00
Edward Firmo
03f5b74849 Handle utilities missing items
Solves #168
2024-03-09 10:02:35 +01:00
Edward Firmo
3314280297 New input: Main Climate - Always Show Chip
Solves #1869
2024-03-09 00:02:52 +01:00
Edward Firmo
ee600264c6 Lint 2024-03-08 18:19:38 +01:00
Edward Firmo
1e072a05b3 Creating TFTs v4.3dev4 2024-03-08 18:17:50 +01:00
GitHub Actions
053db917bf Pre-built firmware for NSPanel - Automatic Font Size Adjustment for Entity Page Values 2024-03-08 16:04:07 +00:00
Edward Firmo
7fc66610dc Automatic Font Size Adjustment for Entity Page Values
Solves #1728
2024-03-08 16:54:00 +01:00
Edward Firmo
d328307793 Input - Hide indoor temp
Solves #1724
2024-03-08 16:08:59 +01:00
Edward Firmo
5e9bbb455f Additional Value on Home Page
Solves #1838
2024-03-08 15:58:39 +01:00
Edward Firmo
acd57abdf6 Fix the blueprint update instructions 2024-03-08 14:20:44 +01:00
Edward Firmo
a47c70ae80 Bump HMI to v4.3dev4 2024-03-08 13:36:06 +01:00
Edward Firmo
26c5a42914 Lint 2024-03-08 13:33:42 +01:00
Edward Firmo
32e9246ace Clean-up logs
To reduce RAM requirements
2024-03-08 13:23:30 +01:00
Edward Firmo
1d52396e96 Redraws hw buttons bars after page constructor 2024-03-08 13:20:22 +01:00
Edward Firmo
fa8ee066ac Return notific button engine to Blueprint
Solves #1867
2024-03-08 13:06:55 +01:00
Edward Firmo
6042d3ea94 Fix icon selection
Solves #1178
Solves #1864
2024-03-08 09:56:28 +01:00
Edward Firmo
48a4b3edbf Merge pull request #1865 from andythomas/docs_at240307
Updated docs
2024-03-08 09:51:18 +01:00
Edward Firmo
ae090a2481 Added thanks in the release notes 2024-03-08 09:50:36 +01:00
Andy Thomas
2ebc92439c Lint 2024-03-07 13:00:35 +01:00
Andy Thomas
33c3d55879 Update climate addon docs
Include a concrete example with data.
2024-03-07 12:44:01 +01:00
Edward Firmo
70edd8e5e8 Typo 2024-03-07 10:34:50 +01:00
Edward Firmo
f17b82d350 Update error_initializing.md 2024-03-07 10:34:14 +01:00
Andy Thomas
9f24df32c4 Update 'Blueprint' doc 2024-03-07 09:36:54 +01:00
Andy Thomas
631516f7c6 Update 'compiling errors' doc 2024-03-07 09:25:42 +01:00
Edward Firmo
01161b9f25 Merge pull request #1809 from Blackymas/beta
Fix release notes title
2024-02-17 11:21:32 +01:00
Edward Firmo
f453bcffd4 Merge pull request #1808 from Blackymas/v4.2.6dev
Update ReleaseNotes.md
2024-02-17 11:19:26 +01:00
Edward Firmo
32457fcbff Update ReleaseNotes.md 2024-02-17 07:59:54 +01:00
Edward Firmo
7179c21bd8 Merge pull request #1807 from Blackymas/beta
v4.2.6 - Enhancing Stability and User Experience
2024-02-17 00:53:00 +01:00
Edward Firmo
34a69def42 Merge pull request #1806 from Blackymas/v4.2.6dev
v4.2.6 - Enhancing Stability and User Experience
2024-02-17 00:23:10 +01:00
Edward Firmo
e1ddf3e43a Bump to v4.2.6 2024-02-16 23:55:34 +01:00
Edward Firmo
5a5e963321 Merge pull request #1789 from Blackymas/beta
No validation to text fields
2024-02-13 08:39:33 +01:00
Edward Firmo
eec369dbe6 Merge pull request #1788 from Blackymas/dev
No validation to text fields
2024-02-13 08:33:57 +01:00
Edward Firmo
855e606bc8 Merge pull request #1786 from Blackymas/beta
Lint
2024-02-12 13:00:52 +01:00
Edward Firmo
0565f5a997 Merge pull request #1785 from Blackymas/dev
Lint
2024-02-12 12:54:50 +01:00
Edward Firmo
fd5c7e2a73 Merge pull request #1784 from Blackymas/beta
v4.2.5 - Celebrating 1000 Stars with Enhanced Functionality and UI Improvements
2024-02-12 12:37:39 +01:00
Edward Firmo
7282c23ffd Merge pull request #1783 from Blackymas/dev
v4.2.5 beta
2024-02-12 10:35:18 +01:00
Edward Firmo
d704de853a Merge pull request #1681 from Blackymas/beta
v4.2.4 - Critical bug fixes
2024-01-18 07:33:12 +01:00
Edward Firmo
4d4c869f45 Merge pull request #1680 from Blackymas/dev
v4.2.4 to beta
2024-01-18 06:58:13 +01:00
Edward Firmo
4d73312b18 Merge pull request #1673 from Blackymas/beta
Revert template title
2024-01-17 20:08:34 +01:00
Edward Firmo
f26afa06a8 Merge pull request #1672 from Blackymas/dev
Revert template title
2024-01-17 20:07:28 +01:00
Edward Firmo
f5f2c05550 Merge pull request #1671 from Blackymas/beta
Fix empty title on issues templates
2024-01-17 20:03:27 +01:00
Edward Firmo
eb2f5c987a Merge pull request #1670 from Blackymas/dev
Fix empty title on issues templates
2024-01-17 20:02:11 +01:00
Edward Firmo
9acc00c6df Merge pull request #1669 from Blackymas/beta
v4.2.3 - Bug fixes and minor enhancements
2024-01-17 19:51:27 +01:00
Edward Firmo
7b5af70a4f Merge pull request #1668 from Blackymas/dev
v4.2.3 to beta
2024-01-17 19:30:04 +01:00
Edward Firmo
29087e2ca0 Merge pull request #1648 from Blackymas/beta
v4.2.2 - Bug fixes and minor enhancements
2024-01-16 13:38:04 +01:00
Edward Firmo
dd3f3457c4 Merge pull request #1646 from Blackymas/dev
v4.2.2 to Beta
2024-01-16 11:51:02 +01:00
291 changed files with 14275 additions and 15238 deletions

View File

@@ -28,7 +28,7 @@ body:
attributes: attributes:
label: TFT Version label: TFT Version
description: Enter the TFT version number. description: Enter the TFT version number.
placeholder: e.g., 4.1.4 placeholder: e.g., 4.3.2
validations: validations:
required: false required: false
@@ -36,7 +36,7 @@ body:
attributes: attributes:
label: ESPHome Version label: ESPHome Version
description: Enter the ESPHome version number. description: Enter the ESPHome version number.
placeholder: e.g., 4.1.4 placeholder: e.g., 4.3.2
validations: validations:
required: false required: false
@@ -44,7 +44,7 @@ body:
attributes: attributes:
label: Blueprint Version label: Blueprint Version
description: Enter the Blueprint version number. description: Enter the Blueprint version number.
placeholder: e.g., 4.1.4 placeholder: e.g., 4.3.2
validations: validations:
required: false required: false
@@ -57,20 +57,18 @@ body:
- US - US
- US (Landscape) - US (Landscape)
validations: validations:
required: true required: false
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
## Bug Details ## Bug Details
- type: input - type: textarea
attributes: attributes:
label: What is the bug? label: What is the bug?
description: Describe the bug clearly and concisely. description: Describe the bug clearly and concisely.
placeholder: e.g., When I try this, I get this result, but I expected that... placeholder: e.g., When I try this, I get this result, but I expected that...
validations:
required: true
- type: textarea - type: textarea
attributes: attributes:
@@ -102,15 +100,20 @@ body:
Access these logs via the **Logs** button on the ESPHome Dashboard. Access these logs via the **Logs** button on the ESPHome Dashboard.
These logs are crucial for diagnosing issues with your device. These logs are crucial for diagnosing issues with your device.
Please follow the guidelines below to ensure the logs are comprehensive: Please follow the guidelines below to ensure the logs are comprehensive:
- **Boot Issues**: If the problem occurs during boot, capture the logs from the start of your device to a minute or two after the boot completes. - **Boot Issues**: If the problem occurs during boot, capture the logs from the start of your device to a minute or two after the boot completes.
Look for errors or unusual messages during this period. Look for errors or unusual messages during this period.
- **TFT File Update Issues**: For problems related to TFT file updates, - **TFT File Update Issues**: For problems related to TFT file updates,
include logs from the moment you press the **Update TFT Display** button until a few seconds after the device restarts. include logs from the moment you press the **Update TFT Display** button until a few seconds after the device restarts.
Pay attention to any error messages or warnings during the update process. Pay attention to any error messages or warnings during the update process.
- **Other Issues**: For other types of problems, include logs that encompass the issue's onset and continue for a short duration thereafter. - **Other Issues**: For other types of problems, include logs that encompass the issue's onset and continue for a short duration thereafter.
This will help in pinpointing the exact moment and nature of the issue. This will help in pinpointing the exact moment and nature of the issue.
Remember, the more detailed the logs, the easier it is to identify and resolve the problem. Remember, the more detailed the logs, the easier it is to identify and resolve the problem.
- type: textarea - type: textarea
@@ -119,9 +122,15 @@ body:
description: > description: >
To access Home Assistant logs, navigate to **Settings** > **System** > [**Logs**](https://my.home-assistant.io/redirect/logs/). To access Home Assistant logs, navigate to **Settings** > **System** > [**Logs**](https://my.home-assistant.io/redirect/logs/).
When reporting an issue, please focus on providing logs specifically relevant to the problem: When reporting an issue, please focus on providing logs specifically relevant to the problem:
- **NSPanel Blueprint Automation**: If your issue is related to automation using the NSPanel blueprint, include only those logs that directly pertain to this process. - **NSPanel Blueprint Automation**: If your issue is related to automation using the NSPanel blueprint, include only those logs that directly pertain to this process.
- **Panel and ESPHome**: For issues involving your panel and ESPHome, carefully select and share logs that show interactions or errors between these components. - **Panel and ESPHome**: For issues involving your panel and ESPHome, carefully select and share logs that show interactions or errors between these components.
- **Relevancy is Key**: To expedite troubleshooting, avoid including logs that are not related to the issue at hand. This helps in focusing on the pertinent information. - **Relevancy is Key**: To expedite troubleshooting, avoid including logs that are not related to the issue at hand. This helps in focusing on the pertinent information.
Your attention to sharing targeted and relevant log data is greatly appreciated and aids in efficient problem resolution. Your attention to sharing targeted and relevant log data is greatly appreciated and aids in efficient problem resolution.
... ...

View File

@@ -1,5 +1,5 @@
--- ---
name: Validate ESPHome name: Validate and Build ESPHome
# yamllint disable-line rule:truthy # yamllint disable-line rule:truthy
on: on:
@@ -8,6 +8,7 @@ on:
- "nspanel_esphome*.yaml" - "nspanel_esphome*.yaml"
- "esphome/nspanel_esphome*.yaml" - "esphome/nspanel_esphome*.yaml"
- "prebuilt/nspanel_esphome*.yaml" - "prebuilt/nspanel_esphome*.yaml"
- "prebuilt/wall_display*.yaml"
- ".test/*.yaml" - ".test/*.yaml"
- "*.h" - "*.h"
- "*.c" - "*.c"
@@ -18,6 +19,7 @@ on:
- "nspanel_esphome*.yaml" - "nspanel_esphome*.yaml"
- "esphome/nspanel_esphome*.yaml" - "esphome/nspanel_esphome*.yaml"
- "prebuilt/nspanel_esphome*.yaml" - "prebuilt/nspanel_esphome*.yaml"
- "prebuilt/wall_display*.yaml"
- ".test/*.yaml" - ".test/*.yaml"
- "*.h" - "*.h"
- "*.c" - "*.c"
@@ -26,224 +28,346 @@ on:
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
# yamllint disable-line rule:line-length
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
setup_dependencies:
name: Setup & Cache Dependencies
runs-on: ubuntu-latest
outputs:
cache-hit-idf-v4: ${{ steps.cache-idf-v4.outputs.cache-hit }}
cache-hit-idf-v5: ${{ steps.cache-idf-v5.outputs.cache-hit }}
cache-hit-arduino: ${{ steps.cache-arduino.outputs.cache-hit }}
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Cache ESP-IDF v4 Dependencies
id: cache-idf-v4
uses: actions/cache@main
with:
path: |
~/.esphome/cache
~/.platformio/packages
~/.platformio/platforms
key: ${{ runner.os }}-esp-idf-v4-${{ hashFiles('**/esphome_idf_basic.yaml') }}
restore-keys: |
${{ runner.os }}-esp-idf-v4-
- name: Cache ESP-IDF v5 Dependencies
id: cache-idf-v5
uses: actions/cache@main
with:
path: |
~/.esphome/cache
~/.platformio/packages
~/.platformio/platforms
key: ${{ runner.os }}-esp-idf-v5-${{ hashFiles('**/esphome_idf5_basic.yaml') }}
restore-keys: |
${{ runner.os }}-esp-idf-v5-
- name: Cache Arduino Dependencies
id: cache-arduino
uses: actions/cache@main
with:
path: |
~/.esphome/cache
~/.platformio/packages
~/.platformio/platforms
key: ${{ runner.os }}-arduino-${{ hashFiles('**/esphome_ard_basic.yaml') }}
restore-keys: |
${{ runner.os }}-arduino-
code_scan: code_scan:
name: Code scan (YAML) name: Code scan (YAML)
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
needs: setup_dependencies
steps: steps:
- uses: actions/checkout@main - name: Checkout Code
with: uses: actions/checkout@main
fetch-depth: '0'
- name: Validate nspanel_esphome.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome.yaml
- name: Validate nspanel_esphome_core.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_core.yaml
- name: Validate nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_cool.yaml
- name: Validate nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_heat.yaml
- name: Validate nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_dual.yaml
- name: Validate nspanel_esphome_addon_upload_tft.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_upload_tft.yaml
- name: Validate nspanel_esphome_advanced.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_advanced.yaml
- name: Validate nspanel_esphome_addon_climate_base.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_base.yaml
- name: Validate nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_cool.yaml
- name: Validate nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_heat.yaml
- name: Validate nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_dual.yaml
build_core: - name: Setup Python
name: Core uses: actions/setup-python@main
runs-on: "ubuntu-latest"
needs:
- code_scan
steps:
- uses: actions/checkout@main
with: with:
fetch-depth: '0' python-version: '3.8'
- name: Build core
- name: Install Yamllint
run: pip install yamllint
- name: Validate YAML files
run: find . -name "*.yaml" -exec yamllint -c ./.rules/yamllint.yml {} +
build_cores:
name: Core
needs: [code_scan, setup_dependencies]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- id: idf_v4
yaml_file: ".test/esphome_idf_basic.yaml"
cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-idf-v4 }}
- id: idf_v5
yaml_file: ".test/esphome_idf5_basic.yaml"
cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-idf-v5 }}
- id: ard
yaml_file: ".test/esphome_ard_basic.yaml"
cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-arduino }}
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Firmware
if: steps.matrix.outputs.cache-hit != 'true'
uses: barndawgie/build-action@v1.9.0 uses: barndawgie/build-action@v1.9.0
with: with:
yaml_file: "./.test/esphome_basic.yaml" yaml_file: ${{ matrix.yaml_file }}
build_advanced: build_advanced:
name: Advanced name: Advanced
runs-on: "ubuntu-latest" needs: build_cores
needs: runs-on: ubuntu-latest
- build_core strategy:
steps: matrix:
- uses: actions/checkout@main include:
with: - id: idf_v4
fetch-depth: '0' base: idf_v4
- name: Build core+advanced yaml_file: ".test/esphome_idf_advanced.yaml"
uses: barndawgie/build-action@v1.9.0 - id: idf_v5
with: base: idf_v5
yaml_file: "./.test/esphome_advanced.yaml" yaml_file: ".test/esphome_idf5_advanced.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_advanced.yaml"
build_climate_heat:
name: Climate (heat)
runs-on: "ubuntu-latest"
needs:
- build_core
steps: steps:
- uses: actions/checkout@main - name: Checkout repository
with: uses: actions/checkout@main
fetch-depth: '0'
- name: Build core+climate_heat - name: Build Advanced Firmware
uses: barndawgie/build-action@v1.9.0 uses: barndawgie/build-action@v1.9.0
with: with:
yaml_file: "./.test/esphome_climate_heat.yaml" yaml_file: ${{ matrix.yaml_file }}
build_ble_tracker:
name: BLE Tracker
needs: build_cores
runs-on: ubuntu-latest
strategy:
matrix:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_ble_tracker.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_ble_tracker.yaml"
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Build BLE Tracker Firmware
uses: barndawgie/build-action@v1.9.0
with:
yaml_file: ${{ matrix.yaml_file }}
build_bluetooth_proxy:
name: Bluetooth Proxy
needs: build_cores
runs-on: ubuntu-latest
strategy:
matrix:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml"
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Build Bluetooth Proxy Firmware
uses: barndawgie/build-action@v1.9.0
with:
yaml_file: ${{ matrix.yaml_file }}
build_climate_cool: build_climate_cool:
name: Climate (cool) name: Climate Cool
runs-on: "ubuntu-latest" needs: build_cores
needs: runs-on: ubuntu-latest
- build_core strategy:
matrix:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_climate_cool.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_climate_cool.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_climate_cool.yaml"
steps: steps:
- uses: actions/checkout@main - name: Checkout repository
with: uses: actions/checkout@main
fetch-depth: '0'
- name: Build core+climate_cool - name: Build Climate Cool Firmware
uses: barndawgie/build-action@v1.9.0 uses: barndawgie/build-action@v1.9.0
with: with:
yaml_file: "./.test/esphome_climate_cool.yaml" yaml_file: ${{ matrix.yaml_file }}
build_climate_heat:
name: Climate Heat
needs: build_cores
runs-on: ubuntu-latest
strategy:
matrix:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_climate_heat.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_climate_heat.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_climate_heat.yaml"
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Build Climate Heat Firmware
uses: barndawgie/build-action@v1.9.0
with:
yaml_file: ${{ matrix.yaml_file }}
build_climate_dual: build_climate_dual:
name: Climate (dual) name: Climate Dual
runs-on: "ubuntu-latest" needs: build_cores
needs: runs-on: ubuntu-latest
- build_core strategy:
matrix:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_climate_dual.yaml"
- id: idf_v5
base: idf_v5
yaml_file: ".test/esphome_idf5_climate_dual.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_climate_dual.yaml"
steps: steps:
- uses: actions/checkout@main - name: Checkout repository
with: uses: actions/checkout@main
fetch-depth: '0'
- name: Build core+climate_dual - name: Build Climate Dial Firmware
uses: barndawgie/build-action@v1.9.0 uses: barndawgie/build-action@v1.9.0
with: with:
yaml_file: "./.test/esphome_climate_dual.yaml" yaml_file: ${{ matrix.yaml_file }}
build_climate_heat_advanced: build_customizations:
name: Advanced+climate (heat) name: Customizations
runs-on: "ubuntu-latest"
needs: needs:
- build_climate_heat
- build_advanced - build_advanced
- build_climate_heat
runs-on: ubuntu-latest
strategy:
matrix:
include:
- id: idf_v4
base: idf_v4
yaml_file: ".test/esphome_idf_advanced_climate_heat_customizations.yaml"
- id: ard
base: ard
yaml_file: ".test/esphome_ard_advanced_climate_heat_customizations.yaml"
steps: steps:
- uses: actions/checkout@main - name: Checkout repository
with: uses: actions/checkout@main
fetch-depth: '0'
- name: Build core+advanced+climate_heat - name: Build Customizations Firmware
uses: barndawgie/build-action@v1.9.0 uses: barndawgie/build-action@v1.9.0
with: with:
yaml_file: "./.test/esphome_advanced_climate_heat.yaml" yaml_file: ${{ matrix.yaml_file }}
build_climate_cool_advanced_arduino: build_climate_ble_proxy:
name: Arduino name: Climate Cool + Bluetooth Proxy
runs-on: "ubuntu-latest"
needs: needs:
- build_climate_cool - build_climate_cool
- build_advanced - build_bluetooth_proxy
steps: runs-on: ubuntu-latest
- uses: actions/checkout@main strategy:
with: matrix:
fetch-depth: '0' include:
- name: Build core+advanced+climate_cool+arduino - id: idf_v4
uses: barndawgie/build-action@v1.9.0 base: idf_v4
with: yaml_file: ".test/esphome_idf_climate_cool_bluetooth_proxy.yaml"
yaml_file: "./.test/esphome_advanced_climate_cool_arduino.yaml"
build_climate_dual_esp_idf5:
name: esp-idf v5 & Climate Dual & Bluetooth proxy
runs-on: "ubuntu-latest"
needs:
- build_advanced
- build_climate_dual
steps: steps:
- uses: actions/checkout@main - name: Checkout repository
with: uses: actions/checkout@main
fetch-depth: '0'
- name: Build core+climate_dual+bt_proxy+esp_idf5
uses: barndawgie/build-action@v1.9.0
with:
yaml_file: "./.test/esphome_advanced_climate_dual_esp_idf5.yaml"
build_climate_heat_advanced_customization: - name: Build Customizations Firmware
name: Customizations
runs-on: "ubuntu-latest"
needs:
- build_climate_heat_advanced
- build_climate_cool_bluetooth_proxy
steps:
- uses: actions/checkout@main
with:
fetch-depth: '0'
- name: Build core+advanced+climate_heat+customizations
uses: barndawgie/build-action@v1.9.0 uses: barndawgie/build-action@v1.9.0
with: with:
yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml" yaml_file: ${{ matrix.yaml_file }}
build_prebuilt_firmware: build_prebuilt_firmware:
name: Prebuilt Firmware name: Prebuilt Firmware
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build_core # Ensure this job runs after the core build job needs: code_scan
if: github.ref == 'refs/heads/dev' || github.base_ref == 'dev'
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@main
with:
fetch-depth: '0'
- name: Build ESPHome Prebuilt Firmware - name: Build ESPHome Prebuilt Firmware
uses: barndawgie/build-action@v1.9.0 uses: barndawgie/build-action@v1.9.0
with: with:
yaml_file: prebuilt/nspanel_esphome_prebuilt.yaml yaml_file: prebuilt/nspanel_esphome_prebuilt.yaml
- name: Move and Rename Firmware File - name: Move and Rename Firmware File - nspanel_esphome_prebuilt
run: | run: |
mkdir -p prebuilt mkdir -p prebuilt
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware.bin prebuilt/nspanel_esphome_prebuilt.bin || true cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware.bin prebuilt/nspanel_esphome_prebuilt.bin || true
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware-factory.bin prebuilt/nspanel_esphome_prebuilt-factory.bin || true cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware-factory.bin prebuilt/nspanel_esphome_prebuilt-factory.bin || true
- name: Set Commit Message - name: Build ESPHome Prebuilt Wall Display Firmware
id: set_commit_message uses: barndawgie/build-action@v1.9.0
with:
yaml_file: prebuilt/wall_display.yaml
- name: Move and Rename Firmware File - wall_display
run: | run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then mkdir -p prebuilt
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel - ${{ github.event.pull_request.title }}" >> $GITHUB_ENV cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware.bin prebuilt/wall_display.bin || true
elif [[ "${{ github.event_name }}" == "push" ]]; then cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware-factory.bin prebuilt/wall_display-factory.bin || true
commit_message=$(git log -1 --pretty=format:'%s')
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel - $commit_message" >> $GITHUB_ENV - name: Generate checksum for Firmware Files
else run: |
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel" >> $GITHUB_ENV md5sum prebuilt/nspanel_esphome_prebuilt.bin > prebuilt/nspanel_esphome_prebuilt.bin.md5
fi md5sum prebuilt/nspanel_esphome_prebuilt-factory.bin > prebuilt/nspanel_esphome_prebuilt-factory.bin.md5
md5sum prebuilt/wall_display.bin > prebuilt/wall_display.bin.md5
md5sum prebuilt/wall_display-factory.bin > prebuilt/wall_display-factory.bin.md5
- name: Commit and Push Firmware Files - name: Commit and Push Firmware Files
run: | run: |
git config --global user.name 'GitHub Actions' git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com' git config --global user.email 'actions@github.com'
git add prebuilt/*.bin git add prebuilt/*.bin prebuilt/*.md5
git commit -m "${{ env.COMMIT_MESSAGE }}" git commit -m "Pre-built firmware update: ${{ github.run_id }}"
git push git push
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_climate_cool_bluetooth_proxy:
name: Climate cool & BLE proxy
runs-on: "ubuntu-latest"
needs:
- build_climate_cool
steps:
- uses: actions/checkout@main
with:
fetch-depth: '0'
- name: Build core+climate_cool+bluetooth_proxy
uses: barndawgie/build-action@v1.9.0
with:
yaml_file: "./.test/esphome_climate_cool_bluetooth_proxy.yaml"
... ...

View File

@@ -20,26 +20,6 @@ jobs:
fetch-depth: '0' fetch-depth: '0'
- name: Validate nspanel_esphome.yaml - name: Validate nspanel_esphome.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome.yaml run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome.yaml
- name: Validate nspanel_esphome_core.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_core.yaml
- name: Validate nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_cool.yaml
- name: Validate nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_heat.yaml
- name: Validate nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_dual.yaml
- name: Validate nspanel_esphome_addon_upload_tft.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_upload_tft.yaml
- name: Validate nspanel_esphome_advanced.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_advanced.yaml
- name: Validate nspanel_esphome_addon_climate_base.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_base.yaml
- name: Validate nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_cool.yaml
- name: Validate nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_heat.yaml
- name: Validate nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.rules/yamllint.yml" esphome/nspanel_esphome_addon_climate_dual.yaml
build_core: build_core:
name: Core name: Core
@@ -168,8 +148,7 @@ jobs:
name: Customizations name: Customizations
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
needs: needs:
- build_climate_heat_advanced - code_scan
- build_climate_cool_bluetooth_proxy
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@main
with: with:
@@ -183,7 +162,8 @@ jobs:
build_prebuilt_firmware: build_prebuilt_firmware:
name: Prebuilt Firmware name: Prebuilt Firmware
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build_core # Ensure this job runs after the core build job needs: code_scan
if: github.ref == 'refs/heads/dev' || github.base_ref == 'dev'
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@main
with: with:
@@ -195,33 +175,11 @@ jobs:
yaml_file: prebuilt/nspanel_esphome_prebuilt.yaml yaml_file: prebuilt/nspanel_esphome_prebuilt.yaml
version: beta version: beta
- name: Move and Rename Firmware File - name: Build ESPHome Prebuilt Wall Display Firmware
run: | uses: barndawgie/build-action@v1.9.0
mkdir -p prebuilt with:
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware.bin prebuilt/nspanel_esphome_prebuilt.bin || true yaml_file: prebuilt/wall_display.yaml
cp prebuilt/.esphome/build/nspanel/.pioenvs/nspanel/firmware-factory.bin prebuilt/nspanel_esphome_prebuilt-factory.bin || true version: beta
- name: Set Commit Message
id: set_commit_message
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel - ${{ github.event.pull_request.title }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "push" ]]; then
commit_message=$(git log -1 --pretty=format:'%s')
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel - $commit_message" >> $GITHUB_ENV
else
echo "COMMIT_MESSAGE=Pre-built firmware for NSPanel" >> $GITHUB_ENV
fi
- name: Commit and Push Firmware Files
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add prebuilt/*.bin
git commit -m "${{ env.COMMIT_MESSAGE }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_climate_cool_bluetooth_proxy: build_climate_cool_bluetooth_proxy:
name: Climate cool & BLE proxy name: Climate cool & BLE proxy

View File

@@ -12,22 +12,19 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
flake8_py3: flake8-lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Lint
steps: steps:
- name: Setup Python - name: Check out source repository
uses: actions/setup-python@v1
with:
python-version: 3.7.4
architecture: x64
- name: Checkout PyTorch
uses: actions/checkout@main uses: actions/checkout@main
- name: Install flake8 - name: Set up Python environment
run: pip install flake8 uses: actions/setup-python@main
- name: Run flake8
uses: suo/flake8-github-action@releases/v1
with: with:
checkName: 'flake8_py3' # NOTE: this needs to be the same as the job name python-version: "3.11"
env: - name: flake8 Lint
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} uses: py-actions/flake8@v2
with:
max-line-length: "200"
path: "components/nspanel_ha_blueprint"
... ...

2
.gitignore vendored
View File

@@ -10,4 +10,4 @@ Nextion2Text.*
.idea .idea
# Ignore dev folder # Ignore dev folder
#dev dev

View File

@@ -8,7 +8,8 @@ substitutions:
packages: packages:
basic_package: !include ../nspanel_esphome.yaml # Core package basic_package: !include ../nspanel_esphome.yaml # Core package
advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
# addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
# addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml esp32:
# addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml framework:
type: arduino
... ...

View File

@@ -0,0 +1,240 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
esp32:
framework:
type: arduino
##### Customizations from Wiki #####
api:
# Encrypt the communication between ESPHome and Home Assistant
encryption:
key: !secret api_encryption_key
# Reboot if HA is not connected for 15 minutes
reboot_timeout: 15min
binary_sensor:
# Is display awake?
- name: ${device_name} Display state
id: display_state
platform: template
lambda: |-
return (current_page->state != "screensaver");
button:
# Adds a button to put the panel to sleep
- name: ${device_name} Sleep
id: force_sleep
platform: template
icon: mdi:sleep
on_press:
then:
- logger.log: Button Sleep pressed
- lambda: |-
goto_page->execute("screensaver");
# Adds a button to wake-up the panel (similar to the existing service)
- name: ${device_name} Wake-up
id: force_wake_up
platform: template
icon: mdi:alarm
on_press:
then:
- logger.log: Button Wake-up pressed
- lambda: |-
if (current_page->state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str());
// timer_page->execute(); // enable this if you want page timeout to be reset
timer_sleep->execute();
timer_dim->execute();
# Add custom presets to your climate (heat in this example)
climate:
- id: !extend thermostat_embedded
heat_deadband: 0.3
heat_overrun: 0.0
default_preset: "Home"
preset:
- name: "Off"
default_target_temperature_low: ${temp_min} ${temp_units}
mode: "off"
- name: Home
default_target_temperature_low: 21 ${temp_units}
mode: "heat"
- name: Away
default_target_temperature_low: 16.5 ${temp_units}
mode: "heat"
- name: Sleep
default_target_temperature_low: 17.5 ${temp_units}
mode: "heat"
esphome:
# change OTA password, remove after flashing
on_boot:
- priority: 601.0
then:
- lambda: |-
id(my_ota).set_auth_password("New password");
# Limit the amount of resources used for compiling
compile_process_limit: 1
light:
# Add the display as a light in Home Assistant
- name: ${device_name} Display
id: display_light
icon: mdi:tablet-dashboard
platform: monochromatic
output: display_output
default_transition_length: 0s
on_turn_on:
then:
- lambda: |-
ESP_LOGD("light.display_light", "Turn-on");
if (current_page->state == "screensaver") disp1->goto_page(wakeup_page_name->state.c_str());
timer_reset_all->execute();
on_turn_off:
then:
- lambda: |-
ESP_LOGD("light.display_light", "Turn-off");
goto_page->execute("screensaver");
logger:
# Enable hardware UART serial logging
baud_rate: 115200
ota:
# change OTA password, remove after flashing
password: !secret wifi_password
id: my_ota
output:
# Output required by `display_light` to send the commands to Nextion
- id: display_output
platform: template
type: float
write_action:
- lambda: |-
ESP_LOGV("output.display_output", "state: %f", state);
uint8_t current_brightness = int(round(display_light->current_values.is_on() ? (display_light->current_values.get_brightness() * 100.0f) : 0.0));
ESP_LOGV("output.display_output", "current_brightness: %i%%", current_brightness);
set_brightness->execute(current_brightness);
script:
# Updates the existing `page_changed` script to update the `display_light` status when a page changes
- id: !extend page_changed
then:
- lambda: |-
ESP_LOGD("script.page_changed(custom)", "page: %s", current_page->state.c_str());
ESP_LOGV("script.page_changed(custom)", "is_on(): %s", display_light->current_values.is_on() ? "True" : "False");
if (current_page->state == "screensaver" and display_light->current_values.is_on()) {
auto call = display_light->turn_off();
call.perform();
} else if (current_page->state != "screensaver" and (not display_light->current_values.is_on())) {
auto call = display_light->turn_on();
call.perform();
}
# Updates the existing `set_brightness` script to update the `display_light` status when a new brightness level is set
- id: !extend set_brightness
then:
- lambda: |-
ESP_LOGD("script.set_brightness(custom)", "brightness: %.0f%%", brightness);
uint8_t current_light_brightness = int(round(display_light->current_values.is_on() ? (display_light->current_values.get_brightness() * 100.0f) : 0.0));
ESP_LOGV("script.set_brightness(custom)", "current_light_brightness: %i%%", current_light_brightness);
if (brightness != current_light_brightness) {
if (current_page->state != "screensaver" and brightness > 0) {
auto call = display_light->turn_on();
call.set_brightness(current_brightness->state / 100.0f);
call.perform();
} else if (display_light->current_values.is_on()) {
auto call = display_light->turn_off();
call.set_brightness(0);
call.perform();
}
}
time:
- id: !extend time_provider
timezone: "America/Cancun"
# Use my own local network time server
platform: sntp
servers:
- !secret mysntpserver
- europe.pool.ntp.org
- 0.pool.ntp.org
# Scheduled relay
on_time:
- hours: 7
minutes: 30
seconds: 0
then:
- switch.turn_on: relay_1
- hours: 12
minutes: 15
seconds: 0
then:
- switch.turn_off: relay_1
- hours: 19
minutes: 30
seconds: 0
then:
- switch.turn_on: relay_1
- hours: 23
minutes: 30
seconds: 0
then:
- switch.turn_off: relay_1
# Scheduled climate
- hours: 7
minutes: 0
seconds: 0
then:
- climate.control:
id: thermostat_embedded
mode: auto
target_temperature: 22°C
- hours: 19
minutes: 0
seconds: 0
then:
- climate.control:
id: thermostat_embedded
mode: auto
target_temperature: 20°C
- hours: 23
minutes: 0
seconds: 0
then:
- climate.control:
id: thermostat_embedded
mode: auto
target_temperature: 18°C
web_server:
# Custom web server credentials
auth:
username: !secret web_server_username
password: !secret web_server_password
wifi:
networks:
- id: !extend wifi_default
# Set IP address manually
manual_ip:
static_ip: 192.168.0.123
gateway: 192.168.0.1
subnet: 255.255.255.0
# Set dual network
priority: 10
- ssid: !secret wifi_ssid_backup
password: !secret wifi_password_backup
priority: 0
...

View File

@@ -0,0 +1,14 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Basic package
esp32:
framework:
type: arduino
...

View File

@@ -7,10 +7,7 @@ substitutions:
packages: packages:
basic_package: !include ../nspanel_esphome.yaml # Core package basic_package: !include ../nspanel_esphome.yaml # Core package
advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
# addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
# addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml
esp32: esp32:
framework: framework:

View File

@@ -7,8 +7,9 @@ substitutions:
packages: packages:
basic_package: !include ../nspanel_esphome.yaml # Core package basic_package: !include ../nspanel_esphome.yaml # Core package
# advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
# addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
# addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml
esp32:
framework:
type: arduino
... ...

View File

@@ -7,8 +7,9 @@ substitutions:
packages: packages:
basic_package: !include ../nspanel_esphome.yaml # Core package basic_package: !include ../nspanel_esphome.yaml # Core package
# advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
# addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
# addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml esp32:
framework:
type: arduino
... ...

View File

@@ -1,14 +0,0 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Basic package
# advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
# addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
# addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
# addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml
...

View File

@@ -0,0 +1,17 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
esp32:
framework:
type: esp-idf
version: 5.0.2
platform_version: 6.3.2
...

View File

@@ -0,0 +1,16 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Basic package
esp32:
framework:
type: esp-idf
version: 5.0.2
platform_version: 6.3.2
...

View File

@@ -0,0 +1,17 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_ble_tracker: !include ../esphome/nspanel_esphome_addon_ble_tracker.yaml
esp32:
framework:
type: esp-idf
version: 5.0.2
platform_version: 6.3.2
...

View File

@@ -0,0 +1,17 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_bluetooth_proxy: !include ../esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
esp32:
framework:
type: esp-idf
version: 5.0.2
platform_version: 6.3.2
...

View File

@@ -7,8 +7,11 @@ substitutions:
packages: packages:
basic_package: !include ../nspanel_esphome.yaml # Core package basic_package: !include ../nspanel_esphome.yaml # Core package
# advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
# addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
# addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml
esp32:
framework:
type: esp-idf
version: 5.0.2
platform_version: 6.3.2
... ...

View File

@@ -7,9 +7,6 @@ substitutions:
packages: packages:
basic_package: !include ../nspanel_esphome.yaml # Core package basic_package: !include ../nspanel_esphome.yaml # Core package
# advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
# addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
# addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml
esp32: esp32:
@@ -17,10 +14,4 @@ esp32:
type: esp-idf type: esp-idf
version: 5.0.2 version: 5.0.2
platform_version: 6.3.2 platform_version: 6.3.2
bluetooth_proxy:
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
wifi:
power_save_mode: LIGHT
... ...

View File

@@ -0,0 +1,17 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
esp32:
framework:
type: esp-idf
version: 5.0.2
platform_version: 6.3.2
...

View File

@@ -0,0 +1,11 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
...

View File

@@ -26,10 +26,7 @@ binary_sensor:
id: display_state id: display_state
platform: template platform: template
lambda: |- lambda: |-
return (id(current_page).state != "screensaver"); return (current_page->state != "screensaver");
# Enable Bluetooth proxy
bluetooth_proxy:
button: button:
# Adds a button to put the panel to sleep # Adds a button to put the panel to sleep
@@ -41,7 +38,7 @@ button:
then: then:
- logger.log: Button Sleep pressed - logger.log: Button Sleep pressed
- lambda: |- - lambda: |-
if (id(current_page).state != "screensaver") id(disp1).goto_page("screensaver"); goto_page->execute("screensaver");
# Adds a button to wake-up the panel (similar to the existing service) # Adds a button to wake-up the panel (similar to the existing service)
- name: ${device_name} Wake-up - name: ${device_name} Wake-up
@@ -52,10 +49,10 @@ button:
then: then:
- logger.log: Button Wake-up pressed - logger.log: Button Wake-up pressed
- lambda: |- - lambda: |-
if (id(current_page).state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str()); if (current_page->state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str());
// id(timer_page).execute(id(wakeup_page_name).state.c_str()); // enable this if you want page timeout to be reset // timer_page->execute(); // enable this if you want page timeout to be reset
id(timer_sleep).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_sleep).state)); timer_sleep->execute();
id(timer_dim).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_dim).state)); timer_dim->execute();
# Add custom presets to your climate (heat in this example) # Add custom presets to your climate (heat in this example)
climate: climate:
@@ -100,12 +97,12 @@ light:
- lambda: |- - lambda: |-
ESP_LOGD("light.display_light", "Turn-on"); ESP_LOGD("light.display_light", "Turn-on");
if (current_page->state == "screensaver") disp1->goto_page(wakeup_page_name->state.c_str()); if (current_page->state == "screensaver") disp1->goto_page(wakeup_page_name->state.c_str());
timer_reset_all->execute(wakeup_page_name->state.c_str()); timer_reset_all->execute();
on_turn_off: on_turn_off:
then: then:
- lambda: |- - lambda: |-
ESP_LOGD("light.display_light", "Turn-off"); ESP_LOGD("light.display_light", "Turn-off");
disp1->goto_page("screensaver"); goto_page->execute("screensaver");
logger: logger:
# Enable hardware UART serial logging # Enable hardware UART serial logging
@@ -133,12 +130,12 @@ script:
- id: !extend page_changed - id: !extend page_changed
then: then:
- lambda: |- - lambda: |-
ESP_LOGD("script.page_changed(custom)", "page: %s", page.c_str()); ESP_LOGD("script.page_changed(custom)", "page: %s", current_page->state.c_str());
ESP_LOGV("script.page_changed(custom)", "is_on(): %s", display_light->current_values.is_on() ? "True" : "False"); ESP_LOGV("script.page_changed(custom)", "is_on(): %s", display_light->current_values.is_on() ? "True" : "False");
if (page == "screensaver" and display_light->current_values.is_on()) { if (current_page->state == "screensaver" and display_light->current_values.is_on()) {
auto call = display_light->turn_off(); auto call = display_light->turn_off();
call.perform(); call.perform();
} else if (page != "screensaver" and (not display_light->current_values.is_on())) { } else if (current_page->state != "screensaver" and (not display_light->current_values.is_on())) {
auto call = display_light->turn_on(); auto call = display_light->turn_on();
call.perform(); call.perform();
} }
@@ -171,8 +168,8 @@ time:
- !secret mysntpserver - !secret mysntpserver
- europe.pool.ntp.org - europe.pool.ntp.org
- 0.pool.ntp.org - 0.pool.ntp.org
on_time:
# Scheduled relay # Scheduled relay
on_time:
- hours: 7 - hours: 7
minutes: 30 minutes: 30
seconds: 0 seconds: 0
@@ -238,6 +235,4 @@ wifi:
- ssid: !secret wifi_ssid_backup - ssid: !secret wifi_ssid_backup
password: !secret wifi_password_backup password: !secret wifi_password_backup
priority: 0 priority: 0
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
power_save_mode: LIGHT
... ...

View File

@@ -0,0 +1,10 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Basic package
...

View File

@@ -0,0 +1,11 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_ble_tracker: !include ../esphome/nspanel_esphome_addon_ble_tracker.yaml
...

View File

@@ -0,0 +1,11 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_bluetooth_proxy: !include ../esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
...

View File

@@ -7,10 +7,5 @@ substitutions:
packages: packages:
basic_package: !include ../nspanel_esphome.yaml # Core package basic_package: !include ../nspanel_esphome.yaml # Core package
# advanced_package: !include ../esphome/nspanel_esphome_advanced.yaml
# addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
# addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.
bluetooth_proxy:
... ...

View File

@@ -0,0 +1,12 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml
addon_bluetooth_proxy: !include ../esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
...

View File

@@ -0,0 +1,11 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml
...

View File

@@ -0,0 +1,11 @@
---
substitutions:
device_name: nspanel
wifi_ssid: "nspanel"
wifi_password: "NSPanel_HA_Blueprint"
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
packages:
basic_package: !include ../nspanel_esphome.yaml # Core package
addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml
...

View File

@@ -65,6 +65,10 @@ This change is aimed at improving functionality and compatibility but may requir
- **What to Do**: For users who utilized customizations to expose these switches, refer to our updated customization guide. - **What to Do**: For users who utilized customizations to expose these switches, refer to our updated customization guide.
Alternatively, use the `esphome.xxxxx_init_hardware` service for a similar functionality without the memory overhead. Alternatively, use the `esphome.xxxxx_init_hardware` service for a similar functionality without the memory overhead.
6. **Home Page Redesign**: We've redesigned the Home page layout to incorporate an additional value (sensor) and a utilities button, resulting in a minor repositioning of some components.
This change enhances the page's functionality, offering you a broader overview of your smart home at a glance.
While adjusting to the new layout, you might find some of your usual indicators or controls have shifted places, but they're all still readily accessible, designed with intuitive interaction in mind.
We appreciate your understanding and patience during this transition. We appreciate your understanding and patience during this transition.
Our goal is to ensure NSPanel continues to evolve in a way that enhances your experience and meets future needs. Our goal is to ensure NSPanel continues to evolve in a way that enhances your experience and meets future needs.
Our community and support channels are open for any questions or assistance you may require. Our community and support channels are open for any questions or assistance you may require.
@@ -82,6 +86,8 @@ Our community and support channels are open for any questions or assistance you
- [Expanded Entity Selection for Home and Climate Pages](#expanded-entity-selection-for-home-and-climate-pages) - [Expanded Entity Selection for Home and Climate Pages](#expanded-entity-selection-for-home-and-climate-pages)
- [Introducing the Utilities Dashboard](#introducing-the-utilities-dashboard) - [Introducing the Utilities Dashboard](#introducing-the-utilities-dashboard)
- [Expanded Support for "Lock" Entities on Buttons and Chips](#expanded-support-for-lock-entities-on-buttons-and-chips) - [Expanded Support for "Lock" Entities on Buttons and Chips](#expanded-support-for-lock-entities-on-buttons-and-chips)
- [Additional Value on Home Page](#additional-value-on-home-page)
- [Automatic Font Size Adjustment for Entity Page Values](#automatic-font-size-adjustment-for-entity-page-values)
## Details of noteworthy changes ## Details of noteworthy changes
### Transition to ESP-IDF as Default Framework ### Transition to ESP-IDF as Default Framework
@@ -119,12 +125,12 @@ Now you can chose the font size for your clock display in the screen saver. Ther
> [!IMPORTANT] > [!IMPORTANT]
> For this time to be displayed you must select a brightness higher than 0 on the device's page (under **Settings** > **Devices & Services** > **ESPHome**). > For this time to be displayed you must select a brightness higher than 0 on the device's page (under **Settings** > **Devices & Services** > **ESPHome**).
> [!ATTENTION] > [!WARNING]
> Some fonts may not support all the languages. > Some fonts may not support all the languages.
> [!ATTENTION] > [!WARNING]
> Bigger fonts may not fit well on your display and the selected time format. > Bigger fonts may not fit well on your display and the selected time format.
> Please select a differnt font in that case. > Please select a different font in that case.
<!-- markdownlint-enable MD028 --> <!-- markdownlint-enable MD028 -->
### Enhanced Visibility of Hardware Button Bars Across Pages ### Enhanced Visibility of Hardware Button Bars Across Pages
@@ -196,14 +202,585 @@ It's designed for flexibility, allowing you to customize up to six data points,
battery levels, water, and gas consumption, according to what's relevant to your home. battery levels, water, and gas consumption, according to what's relevant to your home.
This customization ensures that the dashboard only displays the utilities you're monitoring, maintaining a clean and uncluttered interface. This customization ensures that the dashboard only displays the utilities you're monitoring, maintaining a clean and uncluttered interface.
<< ADD A PICTURE OF THE PAGE ON NSPANEL >> ![US model - Utilities Dashboard](docs/pics/us_page_utilities.png) ![EU model - Utilities Dashboard](docs/pics/eu_page_utilities.png)
<< ADD A SCREENSHOT OF THE BLUEPRINT >>
![Blueprint - Utilities](docs/pics/ha_blueprint_utilities.png)
### Expanded Support for "Lock" Entities on Buttons and Chips ### Expanded Support for "Lock" Entities on Buttons and Chips
We're enhancing the NSPanel's integration capabilities by extending support for "lock" entities to both buttons and chips. We're enhancing the NSPanel's integration capabilities by extending support for "lock" entities to both buttons and chips.
This development significantly broadens your ability to interact with and control lock mechanisms directly from the NSPanel. This development significantly broadens your ability to interact with and control lock mechanisms directly from the NSPanel.
Whether securing your home or managing access to different areas, these updates streamline the control process, integrating seamlessly with your smart home's security setup. Whether securing your home or managing access to different areas, these updates streamline the control process, integrating seamlessly with your smart home's security setup.
### Additional Value on Home Page
In our continuous effort to enhance the NSPanel's utility and efficiency, we're pleased to announce that the Home page now accommodates a fourth value, complete with its icon.
This addition allows for a more comprehensive at-a-glance view of your essential metrics directly from the home screen, ensuring that crucial information is always just a glance away.
### Automatic Font Size Adjustment for Entity Page Values
We've enhanced the entities pages with an automatic font size adjustment feature to improve the display of values, especially for longer strings or values with lengthy units.
This smart adjustment reduces the occurrence of truncated values by dynamically resizing the font based on the string length.
While the selection of fonts for the panel remains limited, this automatic resizing significantly enhances readability,
ensuring that all displayed information is clear and fully visible at a glance.
## v4.3.1 - Ensuring Compatibility with ESPHome v2024.3.0 and Enhancing Stability
Patch v4.3.1 focuses primarily on ensuring full compatibility with the latest ESPHome v2024.3.0 IP address format changes, crucial for the smooth compilation and operation of the NSPanel project.
This timely update addresses critical compatibility issues, alongside implementing key bug fixes and optimizations.
It underscores our ongoing commitment to enhancing stability and ensuring a reliable experience for all NSPanel users, keeping pace with the evolving ESPHome ecosystem.
### Support for ESPHome v2024.3.0 IP Address Format
- **Criticality:** Critical (required for compiling with ESPHome 2024.3.0)
- **Affected Components:** ESPHome
- **Description:** This update introduces necessary adjustments to accommodate the new IP address format introduced by ESPHome v2024.3.0,
ensuring uninterrupted project compilation and enhancing compatibility.
This critical update is the cornerstone of patch v4.3.1, deployed simultaneously with ESPHome to ensure NSPanel users experience no disruption in service.
This adaptation ensures that NSPanel firmware remains fully functional and up-to-date with ESPHome's latest advancements,
reaffirming our commitment to providing a seamless and stable user experience.
### Button Bars Visibility Enhancement and Configuration Change
- **Criticality:** Breaking Change (with Enhancement)
- **Affected Components:** Blueprint
- **Description:** The visibility of button bars, indicating the status of entities linked to hardware buttons,
has been updated to be visible across all pages by default, including the screensaver.
This enhancement improves the accessibility of crucial status information.
Users who previously customized the visibility settings for button bars will need to review and adjust their configurations to align with the new default behavior.
This change enables users to selectively exclude button bars from specific pages if desired, providing greater flexibility and control over the interface's appearance.
### Service `hw_button_state` Update
- **Criticality:** Breaking Change (with Enhancement)
- **Affected Components:** Blueprint and ESPHome
- **Description:** The method for controlling the state of hardware buttons has been refined with the introduction of a `button_mask` parameter.
This update simplifies the process of simultaneously updating the visual state of multiple hardware buttons,
enhancing user interaction by providing a more intuitive interface for managing button states.
Users can now specify the buttons they wish to control using a single `button_mask` parameter,
offering a streamlined approach for activating or deactivating the on-screen indication bars of the hardware buttons.
This change fosters a more flexible and efficient user experience in configuring the visual feedback for button states.
### Celsius Display Issue for Embedded Temperature Sensor Resolved (#1834)
- **Criticality:** Medium
- **Affected Components:** ESPHome
- **Description:** Addressed an issue where the NSPanel's built-in temperature sensor incorrectly displayed temperature readings in Celsius, even when Fahrenheit was expected.
This fix ensures temperature readings are accurately represented according to the user's settings, improving usability and consistency across the system.
### Resolution for Panel Naming When `device_name` Is Not Provided (#1907)
- **Criticality:** Medium
- **Affected Components:** ESPHome
- **Description:** Corrected a bug that caused the new "Device Name" sensor to report "nspanel"
and therefore fail on defining services names when a `device_name` substitution was not specified by the user.
### External Temperature Sensor Selection Now Correctly Overrides Embedded Sensor Value (#1911)
- **Criticality:** Medium
- **Affected Components:** Blueprint and ESPHome
- **Description:** Fixed a display issue where the built-in sensor's temperature reading persisted despite configuration for an external sensor.
### Utilities Dashboard Now Correctly Omits Default Labels When Customized (#1899)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Description:** Enhanced the utilities dashboard by ensuring custom labels properly replace or remove default ones for a personalized display.
### Clarification and Improvements to `rtttl_play` Service Documentation (#1901 and #1912)
- **Criticality:** Minor
- **Affected Components:** Documentation
- **Description:** Updated documentation for clearer guidance on using the `rtttl_play` service for custom sounds and alerts.
### Correction of Missing Icon Display Issue on Entities Page 3 (#1902)
- **Criticality:** Minor
- **Affected Components:** TFT
- **Description:** Addressed a bug preventing certain icons from displaying on the third Entities page, ensuring a consistent user interface.
### Icons No Longer Appear "Disabled" for Sensor Values of 0.0 (#1902)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Description:** Resolved an incorrect icon color display issue where they appeared disabled at a sensor value of exactly 0.0.
### Vertical Alignment Improvements on Entities Pages for Enhanced Readability (#1903)
- **Criticality:** Minor
- **Affected Components:** TFT
- **Description:** Adjusted the vertical alignment of text and icons on Entities pages for a more visually appealing presentation.
### Enhanced Guidance on Handling Duplicated Entities on the Device's Page (#1905)
- **Criticality:** Minor
- **Affected Components:** Documentation
- **Description:** Updated documentation to better address and resolve issues related to entity duplication on the device's page on Home Assistant.
### Compilation Guidance Updated for Customizations with the Latest Version (#1914)
- **Criticality:** Minor
- **Affected Components:** Documentation
- **Description:** Resolved documentation issues leading to compilation errors during customization, facilitating smoother custom feature implementation.
### Elimination of Transient Icon Flashes on the Home Page During Page Transitions (#1915)
- **Criticality:** Minor
- **Affected Components:** Blueprint, ESPHome and TFT
- **Description:** Fixed a visual glitch where icons briefly flashed during transitions, streamlining the visual experience.
### Real-Time Brightness Adjustment Now Effective Even During Sleep Mode (#1919)
- **Criticality:** Minor
- **Affected Components:** ESPHome
- **Description:** Ensured brightness settings changes are immediately applied, even when the panel is in sleep mode.
### Smooth Cursor Movement on Utilities Page Near Zero Sensor Readings (#1926)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Description:** Ensured cursor movement on the Utilities page is smooth and accurate, even with sensor readings defining the cursor direction is between 0 and 1.
### Notification Screen Clearing Now Functional with `notification_clear` Service Call (#1931)
- **Criticality:** Minor
- **Affected Components:** ESPHome
- **Description:** Enabled clear display of notifications from the screen upon invoking the `notification_clear` service, enhancing display control.
### Page Indicator Removed for Single-Page Views (#1883)
- **Criticality:** Enhancement
- **Affected Components:** TFT
- **Description:** Improved UI by removing unnecessary page indicators when only one page is present, simplifying navigation.
### Entities Page Font Adjustment for CJK Fonts Improved (#1884)
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Description:** Optimized font sizing and display on Entities pages for CJK fonts, addressing readability issues.
### User Option Added to Disable Entities Page Icons for a Text-Focused View (#1885)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Description:** Introduced an option to disable icons on Entities pages, allowing for a simplified, text-only display.
### Utilities Page Line Cursor Size Customization Option Added (#1910)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Description:** Provided customization options for cursor size on the Utilities dashboard, enhancing data visualization.
### Temperature Measurement Sampling Enhancement (#1918)
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Description:** Enhanced the temperature reporting mechanism of the NSPanel's built-in temperature sensor by implementing a sampling method.
Now, the sensor collects 12 intermediate measurements and calculates their average before reporting the temperature.
This enhancement, which does not alter the 1-minute measurement interval, aims to provide smoother and more stable temperature readings,
improving accuracy and reliability for users monitoring their environment.
### Boot Page Visual Feedback Enhancements for Clearer System Status Display (#1923)
- **Criticality:** Enhancement
- **Affected Components:** ESPHome and TFT
- **Description:** Updated the Boot page to offer clearer visual feedback on version information and system status, with a new progress bar.
## v4.3.2 - Enhancements and Critical Fixes for a Seamless Experience
In this patch, we focus on enhancing the NSPanel experience by introducing critical fixes and requested enhancements to improve overall system stability and user interaction.
This update addresses key issues, such as the incorrect display of the "boot" page upon wake-up, and optimizes the performance of the Utilities Dashboard to prevent potential overload states.
With updates across firmware, user interface, and documentation, v4.3.2 underscores our dedication to delivering a seamless and robust smart home control solution.
### Device Reboot Issue on Wake Up Resolved (#1947 and #1976)
- **Criticality:** Medium
- **Affected Components:** Blueprint
- **Issue Number:** #1947 and #1976
- **Description:** Resolved a critical issue causing the NSPanel to boot to the "boot" page rather than the "home" page under certain conditions, such as upon waking.
This correction ensures the panel directly accesses the "home" page, streamlining user interaction by promptly presenting the main interface.
Effective implementation of this fix necessitates clearing the build files before updating.
The procedure below guides you through cleaning build files in the ESPHome Dashboard, an essential step to actualize this update.
### Utilities Dashboard Performance Bug Resolved (#1949 and #1964)
- **Criticality:** Medium
- **Affected Components:** Blueprint and ESPHome
- **Issue Number:** #1949 and #1964
- **Description:** Fixed a significant performance bug in the "Utilities Dashboard" related to sensors with high update frequencies.
Previously, sensors updating frequently could overload the Home Assistant host, causing the blueprint execution to delay.
As updates persisted, this led to multiple instances of the blueprint being triggered, eventually hitting the limit of 50 concurrent instances.
This update minimizes the issue, ensuring smooth operation and reducing the chances of a overload state, thereby maintaining efficient and reliable dashboard performance.
#### How to Clean-up Build Files
1. Navigate to your ESPHome Dashboard.
2. Select the 3-dot menu adjacent to your device's listing.
3. Choose "**Clean Build Files**".
![Clean Build Files Instruction](https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/dev/docs/pics/esphome_dashboard_clean_build_files.png)
> [!IMPORTANT]
> Cleaning build files is a mandatory step for this update to apply successfully.
> It ensures your NSPanel operates smoothly with the new improvements post-update.
### Fix for Inverted Chip Icon Color Issue (#1928)
- **Criticality:** Minor
- **Affected Components:** Blueprint, TFT
- **Issue Number:** #1928
- **Description:** Resolved an issue where the color of icons on inverted chips did not display correctly on the home page, affecting the visual distinction and readability of these elements.
This fix ensures that icons on inverted chips are now properly rendered, maintaining consistency and enhancing the overall aesthetic of the user interface.
This correction contributes to a more intuitive and visually appealing experience for users, reinforcing the clarity of information presented on the NSPanel.
### Fix for Numeric Button Page Labels Not Displaying (#1961)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1961
- **Description:** Resolved an issue where button page labels consisting solely of numbers were not being displayed, ensuring that numeric titles are now properly shown.
This fix enhances interface clarity by allowing users to utilize numerical identifiers for their button pages, thereby improving navigation and usability within the NSPanel environment.
### Automatic Update for Weather Icon at Sunrise and Sunset (#1971)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1971
- **Description:** Addressed a bug where the weather icon on the home page did not automatically update to reflect changes at sunrise and sunset, necessitating a manual page reload.
With this fix, the icon now refreshes automatically to provide an accurate representation of the weather conditions in relation to the day and night cycle.
This improvement ensures a more dynamic and responsive user interface, enhancing the visual experience by seamlessly integrating natural environmental changes.
### Fix for Missing Titles and Icons on Detailed Entities Pages (#1978)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1978
- **Description:** Resolved an issue on detailed entities pages where page titles and icons were not being displayed, leading to a lack of clarity and navigation challenges for users.
This fix ensures that each detailed page now correctly showcases its respective title and icon,
enhancing the overall user interface by providing immediate context and visual cues for better usability and navigation within the NSPanel environment.
### Swipe Functionality Restored on Button and Home Pages (#1980 and #1994)
- **Criticality:** Minor
- **Affected Components:** TFT
- **Issue Number:** #1980 and #1994
- **Description:** Addressed issues impacting swipe functionality on button pages and the home page, which previously hindered smooth navigation through swipe gestures.
This update restores proper swipe operation, allowing users to effortlessly switch between pages with a simple gesture.
Enhancing swipe responsiveness contributes to a more fluid and intuitive user experience, reinforcing the ease of navigating the NSPanel's interface.
### Typo Correction in Blueprint Inputs (#2003)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #2003
- **Description:** Corrected a minor typo in the blueprint inputs to ensure accuracy and clarity in the configuration options.
This adjustment, made in the description for the `hw_buttons_bar_color_off` input, showcases our commitment to detail and high-quality documentation,
enhancing user experience by providing clear and precise instructions.
- **Special Thanks:** Our thanks go to @colincachia for this attentive correction.
This action highlights the importance of community involvement and the collective effort to maintain the project's high standards, even in the smallest details.
### Immediate Brightness Adjustment from Home Assistant Fixed
- **Criticality:** Minor
- **Affected Components:** ESPHome
- **Issue Number:** #2006
- **Description:** Resolved a minor issue affecting brightness adjustments made from Home Assistant.
Previously, when the brightness target was reduced via Home Assistant, the change was not immediately reflected on the NSPanel.
This update ensures that any adjustments to brightness settings are promptly applied,
maintaining consistency between the Home Assistant interface and the NSPanel's display for a more synchronized and responsive user experience.
### Custom Binary State Entities for Hardware Button Status Display Enhancement (#1904, #1933, #1959, #1973)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1904, #1933, #1959, #1973
- **Description:** This update introduces the capability to assign custom binary state entities to the hardware button status display.
This significant enhancement allows for the hardware button bar to reflect the status of a different entity than the one assigned to the button itself,
providing users with greater customization and flexibility in their interface interactions.
This development enriches user feedback mechanisms, enabling more intuitive and dynamic control options within the NSPanel environment.
- **Special Thanks:** Our heartfelt appreciation goes to @lafriks for their invaluable contribution and initiative in developing this feature.
These efforts have notably advanced the customization potential of NSPanel, fostering a more versatile and user-centric experience.
### Enhanced Temperature Measurement Strategy (#1918)
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Issue Number:** #1918
- **Description:** Thanks to the dedicated efforts and thorough testing by our community,
the NSPanel's built-in temperature sensor now employs a more sophisticated measurement strategy for enhanced accuracy and responsiveness.
By integrating a combination of four samples per measurement and employing a `sliding_window_moving_average` filter with a window size of six,
the sensor's reporting frequency has been adjusted to every 10 seconds.
This methodological enhancement, chiefly proposed and tested by community members @andythomas and @grigi,
ensures a smoother temperature curve and faster response to environmental changes such as opening a window.
While the adjusted frequency means data is reported more often, ESPHome's efficient data transmission only when changes occur ensures that the impact on Home Assistant's data processing is minimal.
This significant improvement, sparked by proactive community involvement,
not only enhances the NSPanel's functionality but also broadens the scope for more dynamic and responsive environmental automations.
- **Special Thanks:** To @andythomas and @grigi for their exceptional work in testing and proposing these adjustments, truly embodying the spirit of community-driven development.
Your active participation and contributions have been instrumental in refining this feature.
### Enhanced Version Mismatch Notifications for Comprehensive System Compatibility (#1966 and #1968)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1966 and #1968
- **Description:** The version mismatch notification system has been significantly improved to cover all critical components of the NSPanel project,
including the ESPHome firmware, Home Assistant blueprint, and Nextion TFT file.
This update ensures that notifications are more descriptive, pinpointing which component is out of sync and providing specific instructions for resolution.
This targeted approach helps users quickly identify and rectify compatibility issues, maintaining the system's overall harmony and preventing disruptions in functionality.
### Documentation Improvement for TFT Upload Process (#1969)
- **Criticality:** Enhancement
- **Affected Components:** Documentation
- **Issue Number:** #1969
- **Description:** Enhanced the documentation to clarify the necessity of DNS for downloading TFT files from GitHub during the TFT upload process.
This update addresses confusion encountered when manually setting IP addresses as part of customizations, emphasizing that a DNS server must be specified to enable remote TFT downloads.
For setups lacking DNS configuration, the documentation now highlights the alternative of using local TFT transfer via the `nextion_update_url` substitution.
This clarification aims to streamline the TFT update process, ensuring users have a clear understanding of the requirements for successful TFT file downloads and uploads,
thereby enhancing the overall setup experience.
### Documentation Update for "Folder-Watcher" Engine Use (#1974)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1974
- **Description:** Updated documentation to provide clearer instructions on the "folder-watcher" engine's use within the NSPanel project.
This engine, which triggers TFT updates upon changes in a user-specified folder, may not be widely used but offers valuable functionality for those who do.
The documentation now more accurately describes how to leverage this feature for automated TFT updates, aiming to improve understanding and ease of use for interested users.
### Close Icon Visibility Enhancement (#1984)
- **Criticality:** Enhancement
- **Affected Components:** TFT
- **Issue Number:** #1984
- **Description:** Enhanced the visibility of the "close" icon (represented as an "x" sign) located at the top right corner of various pages.
By slightly increasing the size of this icon, users can now more easily identify and interact with it, improving the overall usability of the NSPanel interface.
This minor yet impactful adjustment ensures a smoother, more intuitive navigation experience for all users.
### Alarm Control with Hardware Button Enhancement (#1995)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1995
- **Description:** Enhanced the functionality of hardware buttons for a more intuitive interaction with alarm control panels.
Now, a short click on a hardware button assigned to an entity from the `alarm_control_panel` domain will open its detailed page, aligning with the behavior for `climate` and `media_player` entities.
This update facilitates quicker access to alarm controls directly from the NSPanel, streamlining user interactions.
Long clicks continue to open the detailed page for these and other domains, maintaining a consistent and user-friendly experience across various controls.
### Documentation Updates for Arduino References (#1997)
- **Criticality:** Enhancement
- **Affected Components:** Documentation
- **Issue Number:** #1997
- **Description:** Comprehensive updates and refinements were made to the project documentation, with a particular focus on correcting and clarifying references related to the Arduino framework.
This effort led to a thorough review and subsequent enhancement of various sections of the documentation, improving clarity, accuracy, and usefulness across the board.
Special thanks to the author of this PR, @andythomas, whose dedicated work went beyond just addressing
Arduino framework references to include minor fixes and overall improvements to the documentation.
These contributions have significantly elevated the quality of information available to users, ensuring that the documentation remains a reliable and up-to-date resource for the community.
### Expanded Wake-Up Sensor Support (#1998)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1998
- **Description:** The range of supported device classes for wake-up sensors on the NSPanel has been significantly expanded.
Now, in addition to the previously supported door, motion, and occupancy sensors, the NSPanel firmware accommodates a wider variety of sensor types.
These enhancements enable the panel to wake up from sleep mode upon detecting various environmental changes, improving responsiveness and user interaction.
The newly supported device classes include:
- door
- garage_door
- lock
- motion
- occupancy
- opening
- smoke
- sound
- vibration
- window
This update broadens the NSPanel's integration capabilities with home automation systems, allowing for a more dynamic and reactive smart home environment.
### Hebrew Translation Text Reversal Fix (#1999)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1999
- **Description:** Addressed a specific issue with the Hebrew translation where text was displayed in reverse order, hindering readability and user experience.
This fix ensures that Hebrew text is correctly aligned and presented, enhancing the interface for Hebrew-speaking users.
The commitment to support diverse languages and correct such localization issues underscores our dedication to providing a user-friendly experience for all NSPanel users,
regardless of their language.
### Enhanced TFT Update Reliability in ESPHome Nextion Component
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Description:** Improved the reliability of TFT updates within the ESPHome Nextion component.
This enhancement optimizes the process of updating the NSPanel's display, ensuring smoother transitions and reducing the potential for update failures.
The upgrade targets the underlying mechanisms of the Nextion component in ESPHome,
refining its functionality to offer a more dependable and efficient update experience for users implementing TFT changes.
## v4.3.3 - Enhancing Flexibility and User Experience
With the v4.3.3 update, we're focused on refining the NSPanel's usability and customization capabilities, addressing user feedback to enhance the intuitive interaction with the panel.
From streamlining light entity controls to expanding text length for entities on the home page, each change is aimed at improving the user experience.
This patch also introduces experimental features, such as prebuilt firmware updates and PSRAM use, pushing the boundaries of what's possible with NSPanel,
while also ensuring a smoother, more reliable interface across different languages and configurations.
### Simplified Light Entity Control on Custom Buttons (#1844)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1844
- **Description:** Addressed an inconsistency where light entities with only on/off capabilities erroneously showed an extended screen with a brightness slider.
This fix streamlines the control interface for such light entities, aligning with their actual capabilities.
### Deletion of Button Icons from Home Page Enabled (#1992)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1992
- **Description:** Resolved an issue preventing the removal of button icons from the home page.
Users can now delete or change button icons as needed, providing flexibility in customizing the panel's appearance.
### Correction of Missing Characters on Button Pages for Multi-Byte Languages (#2000)
- **Criticality:** Minor
- **Affected Components:** Blueprint, ESPHome, and TFT
- **Issue Number:** #2000
- **Description:** Resolved a display issue affecting multi-byte languages, where specific characters were missing on the button pages.
This fix ensures complete and accurate representation of all languages across the NSPanel interface, including Hebrew and others where a character may occupy more than a single byte.
### Entity Display Persistence on Home Page Addressed (#2018)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #2018
- **Description:** Fixed a bug where entities removed from the blueprint continued to display on the home page.
This update ensures that the home page accurately reflects the current configuration, removing any unassigned entities.
### Resolved Unintended Climate Control Page Access (#2021)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #2021
- **Description:** Fixed an issue where touching the temperature display on the home page erroneously opened the climate control page, even in the absence of configured climate entities.
This update ensures that interactions with the temperature display are consistent with the available configurations, enhancing the intuitive use of the NSPanel.
### Internal Temperature Reporting Fix After Sleep (#2030)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #2030
- **Description:** Resolved an issue where the internal temperature indicator disappeared for a few seconds upon waking the panel from sleep mode.
This fix ensures the internal temperature, especially when sourced from the panel's internal sensor,
remains consistently displayed without interruption when transitioning from sleep to the home page, enhancing the stability and reliability of environmental monitoring on the NSPanel.
### Advanced Settings Page Entity Name Enhancement (#1909)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1909
- **Description:** Improved the advanced settings page by providing clearer entity names when opened from a custom button,
enhancing user navigation and configuration understanding within the NSPanel settings.
### Support for `mdi:void` Icon on Homepage for Blank Display (#2019)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #2019
- **Description:** Implemented support for the `mdi:void` icon on the homepage, allowing for a blank display where no icon is preferred.
This enhancement provides users with greater customization flexibility, enabling a cleaner and more minimalistic interface by opting not to show any icon.
### Extended Text Length for Entities on Home Page (#2020)
- **Criticality:** Enhancement
- **Affected Components:** TFT
- **Issue Number:** #2020
- **Description:** Enhanced the home page by allowing for longer text for entities values.
This improvement accommodates more detailed values, improving clarity and user understanding of displayed data and controls.
### Timezone Selector Added to Blueprint
- **Criticality:** Enhancement
- **Affected Components:** Blueprint and ESPHome
- **Description:** Introduced a timezone selector within the Blueprint configuration, streamlining the setup process and enhancing user convenience.
This addition simplifies the configuration of the NSPanel, significantly reducing the need for YAML customizations related to timezone settings.
By providing a direct method to specify the timezone, this enhancement ensures that time displays and other time-sensitive features on the NSPanel accurately reflect the user's local time,
contributing to a more personalized and accurate user experience.
### Prebuilt Firmware Updates (#2024) - EXPERIMENTAL
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Issue Number:** #2024
- **Description:** The prebuilt firmware has been updated to incorporate the latest fixes and enhancements,
ensuring users have access to the most current and stable version without the need for manual compilation.
This is another important step in our goal torwards [Simplifying User Experience for NSPanel Firmware](https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1602),
allowing users to directly download the firmware from GitHub without the need of compiling it locally.
- **Special Thanks:** To @MichaelHeimann for trimming this feature, fixing bugs and reviving this idea.
### Use of PSRAM (#1815, #1946, and #1983) - EXPERIMENTAL
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Issue Number:** #1815, #1946, and #1983
- **Description:** We are introducing the use of PSRAM memory available on the NSPanel.
This will possibly open space for additional features to be developed in the future and the use of more customizations for your panel.
- **Special Thanks:** To @Bascht74 and @olicooper for giving the directions to enable the use of non-standard pins for PSRAM used in NSPanel,
and to @X-Ryl669 and @MichaelHeimann for all the tests, tips, and feedback around this.
## v4.3.4 - Urgent Fix for Home Screen Interaction
This patch release addresses a critical issue from the v4.3.3 update that affected the touch functionality on the Home screen, specifically impacting the ability to navigate to the climate page.
### Critical Touch Interaction Bug Fixed (#2040)
- **Criticality:** Critical
- **Affected Components:** Blueprint
- **Issue Number:** #2040
- **Description:** Fixed an issue where users were unable to navigate to the climate control page by touching the temperature display on the Home screen.
This bug was inadvertently introduced in the v4.3.3 update and has been promptly resolved to restore full functionality.
Users can now interact with the temperature display as intended, facilitating seamless access to the climate controls.
This update is essential for ensuring that the NSPanel functions correctly, maintaining the quality and reliability expected by our users.
We apologize for any inconvenience caused and thank you for your continued support.
## v4.3.5 - Experimenting with Bluetooth Capabilities
This patch release v4.3.5 introduces experimental Bluetooth features alongside critical fixes and enhancements.
The new Bluetooth capabilities leverage the previously untapped potential of the NSPanel's Bluetooth modem, enabled by the increased memory availability in the ESP-IDF framework.
### New Bluetooth Features (Experimental)
- **BLE Tracker Add-on**
- **Description:** This add-on enables the NSPanel to act as a Bluetooth Low Energy (BLE) tracker, allowing it to detect and report the presence of BLE devices in its vicinity.
This feature is instrumental for presence detection and smart home automation scenarios.
- **Bluetooth Proxy Add-on**
- **Description:** The Bluetooth Proxy add-on allows the NSPanel to act as a bridge or proxy for other Bluetooth devices, facilitating communication between BLE devices and Home Assistant.
This can significantly extend the functionality of Home Assistant in managing Bluetooth devices without direct connectivity.
### Temperature Display and Control Fixes
- **Temperature Increment Error in Climate Card Resolved (#2076)**
- **Criticality:** Medium
- **Affected Components:** ESPHome
- **Description:** Corrected a rounding error in the climate card, which caused temperature set points to adjust in increments of 0.9 degrees.
This fix ensures temperature adjustments are now rounded to the nearest whole number, aligning with expected control behavior.
- **Consistent Temperature Unit Display Across Panels (#2056)**
- **Criticality:** Medium
- **Affected Components:** ESPHome
- **Description:** Resolved an issue where the internal temperature sensor did not convert temperatures from Celsius to Fahrenheit for display on the home screen,
despite displaying correctly on the climate page. Temperatures are now consistently shown in the user-defined units across all NSPanel displays.
### Control and Interface Enhancements
- **Improved Custom Button Response for Dimmable Color Lights (#2072)**
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Description:** Fixed a bug where custom buttons for dimmable color lights only toggled the lights on/off.
The buttons now correctly adjust brightness and color settings, enhancing user control.
- **Homepage Weather and Climate Control Delay Minimized (#2056)**
- **Criticality:** Minor
- **Affected Components:** ESPHome and TFT
- **Description:** Introduced a minor delay optimization for weather updates and climate control interactions on the home page, improving the responsiveness and user experience.
- **Consistent Icon Color Display on Home Page (#2043)**
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Description:** Addressed an issue where icons on the home page always displayed in white, regardless of the set color.
Icons now correctly reflect the specified colors, enhancing visual consistency and user interface aesthetics.
### System Stability and Functionality
- **Restoration of Webserver Functionality Post-Upgrade (#2054, #2050)**
- **Criticality:** Critical
- **Affected Components:** ESPHome
- **Description:** Fixed issues that caused the webserver component to stop functioning following recent upgrades.
This repair restores full webserver functionality, essential for user access and system configuration via a web interface.
- **Reliability Improvements for TFT Uploads with Bluetooth Components (#1946, #1815)**
- **Criticality:** Medium
- **Affected Components:** ESPHome
- **Description:** Enhanced the reliability of TFT file uploads when the Bluetooth proxy or the BLE Tracker are enabled.
This fix addresses disruptions previously experienced during TFT updates, ensuring smoother and more reliable firmware installations.
This update, v4.3.5, is a significant step towards harnessing the full potential of the NSPanel's hardware capabilities, especially its Bluetooth functionality,
while continuing to refine the user experience and system stability.
We appreciate the community's active involvement in identifying these issues and thank everyone for their contributions to improving the firmware.
## v4.3.6 - Critical Fixes for Custom Buttons
This release of v4.3.6 is an urgent patch to address critical issues affecting the functionality of custom buttons on the NSPanel.
These fixes ensure that custom buttons properly trigger actions for climate and alarm controls, and correct the integration with external thermostat entities.
### Fixes for Custom Button Functionality
- **Climate Page Accessibility Restored (#2067)**
- **Criticality:** Critical
- **Affected Components:** Blueprint
- **Description:** Resolved an issue where the climate page was not opening when triggered from a custom button.
Users can now access the climate controls directly from the home screen without interruption.
- **Alarm Control from Custom Button Restored (#2081)**
- **Criticality:** Critical
- **Affected Components:** Blueprint
- **Description:** Fixed a malfunction where custom buttons configured for alarm control were unresponsive.
This update restores full functionality, allowing for immediate access and control of alarm settings from the home page.
- **Integration of External Thermostat Entities Fixed (#2080)**
- **Criticality:** Critical
- **Affected Components:** ESPHome
- **Description:** Corrected an issue introduced in v4.3.5 where external thermostat entities (the ones controlled by Home Assistant) linked to custom buttons were not functioning correctly.
With this fix, users can again utilize custom buttons to control their external thermostats effectively.
This patch release v4.3.6 ensures that custom buttons on the NSPanel are fully operational, addressing urgent issues that impacted user interaction and control of climate and alarm systems.
We thank our community for their prompt reporting and patience as we continue to enhance the NSPanel experience.
## v4.3.7 - Quick Fix for Captive Portal Compile Error
This patch addresses a critical compile error related to the captive portal feature, ensuring smooth and successful firmware compilations for users utilizing this feature.
### Captive Portal Compile Error Resolved (#2088)
- **Criticality:** Critical
- **Affected Components:** ESPHome
- **Issue Number:** #2088
- **Description:** Fixed a critical issue where users faced a compilation error due to an undeclared reference to 'ap_captive_portal'.
This fix corrects the reference error, restoring the ability to compile with the captive portal enabled.
Users who do not utilize the captive portal can continue without modification, while those who do should see successful compilations without further adjustments.
This release ensures that all users, regardless of their use of the captive portal feature, can compile and update their firmware without interruption.
We apologize for any inconvenience caused and appreciate your patience as we continue to improve the NSPanel firmware.
## Support ## Support
For support or more information about this update, For support or more information about this update,
visit our [GitHub repository](https://github.com/Blackymas/NSPanel_HA_Blueprint) visit our [GitHub repository](https://github.com/Blackymas/NSPanel_HA_Blueprint)
@@ -213,9 +790,20 @@ or our [online documentation](https://github.com/Blackymas/NSPanel_HA_Blueprint/
Discover our upcoming projects in our [Milestones](https://github.com/Blackymas/NSPanel_HA_Blueprint/milestones?direction=asc&sort=title&state=open). Discover our upcoming projects in our [Milestones](https://github.com/Blackymas/NSPanel_HA_Blueprint/milestones?direction=asc&sort=title&state=open).
## Special Thanks ## Special Thanks
*Details to be added.* We extend our heartfelt thanks to the contributors who have played a pivotal role in enhancing the NSPanel's capabilities and documentation in this release:
- **@shing6326**: For diligently addressing and fixing issues related to the new Fan oscillating feature.
Your efforts have significantly improved its functionality and reliability (#1839).
- **@andythomas**: For the comprehensive enhancements made to our documentation.
Your contributions have made our guides more informative and accessible, enriching the user experience for everyone (#1865).
## Previous releases ## Previous releases
- [v4.3.6 - Critical Fixes for Custom Buttons](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.6)
- [v4.3.5 - Experimenting with Bluetooth Capabilities](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.5)
- [v4.3.4 - Urgent Fix for Home Screen Interaction](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.4)
- [v4.3.3 - Enhancing Flexibility and User Experience](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.3)
- [v4.3.2 - Enhancements and Critical Fixes for a Seamless Experience](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.2)
- [v4.3.1 - Ensuring Compatibility with ESPHome v2024.3.0 and Enhancing Stability](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.1)
- [v4.3 - Welcome to Framework ESP-IDF, an Utilities Dashboard and Enhanced Localization](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.0)
- [v4.2.6 - Enhancing Stability and User Experience](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.6) - [v4.2.6 - Enhancing Stability and User Experience](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.6)
- [v4.2.5 - Celebrating 1000 Stars with Enhanced Functionality and UI Improvements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.5) - [v4.2.5 - Celebrating 1000 Stars with Enhanced Functionality and UI Improvements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.5)
- [v4.2.4 - Critical bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.4) - [v4.2.4 - Critical bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.4)

View File

@@ -1,18 +1,45 @@
# __init__.py # __init__.py
import esphome.codegen as cg import esphome.codegen as cg
import esphome.config_validation as cv import esphome.config_validation as cv
from esphome.core import coroutine_with_priority from esphome.components.esp32 import add_idf_sdkconfig_option
from esphome.core import CORE, coroutine_with_priority
# from esphome.cpp_tools import CppFile
CODEOWNERS = ["@edwardtfn"] CODEOWNERS = ["@edwardtfn"]
nspanel_ha_blueprint_ns = cg.esphome_ns.namespace('nspanel_ha_blueprint') nspanel_ha_blueprint_ns = cg.esphome_ns.namespace('nspanel_ha_blueprint')
# MdiIcons = nspanel_ha_blueprint_ns.class_('MdiIcons', cg.Component)
CONFIG_SCHEMA = cv.All( CONFIG_SCHEMA = cv.All(
cv.Schema({}), cv.Schema({}),
) )
@coroutine_with_priority(1.0)
@coroutine_with_priority(1.0)
async def to_code(config): async def to_code(config):
if CORE.using_arduino:
cg.add_build_flag("-DCONFIG_D0WD_PSRAM_CLK_IO=5")
cg.add_build_flag("-DCONFIG_D0WD_PSRAM_CS_IO=18")
if CORE.using_esp_idf:
add_idf_sdkconfig_option("CONFIG_D0WD_PSRAM_CLK_IO", 5)
add_idf_sdkconfig_option("CONFIG_D0WD_PSRAM_CS_IO", 18)
add_idf_sdkconfig_option("CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST", True)
add_idf_sdkconfig_option("CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY", True)
add_idf_sdkconfig_option("CONFIG_ESP32_REV_MIN_3", True)
# add_idf_sdkconfig_option("CONFIG_LWIP_MAX_SOCKETS", 5) # This breakes web_server
add_idf_sdkconfig_option("CONFIG_MBEDTLS_DYNAMIC_BUFFER", True)
add_idf_sdkconfig_option("CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT", True)
add_idf_sdkconfig_option("CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA", True)
add_idf_sdkconfig_option("CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC", True)
add_idf_sdkconfig_option("CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY", True)
add_idf_sdkconfig_option("CONFIG_SPIRAM_RODATA", True)
add_idf_sdkconfig_option("CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP", True)
cg.add_define("USE_NSPANEL_HA_BLUEPRINT") cg.add_define("USE_NSPANEL_HA_BLUEPRINT")
cg.add_global(nspanel_ha_blueprint_ns.using) cg.add_global(nspanel_ha_blueprint_ns.using)
# Setup the MdiIcons class instance
# mdi_icons = cg.new_Pvariable('mdi_icons')
# yield cg.register_component(mdi_icons, config)

View File

@@ -0,0 +1,24 @@
// ha_components.cpp
#include "ha_components.h"
namespace nspanel_ha_blueprint {
// Function Definition
HomeAssistantEntity extractHomeAssistantEntity(const std::string& entity_id) {
size_t dotPos = entity_id.find(".");
HomeAssistantEntity result;
if (dotPos != std::string::npos) {
// Extract domain and id from the entity_id string
result.domain = entity_id.substr(0, dotPos);
result.id = entity_id.substr(dotPos + 1);
} else {
// No dot found, the entire entity_id is considered as id.
result.domain = "invalid";
result.id = entity_id;
}
return result;
}
} // namespace nspanel_ha_blueprint

View File

@@ -1,36 +1,36 @@
// ha_components.h // ha_components.h
#pragma once #pragma once
#include <string> #include <string>
// Defines structures and functions related to Home Assistant entities within the nspanel_ha_blueprint namespace.
namespace nspanel_ha_blueprint { namespace nspanel_ha_blueprint {
// Represents a Home Assistant entity with a domain and an identifier.
struct HomeAssistantEntity { struct HomeAssistantEntity {
std::string domain; std::string domain; // The domain part of the entity, like "light" or "switch".
std::string id; std::string id; // The unique identifier of the entity within its domain.
}; };
/** /**
* Extracts the domain name and unique ID from a given Home Assistant entity string. * Extracts the domain name and unique ID from a given Home Assistant entity string.
* Handles a special case where "alarm_control_panel" should be shortened to "alarm". *
* This function parses a Home Assistant entity string to extract and separate the domain
* and ID components of the entity. If the string does not contain a valid entity format
* (i.e., "domain.id"), the function will mark the domain as "invalid" and treat the entire
* string as the ID. It also handles a special case where "alarm_control_panel" should be
* shortened to "alarm", though the implementation of this feature needs to be added in the
* function's definition in the corresponding .cpp file.
*
* Usage example:
* auto entity = extractHomeAssistantEntity("light.kitchen");
* // entity.domain would be "light"
* // entity.id would be "kitchen"
* *
* @param entity_id The input string containing either the combined domain and unique ID or just the unique ID. * @param entity_id The input string containing either the combined domain and unique ID or just the unique ID.
* @return A HomeAssistantEntity struct containing the extracted domain and the unique ID. * @return A HomeAssistantEntity struct containing the extracted domain and the unique ID.
*/ */
HomeAssistantEntity extractHomeAssistantEntity(const std::string& entity_id) { HomeAssistantEntity extractHomeAssistantEntity(const std::string& entity_id);
size_t dotPos = entity_id.find(".");
HomeAssistantEntity result;
if (dotPos != std::string::npos) {
// Extract domain and id from the entity_id string
result.domain = entity_id.substr(0, dotPos);
result.id = entity_id.substr(dotPos + 1);
} else {
// No dot found, the entire entity_id is considered as id.
result.domain = "invalid";
result.id = entity_id;
}
return result;
}
} // namespace nspanel_ha_blueprint } // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,21 @@
// hardware.cpp
#include "hardware.h"
namespace nspanel_ha_blueprint {
template<typename SettingsEnum>
void update_bitwise_setting(uint8_t& settings, bool condition, SettingsEnum flag) {
if (condition) {
settings |= flag; // Set bit
} else {
settings &= ~flag; // Clear bit
}
}
// Explicit template instantiation
// Note: You need to explicitly instantiate templates for all enums used as SettingsEnum
template void update_bitwise_setting<ButtonSettings>(uint8_t& settings, bool condition, ButtonSettings flag);
template void update_bitwise_setting<RelaySettings>(uint8_t& settings, bool condition, RelaySettings flag);
} // namespace nspanel_ha_blueprint

View File

@@ -1,73 +1,73 @@
// hardware.h // hardware.h
#pragma once #pragma once
#include <cstdint> #include <cstdint>
// Namespace for nspanel_ha_blueprint, encapsulating definitions related to hardware settings.
namespace nspanel_ha_blueprint { namespace nspanel_ha_blueprint {
/** /**
* @enum ButtonsSettings * @enum ButtonSettings
* Represents the settings for hardware buttons as individual bits within a uint8_t value. * Represents the settings for hardware buttons using individual bits within a uint8_t value.
* Each enum value corresponds to a specific bit position that represents a distinct setting * This allows efficient storage and manipulation of settings for multiple buttons in a compact form.
* for the buttons. This allows for efficient storage and manipulation of multiple buttons
* settings within a single byte.
* *
* Bits are allocated as follows: * The bit allocations are as follows:
* - Bit 0: Left button - Enabled. * - Bit 0: Left button enabled.
* - Bit 1: Left button - Current state (0 for `off` or 1 for `on`) * - Bit 1: Left button state (0 for `off`, 1 for `on`).
* - Bits 2-3: Reserved for future use. * - Bits 2-3: Reserved for future use.
* - Bit 4: Right button - Enabled. * - Bit 4: Right button enabled.
* - Bit 5: Right button - Current state (0 for `off` or 1 for `on`) * - Bit 5: Right button state (0 for `off`, 1 for `on`).
* - Bits 6-7: Reserved for future use. * - Bits 6-7: Reserved for future use.
* *
* Usage involves bitwise operations to set, clear, and check these settings within a * These settings facilitate easy manipulation of button states and configurations through bitwise operations.
* uint8_t variable. This approach enables compact representation and easy manipulation
* of relay settings.
*/ */
enum ButtonSettings { enum ButtonSettings {
ButtonLeft_Enabled = 1 << 0, ///< Bit 0: Enables left button visualization on screen. ButtonLeft_Enabled = 1 << 0, ///< Enables left button visualization on screen.
ButtonLeft_State = 1 << 1, ///< Bit 1: Current state of left button. ButtonLeft_State = 1 << 1, ///< Indicates current state of the left button.
// Bits 2 and 3 are reserved for future expansion. // Bits 2 and 3 are reserved for future expansion.
ButtonRight_Enabled = 1 << 4, ///< Bit 4: Enables right button visualization on screen. ButtonRight_Enabled = 1 << 4, ///< Enables right button visualization on screen.
ButtonRight_State = 1 << 5, ///< Bit 5: Current state of right button. ButtonRight_State = 1 << 5, ///< Indicates current state of the right button.
// Bits 6 and 7 are reserved for future expansion. // Bits 6 and 7 are reserved for future expansion.
}; };
/** /**
* @enum RelaySettings * @enum RelaySettings
* Represents the settings for relays as individual bits within a uint8_t value. Each * Represents the settings for relays using individual bits within a uint8_t value.
* enum value corresponds to a specific bit position that represents a distinct setting * This approach allows for the efficient storage and manipulation of settings for multiple
* for the relays. This allows for efficient storage and manipulation of multiple relay * relays in a single byte, enabling compact representation and ease of setting manipulation.
* settings within a single byte.
* *
* Bits are allocated as follows: * The bit allocations are as follows:
* - Bit 0: Relay 1 - Local control enabled. * - Bit 0: Relay 1 local control enabled.
* - Bit 1: Relay 1 - Fallback mode enabled. * - Bit 1: Relay 1 fallback mode enabled.
* - Bits 2-3: Reserved for future use. * - Bits 2-3: Reserved for future use.
* - Bit 4: Relay 2 - Local control enabled. * - Bit 4: Relay 2 local control enabled.
* - Bit 5: Relay 2 - Fallback mode enabled. * - Bit 5: Relay 2 fallback mode enabled.
* - Bits 6-7: Reserved for future use. * - Bits 6-7: Reserved for future use.
* *
* Usage involves bitwise operations to set, clear, and check these settings within a * These settings support flexible relay configuration and state management through bitwise operations.
* uint8_t variable. This approach enables compact representation and easy manipulation
* of relay settings.
*/ */
enum RelaySettings { enum RelaySettings {
Relay1_Local = 1 << 0, ///< Bit 0: Enables local control for Relay 1. Relay1_Local = 1 << 0, ///< Enables local control for Relay 1.
Relay1_Fallback = 1 << 1, ///< Bit 1: Enables fallback mode for Relay 1. Relay1_Fallback = 1 << 1, ///< Enables fallback mode for Relay 1.
// Bits 2 and 3 are reserved for future expansion. // Bits 2 and 3 are reserved for future expansion.
Relay2_Local = 1 << 4, ///< Bit 4: Enables local control for Relay 2. Relay2_Local = 1 << 4, ///< Enables local control for Relay 2.
Relay2_Fallback = 1 << 5, ///< Bit 5: Enables fallback mode for Relay 2. Relay2_Fallback = 1 << 5, ///< Enables fallback mode for Relay 2.
// Bits 6 and 7 are reserved for future expansion. // Bits 6 and 7 are reserved for future expansion.
}; };
/**
* Updates a settings byte according to a specified condition and flag.
*
* This function template applies a bitwise operation to modify the settings byte based on
* the provided condition and flag. If the condition is true, the bit corresponding to the flag
* is set; otherwise, it's cleared. This method enables dynamic and conditional settings updates.
*
* @param settings Reference to the settings byte to be modified.
* @param condition Boolean condition determining how the settings byte is modified.
* @param flag The specific bit flag (from ButtonSettings or RelaySettings) to modify.
*/
template<typename SettingsEnum> template<typename SettingsEnum>
void update_bitwise_setting(uint8_t& settings, bool condition, SettingsEnum flag) { void update_bitwise_setting(uint8_t& settings, bool condition, SettingsEnum flag);
if (condition) {
settings |= flag; // Set bit
} else {
settings &= ~flag; // Clear bit
}
}
} // namespace nspanel_ha_blueprint } // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,61 @@
// icons.cpp
#include "icons.h"
#include <vector>
#ifdef USE_PSRAM
#ifdef USE_ARDUINO
#include <esp32-hal-psram.h>
#else // ESP-IDF
#include <esp_heap_caps.h> // Required for heap capabilities functions
#endif // ARDUINO vs ESP-IDF
#endif // USE_PSRAM
namespace nspanel_ha_blueprint {
std::vector<Icon> icons; // This declaration may not be necessary; see below
bool initializeIconsVector() {
Icon* allocatedMemory = nullptr;
// Try to allocate the vector in PSRAM
#ifdef USE_PSRAM
#if defined(USE_ARDUINO)
if (psramFound())
allocatedMemory = static_cast<Icon*>(ps_malloc(10 * sizeof(Icon)));
#else // ESP-IDF
allocatedMemory = static_cast<Icon*>(heap_caps_malloc(10 * sizeof(Icon), MALLOC_CAP_SPIRAM));
#endif
if (allocatedMemory != nullptr) {
new (&icons) std::vector<Icon>(allocatedMemory, allocatedMemory + 10); // Placement new to initialize vector
return true; // Successfully allocated in PSRAM
}
#endif
// Fallback to DRAM if PSRAM allocation fails or if PSRAM is not used
allocatedMemory = static_cast<Icon*>(malloc(10 * sizeof(Icon)));
if (allocatedMemory != nullptr) {
new (&icons) std::vector<Icon>(allocatedMemory, allocatedMemory + 10); // Placement new to initialize vector
return true; // Successfully allocated in DRAM
}
return false; // Allocation failed
}
void Icon::updateIcon(const char* code, uint16_t color, bool vis) {
if (strcmp(last_icon_code, code) != 0 || last_icon_color != color || visible != vis) {
strncpy(last_icon_code, code, 4);
last_icon_code[4] = '\0';
last_icon_color = color;
visible = vis;
}
}
Icon* findIcon(uint8_t page_id, const char* comp) {
for (auto& icon : icons) {
if (icon.page_id == page_id && strcmp(icon.component, comp) == 0) {
return &icon;
}
}
return nullptr;
}
}

View File

@@ -0,0 +1,32 @@
// icons.h
#pragma once
#include <cstdint>
#include <cstring> // For strncpy and strcmp
#include <vector>
namespace nspanel_ha_blueprint {
struct Icon {
uint8_t page_id; // Page ID, placed logically before the component
char component[15]; // Component name (max 14 chars + null terminator)
char last_icon_code[5]; // UTF-8 code (4 bytes + null terminator)
uint16_t last_icon_color; // Color value
bool visible; // Visibility of the icon
// Constructor with default values
Icon(uint8_t pid, const char* comp, const char* code = "\xEF\xBF\xBF", uint16_t color = UINT16_MAX, bool vis = true)
: page_id(pid), last_icon_color(color), visible(vis) {
strncpy(const_cast<char*>(component), comp, 14); // Use const_cast to bypass const for initialization
const_cast<char*>(component)[14] = '\0'; // Ensure null termination safely
strncpy(last_icon_code, code, 4);
last_icon_code[4] = '\0';
}
void updateIcon(const char* code, uint16_t color, bool vis);
};
extern std::vector<Icon> icons; // Global list of icons
Icon* findIcon(uint8_t page_id, const char* component);
}

View File

@@ -0,0 +1,64 @@
// mdiicons.cpp
#include "mdiicons.h"
#include "esphome/core/log.h"
using namespace esphome;
MdiIcons::MdiIcons() : iconPool(nullptr), iconPoolSize(0), iconPoolCapacity(100) {}
void MdiIcons::setup() {
iconPool = new MdiIcon[iconPoolCapacity];
if (!iconPool) {
ESP_LOGE("MdiIcons", "Failed to allocate memory for icons in PSRAM");
return;
}
memset(iconPool, 0, iconPoolCapacity * sizeof(MdiIcon));
ESP_LOGI("MdiIcons", "Icon pool initialized with capacity %u", iconPoolCapacity);
}
void MdiIcons::dump_config() {
ESP_LOGCONFIG("MdiIcons", "MDI Icons: Initialized with pool capacity %u", iconPoolCapacity);
}
const MdiIcon* MdiIcons::find_icon(const char* name) const {
for (size_t i = 0; i < iconPoolSize; ++i) {
if (strcmp(iconPool[i].name, name) == 0) {
return &iconPool[i];
}
}
return nullptr;
}
bool MdiIcons::add_icon(const char* name, const char* code) {
if (find_icon(name) != nullptr) {
ESP_LOGW("MdiIcons", "Icon '%s' is already in the pool. Not adding again.", name);
return false;
}
if (iconPoolSize >= iconPoolCapacity) {
resize_pool();
}
strncpy(iconPool[iconPoolSize].name, name, sizeof(MdiIcon::name) - 1);
strncpy(iconPool[iconPoolSize].code, code, sizeof(MdiIcon::code) - 1);
iconPool[iconPoolSize].name[sizeof(MdiIcon::name) - 1] = '\0';
iconPool[iconPoolSize].code[sizeof(MdiIcon::code) - 1] = '\0';
iconPoolSize++;
ESP_LOGI("MdiIcons", "New icon '%s' added to the pool.", name);
return true;
}
void MdiIcons::resize_pool() {
size_t newCapacity = iconPoolCapacity * 2;
MdiIcon* newPool = new MdiIcon[newCapacity];
if (!newPool) {
ESP_LOGE("MdiIcons", "Failed to resize the icon pool");
return;
}
memcpy(newPool, iconPool, iconPoolSize * sizeof(MdiIcon));
delete[] iconPool;
iconPool = newPool;
iconPoolCapacity = newCapacity;
ESP_LOGI("MdiIcons", "Icon pool resized to %u.", iconPoolCapacity);
}

View File

@@ -0,0 +1,33 @@
// mdiicons.h
#ifndef MDI_ICONS_H
#define MDI_ICONS_H
#include "esphome/core/component.h"
#include "esphome/core/log.h"
#include <cstring>
struct MdiIcon {
char name[32]; // Icon name, assuming max length of 31 characters + null terminator
char code[5]; // Icon code, 4 bytes + null terminator (UTF-8 characters)
};
class MdiIcons : public esphome::Component {
public:
MdiIcons(); // Constructor declaration
void setup() override; // Setup method declaration
void dump_config() override; // Dump config method declaration
const MdiIcon* find_icon(const char* name) const; // Method to find an icon by name
bool add_icon(const char* name, const char* code); // Method to add an icon
private:
MdiIcon* iconPool; // Dynamic array of MdiIcons
size_t iconPoolSize; // Number of icons currently in the pool
size_t iconPoolCapacity; // Current capacity of the pool
void resize_pool(); // Method to resize the icon pool
};
#endif // MDI_ICONS_H

View File

@@ -0,0 +1,36 @@
// nextion_components.cpp
#include "nextion_components.h"
#include <algorithm>
#include <cstring>
namespace nspanel_ha_blueprint {
NextionComponent extractNextionComponent(const std::string& input, const std::string& defaultPage) {
NextionComponent result{};
size_t dotPos = input.find(".");
if (dotPos != std::string::npos) {
// Handling special case and standard extraction
strncpy(result.page, input.substr(0, std::min<size_t>(dotPos, 14)).c_str(), 14);
result.page[14] = '\0'; // Ensure null termination
strncpy(result.component_id, input.substr(dotPos + 1, 14).c_str(), 14);
result.component_id[14] = '\0'; // Ensure null termination
result.is_current_page = false;
} else {
// Default page case
strncpy(result.page, defaultPage.c_str(), 14);
result.page[14] = '\0'; // Ensure null termination
strncpy(result.component_id, input.c_str(), 14);
result.component_id[14] = '\0'; // Ensure null termination
result.is_current_page = true;
}
if (strcmp(result.page, defaultPage.c_str()) == 0) {
result.is_current_page = true;
}
return result;
}
} // namespace nspanel_ha_blueprint

View File

@@ -1,51 +1,49 @@
// nextion_components.h // nextion_components.h
#pragma once #pragma once
#include <string> #include <string>
#include <vector>
#include <cstdint>
namespace nspanel_ha_blueprint { namespace nspanel_ha_blueprint {
struct NextionComponent { struct NextionComponent {
std::string page; char page[15]; // 14 characters + null terminator, representing the Nextion display page
std::string component_id; char component_id[15]; // 14 characters + null terminator, representing the component ID within the page
bool is_current_page; bool is_current_page; // Flag indicating whether the component is on the current page
}; };
/** /**
* Extracts the page name and component ID from a given input string. * Extracts the page name and component ID from a given input string.
* Handles a special case where "alarm_control_panel" should be shortened to "alarm". * If the input string omits the page, a default page name is used.
* Handles a special case for "alarm_control_panel" by shortening it to "alarm".
* *
* @param input The input string containing either the combined page and component ID or just the component ID. * @param input The input string containing the component ID, optionally prefixed by the page name and a dot.
* @param defaultPage The default page name to use if the input string does not specify a page. * @param defaultPage The default page name to use if the input string does not specify a page.
* @return A NextionComponent struct containing the extracted or default page name, the component ID, and a flag indicating if it's the current page. * @return A NextionComponent struct with the extracted or default page name, component ID, and current page status.
*/ */
NextionComponent extractNextionComponent(const std::string& input, const std::string& defaultPage) { NextionComponent extractNextionComponent(const std::string& input, const std::string& defaultPage);
size_t dotPos = input.find(".");
NextionComponent result;
if (dotPos != std::string::npos) {
// Extract page and component_id from the input string
result.page = input.substr(0, dotPos);
result.component_id = input.substr(dotPos + 1);
result.is_current_page = false; // Since there's a dot, it's assumed not to be the current page
// Check for the special case of "alarm_control_panel" /**
if (result.page == "alarm_control_panel") { * Converts an RGB color represented as a vector of integers to the 16-bit 5-6-5 format supported by Nextion displays.
result.page = "alarm"; *
} * This function takes a vector containing three integer values representing
} else { * the red, green, and blue components of an RGB color, each in the range 0-255.
// No dot found, the entire input is considered as component_id * It then converts these values into a single uint16_t value in 5-6-5 format,
result.page = defaultPage; * commonly used for color displays. The conversion process masks and shifts
result.component_id = input; * the components to fit into the 5 bits for red, 6 bits for green, and 5 bits for blue.
result.is_current_page = true; // No specific page mentioned, so it's the current page *
* @param rgb A vector of integers with exactly three elements: [red, green, blue].
* @return The color encoded in 16-bit 5-6-5 format, or UINT16_MAX if the input vector
* does not contain at least three elements.
*/
template <typename Container>
inline uint16_t rgbTo565(const Container& rgb) {
if (rgb.size() != 3) {
return UINT16_MAX; // Use UINT16_MAX as an error indicator
} }
return ((rgb[0] & 0xF8) << 8) | ((rgb[1] & 0xFC) << 3) | (rgb[2] >> 3);
// Check if the resolved page matches the defaultPage indicating it's the current page
if (result.page == defaultPage) {
result.is_current_page = true;
}
return result;
} }
} // namespace nspanel_ha_blueprint } // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,26 @@
// pages.cpp
#include "pages.h"
#include <cstring>
namespace nspanel_ha_blueprint {
uint8_t get_page_id(const std::string& page_name) {
for (uint8_t i = 0; i < page_names.size(); ++i) {
if (strcmp(page_names[i], page_name.c_str()) == 0) {
return i;
}
}
return UINT8_MAX;
}
bool isStringInList(const std::string& strToSearch, std::initializer_list<std::string> list) {
for (const auto& str : list) {
if (strToSearch == str) {
return true;
}
}
return false;
}
} // namespace nspanel_ha_blueprint

View File

@@ -1,10 +1,9 @@
// pages.h // pages.h
#pragma once #pragma once
#include <array> #include <array>
#include <cstring>
#include <cstdint> #include <cstdint>
#include <utility>
#include <string> #include <string>
#include <initializer_list> #include <initializer_list>
@@ -12,7 +11,7 @@ namespace nspanel_ha_blueprint {
/** /**
* @file pages.h * @file pages.h
* Defines constants and functions related to page names for "NSPanel HA Blueprint" project.. * Defines constants and functions related to page names for the NSPanel HA Blueprint project.
*/ */
// Constants // Constants
@@ -22,6 +21,7 @@ namespace nspanel_ha_blueprint {
* such as settings, home, weather information, and more. * such as settings, home, weather information, and more.
*/ */
constexpr std::array<const char*, 28> page_names = { constexpr std::array<const char*, 28> page_names = {
"boot",
"home", "home",
"weather01", "weather01",
"weather02", "weather02",
@@ -30,7 +30,6 @@ namespace nspanel_ha_blueprint {
"weather05", "weather05",
"climate", "climate",
"settings", "settings",
"boot",
"screensaver", "screensaver",
"light", "light",
"cover", "cover",
@@ -59,51 +58,15 @@ namespace nspanel_ha_blueprint {
* @return The index of the page_name in the page_names array. If the page_name * @return The index of the page_name in the page_names array. If the page_name
* is not found, returns UINT8_MAX as an indicator that no matching page was found. * is not found, returns UINT8_MAX as an indicator that no matching page was found.
*/ */
inline uint8_t get_page_id(const std::string& page_name) { uint8_t get_page_id(const std::string& page_name);
for (uint8_t i = 0; i < page_names.size(); ++i) {
if (strcmp(page_names[i], page_name.c_str()) == 0) {
return i; // Return the index if found
}
}
return UINT8_MAX; // Return UINT8_MAX if not found
}
/** /**
* Checks if a given string is present within a list of strings. * Checks if a given string is present within a list of strings.
* *
* This function provides a convenient way to search for the presence of a specific string * @param strToSearch The string to search for within the list.
* within a variably sized list of strings. It iterates through each string in the provided * @param list An initializer list of strings to search within.
* list, comparing it against the target string for an exact match. This utility is particularly * @return `true` if the target string is found within the list, `false` otherwise.
* useful for validating if a certain value matches any item from a predefined set of allowed
* values.
*
* @param strToSearch The string to search for within the list. This is the target string
* that the function will attempt to find an exact match for within the
* provided list of strings.
* @param list An initializer list of strings to search within. This list contains the strings
* against which the target string will be compared. The list is flexible in size,
* allowing for a variable number of strings to be specified.
*
* @return Returns `true` if the target string is found within the list, indicating an exact
* match was encountered. Returns `false` if the target string is not present in the
* list, indicating no matches were found.
*
* Usage Example:
* ```cpp
* std::string page = "alarm";
* bool isPresent = isStringInList(page, {"alarm", "climate", "cover", "fan", "light", "media_player", "confirm", "keyb_num"});
* if (!isPresent) {
* // The string 'page' was not found in the list
* }
* ```
*/ */
bool isStringInList(const std::string& strToSearch, std::initializer_list<std::string> list) { bool isStringInList(const std::string& strToSearch, std::initializer_list<std::string> list);
for (const auto& str : list) {
if (strToSearch == str) {
return true;
}
}
return false;
}
} // namespace nspanel_ha_blueprint } // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,49 @@
// text.cpp
#include "text.h"
#include <algorithm>
#include <cctype>
#include <cstring>
namespace nspanel_ha_blueprint {
template <unsigned int N>
void copyStringToCharArray(char (&dest)[N], const std::string& src) {
size_t length = std::min(src.size(), static_cast<size_t>(N - 1));
std::strncpy(dest, src.c_str(), length);
dest[length] = '\0';
}
// Explicit template instantiation might be needed depending on usage
// template void copyStringToCharArray<YOUR_SIZE_HERE>(char (&)[YOUR_SIZE_HERE], const std::string&);
bool isNumberChar(char c) {
return std::isdigit(static_cast<unsigned char>(c)) || c == '.' || c == '-' || c == ',';
}
std::string adjustDecimalSeparator(const std::string& input, char decimalSeparator) {
if (decimalSeparator == '.') {
return input;
}
size_t numericEnd = 0;
for (; numericEnd < input.size() && isNumberChar(input[numericEnd]); ++numericEnd);
std::string numericPart = input.substr(0, numericEnd);
std::string suffix = input.substr(numericEnd);
char* end;
double val = strtod(numericPart.c_str(), &end);
if (end != numericPart.c_str() && *end == '\0') {
size_t decimalPointPos = numericPart.find('.');
if (decimalPointPos != std::string::npos) {
numericPart[decimalPointPos] = decimalSeparator;
}
return numericPart + suffix;
} else {
return input;
}
}
} // namespace nspanel_ha_blueprint

View File

@@ -1,100 +1,40 @@
// text.h // text.h
#pragma once #pragma once
#include <algorithm>
#include <cctype>
#include <cstring>
#include <string> #include <string>
namespace nspanel_ha_blueprint { namespace nspanel_ha_blueprint {
/** /**
* Copies the contents of a std::string to a fixed-size char array, ensuring * Copies the contents of a std::string to a fixed-size char array, ensuring
* null termination of the string within the array. This function template * null termination. The destination array size is automatically deduced.
* automatically deduces the size of the destination char array at compile time, * Designed for fixed-size char arrays only.
* minimizing the risk of buffer overflow. It's designed for use with fixed-size
* char arrays only, not pointers or dynamically allocated memory.
* *
* Template Parameter: * @param dest A reference to the destination char array.
* N - The size of the destination char array. This value is deduced automatically * @param src The source std::string to copy.
* and must be greater than 0.
*
* Parameters:
* dest - A reference to the destination char array where the string should be copied.
* The array must have a size that can accommodate the source string plus a
* null terminator. If the source string is longer than the destination array,
* it will be truncated.
* src - The source std::string to copy. This string's contents are copied into the
* destination array up to the array's capacity minus one, to leave space for
* the null terminator.
*
* Usage Example:
* char destination[11];
* std::string source = "Hello";
* nspanel_ha_blueprint::copyStringToCharArray(destination, source);
*
* Note: The destination array is always null-terminated, even if the source string
* is truncated to fit into the array.
*/ */
template <unsigned int N> template <unsigned int N>
void copyStringToCharArray(char (&dest)[N], const std::string& src) { void copyStringToCharArray(char (&dest)[N], const std::string& src);
// Ensure we do not exceed the buffer size, leaving space for the null terminator
size_t length = std::min(src.size(), N - 1);
// Copy the string data into the destination buffer
std::strncpy(dest, src.c_str(), length);
// Explicitly null-terminate the destination buffer
dest[length] = '\0';
}
// Helper function to determine if a character is part of a number
bool isNumberChar(char c) {
return std::isdigit(c) || c == '.' || c == '-' || c == ',';
}
/** /**
* Adjusts the decimal separator in a numeric string to a specified character. * Determines if a character is part of a numeric string. This includes digits,
* This function identifies and modifies the decimal separator of a number within a string, * a period (.), a minus sign (-), or a comma (,).
* ensuring that only the first occurrence is replaced if it is a valid number followed by *
* any non-numeric characters (e.g., units of measurement). If the input string does not * @param c The character to check.
* start with a valid number, it is returned unchanged. * @return True if the character is part of a number; false otherwise.
* */
* @param input The string potentially containing a numeric value followed by text. bool isNumberChar(char c);
* @param decimalSeparator The character to use as the decimal separator.
* @return A string with the decimal separator adjusted if the input is a valid number,
* otherwise the original input string.
*/
std::string adjustDecimalSeparator(const std::string& input, char decimalSeparator) {
// Immediately return the original string if the desired decimal separator is "."
if (decimalSeparator == '.') {
return input;
}
// Find the end of the numeric part of the string /**
size_t numericEnd = 0; * Adjusts the decimal separator in a numeric string to the specified character.
for (; numericEnd < input.size() && isNumberChar(input[numericEnd]); ++numericEnd); * Only the first occurrence is replaced if it's a valid number followed by text.
* Returns the original string if it doesn't start with a valid number.
// Extract the numeric part and the suffix (if any) *
std::string numericPart = input.substr(0, numericEnd); * @param input The string containing a numeric value followed by text.
std::string suffix = input.substr(numericEnd); * @param decimalSeparator The character to use as the decimal separator.
* @return A string with the adjusted decimal separator if valid; otherwise, the original string.
// Attempt to convert the numeric part to a double */
char* end; std::string adjustDecimalSeparator(const std::string& input, char decimalSeparator);
double val = strtod(numericPart.c_str(), &end);
// Check if conversion was successful (end points to a null terminator if so)
if (end != numericPart.c_str() && *end == '\0') {
// Find and replace only the first occurrence of '.' with the specified decimalSeparator
size_t decimalPointPos = numericPart.find('.');
if (decimalPointPos != std::string::npos) {
numericPart[decimalPointPos] = decimalSeparator;
}
return numericPart + suffix;
} else {
// If the input is not a number, return it as is
return input;
}
}
} // namespace nspanel_ha_blueprint } // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,32 @@
// upload_tft.cpp
#ifdef NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT
#include "upload_tft.h"
namespace nspanel_ha_blueprint {
std::string construct_tft_url(const std::string& branch, const std::string& model,
const std::string& defaultUrl, const std::string& baseUrl) {
std::string relative_branch = branch.find("b") != std::string::npos ? "beta" : branch.find("d") != std::string::npos ? "dev" : branch;
std::string file_name;
if (model == "NSPanel Blank") file_name = "nspanel_blank.tft";
else if (model == "NSPanel EU") file_name = "nspanel_eu.tft";
else if (model == "NSPanel US") file_name = "nspanel_us.tft";
else if (model == "NSPanel US Landscape") file_name = "nspanel_us_land.tft";
else if (model == "NSPanel EU (CJK languages)") file_name = "nspanel_CJK_eu.tft";
else if (model == "NSPanel US (CJK languages)") file_name = "nspanel_CJK_us.tft";
else if (model == "NSPanel US Landscape (CJK languages)") file_name = "nspanel_CJK_us_land.tft";
return file_name.empty() ? defaultUrl : baseUrl + relative_branch + "/hmi/" + file_name;
}
std::string getNSPanelText(int displayMode, int charset) {
if (displayMode < 1 || displayMode > 3 || charset < 1 || charset > 2) return "";
std::string text = (displayMode == 1) ? "NSPanel EU" : (displayMode == 2) ? "NSPanel US" : "NSPanel US Landscape";
if (charset == 2) text += " (CJK languages)";
return text;
}
} // namespace nspanel_ha_blueprint
#endif // NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT

View File

@@ -0,0 +1,34 @@
// upload_tft.h
#pragma once
#ifdef NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT
#include <string>
namespace nspanel_ha_blueprint {
/**
* Constructs the TFT file URL based on branch, model, default URL, and base URL.
*
* @param branch The branch version input, potentially containing keywords like "beta" or "dev".
* @param model The device model, determining the specific TFT file name.
* @param defaultUrl The fallback URL if no specific file is associated with the model.
* @param baseUrl The base URL, to which branch and file names are appended to create the full URL.
* @return A string representing the fully constructed URL.
*/
std::string construct_tft_url(const std::string& branch, const std::string& model,
const std::string& defaultUrl, const std::string& baseUrl);
/**
* Generates a descriptive text for the NSPanel based on display mode and charset.
*
* @param displayMode Numeric code for the NSPanel's display mode: 1 for "EU", 2 for "US", 3 for "US Landscape".
* @param charset Numeric code for the character set: 1 for "International (original)", 2 for "CJK languages".
* @return A string describing the NSPanel configuration, or an empty string if inputs don't match any configuration.
*/
std::string getNSPanelText(int displayMode, int charset);
} // namespace nspanel_ha_blueprint
#endif // NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT

View File

@@ -0,0 +1,73 @@
// utilities.cpp
#include "utilities.h"
#include <cstdlib> // For malloc/free
#ifdef USE_ESP_IDF
#include "esp_heap_caps.h"
#elif defined(USE_ARDUINO)
#include "esp32-hal-psram.h"
#endif
namespace nspanel_ha_blueprint {
UtilitiesGroupValues *UtilitiesGroups = nullptr;
void resetUtilitiesGroups() {
// Dynamically allocate the UtilitiesGroups array in PSRAM
#ifdef USE_ESP_IDF
UtilitiesGroups = static_cast<UtilitiesGroupValues*>(heap_caps_malloc(8 * sizeof(UtilitiesGroupValues), MALLOC_CAP_SPIRAM));
#elif defined(USE_ARDUINO)
UtilitiesGroups = static_cast<UtilitiesGroupValues*>(ps_malloc(8 * sizeof(UtilitiesGroupValues)));
#endif
if (!UtilitiesGroups) UtilitiesGroups = new UtilitiesGroupValues[8]; // Fallback to internal SRAM if PSRAM is not available or not supported
if (!UtilitiesGroups) return; // Fail nicely if no memory is available
// Initialize UtilitiesGroups with default values
const UtilitiesGroupValues initialUtilitiesGroups[8] = {
{"grid", "\0", "\0", 0},
{"group01", "\0", "\0", 0},
{"group02", "\0", "\0", 0},
{"group03", "\0", "\0", 0},
{"group04", "\0", "\0", 0},
{"group05", "\0", "\0", 0},
{"group06", "\0", "\0", 0},
{"home", "\0", "\0", 0}
};
for (size_t i = 0; i < 8; ++i) {
std::strcpy(UtilitiesGroups[i].group_id, initialUtilitiesGroups[i].group_id);
std::strcpy(UtilitiesGroups[i].value1, initialUtilitiesGroups[i].value1);
std::strcpy(UtilitiesGroups[i].value2, initialUtilitiesGroups[i].value2);
UtilitiesGroups[i].direction = initialUtilitiesGroups[i].direction;
}
}
void cleanupUtilitiesGroups() {
if (UtilitiesGroups != nullptr) {
free(UtilitiesGroups); // Compatible with both heap_caps_malloc and ps_malloc
UtilitiesGroups = nullptr; // Prevent dangling pointers
}
}
uint8_t findUtilitiesGroupIndex(const char* group_id) {
int low = 0;
int high = 7; // Directly use the number of elements in UtilitiesGroups - 1
while (low <= high) {
int mid = low + (high - low) / 2;
int cmp = std::strcmp(UtilitiesGroups[mid].group_id, group_id);
if (cmp < 0) {
low = mid + 1;
} else if (cmp > 0) {
high = mid - 1;
} else {
return static_cast<uint8_t>(mid); // Found
}
}
return UINT8_MAX; // Not found
}
} // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,44 @@
// utilities.h
#pragma once
#include <cstdint>
#include <cstring> // For std::strcpy
#include <string>
namespace nspanel_ha_blueprint {
struct UtilitiesGroupValues {
char group_id[8]; // 7 characters + null terminator
char value1[11]; // 10 characters + null terminator
char value2[11]; // 10 characters + null terminator
int8_t direction;
};
extern UtilitiesGroupValues *UtilitiesGroups;
void resetUtilitiesGroups();
void cleanupUtilitiesGroups();
uint8_t findUtilitiesGroupIndex(const char* group_id);
/**
* Copies the contents of a std::string to a fixed-size char array, ensuring
* null termination. The destination array size is automatically deduced.
* Designed for fixed-size char arrays only.
*
* @param dest A reference to the destination char array.
* @param src The source std::string to copy.
*/
template <unsigned int N>
void copyStringToCharArray(char (&dest)[N], const std::string& src) {
// Ensure we do not exceed the buffer size, leaving space for the null terminator
size_t length = std::min(src.size(), N - 1);
// Copy the string data into the destination buffer
std::strncpy(dest, src.c_str(), length);
// Explicitly null-terminate the destination buffer
dest[length] = '\0';
}
} // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,20 @@
// versioning.cpp
#include "versioning.h"
#include <cstdio> // For sscanf
namespace nspanel_ha_blueprint {
bool compare_versions(const char* version1, const char* version2) {
int major1 = 0, minor1 = 0;
int major2 = 0, minor2 = 0;
// Parse the version strings into major and minor numbers
sscanf(version1, "%d.%d", &major1, &minor1);
sscanf(version2, "%d.%d", &major2, &minor2);
// Compare the parsed major and minor numbers
return (major1 == major2) && (minor1 == minor2);
}
} // namespace nspanel_ha_blueprint

View File

@@ -1,25 +1,19 @@
// versioning.h // versioning.h
#pragma once #pragma once
#include <cstdio> // For sscanf
namespace nspanel_ha_blueprint { namespace nspanel_ha_blueprint {
/** /**
* Compares two version strings by major and minor version numbers. * Compares two version strings by major and minor version numbers, assuming the version
* Assumes version strings are in the format "major.minor". * strings are formatted as "major.minor". This function parses both version strings and
* compares their major and minor components.
* *
* @param version1 First version string to compare. * @param version1 The first version string to compare, in "major.minor" format.
* @param version2 Second version string to compare. * @param version2 The second version string to compare, in "major.minor" format.
* @return true if the major and minor versions are equal, false otherwise. * @return True if both the major and minor versions of version1 and version2 are equal,
* false otherwise.
*/ */
inline bool compare_versions(const char* version1, const char* version2) { bool compare_versions(const char* version1, const char* version2);
int major1 = 0, minor1 = 0;
int major2 = 0, minor2 = 0;
sscanf(version1, "%d.%d", &major1, &minor1);
sscanf(version2, "%d.%d", &major2, &minor2);
return (major1 == major2) && (minor1 == minor2);
}
} // namespace nspanel_ha_blueprint } // namespace nspanel_ha_blueprint

View File

@@ -1,18 +0,0 @@
# __init__.py
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.core import coroutine_with_priority
CODEOWNERS = ["@edwardtfn"]
nspanel_ha_blueprint_upload_tft_ns = cg.esphome_ns.namespace('nspanel_ha_blueprint_upload_tft')
CONFIG_SCHEMA = cv.All(
cv.Schema({}),
)
@coroutine_with_priority(1.0)
async def to_code(config):
cg.add_define("USE_NSPANEL_HA_BLUEPRINT_UPLOAD_TFT")
cg.add_global(nspanel_ha_blueprint_upload_tft_ns.using)

View File

@@ -1,45 +0,0 @@
// upload_tft.h
#pragma once
#include <string>
namespace nspanel_ha_blueprint_upload_tft {
/**
* Constructs the TFT file URL based on branch, model, default URL, and base URL.
*
* @param branchInput The input branch version, which might contain special keywords like "beta" or "dev".
* @param model The model of the device, used to determine the specific TFT file name.
* @param defaultUrl The default URL to use if no specific file is associated with the model.
* @param baseUrl The base URL to which branch and file names are appended to construct the full URL.
* @return The fully constructed URL as a string.
*/
std::string construct_tft_url(const std::string& branch, const std::string& model,
const std::string& defaultUrl, const std::string& baseUrl) {
// Determine the branch based on the input
std::string relative_branch = branch;
if (branch.find("beta") != std::string::npos) relative_branch = "beta";
else if (branch.find("dev") != std::string::npos) relative_branch = "dev";
// Mapping model to the corresponding TFT file name
std::string file_name;
if (model == "NSPanel Blank") file_name = "nspanel_blank.tft";
else if (model == "NSPanel EU") file_name = "nspanel_eu.tft";
else if (model == "NSPanel US") file_name = "nspanel_us.tft";
else if (model == "NSPanel US Landscape") file_name = "nspanel_us_land.tft";
else if (model == "NSPanel EU (CJK languages)") file_name = "nspanel_CJK_eu.tft";
else if (model == "NSPanel US (CJK languages)") file_name = "nspanel_CJK_us.tft";
else if (model == "NSPanel US Landscape (CJK languages)") file_name = "nspanel_CJK_us_land.tft";
// Construct the URL based on the determined file name
std::string url;
if (file_name.empty()) {
url = defaultUrl; // Use the default URL if no specific file name is matched
} else {
url = baseUrl + relative_branch + "/hmi/" + file_name; // Construct the full URL
}
return url; // Return the constructed URL
}
} // namespace nspanel_ha_blueprint_upload_tft

View File

@@ -6,13 +6,14 @@
- [Version compatibility matrix](version_compatibility.md) - [Version compatibility matrix](version_compatibility.md)
## Common issues ## Common issues
- [TFT Upload](tft_upload.md) - [Panel startup issues](error_initializing.md)
- [Stuck on Initializing](error_initializing.md)
- [Compiling Errors](error_compiling.md) - [Compiling Errors](error_compiling.md)
- [TFT Upload](tft_upload.md)
## Advanced settings ## Advanced settings
- [Customization](customization.md) - [Customization](customization.md)
- [Add-on climate](addon_climate.md) - [Add-on Bluetooth Proxy](addon_bluetooth_proxy.md)
- [Add-on Climate](addon_climate.md)
- [Alarm Control Panel](alarm.md) - [Alarm Control Panel](alarm.md)
- [API](api.md) - [API](api.md)
- [Using Different Versions of This Project](different_version.md) - [Using Different Versions of This Project](different_version.md)

64
docs/addon_ble_tracker.md Normal file
View File

@@ -0,0 +1,64 @@
# Add-on: BLE Tracker
## Description
This add-on enables your NSPanel to use its internal Bluetooth module to track nearby Bluetooth Low Energy (BLE) devices
using the [ESPHome BLE Tracker component](https://esphome.io/components/esp32_ble_tracker.html).
> [!IMPORTANT]
> Configuring the BLE Tracker on your NSPanel is crucial for enabling device discovery and presence detection functionalities efficiently.
This component should be managed with careful consideration of ESP32's memory capabilities, especially when other Bluetooth components are used concurrently.
## Prerequisites
- The `esp-idf` framework is recommended for the [ESP32 Platform](customization.md#framework-esp-idf) to ensure optimal operation and compatibility when using BLE features.
The `arduino` framework is not advised as it may increase memory usage and impact the performance negatively.
> [!WARNING]
> Using the `arduino` framework can lead to high memory consumption which might interfere with the stability of BLE operations on the NSPanel.
It is crucial to use the `esp-idf` framework to avoid such issues.
## Configuration Steps
1. **Edit Your ESPHome YAML File**: Incorporate the BLE Tracker component into your NSPanel's configuration by adding the necessary entries under the `esp32_ble_tracker:` section as shown below:
```yaml
substitutions:
device_name: "YOUR_NSPANEL_NAME" # Set your NSPanel's device name
friendly_name: "Your Friendly Name" # Set a friendly display name
wifi_ssid: !secret wifi_ssid # Your Wi-Fi SSID
wifi_password: !secret wifi_password # Your Wi-Fi password
# Optional configurations (uncomment if needed)
## Add-on for specific tracked devices or automation triggers
# sensor:
# - platform: ble_rssi
# mac_address: MAC_ADDRESS_OF_DEVICE
# name: "BLE Device RSSI"
## If you wanna set non-standard parameters to your BLE tracker, just add like this:
# esp32_ble_tracker:
# scan_parameters:
# interval: 1100ms
# window: 1100ms
# active: true
# Package Configuration
packages:
remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main
refresh: 300s
files:
- nspanel_esphome.yaml # Basic NSPanel package
# Optional packages for advanced features and other add-ons
- esphome/nspanel_esphome_addon_ble_tracker.yaml # BLE Tracker add-on package
# - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
# - esphome/nspanel_esphome_addon_climate_cool.yaml
# - esphome/nspanel_esphome_addon_climate_heat.yaml
# - esphome/nspanel_esphome_addon_climate_dual.yaml
```
2. **Update Substitutions**: Customize `"YOUR_NSPANEL_NAME"` and `"Your Friendly Name"` to appropriate identifiers for your device and its Bluetooth functionality.
3. **Save and Upload**: After making the necessary changes, save your configuration file and upload it to your NSPanel via the ESPHome dashboard.
> [!NOTE]
> The first time this component is enabled for an ESP32, the code partition needs to be resized.
> Please flash the ESP32 via USB when adding this to your configuration. After that, you can use OTA updates again.
This configuration allows your NSPanel to efficiently manage Bluetooth connections, acting as a proxy for various BLE operations.

View File

@@ -0,0 +1,65 @@
# Add-on: Bluetooth Proxy
## Description
This add-on enables your NSPanel to function as a Bluetooth Low Energy (BLE) proxy utilizing its internal Bluetooth module
along with the [ESPHome Bluetooth Proxy component](https://esphome.io/components/bluetooth_proxy.html).
> [!IMPORTANT]
> It is crucial to configure the Bluetooth Proxy using this add-on for optimal memory management, which involves releasing the Bluetooth stack prior to any TFT updates.
### Prerequisites
- Ensure the `esp-idf` framework is utilized for the [ESP32 Platform](customization.md#framework-esp-idf) when enabling Bluetooth features.
Avoid switching to the `arduino` framework as it significantly increases memory usage, potentially causing installation failures on your panel.
> [!WARNING]
> The `arduino` framework, while compatible, should not be used for Bluetooth-intensive applications on the NSPanel due to its higher memory consumption.
### Configuration Steps
1. **Edit Your ESPHome YAML File**: Add the Bluetooth Proxy add-on to your configuration by including the `remote_package` entry under the `packages` section as illustrated below:
```yaml
substitutions:
device_name: "YOUR_NSPANEL_NAME" # Set your NSPanel's device name
friendly_name: "Your Friendly Name" # Set a friendly display name
wifi_ssid: !secret wifi_ssid # Your Wi-Fi SSID
wifi_password: !secret wifi_password # Your Wi-Fi password
# Optional configurations (uncomment if needed)
## Add-on for climate control
# heater_relay: "1" # Options: "1" or "2"
# Begin Customization Section
##### Customization - Start #####
## If you wanna set non-standard parameters to your Bluetooth proxy just add like this:
# esp32_ble_tracker:
# scan_parameters:
# interval: 1100ms
# window: 1100ms
# active: true
#
# bluetooth_proxy:
# active: true
##### Customization - End #####
# Package Configuration
packages:
remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main
refresh: 300s
files:
- nspanel_esphome.yaml # Basic NSPanel package
# Optional packages for advanced features and other add-ons
# - esphome/nspanel_esphome_addon_ble_tracker.yaml
- esphome/nspanel_esphome_addon_bluetooth_proxy.yaml # Bluetooth Proxy add-on package
# - esphome/nspanel_esphome_addon_climate_cool.yaml
# - esphome/nspanel_esphome_addon_climate_heat.yaml
# - esphome/nspanel_esphome_addon_climate_dual.yaml
```
2. **Update Substitutions**: Customize `"YOUR_NSPANEL_NAME"` and `"Your Friendly Name"` to appropriate identifiers for your device and its Bluetooth functionality.
3. **Save and Upload**: After making the necessary changes, save your configuration file and upload it to your NSPanel via the ESPHome dashboard.
> [!NOTE]
> The first time this component is enabled for an ESP32, the code partition needs to be resized.
> Please flash the ESP32 via USB when adding this to your configuration. After that, you can use OTA updates again.
This configuration allows your NSPanel to efficiently manage Bluetooth connections, acting as a proxy for various BLE operations.

View File

@@ -19,7 +19,11 @@ Don't use it for directly power your cooler/heater if exceeding the panel specif
## Installation ## Installation
You will need to add the reference to `addon_climate_heat`, `addon_climate_cool` or `addon_climate_dual` files on your ESPHome settings in the `package` section You will need to add the reference to `addon_climate_heat`, `addon_climate_cool` or `addon_climate_dual` files on your ESPHome settings in the `package` section
and after the `remote_package` (base code), as shown bellow (for `heat` in this example): and after the `remote_package` (base code), as shown below (for `heat` in this example):
> [!NOTE]
> Occasionally, ESPHome updates may result in the `entity_id` of embedded thermostats being appended with `_2`.
> If you experience this change, refer to this [forum post](https://community.home-assistant.io/t/esphome-devices-all-renamed-with-2-added/388146) on the Home Assistant Forum for guidance.
```yaml ```yaml
substitutions: substitutions:
@@ -42,14 +46,16 @@ packages:
remote_package: remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main ref: main
refresh: 300s
files: files:
- nspanel_esphome.yaml # Basic package - nspanel_esphome.yaml # Basic package
# Optional advanced and add-on configurations # Optional advanced and add-on configurations
# - esphome/nspanel_esphome_advanced.yaml # - esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_cool.yaml # - esphome/nspanel_esphome_addon_ble_tracker.yaml
- nspanel_esphome_addon_climate_heat.yaml # - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
# - nspanel_esphome_addon_climate_dual.yaml # - esphome/nspanel_esphome_addon_climate_cool.yaml
refresh: 300s - esphome/nspanel_esphome_addon_climate_heat.yaml
# - esphome/nspanel_esphome_addon_climate_dual.yaml
``` ```
## Configuration ## Configuration
@@ -81,9 +87,9 @@ heat_overrun|Optional|Number representing a temperature hysteresis in the select
- For more details on the keys, please take a look at [ESPHome Base Climate Configurations](https://esphome.io/components/climate/index.html#base-climate-configuration) - For more details on the keys, please take a look at [ESPHome Base Climate Configurations](https://esphome.io/components/climate/index.html#base-climate-configuration)
and [ESPHome Climate Thermostat - Additional actions behavior](https://esphome.io/components/climate/thermostat.html#additional-actions-behavior). and [ESPHome Climate Thermostat - Additional actions behavior](https://esphome.io/components/climate/thermostat.html#additional-actions-behavior).
### Examples ## Examples
#### Cooler ### Cooler
```yaml ```yaml
substitutions: substitutions:
@@ -112,17 +118,19 @@ packages:
remote_package: remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main ref: main
refresh: 300s
files: files:
- nspanel_esphome.yaml # Basic package - nspanel_esphome.yaml # Basic package
# Optional advanced and add-on configurations # Optional advanced and add-on configurations
# - esphome/nspanel_esphome_advanced.yaml # - esphome/nspanel_esphome_advanced.yaml
- nspanel_esphome_addon_climate_cool.yaml # - esphome/nspanel_esphome_addon_ble_tracker.yaml
# - nspanel_esphome_addon_climate_heat.yaml # - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
# - nspanel_esphome_addon_climate_dual.yaml - esphome/nspanel_esphome_addon_climate_cool.yaml
refresh: 300s # - esphome/nspanel_esphome_addon_climate_heat.yaml
# - esphome/nspanel_esphome_addon_climate_dual.yaml
``` ```
#### Heater ### Heater
```yaml ```yaml
substitutions: substitutions:
@@ -151,17 +159,20 @@ packages:
remote_package: remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main ref: main
refresh: 300s
files: files:
- nspanel_esphome.yaml # Basic package - nspanel_esphome.yaml # Basic package
# Optional advanced and add-on configurations # Optional advanced and add-on configurations
# - esphome/nspanel_esphome_advanced.yaml # - esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_cool.yaml # - esphome/nspanel_esphome_addon_ble_tracker.yaml
- nspanel_esphome_addon_climate_heat.yaml # - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
# - nspanel_esphome_addon_climate_dual.yaml # - esphome/nspanel_esphome_addon_climate_cool.yaml
refresh: 300s - esphome/nspanel_esphome_addon_climate_heat.yaml
# - esphome/nspanel_esphome_addon_climate_dual.yaml
``` ```
#### Dual
### Dual
```yaml ```yaml
substitutions: substitutions:
@@ -193,12 +204,52 @@ packages:
remote_package: remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main ref: main
refresh: 300s
files: files:
- nspanel_esphome.yaml # Basic package - nspanel_esphome.yaml # Basic package
# Optional advanced and add-on configurations # Optional advanced and add-on configurations
# - esphome/nspanel_esphome_advanced.yaml # - esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_cool.yaml # - esphome/nspanel_esphome_addon_ble_tracker.yaml
# - nspanel_esphome_addon_climate_heat.yaml # - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
- nspanel_esphome_addon_climate_dual.yaml # - esphome/nspanel_esphome_addon_climate_cool.yaml
refresh: 300s # - esphome/nspanel_esphome_addon_climate_heat.yaml
- esphome/nspanel_esphome_addon_climate_dual.yaml
``` ```
### Real Use Case Example: Water Underfloor Heating with NSPanel
The NSPanel works nicely as a replacement for existing water underfloor heating controllers, installed at eye level and often powered by 100-240VAC.
In my specific use case, the control valve is of the 'normally closed' type, meaning that an open relay indicates 'no heating.'
I have utilized relay #1 for this purpose. It's important to note that this setup does not act as a PID controller, but operates on a simple on-off mechanism.
The system initiates heating at a preset value below and turns it off at a value above the set point.
I have set these values to `0.1°C` below and `0.1°C` above the target temperature, respectively.
These adjustments have been effectively maintaining the desired temperature in all of our four rooms.
The thermostat's settings range from a minimum of `15°C` to a maximum of `22°C`, with a granularity of `0.1°C` for adjustments.
Furthermore, I have selected `18.3°C` as the default target temperature.
```yaml
##### addon-configuration #####
## addon_climate ##
heater_relay: "1" #Use relay 1
temp_min: "15"
temp_max: "22"
temp_step: "0.1"
cold_tolerance: "0.1"
hot_tolerance: "0.1"
##### CHANGE ME END #####
climate:
- id: !extend thermostat_embedded
visual:
temperature_step: ${temp_step}
preset:
- name: Home
default_target_temperature_low: 18.3
mode: "heat"
```
Please note that employing any filter to smooth the temperature readings, such as averaging, is discouraged if the relevant timescale exceeds 1min.
Such filtering methods can delay the response times of an already slow underfloor heating system.
Despite this, the temperature stability achieved is quite satisfactory, as illustrated in the graph below.
![Temperature vs Time](pics/addon_underfloor.png)
*On March 24th (around 9:20 PM) and March 25th (around 7:30AM) a window was opened, and all heaters were set to 'off.' for 30min*

View File

@@ -233,11 +233,11 @@ and provides a structured way to return to either the home page or a specific bu
**Usage:** **Usage:**
Ideal for interfaces requiring detailed entity information across various contexts. Ideal for interfaces requiring detailed entity information across various contexts.
By specifying the `entity_id` and `back_page`, users are offered a seamless navigation experience, By specifying the `entity` and `back_page`, users are offered a seamless navigation experience,
ensuring they can easily access detailed information and return to their initial navigation point within the interface. ensuring they can easily access detailed information and return to their initial navigation point within the interface.
**Parameters:** **Parameters:**
- `entity_id` (string): The unique identifier of the entity for which details are displayed. - `entity` (string): The unique identifier of the entity (`entity_id` in Home Assistant) for which details are displayed.
- `back_page` (string): The page identifier to return to after viewing entity details. - `back_page` (string): The page identifier to return to after viewing entity details.
Valid options are `home` for the home page or `buttonpage01` to `buttonpage04` for button pages. Valid options are `home` for the home page or `buttonpage01` to `buttonpage04` for button pages.
No other pages are supported to maintain navigation consistency. No other pages are supported to maintain navigation consistency.
@@ -246,7 +246,7 @@ No other pages are supported to maintain navigation consistency.
```yaml ```yaml
service: esphome.<your_panel_name>_entity_details_show service: esphome.<your_panel_name>_entity_details_show
data: data:
entity_id: "light.living_room" entity: "light.living_room"
back_page: "buttonpage01" back_page: "buttonpage01"
``` ```
> [!NOTE] > [!NOTE]
@@ -254,26 +254,27 @@ data:
> This setup provides a direct and user-friendly way to access and return from detailed entity information, enhancing the interface's usability. > This setup provides a direct and user-friendly way to access and return from detailed entity information, enhancing the interface's usability.
### Hardware Button State Indication Service: `hw_button_state` ### Hardware Button State Indication Service: `hw_button_state`
Updates the on-screen indication bars for the hardware buttons, reflecting the current state of the entities they control. This service dynamically updates the on-screen indication bars for the hardware buttons, reflecting the current state of the entities they control.
It's designed to provide immediate visual feedback, enhancing the user interface by showing the active/inactive state of the left and right hardware button indicators on the panel.
**Usage:** **Usage:**
This service updates the visual state (on/off) of the left and right hardware button indicators on the panel. Utilize this service to modify the visual state (on/off) of hardware button indicators on the panel, corresponding to the state of entities controlled by these buttons.
It's used to provide visual feedback corresponding to the state of the entities controlled by these hardware buttons. This allows for visual feedback that matches the operational state of the buttons.
**Parameters:** **Parameters:**
- `left` (bool): The state to set for the left button's indication bar. - `button_mask` (int): A bitwise identifier for buttons. Use `1` for the left button, `2` for the right button, and `3` for both buttons.
- `right` (bool): The state to set for the right button's indication bar. - `state` (bool): The state to apply to the button(s) indicated by `button_mask`. True for on (active), false for off (inactive).
**Home Assistant Example:** **Home Assistant Example:**
```yaml ```yaml
service: esphome.<your_panel_name>_hw_button_state service: esphome.<your_panel_name>_hw_button_state
data: data:
left: true # Turns the left button's indication bar on button_mask: 3 # Targets both the left (1) and right (2) buttons
right: false # Turns the right button's indication bar off state: true # Turns the indication bars on for both buttons
``` ```
> [!NOTE] > [!NOTE]
> Replace `<your_panel_name>` with your specific panel name as configured in Home Assistant. > Replace `<your_panel_name>` with your specific panel name as configured in Home Assistant.
> This service dynamically updates the hardware button state indications, enhancing the user interface by providing immediate visual feedback. > This service leverages a bitmask (`button_mask`) for flexible control over multiple hardware buttons simultaneously, offering a streamlined method for updating their visual states.
### Icon Service: `icon` ### Icon Service: `icon`
Updates a chip or custom button's icon, color, and visibility within Home Assistant. Updates a chip or custom button's icon, color, and visibility within Home Assistant.
@@ -403,11 +404,6 @@ It accommodates extensive customizations, impacting both visual appeal and funct
- `meridiem` (string[]): Array of strings for AM/PM labels, applicable if the time format includes meridiem. - `meridiem` (string[]): Array of strings for AM/PM labels, applicable if the time format includes meridiem.
- `chip_font` (int): Font Id for icons or chips displayed on the "Home" page. - `chip_font` (int): Font Id for icons or chips displayed on the "Home" page.
- `custom_buttons_font` (int): Font Id for custom button icons on the "Home" page. - `custom_buttons_font` (int): Font Id for custom button icons on the "Home" page.
- `notification_icon` (string):
Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
for the notification button.
- `notification_icon_color_normal` (int[]): RGB color array for the notification icon under normal conditions.
- `notification_icon_color_unread` (int[]): RGB color array for the notification icon when there are unread notifications.
- `qrcode` (bool): Flag indicating whether the QR code button is enabled. - `qrcode` (bool): Flag indicating whether the QR code button is enabled.
- `qrcode_icon` (string): - `qrcode_icon` (string):
Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
@@ -434,9 +430,6 @@ data:
meridiem: ["AM", "PM"] meridiem: ["AM", "PM"]
chip_font: 8 chip_font: 8
custom_buttons_font: 9 custom_buttons_font: 9
notification_icon: "\uE1ED" # Example for mdi:email
notification_icon_color_normal: [255, 255, 255] # White
notification_icon_color_unread: [255, 0, 0] # Red
qrcode: true qrcode: true
qrcode_icon: "\uE432" # Example for mdi:qrcode-scan qrcode_icon: "\uE432" # Example for mdi:qrcode-scan
qrcode_icon_color: [0, 255, 0] # Green qrcode_icon_color: [0, 255, 0] # Green
@@ -701,7 +694,7 @@ For example tones and further inspiration, you can visit examples of RTTTL songs
```yaml ```yaml
service: esphome.<your_panel_name>_rtttl_play service: esphome.<your_panel_name>_rtttl_play
data: data:
tone: "d=4,o=5,b=140:c,e,g,8p,c6,e6,g6,8p,c7,p" tone: "The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6"
``` ```
> [!NOTE] > [!NOTE]
> Replace `<your_panel_name>` with your specific panel name as configured in Home Assistant to ensure correct service execution. > Replace `<your_panel_name>` with your specific panel name as configured in Home Assistant to ensure correct service execution.

View File

@@ -19,7 +19,7 @@ For an easier overview, the menu items "Icon Color" and "Label Color" will not b
You will be presented with a list of all of your ESPHome ESP32 devices and you must select your panel from the list. You will be presented with a list of all of your ESPHome ESP32 devices and you must select your panel from the list.
This is technically the only required field, as basic functionality will be available when the Blueprint knows to which panel it have to send the settings. This is technically the only required field, as basic functionality will be available when the Blueprint knows to which panel it has to send the settings.
> [!NOTE] > [!NOTE]
> You cannot have more than one blueprint based automation per each panel > You cannot have more than one blueprint based automation per each panel
@@ -39,10 +39,9 @@ Select how you want to see the date displayed on your panel (Home page and weath
Select how you want to see the time displayed on your panel's Home page. Select how you want to see the time displayed on your panel's Home page.
### Delay to avoid synchronization problems ### Timezone
If the Wi-Fi signal is poor, you may have issues when loading some pages. Select the timezone for this panel. Default (nothing) sets the timezone of the machine the firmware was compiled on. Important to set for prebuilt firmware.
If this happens, try to increase this delay as that may help.
## Weather and Temperature ## Weather and Temperature
@@ -65,11 +64,11 @@ An indoor temperature sensor is not necessary.
Leave the field empty if you want to use the temperature sensor of the NSPanel. Leave the field empty if you want to use the temperature sensor of the NSPanel.
If the value of the sensor needs to be corrected, this can be done via the temperature correction for the NSPanel under HA Devices. If the value of the sensor needs to be corrected, this can be done via the temperature correction for the NSPanel under HA Devices.
## Home page - Sensor ## Home page - Entities States
### Sensor 01-03 - Entity (Optional) ### Home page - Entity 01-04 (Optional)
Up to three sensors can be displayed on the home screen. Up to four entities can be displayed on the home screen.
Select the corresponding HA entity. Select the corresponding HA entity.
## Home page - Chips ## Home page - Chips
@@ -90,22 +89,22 @@ The behavior of these buttons will depend on the entity's domain (light, media p
## Alarm Control Panel ## Alarm Control Panel
An alarm control panel entity can be controlled by your panel. An alarm control panel entity can be controlled by your panel.
When you assign the entity here, it's icon will be shown as a button on the Home page. When you assign the entity here, its icon will be shown as a button on the Home page.
## Climate ## Climate
### Climate to Control (Optional) ### Climate to Control (Optional)
Here you select the main climate entity controlled by your panel. Here you select the main climate entity controlled by your panel.
It's temperature will be used on the Home page and by clicking on that value you will be able to control the climate settings. Its temperature will be used on the Home page and by clicking on that value you will be able to control the climate settings.
You can optionally use your panel to control a climate system locally, using it's temperature sensor and relays. You can optionally use your panel to control a climate system locally, using its temperature sensor and relays.
You will find more details about this on the Add-on Climate docummentation. You will find more details about this on the Add-on Climate documentation.
If you are using the Add-on Climate, it will create a climate entity in your panel's device page. If you are using the climate add-on, it will create a climate entity in your panel's device page.
You still have to select that entity on this field in the blueprint settings to have it used as your main climate. You still have to select that entity on this field in the blueprint settings to have it used as your main climate.
Additional climate entities can be assigned to buttons and will be explained later in this documment. Additional climate entities can be assigned to buttons and will be explained later in this document.
On the blueprint settings, you will also find settings for sensors and custom buttons to be shown on all the climate pages. On the blueprint settings, you will also find settings for sensors and custom buttons to be shown on all the climate pages.
@@ -118,7 +117,7 @@ Activates the QR Code page and shows the QR Code button on the Home page.
### QR Code content (Optional) ### QR Code content (Optional)
String, which is shown as a QR Code on the NSPanel. String, which is shown as a QR Code on the NSPanel.
This can be a simple text, a URL or could also be used for a simplified login to the Wi-Fi. This can be a simple text, an URL or could also be used for a simplified login to the Wi-Fi.
Here is an example (simply change SSID and password to your credentials and either use "WPA" or "WEP"): Here is an example (simply change SSID and password to your credentials and either use "WPA" or "WEP"):
`WIFI:S:SSID;T:WPA/WEP;P:PASSWORD;;` `WIFI:S:SSID;T:WPA/WEP;P:PASSWORD;;`
@@ -138,6 +137,10 @@ For more details about these specifications, please visit the [WPA3™ Specifica
## Hardware Buttons ## Hardware Buttons
### Visibility Pages
Choose the pages where the bars, indicating the status of entities linked to hardware buttons, will be displayed.
### Activate Relay x local Fallback (Optional) ### Activate Relay x local Fallback (Optional)
Normally, the internal relays of the NSPanels are triggered via HA. Normally, the internal relays of the NSPanels are triggered via HA.
@@ -225,6 +228,21 @@ Additionally there is the possibility to choose an icon of your choice for the E
Of course there is also the possibility to enter a label for each of the 4 pages and the aligment for the values on the entities pages. Of course there is also the possibility to enter a label for each of the 4 pages and the aligment for the values on the entities pages.
## Advanced Settings
### System settings - Decimal Separator
Choose the decimal separator for displaying numbers.
### Delay to avoid synchronization problems
If the Wi-Fi signal is poor, you may have issues when loading some pages.
If this happens, try to increase this delay as that may help.
### Nextion TFT File Folder (Optional)
Specify the path to the folder containing the Nextion TFT file. This is to be used together with the option nextion_upload_tft on the "Update TFT Display - Model" option on the device's page.
## Example Screenshots ## Example Screenshots
![Blueprint 01](pics/ha_blueprint_01.png) ![Blueprint 01](pics/ha_blueprint_01.png)

View File

@@ -90,14 +90,16 @@ packages:
remote_package: remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main ref: main
refresh: 300s
files: files:
- nspanel_esphome.yaml # Basic package - nspanel_esphome.yaml # Basic package
# Optional advanced and add-on configurations # Optional advanced and add-on configurations
# - esphome/nspanel_esphome_advanced.yaml # - esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_cool.yaml # - esphome/nspanel_esphome_addon_ble_tracker.yaml
- nspanel_esphome_addon_climate_heat.yaml # - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
# - nspanel_esphome_addon_climate_dual.yaml # - esphome/nspanel_esphome_addon_climate_cool.yaml
refresh: 300s # - esphome/nspanel_esphome_addon_climate_heat.yaml
# - esphome/nspanel_esphome_addon_climate_dual.yaml
``` ```
## Memory Management ## Memory Management
@@ -225,6 +227,9 @@ api:
### Manual IP ### Manual IP
Set IP address manually. Set IP address manually.
> [!ATTENTION]
> At least one DNS server is required to enable TFT transfer direcly from GitHub, otherwise use `nextion_update_url`.
```yaml ```yaml
# Set IP address manually # Set IP address manually
wifi: wifi:
@@ -234,6 +239,8 @@ wifi:
static_ip: 192.168.0.123 static_ip: 192.168.0.123
gateway: 192.168.0.1 gateway: 192.168.0.1
subnet: 255.255.255.0 subnet: 255.255.255.0
dns1: 1.1.1.1 # At least one DNS server is required to enable TFT transfer direcly from GitHub, otherwise use `nextion_update_url`.
dns2: 8.8.8.8
``` ```
### Hidden Wi-Fi ### Hidden Wi-Fi
@@ -271,7 +278,6 @@ ESPHome takes it's time from Home Assistant, however you can configure it to use
time: time:
- id: !extend time_provider - id: !extend time_provider
platform: sntp platform: sntp
timezone: Europe/Stockholm
servers: servers:
- !secret mysntpserver - !secret mysntpserver
- europe.pool.ntp.org - europe.pool.ntp.org
@@ -288,7 +294,7 @@ binary_sensor:
id: display_state id: display_state
platform: template platform: template
lambda: |- lambda: |-
return (id(current_page).state != "screensaver"); return (current_page->state != "screensaver");
``` ```
You can easily invert the meaning to have a sensor for display sleeping: You can easily invert the meaning to have a sensor for display sleeping:
@@ -300,7 +306,7 @@ binary_sensor:
id: display_sleeping id: display_sleeping
platform: template platform: template
lambda: |- lambda: |-
return (id(current_page).state == "screensaver"); return (current_page->state == "screensaver");
``` ```
### Deep sleep ### Deep sleep
@@ -338,6 +344,7 @@ You can find more ideas around this on [#955](https://github.com/Blackymas/NSPan
### Enforce time zone ### Enforce time zone
Until v3.4 (including), the time was coming from Home Assistant with it's timezone, so the Blueprint was sending the info with no transformation, to the panel. Until v3.4 (including), the time was coming from Home Assistant with it's timezone, so the Blueprint was sending the info with no transformation, to the panel.
From v4.0, the time reference still coming from HA (or optionally from a time server), but is calculated in ESPHome, which will try to detect the timezone from the server. From v4.0, the time reference still coming from HA (or optionally from a time server), but is calculated in ESPHome, which will try to detect the timezone from the server.
From v4.3.3 or later, the time still calculated on ESPHome side, however, you can select the timezone on the Blueprint, making this customization obsolete.
If your system is not showing the time in the correct timezone, it's probabily ESPHome not succeeding on finding your time zone. If your system is not showing the time in the correct timezone, it's probabily ESPHome not succeeding on finding your time zone.
You can easily force a timezone by adding this to your ESPHome settings: You can easily force a timezone by adding this to your ESPHome settings:
@@ -373,7 +380,7 @@ button:
then: then:
- logger.log: Button Sleep pressed - logger.log: Button Sleep pressed
- lambda: |- - lambda: |-
if (id(current_page).state != "screensaver") id(disp1).goto_page("screensaver"); goto_page->execute("screensaver");
# Adds a button to wake-up the panel (similar to the existing service) # Adds a button to wake-up the panel (similar to the existing service)
- name: Wake-up - name: Wake-up
@@ -384,10 +391,10 @@ button:
then: then:
- logger.log: Button Wake-up pressed - logger.log: Button Wake-up pressed
- lambda: |- - lambda: |-
if (id(current_page).state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str()); if (current_page->state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str());
// id(timer_page).execute(id(wakeup_page_name).state.c_str()); // enable this if you want page timeout to be reset // timer_page->execute(); // enable this if you want page timeout to be reset
id(timer_sleep).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_sleep).state)); timer_sleep->execute();
id(timer_dim).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_dim).state)); timer_dim->execute();
``` ```
### Set display as a light ### Set display as a light
@@ -408,12 +415,12 @@ light:
- lambda: |- - lambda: |-
ESP_LOGD("light.display_light", "Turn-on"); ESP_LOGD("light.display_light", "Turn-on");
if (current_page->state == "screensaver") disp1->goto_page(wakeup_page_name->state.c_str()); if (current_page->state == "screensaver") disp1->goto_page(wakeup_page_name->state.c_str());
timer_reset_all->execute(wakeup_page_name->state.c_str()); timer_reset_all->execute();
on_turn_off: on_turn_off:
then: then:
- lambda: |- - lambda: |-
ESP_LOGD("light.display_light", "Turn-off"); ESP_LOGD("light.display_light", "Turn-off");
disp1->goto_page("screensaver"); goto_page->execute("screensaver");
output: output:
# Output required by `display_light` to send the commands to Nextion # Output required by `display_light` to send the commands to Nextion
@@ -432,12 +439,12 @@ script:
- id: !extend page_changed - id: !extend page_changed
then: then:
- lambda: |- - lambda: |-
ESP_LOGD("script.page_changed(custom)", "page: %s", page.c_str()); ESP_LOGD("script.page_changed(custom)", "page: %s", current_page->state.c_str());
ESP_LOGV("script.page_changed(custom)", "is_on(): %s", display_light->current_values.is_on() ? "True" : "False"); ESP_LOGV("script.page_changed(custom)", "is_on(): %s", display_light->current_values.is_on() ? "True" : "False");
if (page == "screensaver" and display_light->current_values.is_on()) { if (current_page->state == "screensaver" and display_light->current_values.is_on()) {
auto call = display_light->turn_off(); auto call = display_light->turn_off();
call.perform(); call.perform();
} else if (page != "screensaver" and (not display_light->current_values.is_on())) { } else if (current_page->state != "screensaver" and (not display_light->current_values.is_on())) {
auto call = display_light->turn_on(); auto call = display_light->turn_on();
call.perform(); call.perform();
} }
@@ -536,11 +543,7 @@ time:
### Frameworks ### Frameworks
> [!IMPORTANT] > [!IMPORTANT]
> When switching between frameworks, make sure to update the device with a serial cable as the partition table is different between the two frameworks > When switching between frameworks, make sure to update the device with a serial cable as the partition table is different between the two frameworks
as [OTA Update Component](https://esphome.io/components/ota) updates will not change the partition table. as [OTA Update Component](https://esphome.io/components/ota) updates will not change the partition table. While it will appear to work, the device will boot the old framework after a reset.
The `arduino` protocol still more popular and therefore more components are available, but as `esp-idf` is maintained by EspressIF and is kept updated,
more boards are supported and the memory management is better, making it ideal if you wanna customize your panel to support memory consumption functionalities,
like `bluetooth_proxy` or [Improv](https://www.improv-wifi.com/).
This project currently uses `esp-idf` as default framework. This project currently uses `esp-idf` as default framework.
You can overlap the settings with this customization. You can overlap the settings with this customization.
@@ -548,6 +551,13 @@ You can overlap the settings with this customization.
> [!NOTE] > [!NOTE]
> For more info about frameworks, please visit [ESPHome docs](https://esphome.io/components/esp32). > For more info about frameworks, please visit [ESPHome docs](https://esphome.io/components/esp32).
`esp-idf` is maintained by EspressIF and is kept updated,
more boards are supported and the memory management is better, making it ideal if you wanna customize your panel to support memory consumption functionalities,
like `bluetooth_proxy` or [Improv](https://www.improv-wifi.com/). Consequently, this project uses `esp-idf` as the default framework since `v4.3`.
However, the `arduino` protocol still very popular and, therefore, more components are available and the project allows to switch between the frameworks
by adding the following lines in your panel's yaml file.
#### Framework `arduino` #### Framework `arduino`
```yaml ```yaml
# Change framework to `arduino` # Change framework to `arduino`
@@ -558,98 +568,17 @@ esp32:
#### Framework `esp-idf` #### Framework `esp-idf`
```yaml ```yaml
# Change framework to `esp-idf` # Change framework to `esp-idf`
# (should not be required)
esp32: esp32:
framework: framework:
type: esp-idf type: esp-idf
``` ```
### Bluetooth proxy ### Bluetooth Proxy
<!-- markdownlint-disable MD028 --> Please refer to the "[Add-on: Bluetooth Proxy](addon_bluetooth_proxy.md)" guide.
> [!IMPORTANT]
> The [ESP32 Platform](#framework-esp-idf) component should be configured to use the `esp-idf` framework,
> as the `arduino` framework uses significantly more memory and performs poorly with the Bluetooth stack enabled.
> [!IMPORTANT]
> The Bluetooth stack significantly reduces device RAM.
> Enabling this with additional customizations/components may lead to crashes due to low memory.
> HTTPS connections might be erratic, and local TFT flashing could fail due to insufficient RAM.
>
> Solutions include:
> 1. Flash the device (remove Bluetooth components) while updating TFT.
> 2. Flash from a local (HTTP) source at a low baud rate (9600 or lower) to avoid memory crashes. This method is slower.
<!-- markdownlint-enable MD028 -->
```yaml
# Enable Bluetooth proxy
bluetooth_proxy:
id: ble_proxy
# Give an id for the BLE Tracker (which is part of BT proxy)
esp32_ble_tracker:
id: ble_tracker
# Modify upload tft engine to stop BLE scan while uploading
script:
- id: !extend upload_tft
then:
- lambda: |-
static const char *const TAG = "CUSTOM.script.upload_tft";
ble_tracker->dump_config();
ESP_LOGD(TAG, "Stopping BLE Tracker scan...");
ble_tracker->stop_scan();
ESP_LOGD(TAG, "Disabling BLE Tracker scan...");
ble_tracker->set_scan_active(false);
ESP_LOGD(TAG, "State: %s", id(ble_proxy)->has_active() ? "Active" : "Passive");
while (ble_proxy->get_bluetooth_connections_limit() != ble_proxy->get_bluetooth_connections_free()) {
ESP_LOGD(TAG, "Connections: %i of %i", int(ble_proxy->get_bluetooth_connections_limit() - ble_proxy->get_bluetooth_connections_free()), int(ble_proxy->get_bluetooth_connections_limit()));
if (id(ble_proxy)->has_active()) {
ESP_LOGD(TAG, "Setting passive mode...");
ble_proxy->set_active(false);
}
vTaskDelay(pdMS_TO_TICKS(1000));
App.feed_wdt();
}
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
wifi:
power_save_mode: LIGHT
```
### BLE Tracker ### BLE Tracker
<!-- markdownlint-disable MD028 --> Please refer to the "[Add-on: BLE Tracker Proxy](addon_ble_tracker.md)" guide.
> [!IMPORTANT]
> The [ESP32 Platform](#framework-esp-idf) component should be configured to use the `esp-idf` framework,
> as the `arduino` framework uses significantly more memory and performs poorly with the Bluetooth stack enabled.
> [!IMPORTANT]
> The Bluetooth stack significantly reduces device RAM.
> Enabling this with additional customizations/components may lead to crashes due to low memory.
> HTTPS connections might be erratic, and local TFT flashing could fail due to insufficient RAM.
>
> Solutions include:
> 1. Flash the device (remove Bluetooth components) while updating TFT.
> 2. Flash from a local (HTTP) source at a low baud rate (9600 or lower) to avoid memory crashes. This method is slower.
<!-- markdownlint-enable MD028 -->
```yaml
# Enable Bluetooth tracker
esp32_ble_tracker:
id: ble_tracker
# Modify upload tft engine to stop BLE tracker while uploading
script:
- id: !extend upload_tft
then:
- lambda: |-
static const char *const TAG = "CUSTOM.script.upload_tft";
ble_tracker->dump_config();
ESP_LOGI(TAG, "Stopping BLE Tracker scan...");
ble_tracker->stop_scan();
ESP_LOGI(TAG, "Disabling BLE Tracker scan...");
ble_tracker->set_scan_active(false);
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
wifi:
power_save_mode: LIGHT
```
### Logger via UART ### Logger via UART
@@ -737,11 +666,11 @@ switch:
lambda: |- lambda: |-
return (id(relay_settings) & nspanel_ha_blueprint::RelaySettings::Relay1_Local); return (id(relay_settings) & nspanel_ha_blueprint::RelaySettings::Relay1_Local);
turn_on_action: turn_on_action:
- lambda: nspanel_ha_blueprint::update_relay_setting(id(relay_settings), true, RelaySettings::Relay1_Local); - lambda: nspanel_ha_blueprint::update_bitwise_setting(id(relay_settings), true, RelaySettings::Relay1_Local);
on_turn_on: on_turn_on:
- logger.log: "Relay 1 Local turned On!" - logger.log: "Relay 1 Local turned On!"
turn_off_action: turn_off_action:
- lambda: nspanel_ha_blueprint::update_relay_setting(id(relay_settings), false, RelaySettings::Relay1_Local); - lambda: nspanel_ha_blueprint::update_bitwise_setting(id(relay_settings), false, RelaySettings::Relay1_Local);
on_turn_off: on_turn_off:
- logger.log: "Relay 1 Local turned Off!" - logger.log: "Relay 1 Local turned Off!"
- name: Relay 2 Local - name: Relay 2 Local
@@ -751,11 +680,11 @@ switch:
internal: false internal: false
lambda: return (id(relay_settings) & nspanel_ha_blueprint::RelaySettings::Relay2_Local); lambda: return (id(relay_settings) & nspanel_ha_blueprint::RelaySettings::Relay2_Local);
turn_on_action: turn_on_action:
- lambda: nspanel_ha_blueprint::update_relay_setting(id(relay_settings), true, RelaySettings::Relay2_Local); - lambda: nspanel_ha_blueprint::update_bitwise_setting(id(relay_settings), true, RelaySettings::Relay2_Local);
on_turn_on: on_turn_on:
- logger.log: "Relay 2 Local turned On!" - logger.log: "Relay 2 Local turned On!"
turn_off_action: turn_off_action:
- lambda: nspanel_ha_blueprint::update_relay_setting(id(relay_settings), false, RelaySettings::Relay2_Local); - lambda: nspanel_ha_blueprint::update_bitwise_setting(id(relay_settings), false, RelaySettings::Relay2_Local);
on_turn_off: on_turn_off:
- logger.log: "Relay 2 Local turned Off!" - logger.log: "Relay 2 Local turned Off!"
``` ```

View File

@@ -65,11 +65,11 @@ They're created for each new release, allowing easy access to different project
### For Nextion TFT Component ### For Nextion TFT Component
The instructions to upload TFT will vary depending on the version you are installing and the framework you are using. The instructions to upload TFT will vary depending on the version you are installing and the framework you are using.
#### v4.2 or later (ESP-IDF) or v4.2.5 or later (Arduino) #### v4.2 or later (if you are using ESP-IDF) or v4.2.5 or later (if you are using Arduino)
1. Go to your device's page under **Settings** > **Devices & Services** > **ESPHome**. 1. Go to your device's page under **Settings** > **Devices & Services** > **ESPHome**.
2. On the **Configuration** group, press **Update TFT display** and wait for the upload to complete. The system will automatically find the right TFT file for the ESPHome version you are running. 2. On the **Configuration** group, press **Update TFT display** and wait for the upload to complete. The system will automatically find the right TFT file for the ESPHome version you are running.
#### v4.1 or earlier, or v4.2.4 or earlier for Arduino framework #### v4.1 or earlier (in either case) or v4.2.4 or earlier (if you are using Arduino)
1. On the GitHub repository, click on your chosen version name on the [NSPanel_HA_Blueprint Tags](https://github.com/Blackymas/NSPanel_HA_Blueprint/tags) list, then select the tab **Code**. 1. On the GitHub repository, click on your chosen version name on the [NSPanel_HA_Blueprint Tags](https://github.com/Blackymas/NSPanel_HA_Blueprint/tags) list, then select the tab **Code**.
2. Double-check that the correct version is shown below the repository name: 2. Double-check that the correct version is shown below the repository name:
@@ -83,12 +83,12 @@ The instructions to upload TFT will vary depending on the version you are instal
### For Blueprint Component ### For Blueprint Component
1. Use your preferred code editor to edit the blueprint file under `/homeassistant/blueprints/automation/Blackymas/nspanel_blueprint.yaml`. 1. Use your preferred code editor to edit the blueprint file under `/homeassistant/blueprints/automation/Blackymas/nspanel_blueprint.yaml`.
2. In the `source_url` key, change the URL replacing `main` by the version you want to install. 2. Go to the GitHub repository and select the [branch (`main`, `beta` or `dev`)](https://github.com/Blackymas/NSPanel_HA_Blueprint/branches)
3. Go to **Developer Tools**, select the tab **YAML** and click the button to reload **AUTOMATIONS**. or the [tag](https://github.com/Blackymas/NSPanel_HA_Blueprint/tags) (for previous versions) you want to use.
4. Go to the [Blueprints dashboard](https://my.home-assistant.io/redirect/blueprints/) (under **Settings** > **Automations & Scenes**, then select tab **Blueprints**). 3. Find the file `nspanel_blueprint.yaml` in the root of the branch/tag, then click on it to open the file content visualization.
5. Find the Blueprint named **NSPanel Configuration** and click on the 3-dot menu related to that. 4. Click the button "**Copy raw file**" in the top right area of the code box. This will copy the entire code to the clipboard.
6. Click **Re-import blueprint**. 5. Go back to your code editor in Home Assistant and replace the entire old code by the one in your clipboard (typically CTRL+A & CTRL+V).
7. Go back to **Developer Tools**, select the tab **YAML** and click the button to reload **AUTOMATIONS**. 6. Go to **Developer Tools**, select the tab **YAML** and click the button to reload **AUTOMATIONS**.
## Additional Notes ## Additional Notes
- Please note that the images provided in this guide might become outdated as the project evolves. - Please note that the images provided in this guide might become outdated as the project evolves.

View File

@@ -1,17 +1,23 @@
# Compiling Errors Guide # Compiling Errors Guide
The most common cases for compiling errors are related to build files needing to be cleaned up and to lack of resourced on your ESPHome comoiler host. The most common cases for compiling errors are related to build files needing to be cleaned up and the lack of resources on your ESPHome compiler host.
These are our suggestions for both cases: These are our suggestions for both cases:
## Clean-up build files ## Clean-up build files
Go to your ESPHome Dashboard, click the 3-dot meny related to your device and then "**Clean Build Files**": Go to your ESPHome Dashboard, click the 3-dot menu related to your device and then "**Clean Build Files**":
![image](https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/dev/docs/pics/esphome_dashboard_clean_build_files.png) ![image](https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/dev/docs/pics/esphome_dashboard_clean_build_files.png)
## Limited resources on ESPHome compiler host ## Limited resources on ESPHome compiler host
### Free Up Server Resources ### Free Up Server Resources
1. Add the following to your device's YAML to reduce resource usage (this may slow down the compilation process):
1. First, please check the available memory of the ESPHome compiler host. 4GB of memory are recommended if you are installing ESPHome as a Home Assistant add-on.
Therefore, a RasPi 4 with 4GB RAM is the minimum if you are using a Raspberry Pi.
A manual installation requires at least 2GB of memory and 500MB of swap space or 3GB of memory.
With less memory the compiler will crash!
2. Add the following to your device's YAML to reduce resource usage (this may slow down the compilation process):
```yaml ```yaml
# Limit the amount of resources used for compiling # Limit the amount of resources used for compiling
@@ -23,15 +29,15 @@ Go to your ESPHome Dashboard, click the 3-dot meny related to your device and th
> Place this in a dedicated customization section in your YAML for easier maintenance, > Place this in a dedicated customization section in your YAML for easier maintenance,
similar to [this example](https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/customization.md#instructions). similar to [this example](https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/customization.md#instructions).
2. Restart your host system, not just Home Assistant. Use the advanced options to **Reboot system**, which also restarts add-ons and can free up memory. 3. Restart your host system, not just Home Assistant. Use the advanced options to **Reboot system**, which also restarts add-ons and can free up memory.
3. Temporarily stop non-essential add-ons in Home Assistant, especially resource-intensive ones like Studio Code Server. 4. Temporarily stop non-essential add-ons in Home Assistant, especially resource-intensive ones like Studio Code Server.
4. [Clean up build files](#clean-up-build-files) 5. [Clean up build files](#clean-up-build-files)
5. Try compiling again. 6. Try compiling again.
6. After completion, restart your host system to reactivate the stopped add-ons. 7. After completion, restart your host system to reactivate the stopped add-ons.
### Compile Using Your Computer ### Compile Using Your Computer
1. Install ESPHome on your computer (Windows, Mac, or Linux) following this guide: [Installing ESPHome Manually](https://esphome.io/guides/installing_esphome.html). 1. Install ESPHome on your computer (Windows, Mac, or Linux) following this guide: [Installing ESPHome Manually](https://esphome.io/guides/installing_esphome.html).

View File

@@ -1,11 +1,11 @@
# Panel stuck on Boot page # Panel startup issues
When your panel starts, a number of different things needs to be set and the ESPHome must establish connection to the Nextion display used by your panel When your panel starts, a number of different things needs to be set and the ESPHome must establish connection to the Nextion display used by your panel
and also to your Home Assistant, which will provide the propper settings required by your panel. and also to your Home Assistant, which will provide the proper settings required by your panel.
If everything goes right, the boot page will be shown for just a few seconds, then the wake-up page will be shown. If everything goes right, the boot page will be shown for just a few seconds, then the wake-up page will be shown.
If something happens during this process, your panel may get stuck on this page. If something happens during this process, your panel may get stuck on this page.
In many cases, restarting your panel can resolve the issue, but if after a reboot it still showing the boot page, this guide may help you. In many cases, restarting your panel can resolve the issue, but if it is still showing the boot page after a reboot, this guide may help you.
Understanding what is shown on the boot page can be useful to find the cause of the problem or when you are looking for help. Understanding what is shown on the boot page can be useful to find the cause of the problem or when you are looking for help.
@@ -13,11 +13,11 @@ Understanding what is shown on the boot page can be useful to find the cause of
Your boot page probably looks like this: Your boot page probably looks like this:
**Before ESPHome is connected:** **Before Home Assistant/ESPHome is connected:**
![Boot page Initializing](pics/eu_boot_initializing.png) ![Boot page Initializing](pics/eu_boot_initializing.png)
**When ESPHome is connected:** **When Home Assistant/ESPHome is connected:**
![Boot page with IP](pics/eu_boot_with_ip_address.png) ![Boot page with IP](pics/eu_boot_with_ip_address.png)
@@ -49,7 +49,7 @@ If some of those versions are not shown, you can have an indication of where a p
- **TFT** version will always be shown, as that is part of the display itself. - **TFT** version will always be shown, as that is part of the display itself.
- **ESPHome** version will be shown as soon the ESPHome establishes the communication with the display. - **ESPHome** version will be shown as soon the ESPHome establishes the communication with the display.
- **Blueprint** version requires both ESPHome and Blueprint to establish communication to be shown. - **Blueprint** version requires both ESPHome and the Blueprint (in Home Assistant) to establish communication to be shown.
In normal situation, all the versions should be displayed and should be the same. Different patch versions are supported. In normal situation, all the versions should be displayed and should be the same. Different patch versions are supported.
@@ -72,7 +72,13 @@ You can use this button to force a reboot of your panel. This button is availabl
### Blueprint is not detected ### Blueprint is not detected
**Symptoms:** The ESPHome version is shown, but not the blueprint version. **Symptoms:** The ESPHome version is shown, but not the blueprint version or, the Home page is shown, but the Home Assistant icon is shown in red and typically the functionality is very limited:
![Blueprint icon on red](pics/us_home_blueprint_icon_red.png)
In some cases you can also see duplicate entities on the device's page in Home Assistant, and some of these entities may have the `entity_id` ending with `_2`, `_3`, etc.
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/9100568/51a5fce4-89cc-43e8-9d92-1f83d7ea2ee5)
<!-- markdownlint-disable MD013 MD033 --> <!-- markdownlint-disable MD013 MD033 -->
| Possible causes | Suggestions | | Possible causes | Suggestions |
@@ -80,7 +86,7 @@ You can use this button to force a reboot of your panel. This button is availabl
| You may have an older version of the blueprint installed or the blueprint isn't installed into your Home Assistant. | [Install the blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml).<br>[Update the blueprint](howto.md#update-blueprint).| | You may have an older version of the blueprint installed or the blueprint isn't installed into your Home Assistant. | [Install the blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml).<br>[Update the blueprint](howto.md#update-blueprint).|
| You don't have an automation created using the blueprint. | On Home Assistant, go to **Settings** --> **Automations & Scenes** --> **Blueprints** --> **NSPanel Configuration** --> **CREATE AUTOMATION** and follow the [instructions to setup your automation](blueprint.md).<br>**Attention!!** You need one automation per panel, if you have more than one panel set. | | You don't have an automation created using the blueprint. | On Home Assistant, go to **Settings** --> **Automations & Scenes** --> **Blueprints** --> **NSPanel Configuration** --> **CREATE AUTOMATION** and follow the [instructions to setup your automation](blueprint.md).<br>**Attention!!** You need one automation per panel, if you have more than one panel set. |
| Your panel is not selected in the automation. | Open the automation related to your panel and make sure the right device is set on the **NSPanel device** field. | | Your panel is not selected in the automation. | Open the automation related to your panel and make sure the right device is set on the **NSPanel device** field. |
| Reconnect the Panel's device to Home Assistant. | 1. Go to **Settings** --> **Devices & Services** --> **ESPHome**<br>2. Delete the device<br>3. Restart Home Assistant host<br>4. Go back to **Settings** --> **Devices & Services**<br>5. Click **Add integration**<br>6. Select **ESPHome**<br>7. Enter your panel's hostname or IP address.| | Your panel's connection to Home Assistant may have issues.<br>This could be from an invalid entity Id (e.g. ending with `_2`), or some service missing registration. | Reconnect the Panel's device to Home Assistant:<br>1. Go to **Settings** --> **Devices & Services** --> **ESPHome**<br>2. Delete the device<br>3. Restart Home Assistant host<br>4. Go back to **Settings** --> **Devices & Services**<br>5. Click **Add integration**<br>6. Select **ESPHome**<br>7. Enter your panel's hostname or IP address.|
<!-- markdownlint-enable MD013 MD033 --> <!-- markdownlint-enable MD013 MD033 -->
## Additional Tips and Resources ## Additional Tips and Resources
@@ -88,8 +94,8 @@ You can use this button to force a reboot of your panel. This button is availabl
After troubleshooting, if issues persist, consult the [Issues](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues) and feel free to create a new one asking for more personalized assistance. After troubleshooting, if issues persist, consult the [Issues](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues) and feel free to create a new one asking for more personalized assistance.
Please share as much info as possible, like: Please share as much info as possible, like:
1. Describing (or a picture of) what is in your screen 1. Describing (or a picture of) what is on your screen
2. Are updating from a previous version of this same project, or coming from another NSPanel customization (which one?) or customizing for the first time a panel with original Sonoff settings? 2. Are you updating from a previous version of this project, or you coming from another NSPanel customization (which one?) or are you customizing for the first time a panel with the original Sonoff settings?
3. Please share the ESPHome logs from when your panel starts to the moment the upload fails. 3. Please share the ESPHome logs from when your panel starts to the moment the upload fails.
4. Describe what you have already tried. 4. Describe what you have already tried.

View File

@@ -12,15 +12,15 @@ You can write a short message with your findings, and we'll include it here.
Below are the topics covered in this document, each with relevant tips and solutions. Below are the topics covered in this document, each with relevant tips and solutions.
1. [How do I create "Issues" when I have a problem ](#how-to-create-issues-when-i-have-a-problem) 1. [How do I create "Issues" when I have a problem ](#how-to-create-issues-when-i-have-a-problem)
1. [Update Blueprint](#update-blueprint) 2. [Update Blueprint](#update-blueprint)
1. [Update ESPHome](#update-esphome) 3. [Update ESPHome](#update-esphome)
1. [Update TFT](#update-tft) 4. [Update TFT](#update-tft)
1. [Notification via HA](#notification-via-ha) 5. [Notification via HA](#notification-via-ha)
1. [Climate control with relays](#climate-control-with-relays) 6. [Climate control with relays](#climate-control-with-relays)
1. [Call a page directly](#call-a-page-directly) 7. [Call a page directly](#call-a-page-directly)
1. [Play RTTTL Sound](#play-rtttl-sound) 8. [Play RTTTL Sound](#play-rtttl-sound)
1. [Start automations via Input_Boolean](#start-automations-via-input_boolean) 9. [Start automations via Input_Boolean](#start-automations-via-input_boolean)
1. [Updating Wi-Fi and OTA passwords in ESPHome with this project](#updating-wi-fi-settings-and-ota-passwords-in-esphome-with-this-project) 10. [Updating Wi-Fi and OTA passwords in ESPHome with this project](#updating-wi-fi-settings-and-ota-passwords-in-esphome-with-this-project)
## How to create "issues" when I have a problem ## How to create "issues" when I have a problem
@@ -138,13 +138,13 @@ The new firmware will be built and then flashed to your panel, which will restar
4. The display starts the update process and then restarts. 4. The display starts the update process and then restarts.
## Notification via HA ## Notification via HA
To show a notification on the NSPAnel, the following service call can be used: To show a notification on the NSPanel, the following service call can be used:
```yaml ```yaml
service: esphome.panelname_notification_show service: esphome.panelname_notification_show
data: data:
label: Example text label: Example label text
message: Example text message: Example message text
``` ```
> [!NOTE] > [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#notification-show-service-notification_show). > For more details about this service call, please refer to our [API documentation](api.md#notification-show-service-notification_show).
@@ -177,7 +177,9 @@ trigger:
## Climate control with Relays ## Climate control with Relays
> [!ATTENTION] > [!ATTENTION]
> Although these instructions are still valid, since v4.0 there is a better way to setup a climate control using the panel's relays an the [add-on climate](addon_climate.md). > Although these instructions are still valid, since v4.0 there is a better way to setup a climate control using the panel's relays an the [add-on climate](addon_climate.md),
> which will continue to work even if Home Assistant and/or WiFi are not available.
> You probably only want to use this approach, if you are not using the build-in thermometer.
In order to use the NSPanel to control a radiator or underfloor heating, at least one Generic Thermostat must be created in the HA. In order to use the NSPanel to control a radiator or underfloor heating, at least one Generic Thermostat must be created in the HA.
More information can be found here: https://www.home-assistant.io/integrations/generic_thermostat/ More information can be found here: https://www.home-assistant.io/integrations/generic_thermostat/
@@ -292,7 +294,7 @@ By repeatedly calling this service whenever motion is detected, the panel can be
HA can send a RTTTL to the NSPanel, custom melodies are possible. HA can send a RTTTL to the NSPanel, custom melodies are possible.
The use this function, the following service is called: ***nspanel_play_rtttl*** The use this function, the following service is called: `rtttl_play`
You can find many RTTTL strings on the web, the important thing is that they must start with the name and then a colon. You can find many RTTTL strings on the web, the important thing is that they must start with the name and then a colon.
@@ -302,7 +304,7 @@ Here is an example:
The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6 The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6
``` ```
![image-20230320222454441](pics/image-20230320222454441.png) ![HA - Developer Tools - Services - RTTTL Play](pics/ha_developer_tools_services_rtttl_play.png)
More information: https://esphome.io/components/rtttl.html#common-beeps More information: https://esphome.io/components/rtttl.html#common-beeps

View File

@@ -80,59 +80,74 @@ Detailed steps for a manual installation can be found in the guide [Installing E
Follow these steps to add a new device in the ESPHome Dashboard: Follow these steps to add a new device in the ESPHome Dashboard:
1. Click the **+ New Device** button. 1. Click the **+ New Device** button.
2. Enter a unique name for your new ESPHome device. 2. Enter a unique name for your new ESPHome device.
![New Device Name](pics/ha_esphome_dashboard_new_device_01.png) ![New Device Name](pics/ha_esphome_dashboard_new_device_01.png)
3. Select **ESP32** as the device type. 3. Select **ESP32** as the device type.
![Select ESP32](pics/ha_esphome_dashboard_new_device_02.png) ![Select ESP32](pics/ha_esphome_dashboard_new_device_02.png)
4. Click **Skip** as we're not starting the installation yet. 4. Click **Skip** as we're not starting the installation yet.
![Skip Installation](pics/ha_esphome_dashboard_new_device_03.png) ![Skip Installation](pics/ha_esphome_dashboard_new_device_03.png)
5. Locate your newly created device in the ESPHome Dashboard and click **Edit**. 5. Locate your newly created device in the ESPHome Dashboard and click **Edit**.
![Edit Device](pics/ha_esphome_dashboard_new_device_04.png) ![Edit Device](pics/ha_esphome_dashboard_new_device_04.png)
6. (Optional) For enhanced security, consider copying the `api:` section to a temporary file.
6. (Optional) For enhanced security, consider copying the `api:` entry to your panel's yaml file while adding the key itself to the secrets file
![API Section](pics/ha_esphome_dashboard_new_device_05.png) ![API Section](pics/ha_esphome_dashboard_new_device_05.png)
which can be edited clicking `secrets` at the top right of your ESPHome menu.
![API Section](pics/ha_esphome_dashboard_new_device_05c.png)
7. Note the device name at the beginning of the file under `esphome`. 7. Note the device name at the beginning of the file under `esphome`.
![Device Name](pics/ha_esphome_dashboard_new_device_05b.png) ![Device Name](pics/ha_esphome_dashboard_new_device_05b.png)
8. Clear all existing content and paste the following YAML configuration: 8. Clear all existing content and paste the following YAML configuration:
```yaml ```yaml
substitutions: substitutions:
# Settings - Editable values # Settings - Editable values
device_name: "YOUR_NSPANEL_NAME" device_name: "YOUR_NSPANEL_NAME"
friendly_name: "Your panel's friendly name" friendly_name: "Your panel's friendly name"
wifi_ssid: !secret wifi_ssid wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password wifi_password: !secret wifi_password
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft" # Optional nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft" # Optional
# Add-on configuration (if needed) # Add-on configuration (if needed)
# heater_relay: "1" # Possible values: "1" or "2" # heater_relay: "1" # Possible values: "1" or "2"
# Customization area # Customization area
##### My customization - Start ##### ##### My customization - Start #####
##### My customization - End ##### ##### My customization - End #####
# Core and optional configurations # Core and optional configurations
packages: packages:
remote_package: remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main ref: main
files: refresh: 300s
- nspanel_esphome.yaml # Basic package files:
# Optional advanced and add-on configurations - nspanel_esphome.yaml # Basic package
# - esphome/nspanel_esphome_advanced.yaml # Optional advanced and add-on configurations
# - nspanel_esphome_addon_climate_cool.yaml # - esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_heat.yaml # - esphome/nspanel_esphome_addon_ble_tracker.yaml
# - nspanel_esphome_addon_climate_dual.yaml # - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
refresh: 300s # - esphome/nspanel_esphome_addon_climate_cool.yaml
``` - esphome/nspanel_esphome_addon_climate_heat.yaml
# - esphome/nspanel_esphome_addon_climate_dual.yaml
```
![YAML Code](pics/ha_esphome_dashboard_new_device_06.png) ![YAML Code](pics/ha_esphome_dashboard_new_device_06.png)
9. Modify the **Settings** section with your device name (as noted in step 7) and Wi-Fi details. 9. Modify the **Settings** section with your device name (as noted in step 7) and Wi-Fi details.
![Edit Settings](pics/ha_esphome_dashboard_new_device_06b.png) ![Edit Settings](pics/ha_esphome_dashboard_new_device_06b.png)
10. For Wi-Fi credentials, use `!secret` for added security or input them directly. 10. For Wi-Fi credentials, use `!secret` for added security or input them directly.
Learn about secrets in ESPHome: [Home Assistant Secrets in ESPHome](https://www.youtube.com/watch?v=eW4vKDeHh7Y). Learn about secrets in ESPHome: [Home Assistant Secrets in ESPHome](https://www.youtube.com/watch?v=eW4vKDeHh7Y).
11. (Optional) Adjust `nextion_update_url` to the URL of a TFT file hosted on an HTTP or HTTPS server, 11. (Optional) Adjust `nextion_update_url` to the URL of a TFT file hosted on an HTTP or HTTPS server,
ensuring that the file is accessible to the NSPanel. ensuring that the file is accessible to the NSPanel.
This URL will be used by ESPHome to download the TFT file to your panel. This URL will be used by ESPHome to download the TFT file to your panel.
For more information on hosting the TFT file and setting up the URL, see the [Upload TFT](#upload-tft) section. For more information on hosting the TFT file and setting up the URL, see the [Upload TFT](#upload-tft) section.
> [!CAUTION] > [!CAUTION]
> **Prefer HTTP over HTTPS for File Transfer** > **Prefer HTTP over HTTPS for File Transfer**
> While you might encounter examples using HTTPS in URLs for file transfer, > While you might encounter examples using HTTPS in URLs for file transfer,
@@ -141,7 +156,6 @@ Learn about secrets in ESPHome: [Home Assistant Secrets in ESPHome](https://www.
> often leading to issues with file transfers. > often leading to issues with file transfers.
12. (Optional) Enhance security with API encryption by adding the copied key from step 6 to the **My Customization** area. 12. (Optional) Enhance security with API encryption by adding the copied key from step 6 to the **My Customization** area.
> [!TIP] > [!TIP]
> You can get a new randomly generated valid key from [ESPHome Native API Component](https://esphome.io/components/api.html#configuration-variables) page. > You can get a new randomly generated valid key from [ESPHome Native API Component](https://esphome.io/components/api.html#configuration-variables) page.

View File

@@ -12,7 +12,7 @@ If you are coming from there, you have to chose one of the 3 options:
### Common steps ### Common steps
1. Download the file [`nspanel_blank.tft`](../nspanel_blank.tft) from our GitHub repository. 1. Download the file [`nspanel_blank.tft`](../hmi/nspanel_blank.tft) from our GitHub repository.
2. Upload the same file (`nspanel_blank.tft`) to the folder _**"www"**_ in your Home Assistant 2. Upload the same file (`nspanel_blank.tft`) to the folder _**"www"**_ in your Home Assistant
3. Double check if the file is available by trying to download it using your local url (typically [`http://homeassistant.local:8123/local/nspanel_blank.tft`](http://homeassistant.local:8123/local/nspanel_blank.tft)). 3. Double check if the file is available by trying to download it using your local url (typically [`http://homeassistant.local:8123/local/nspanel_blank.tft`](http://homeassistant.local:8123/local/nspanel_blank.tft)).

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -7,16 +7,13 @@
> See [Common Issues | TFT Upload when NSPanel Lovelace UI has been installed](howto.md) > See [Common Issues | TFT Upload when NSPanel Lovelace UI has been installed](howto.md)
## Common Issues and Troubleshooting ## Common Issues and Troubleshooting
The following is a list of common issues affecting the TFT upload, along with suggested solutions. The following is a list of common issues affecting the TFT upload, along with suggested solutions.
These issues are not specific to the NSPanel HA Blueprint project but are common to Nextion displays and ESPHome. These issues are not specific to the NSPanel HA Blueprint project but are common to Nextion displays and ESPHome.
### Resolving "System data ERROR!" on Display ### Resolving "System data ERROR!" on Display
![System Data ERROR](pics/us_system_data_error_upside_down.jpg) ![System Data ERROR](pics/us_system_data_error_upside_down.jpg)
#### Don't Panic! #### Don't Panic!
The "System data ERROR!" message, sometimes displayed upside-down, appears when a TFT upload is incomplete. The "System data ERROR!" message, sometimes displayed upside-down, appears when a TFT upload is incomplete.
While it may seem alarming, this message simply indicates that the TFT file on the display is invalid. While it may seem alarming, this message simply indicates that the TFT file on the display is invalid.
A successful TFT upload will resolve this issue. A successful TFT upload will resolve this issue.
@@ -39,8 +36,11 @@ For troubleshooting, refer to the following sections:
> or use a pin to press the hardware restart button in a small hole behind the device. > or use a pin to press the hardware restart button in a small hole behind the device.
> ![Image](pics/eu_reset_button.png) > ![Image](pics/eu_reset_button.png)
### Using the `nspanel_blank.tft` File to Assist ### If using manual IP, make sure you have a DNS server configured
At least one DNS server is required to enable TFT transfer direcly from GitHub, otherwise use `nextion_update_url`.
If you are setting up a manual IP as a customization, please remember to add a valid DNS server for your panel.
### Using the `nspanel_blank.tft` File to Assist
Many TFT upload problems are associated with the Nextion Active Reparse Mode, Many TFT upload problems are associated with the Nextion Active Reparse Mode,
which is used in some implementations like the original Sonoff firmware or other popular custom firmwares. which is used in some implementations like the original Sonoff firmware or other popular custom firmwares.
Installing any TFT file from this project will disable this mode. Installing any TFT file from this project will disable this mode.
@@ -59,7 +59,6 @@ It should be automatically detected as a new integration, but if this is not hap
click the **Add integration** button, select **ESPHome**, add the device hostname or IP address and follow the steps required. click the **Add integration** button, select **ESPHome**, add the device hostname or IP address and follow the steps required.
### Wait a Bit Before Starting the TFT Upload ### Wait a Bit Before Starting the TFT Upload
- **Issue**: The Nextion display might not connect to ESPHome immediately after boot. - **Issue**: The Nextion display might not connect to ESPHome immediately after boot.
- **Solution**: Wait up to 2 minutes for the boot script to complete. - **Solution**: Wait up to 2 minutes for the boot script to complete.
If you are already using a TFT from this project, the display of ESPHome version and the framework used (`arduino` vs `esp-idf`) is an indication that a communication was established. If you are already using a TFT from this project, the display of ESPHome version and the framework used (`arduino` vs `esp-idf`) is an indication that a communication was established.
@@ -68,7 +67,6 @@ If you haven't installed any TFT yet, look for Nextion related messages on ESPHo
Observe any changes in the display or logs indicators to ensure the device is ready. Observe any changes in the display or logs indicators to ensure the device is ready.
### Using a Local Source (Home Assistant) ### Using a Local Source (Home Assistant)
- **Issue**: Problems with downloading the TFT from GitHub. - **Issue**: Problems with downloading the TFT from GitHub.
- **Solution**: Host the TFT file on your Home Assistant and change the `nextion_update_url` accordingly. - **Solution**: Host the TFT file on your Home Assistant and change the `nextion_update_url` accordingly.
- **Step-by-Step Guide**: Here's how you can change your `nextion_update_url`: - **Step-by-Step Guide**: Here's how you can change your `nextion_update_url`:
@@ -77,34 +75,29 @@ Observe any changes in the display or logs indicators to ensure the device is re
3. Replace the URL with the local address where your TFT file is hosted. 3. Replace the URL with the local address where your TFT file is hosted.
### HTTP Instead of HTTPS ### HTTP Instead of HTTPS
- **Issue**: HTTPS connections may be problematic with ESP, especially when using `arduino` as framework. - **Issue**: HTTPS connections may be problematic with ESP, especially when using `arduino` as framework.
- **Solution**: Use HTTP for hosting the TFT file and updating the `nextion_update_url`. - **Solution**: Use HTTP for hosting the TFT file and updating the `nextion_update_url`.
- **Why HTTP?**: HTTP can be more stable for these connections. - **Why HTTP?**: HTTP can be more stable for these connections.
To switch, simply replace 'https' with 'http' in your URLs and make sure your http server supports non-secure connections. To switch, simply replace 'https' with 'http' in your URLs and make sure your http server supports non-secure connections.
### Remove Customizations ### Remove Customizations
- **Issue**: Customizations like `bluetooth_proxy` and `ble_tracker` may interfere with the upload. - **Issue**: Customizations like `bluetooth_proxy` and `ble_tracker` may interfere with the upload.
- **Solution**: Temporarily remove any customizations to free up memory. - **Solution**: Temporarily remove any customizations to free up memory.
- **How to Remove Customizations**: Identify any additional features you've added and remove them from your configuration file. - **How to Remove Customizations**: Identify any additional features you've added and remove them from your configuration file.
Pay special attention to memory-intensive customizations. Pay special attention to memory-intensive customizations.
### Use IP Address Instead of DNS ### Use IP Address Instead of DNS
- **Issue**: DNS may cause connection problems. - **Issue**: DNS may cause connection problems.
- **Solution**: Use the IP address of your Home Assistant directly. - **Solution**: Use the IP address of your Home Assistant directly.
- **Example**: Replace `http://homeassistant.local:8123/local/nspanel_blank.tft` with `http://192.168.0.100:8123/local/nspanel_blank.tft`. - **Example**: Replace `http://homeassistant.local:8123/local/nspanel_blank.tft` with `http://192.168.0.100:8123/local/nspanel_blank.tft`.
### Check the File Size by Downloading to Your Computer ### Check the File Size by Downloading to Your Computer
- **Issue**: Ensuring the file size matches the GitHub version. - **Issue**: Ensuring the file size matches the GitHub version.
- **Solution**: Use the same URL you provided to ESPHome to download the file on your computer and compare sizes. - **Solution**: Use the same URL you provided to ESPHome to download the file on your computer and compare sizes.
- **Verification Steps**: Download the file, then right-click and select 'Properties' to check the size. - **Verification Steps**: Download the file, then right-click and select 'Properties' to check the size.
Compare this with the size listed on GitHub or from the file you downlodaded directly from GitHub. Compare this with the size listed on GitHub or from the file you downlodaded directly from GitHub.
### Power Cycle Your Panel ### Power Cycle Your Panel
- **Issue**: General troubleshooting. - **Issue**: General troubleshooting.
- **Solution**: Turn off the power supply, wait for a moment, and then power it back on. - **Solution**: Turn off the power supply, wait for a moment, and then power it back on.
If your panel is already installed in the wall, you can often power cycle it by switching the relay connected to your panel in your electricity relay's panel. If your panel is already installed in the wall, you can often power cycle it by switching the relay connected to your panel in your electricity relay's panel.
@@ -118,7 +111,6 @@ This duration helps ensure that the system resets to a clean state.
> ![Hardware Reset Button](pics/eu_reset_button.png) > ![Hardware Reset Button](pics/eu_reset_button.png)
### Consider changing the framework ### Consider changing the framework
- **Issue**: You might be facing some situation where the transfer engine used by your framework cannot handle it properly. - **Issue**: You might be facing some situation where the transfer engine used by your framework cannot handle it properly.
- **Solution**: Temporarily switch between the frameworks. - **Solution**: Temporarily switch between the frameworks.
- **Additional Guidance**: This project supports both `arduino` (ESPHome default) or `esp-idf` (this project default) frameworks. - **Additional Guidance**: This project supports both `arduino` (ESPHome default) or `esp-idf` (this project default) frameworks.
@@ -127,7 +119,6 @@ The upload TFT engines have some differences, so changing the framework may solv
You can set the framework you want by adding this to your ESPHome yaml: You can set the framework you want by adding this to your ESPHome yaml:
#### ESP-IDF #### ESP-IDF
```yaml ```yaml
esp32: esp32:
framework: framework:
@@ -135,7 +126,6 @@ esp32:
``` ```
#### Arduino #### Arduino
```yaml ```yaml
esp32: esp32:
framework: framework:
@@ -143,7 +133,6 @@ esp32:
``` ```
### Flash your panel again ### Flash your panel again
- **Issue**: Your firmware might be missing some important library, you may be using an outdated version or the ESP may be out of memory. - **Issue**: Your firmware might be missing some important library, you may be using an outdated version or the ESP may be out of memory.
- **Solution**: Remove all add-ons and non-essential customization and flash your panel again. - **Solution**: Remove all add-ons and non-essential customization and flash your panel again.
- **Step-by-Step Guide**: - **Step-by-Step Guide**:
@@ -153,7 +142,6 @@ esp32:
4. Add the add-ons and removed customization back and then flash it again. 4. Add the add-ons and removed customization back and then flash it again.
### Try an alternative http service ### Try an alternative http service
- **Issue**: Your current http server may be overloaded. - **Issue**: Your current http server may be overloaded.
- **Solution**: Try another http server installed in your computer. - **Solution**: Try another http server installed in your computer.
There are many options available for free to run under you local Windows, MAC or Linux machine. There are many options available for free to run under you local Windows, MAC or Linux machine.
@@ -166,7 +154,6 @@ There are many options available for free to run under you local Windows, MAC or
| XAMPP | [apachefriends.org](https://www.apachefriends.org/index.html) | Linux, Windows, macOS | All-in-one package, easy to install, ideal for beginners | Not optimized for high-traffic sites, more suited for development than production | | XAMPP | [apachefriends.org](https://www.apachefriends.org/index.html) | Linux, Windows, macOS | All-in-one package, easy to install, ideal for beginners | Not optimized for high-traffic sites, more suited for development than production |
## Additional Tips and Resources ## Additional Tips and Resources
After troubleshooting, if issues persist, consult the [Issues](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues) and feel free to create a new one asking for more personalized assistance. After troubleshooting, if issues persist, consult the [Issues](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues) and feel free to create a new one asking for more personalized assistance.
Please share as much info as possible, like: Please share as much info as possible, like:
@@ -176,5 +163,4 @@ Please share as much info as possible, like:
4. Describe what you have already tried. 4. Describe what you have already tried.
## Important note ## Important note
Remember, these steps are a guideline and might vary slightly based on your specific setup and previously installed system. Remember, these steps are a guideline and might vary slightly based on your specific setup and previously installed system.

View File

@@ -3,7 +3,9 @@
<!-- markdownlint-disable MD013 MD033 --> <!-- markdownlint-disable MD013 MD033 -->
| NSPanel_HA_Blueprint<br><sub><sup>Version</sup></sub> | Home Assistant<br><sub><sup>Min version</sup></sub> | ESPHome<br><sub><sup>Min version</sup></sub> | | NSPanel_HA_Blueprint<br><sub><sup>Version</sup></sub> | Home Assistant<br><sub><sup>Min version</sup></sub> | ESPHome<br><sub><sup>Min version</sup></sub> |
| :--: | :--: | :--: | | :--: | :--: | :--: |
| v4.3 | 2023.12.0 | 2023.12.0 | | v4.3.3+ | 2024.3.0 | 2023.12.0 |
| v4.3.2<br>v4.3.1 | 2024.3.0 | 2024.3.0 |
| v4.3.0 | 2024.3.0 | 2023.12.0 |
| v4.2.2+ | 2023.12.0 | 2023.12.0 | | v4.2.2+ | 2023.12.0 | 2023.12.0 |
| v4.2.1<br>v4.2 | 2023.9.0 | 2023.12.0 | | v4.2.1<br>v4.2 | 2023.9.0 | 2023.12.0 |
| v4.1 | 2023.9.0 | 2023.5.0 | | v4.1 | 2023.9.0 | 2023.5.0 |

View File

@@ -0,0 +1,36 @@
#####################################################################################################
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
##### ESPHome Add-on for BLE Tracker #####
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
##### For normal use with the Blueprint, no changes are necessary. #####
#####################################################################################################
##### ATTENTION: This will add climate elements to the core system and requires the core part. #####
#####################################################################################################
---
# Enable Bluetooth tracker
esp32_ble_tracker:
id: ble_tracker
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADDON_BLE_TRACKER
script:
- id: !extend dump_config
then:
- lambda: |-
// Check if this is installed with Arduino
#ifdef USE_ARDUINO
#error "Invalid settings for add-on BLE Tracker. Arduino framework is not supported when using Bluetooth in this project."
#endif
if (!id(is_uploading_tft)) {
static const char *const TAG = "nspanel_ha_blueprint";
ESP_LOGCONFIG(TAG, "Add-on BLE Tracker");
}
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
wifi:
power_save_mode: LIGHT
...

View File

@@ -0,0 +1,43 @@
#####################################################################################################
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
##### ESPHome Add-on for Bluetooth proxy #####
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
##### For normal use with the Blueprint, no changes are necessary. #####
#####################################################################################################
##### ATTENTION: This will add climate elements to the core system and requires the core part. #####
#####################################################################################################
---
bluetooth_proxy:
id: ble_proxy
# Enable Bluetooth tracker
esp32_ble_tracker:
id: ble_tracker
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADDON_BLUETOOTH_PROXY
script:
- id: !extend dump_config
then:
- lambda: |-
// Check if this is installed with Arduino
#ifdef USE_ARDUINO
#error "Invalid settings for add-on Bluetooth Proxy. Arduino framework is not supported when using Bluetooth in this project."
#endif
if (!id(is_uploading_tft)) {
static const char *const TAG = "nspanel_ha_blueprint";
ESP_LOGCONFIG(TAG, "Add-on Bluetooth Proxy:");
ESP_LOGCONFIG(TAG, " Mode: %s", ble_proxy->has_active() ? "Active" : "Passive");
ESP_LOGCONFIG(TAG, " Connections: %i", int(ble_proxy->get_bluetooth_connections_limit() -
ble_proxy->get_bluetooth_connections_free()));
ESP_LOGCONFIG(TAG, " Limit: %i", int(ble_proxy->get_bluetooth_connections_limit()));
}
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
wifi:
power_save_mode: LIGHT
...

View File

@@ -32,6 +32,11 @@ substitutions:
addon_climate_dual: "false" addon_climate_dual: "false"
############################## ##############################
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_BASE
climate: climate:
- platform: thermostat - platform: thermostat
name: Thermostat name: Thermostat
@@ -51,11 +56,8 @@ climate:
internal: false internal: false
on_state: on_state:
- lambda: |- - lambda: |-
static const char *const TAG = "addon_climate_base.climate.thermostat_embedded.on_state";
ESP_LOGD(TAG, "Starting");
page_climate->execute(); page_climate->execute();
page_home->execute(); page_home->execute();
ESP_LOGD(TAG, "Finished");
globals: globals:
##### Is embedded thermostat visible on climate page? ##### ##### Is embedded thermostat visible on climate page? #####
@@ -83,7 +85,6 @@ script:
then: then:
- lambda: |- - lambda: |-
if (embedded and !id(is_uploading_tft)) { if (embedded and !id(is_uploading_tft)) {
static const char *const TAG = "addon_climate_base.script.change_climate_state";
auto FahrenheitToCelsius = [](float fahrenheit) -> float { auto FahrenheitToCelsius = [](float fahrenheit) -> float {
return (fahrenheit - 32.0) * 5.0 / 9.0; return (fahrenheit - 32.0) * 5.0 / 9.0;
}; };
@@ -97,30 +98,68 @@ script:
if (key == "temperature") { if (key == "temperature") {
temperature = stof(value) / 10; temperature = stof(value) / 10;
if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature); if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature);
ESP_LOGD(TAG, "set_target_temperature(%f)", temperature);
call.set_target_temperature(temperature); call.set_target_temperature(temperature);
} else if (key == "target_temp_high") { } else if (key == "target_temp_high") {
temperature = stof(value) / 10; temperature = stof(value) / 10;
if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature); if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature);
ESP_LOGD(TAG, "set_target_temperature_high(%f)", temperature);
call.set_target_temperature_high(temperature); call.set_target_temperature_high(temperature);
} else if (key == "target_temp_low") { } else if (key == "target_temp_low") {
temperature = stof(value) / 10; temperature = stof(value) / 10;
if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature); if (temp_unit_fahrenheit) temperature = FahrenheitToCelsius(temperature);
ESP_LOGD(TAG, "set_target_temperature_low(%f)", temperature);
call.set_target_temperature_low(temperature); call.set_target_temperature_low(temperature);
} else if (key == "hvac_mode") { } else if (key == "hvac_mode") {
ESP_LOGD(TAG, "hvac_mode(%s)", value.c_str());
call.set_mode(value); call.set_mode(value);
} else {
ESP_LOGE(TAG, "Invalid call:");
ESP_LOGE(TAG, " Embedded: %s", YESNO(embedded));
ESP_LOGE(TAG, " Key: %s", key.c_str());
ESP_LOGE(TAG, " Value: %s", value.c_str());
} }
call.perform(); call.perform();
} }
- id: !extend dump_config
then:
- lambda: |-
// Check if more than one or none of the climate options are defined
#if defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_COOL) && defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_HEAT)
#error "Invalid settings for add-on Climate. More than one option selected: Cool + Heat."
#elif defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_COOL) && defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_DUAL)
#error "Invalid settings for add-on Climate. More than one option selected: Cool + Dual."
#elif defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_HEAT) && defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_DUAL)
#error "Invalid settings for add-on Climate. More than one option selected: Heat + Dual."
#elif !defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_COOL) && !defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_HEAT) && !defined(NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_DUAL)
#error "Invalid settings for add-on Climate. No option selected between Cool, Heat or Dual."
#endif
if (!id(is_uploading_tft)) {
static const char *const TAG = "nspanel_ha_blueprint";
const uint cooler_relay = ${cooler_relay};
const uint heater_relay = ${heater_relay};
ESP_LOGCONFIG(TAG, "Add-on climate:");
#ifdef NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_COOL
ESP_LOGCONFIG(TAG, " Cool: Enabled");
if (cooler_relay == 1 or cooler_relay == 2)
ESP_LOGCONFIG(TAG, " Relay: %u", cooler_relay);
else
ESP_LOGE(TAG, " Relay: %u", cooler_relay);
#endif
#ifdef NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_HEAT
ESP_LOGCONFIG(TAG, " Heat: Enabled");
if (heater_relay == 1 or heater_relay == 2)
ESP_LOGCONFIG(TAG, " Relay: %u", heater_relay);
else
ESP_LOGE(TAG, " Relay: %u", heater_relay);
#endif
#ifdef NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_DUAL
ESP_LOGCONFIG(TAG, " Dual: Enabled");
if (cooler_relay == 1 or cooler_relay == 2)
ESP_LOGCONFIG(TAG, " Relay (cooler): %u", cooler_relay);
else
ESP_LOGE(TAG, " Relay (cooler): %u", cooler_relay);
if (heater_relay == 1 or heater_relay == 2)
ESP_LOGCONFIG(TAG, " Relay (heater): %u", heater_relay);
else
ESP_LOGE(TAG, " Relay (heater): %u", heater_relay);
if (cooler_relay == heater_relay)
ESP_LOGE(TAG, " Double relay assignment");
#endif
}
- id: !extend init_hardware_climate - id: !extend init_hardware_climate
then: then:
- lambda: |- - lambda: |-
@@ -131,18 +170,14 @@ script:
- lambda: |- - lambda: |-
id(is_addon_climate_visible) = (current_page->state == "climate" and detailed_entity->state == "embedded_climate"); id(is_addon_climate_visible) = (current_page->state == "climate" and detailed_entity->state == "embedded_climate");
if (id(is_addon_climate_visible) and !id(is_uploading_tft)) { if (id(is_addon_climate_visible) and !id(is_uploading_tft)) {
static const char *const TAG = "addon_climate_base.script.page_climate";
auto CelsiusToFahrenheit = [](float celsius) -> float { auto CelsiusToFahrenheit = [](float celsius) -> float {
return (celsius * 9 / 5) + 32; return (celsius * 9 / 5) + 32;
}; };
std::string temp_units = "${temp_units}"; const std::string temp_units = "${temp_units}";
bool temp_unit_fahrenheit = (temp_units == "°F" || temp_units == "F" || temp_units == "°f" || temp_units == "f"); const bool temp_unit_fahrenheit = (temp_units == "°F" || temp_units == "F" || temp_units == "°f" || temp_units == "f");
ClimateTraits traits = thermostat_embedded->get_traits(); ClimateTraits traits = thermostat_embedded->get_traits();
ESP_LOGV(TAG, "Climate page constructor:"); disp1->set_component_text("page_label", id(addon_climate_friendly_name).c_str());
ESP_LOGV(TAG, " Add-on mode: %s", (${addon_climate_dual}) ? "Dual" : ((${addon_climate_heat}) ? "Heat" : ((${addon_climate_cool}) ? "Cool" : "Unknown")));
ESP_LOGV(TAG, " Temp. units: %s", temp_unit_fahrenheit ? "Fahrenheit" : "Celsius");
disp1->set_component_text_printf("page_label", id(addon_climate_friendly_name).c_str());
float temp_step = traits.get_visual_target_temperature_step(); float temp_step = traits.get_visual_target_temperature_step();
float temp_offset = traits.get_visual_min_temperature(); float temp_offset = traits.get_visual_min_temperature();
float temp_max = traits.get_visual_max_temperature(); float temp_max = traits.get_visual_max_temperature();
@@ -152,7 +187,7 @@ script:
float temp_current = thermostat_embedded->current_temperature; float temp_current = thermostat_embedded->current_temperature;
if (temp_unit_fahrenheit) { if (temp_unit_fahrenheit) {
//temp_step = CelsiusToFahrenheit(temp_step); //temp_step = CelsiusToFahrenheit(temp_step);
temp_step = temp_step * 1.8; temp_step = std::ceil(temp_step * 1.8);
temp_offset = CelsiusToFahrenheit(temp_offset); temp_offset = CelsiusToFahrenheit(temp_offset);
temp_max = CelsiusToFahrenheit(temp_max); temp_max = CelsiusToFahrenheit(temp_max);
temp_target = CelsiusToFahrenheit(temp_target); temp_target = CelsiusToFahrenheit(temp_target);

View File

@@ -15,6 +15,11 @@ substitutions:
addon_climate_cool: "true" addon_climate_cool: "true"
############################## ##############################
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_COOL
climate: climate:
- id: !extend thermostat_embedded - id: !extend thermostat_embedded
min_cooling_off_time: ${min_off_time}s min_cooling_off_time: ${min_off_time}s

View File

@@ -12,6 +12,11 @@ substitutions:
addon_climate_dual: "true" addon_climate_dual: "true"
############################## ##############################
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_DUAL
climate: climate:
- id: !extend thermostat_embedded - id: !extend thermostat_embedded
min_cooling_off_time: ${min_off_time}s min_cooling_off_time: ${min_off_time}s

View File

@@ -15,6 +15,11 @@ substitutions:
addon_climate_heat: "true" addon_climate_heat: "true"
############################## ##############################
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADDON_CLIMATE_HEAT
climate: climate:
- id: !extend thermostat_embedded - id: !extend thermostat_embedded
min_heating_off_time: ${min_off_time}s min_heating_off_time: ${min_off_time}s

View File

@@ -14,15 +14,10 @@ substitutions:
nextion_update_url: "${nextion_update_base_url}/main/hmi/nspanel_blank.tft" nextion_update_url: "${nextion_update_base_url}/main/hmi/nspanel_blank.tft"
############################################## ##############################################
##### External components ##### esphome:
external_components: platformio_options:
- source: build_flags:
type: git - -D NSPANEL_HA_BLUEPRINT_ADDON_UPLOAD_TFT
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: dev # To do: Change it for releasing
components:
- nspanel_ha_blueprint_upload_tft
refresh: 3s # To do: Change it for releasing
# yamllint disable rule:comments-indentation # yamllint disable rule:comments-indentation
api: api:
@@ -50,9 +45,6 @@ api:
url: string url: string
then: then:
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.api.services.upload_tft";
ESP_LOGD(TAG, "Custom TFT file upload requested");
ESP_LOGD(TAG, " URL: %s", url.c_str());
std::string clean_url = url; std::string clean_url = url;
// Convert to lowercase // Convert to lowercase
std::transform(clean_url.begin(), clean_url.end(), clean_url.begin(), std::transform(clean_url.begin(), clean_url.end(), clean_url.begin(),
@@ -60,10 +52,7 @@ api:
// Trim trailing spaces // Trim trailing spaces
auto endPos = clean_url.find_last_not_of(" \t"); auto endPos = clean_url.find_last_not_of(" \t");
if (std::string::npos != endPos) clean_url = clean_url.substr(0, endPos + 1); if (std::string::npos != endPos) clean_url = clean_url.substr(0, endPos + 1);
if (clean_url.empty() or clean_url == "default") url = nspanel_ha_blueprint_upload_tft::construct_tft_url("v${version}", if (clean_url.empty() or clean_url == "default") url = construct_tft_url("v${version}", tft_file_model->state, "${nextion_update_url}", "${nextion_update_base_url}");
tft_file_model->state,
"${nextion_update_url}",
"${nextion_update_base_url}");
upload_tft->execute(url.c_str()); upload_tft->execute(url.c_str());
# yamllint enable rule:comments-indentation # yamllint enable rule:comments-indentation
@@ -76,10 +65,7 @@ button:
entity_category: config entity_category: config
on_press: on_press:
- lambda: |- - lambda: |-
upload_tft->execute(nspanel_ha_blueprint_upload_tft::construct_tft_url("v${version}", upload_tft->execute(construct_tft_url("v${version}", tft_file_model->state, "${nextion_update_url}", "${nextion_update_base_url}").c_str());
tft_file_model->state,
"${nextion_update_url}",
"${nextion_update_base_url}").c_str());
display: display:
- id: !extend disp1 - id: !extend disp1
@@ -102,9 +88,17 @@ globals:
restore_value: false restore_value: false
initial_value: 'esphome::nextion::Nextion::TFTUploadResult::UNKNOWN' initial_value: 'esphome::nextion::Nextion::TFTUploadResult::UNKNOWN'
nspanel_ha_blueprint_upload_tft:
script: script:
- id: !extend dump_config
then:
- lambda: |-
if (!id(is_uploading_tft)) {
static const char *const TAG = "nspanel_ha_blueprint";
ESP_LOGCONFIG(TAG, "Add-on Upload TFT:");
ESP_LOGCONFIG(TAG, " File model: %s", tft_file_model->state.c_str());
ESP_LOGCONFIG(TAG, " Valid TFT: %s", YESNO(id(tft_is_valid)));
}
- id: nextion_status - id: nextion_status
mode: restart mode: restart
then: then:
@@ -121,8 +115,7 @@ script:
baud_rate: uint32_t baud_rate: uint32_t
then: then:
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.nextion_upload"; ESP_LOGD("addon_upload_tft.script.nextion_upload", "Waiting for empty UART and Nextion queues");
ESP_LOGD(TAG, "Waiting for empty UART and Nextion queues");
- wait_until: - wait_until:
condition: condition:
- lambda: return (disp1->queue_size() < 1); - lambda: return (disp1->queue_size() < 1);
@@ -130,10 +123,9 @@ script:
timeout: 10s timeout: 10s
- delay: 2s - delay: 2s
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.nextion_upload"; ESP_LOGD("addon_upload_tft.script.nextion_upload", "Starting TFT upload...");
ESP_LOGD(TAG, "Starting TFT upload...");
id(tft_upload_result) = disp1->upload_tft(baud_rate, !disp1->is_setup()); id(tft_upload_result) = disp1->upload_tft(baud_rate, !disp1->is_setup());
ESP_LOGD(TAG, "TFT upload: %s", esphome::nextion::Nextion::tft_upload_result_to_string(id(tft_upload_result))); ESP_LOGD("addon_upload_tft.script.nextion_upload", "TFT upload: %s", esphome::nextion::Nextion::tft_upload_result_to_string(id(tft_upload_result)));
- id: open_upload_dialog - id: open_upload_dialog
mode: restart mode: restart
@@ -141,23 +133,21 @@ script:
- lambda: |- - lambda: |-
ESP_LOGD("addon_upload_tft.script.open_upload_dialog", "Showing upload dialog page"); ESP_LOGD("addon_upload_tft.script.open_upload_dialog", "Showing upload dialog page");
disp1->goto_page("confirm"); disp1->goto_page("confirm");
page_id->update();
- wait_until: - wait_until:
condition: condition:
- lambda: return (page_id->state == 26); - lambda: return (current_page->state == "confirm");
timeout: 2s timeout: 2s
- lambda: |- - lambda: |-
if (page_id->state == 26) { if (current_page->state == "confirm") {
disp1->hide_component("bclose"); disp1->hide_component("bclose");
disp1->hide_component("bt_accept"); disp1->hide_component("bt_accept");
disp1->hide_component("bt_clear"); disp1->hide_component("bt_clear");
} }
#ifdef ARDUINO #ifdef ARDUINO
disp1->set_component_text_printf("confirm.title", "Upload TFT\\rArduino"); disp1->set_component_text("confirm.title", "Upload TFT\\rArduino");
#elif defined(USE_ESP_IDF) #elif defined(USE_ESP_IDF)
disp1->set_component_text_printf("confirm.title", "Upload TFT\\rESP-IDF"); disp1->set_component_text("confirm.title", "Upload TFT\\rESP-IDF");
#endif #endif
page_id->update();
- id: report_upload_progress - id: report_upload_progress
mode: restart mode: restart
@@ -165,17 +155,23 @@ script:
message: string message: string
then: then:
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.report_upload_progress"; ESP_LOGD("addon_upload_tft.script.report_upload_progress", message.c_str());
ESP_LOGD(TAG, "%s", message.c_str());
if (id(tft_is_valid)) { if (id(tft_is_valid)) {
if (page_id->state != 26) { if (current_page->state != "confirm") open_upload_dialog->execute();
open_upload_dialog->execute();
}
display_wrapped_text->execute("confirm.body", message.c_str(), 18); display_wrapped_text->execute("confirm.body", message.c_str(), 18);
disp1->set_backlight_brightness(1); disp1->set_backlight_brightness(1);
App.feed_wdt(); App.feed_wdt();
} }
- id: select_tft_file_model
mode: restart
then:
- lambda: |-
if (!isnan(display_mode->state) and !isnan(display_charset->state)) {
std::string PanelModel = getNSPanelText(int(display_mode->state), int(display_charset->state));
if (!PanelModel.empty() and tft_file_model->state != PanelModel) tft_file_model->publish_state(PanelModel);
}
- id: !extend stop_all - id: !extend stop_all
then: then:
- lambda: |- - lambda: |-
@@ -193,10 +189,28 @@ script:
then: then:
- switch.turn_on: screen_power - switch.turn_on: screen_power
- delay: 5s - delay: 5s
- lambda: if (id(tft_is_valid)) disp1->goto_page("home");
- delay: 2s
- script.execute: open_upload_dialog
- script.wait: open_upload_dialog
- wait_until:
condition:
- lambda: return (current_page->state == "confirm");
timeout: 2s
- script.execute:
id: report_upload_progress
message: "Set Nextion unavailable for blueprint calls"
- script.wait: report_upload_progress
- binary_sensor.template.publish:
id: nextion_init
state: false
- script.execute:
id: report_upload_progress
message: "Preparing for upload..."
- script.wait: report_upload_progress
# Then start the upload # Then start the upload
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.upload_tft"; static const char *const TAG = "addon_upload_tft.script.upload_tft";
ESP_LOGD(TAG, "Starting...");
id(is_uploading_tft) = true; id(is_uploading_tft) = true;
@@ -210,22 +224,57 @@ script:
ESP_LOGD(TAG, " Upload URL: %s", url.c_str()); ESP_LOGD(TAG, " Upload URL: %s", url.c_str());
disp1->set_tft_url(url.c_str()); disp1->set_tft_url(url.c_str());
- lambda: if (id(tft_is_valid)) disp1->goto_page("home"); // #ifdef USE_IMPROV
// ESP_LOGD(TAG, "Stop Improv BLE");
// ble_improv->dump_config();
// ble_improv->stop();
// ble_improv->dump_config();
// #endif
// #ifdef USE_CAPTIVE_PORTAL
// ESP_LOGD(TAG, "Stop Captive Portal");
// ap_captive_portal->dump_config();
// ap_captive_portal->end();
// ap_captive_portal->dump_config();
// #endif
#ifdef USE_ESP32_BLE_CLIENT
ble_tracker->dump_config();
ESP_LOGD(TAG, "Disable BLE");
#ifdef USE_BLUETOOTH_PROXY
ESP_LOGD(TAG, " Bluetooth proxy: %s", ble_proxy->has_active() ? "Active" : "Passive");
while (ble_proxy->has_active() and
ble_proxy->get_bluetooth_connections_limit() != ble_proxy->get_bluetooth_connections_free()) {
ESP_LOGD(TAG, " BT proxy connections: %i of %i",
int(ble_proxy->get_bluetooth_connections_limit() - ble_proxy->get_bluetooth_connections_free()),
int(ble_proxy->get_bluetooth_connections_limit()));
if (ble_proxy->has_active()) {
ESP_LOGD(TAG, " BT proxy set passive mode...");
ble_proxy->set_active(false);
}
#ifdef ARDUINO
delay(1000);
#elif defined(USE_ESP_IDF)
vTaskDelay(pdMS_TO_TICKS(1000));
#endif
App.feed_wdt();
}
#endif // USE_BLUETOOTH_PROXY
ESP_LOGD(TAG, " Stopping BLE Tracker scan...");
ble_tracker->stop_scan();
ESP_LOGD(TAG, " Disabling BLE Tracker scan...");
ble_tracker->set_scan_active(false);
ESP_LOGD(TAG, " Disabling BLE...");
ble_tracker->get_parent()->disable();
ble_tracker->dump_config();
#endif // USE_ESP32_BLE_CLIENT
- lambda: if (id(tft_is_valid) and current_page->state != "confirm") disp1->goto_page("home");
- delay: 2s - delay: 2s
- script.execute: open_upload_dialog - script.execute: open_upload_dialog
- script.wait: open_upload_dialog - script.wait: open_upload_dialog
- lambda: page_id->update();
- wait_until: - wait_until:
condition: condition:
- lambda: return (page_id->state == 26); - lambda: return (current_page->state == "confirm");
timeout: 2s timeout: 2s
- script.execute:
id: report_upload_progress
message: "Set Nextion unavailable for blueprint calls"
- script.wait: report_upload_progress
- binary_sensor.template.publish:
id: nextion_init
state: false
- script.execute: - script.execute:
id: report_upload_progress id: report_upload_progress
message: "Stopping other scripts" message: "Stopping other scripts"
@@ -306,11 +355,9 @@ script:
### This code should never run ### This code should never run
- delay: 2s - delay: 2s
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.upload_tft";
ESP_LOGD(TAG, "Finishing...");
id(is_uploading_tft) = false; id(is_uploading_tft) = false;
screen_power->publish_state(true); screen_power->publish_state(true);
ESP_LOGE(TAG, "TFT upload finished unsuccessfully!"); ESP_LOGE("addon_upload_tft.script.upload_tft", "TFT upload finished unsuccessfully!");
- id: upload_tft_sequence_attempt - id: upload_tft_sequence_attempt
mode: single mode: single
@@ -427,16 +474,22 @@ select:
icon: mdi:swap-horizontal icon: mdi:swap-horizontal
sensor: sensor:
- id: !extend display_charset
on_value:
then:
- script.execute: select_tft_file_model
- id: !extend display_mode - id: !extend display_mode
on_value: on_value:
then: then:
lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.sensor.display_mode"; static const char *const TAG = "addon_upload_tft.sensor.display_mode";
id(tft_is_valid) = (display_mode->state > 0 and display_mode->state < 4); id(tft_is_valid) = (display_mode->state > 0 and display_mode->state < 4);
if (id(tft_is_valid)) if (id(tft_is_valid)) {
ESP_LOGD(TAG, "Valid TFT: True"); ESP_LOGD(TAG, "Valid TFT: True");
else { select_tft_file_model->execute();
ESP_LOGW(TAG, "Display mode: %i", int(display_mode->state)); } else {
ESP_LOGW(TAG, "Valid TFT: False"); ESP_LOGW(TAG, "Display mode: %i", int(display_mode->state));
} ESP_LOGW(TAG, "Valid TFT: False");
}
... ...

View File

@@ -11,9 +11,15 @@ substitutions:
############################## ##############################
## Change only in your ## ## Change only in your ##
## local yaml substitutions ## ## local yaml substitutions ##
ap_password: ${wifi_password}
web_password: ${wifi_password} web_password: ${wifi_password}
############################## ##############################
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADVANCED
button: button:
- name: Exit reparse - name: Exit reparse
platform: template platform: template
@@ -27,6 +33,7 @@ button:
- script.execute: exit_reparse - script.execute: exit_reparse
captive_portal: captive_portal:
id: ap_captive_portal
script: script:
- id: exit_reparse - id: exit_reparse
@@ -70,9 +77,9 @@ sensor:
text_sensor: text_sensor:
##### ESPhome version used to compile the app ##### ##### ESPhome version used to compile the app #####
- name: ESPhome Version - name: ESPhome Compiler
platform: version platform: version
disabled_by_default: false disabled_by_default: true
internal: false internal: false
icon: mdi:tag-text-outline icon: mdi:tag-text-outline
@@ -95,11 +102,15 @@ time:
- component.update: api_timestamp - component.update: api_timestamp
- component.update: device_timestamp - component.update: device_timestamp
##### Web server #####
web_server: web_server:
id: web_server_std id: web_server_std
port: 80 port: 80
auth: auth:
username: admin username: admin
password: ${web_password} password: ${web_password}
wifi:
ap:
ssid: "${name}"
password: ${ap_password}
... ...

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,9 @@
- **Program.s:** - **Program.s:**
- Change to `display_mode=3` - Change to `display_mode=3`
- **Page boot:**
- Change component `progress` (the progress bar in the very bottom) width to 480.
## Creating `nspanel_CJK_xxx.HMI` from `nspanel_xxx.HMI` ## Creating `nspanel_CJK_xxx.HMI` from `nspanel_xxx.HMI`
- **Program.s:** - **Program.s:**

View File

@@ -15,9 +15,9 @@ framework.txt="esp-idf"
ip_addr.txt="192.168.0.123" ip_addr.txt="192.168.0.123"
``` ```
![Boot EU](../docs/pics/eu_boot.png) ![Boot EU](../../docs/pics/eu_boot.png)
![Boot US](../docs/pics/us_boot.png) ![Boot US](../../docs/pics/us_boot.png)
## Home page ## Home page
@@ -59,7 +59,7 @@ value03_state.txt="715 W"
value03_icon.txt="" value03_icon.txt=""
``` ```
![Home EU](../docs/pics/eu_home.png) ![Home EU](../../docs/pics/eu_home.png)
**US version:** **US version:**
@@ -100,7 +100,7 @@ value03_state.txt="715 W"
value03_icon.txt="" value03_icon.txt=""
``` ```
![Home US](../docs/pics/us_home.png) ![Home US](../../docs/pics/us_home.png)
## Settings page ## Settings page
@@ -108,8 +108,8 @@ value03_icon.txt=""
page settings page settings
``` ```
![Settings EU](../docs/pics/eu_settings.png) ![Settings EU](../../docs/pics/eu_settings.png)
![Settings US](../docs/pics/us_settings.png) ![Settings US](../../docs/pics/us_settings.png)
## Buttons pages (DRAFT) ## Buttons pages (DRAFT)

View File

@@ -6,10 +6,11 @@ Program.s
int p=0,q=0,t=0,f=0 int p=0,q=0,t=0,f=0
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0 int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0 int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
int back_page_id=0 int back_page_id=1
int wakeup_page_id=1
int dimdelta=0 int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_qrcode=0,is_notification=0,is_utilities=0 int is_utilities=0
int brightness=100,brightness_dim=40,brightness_sleep=0 int brightness=100,brightness_dim=40,brightness_sleep=0
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
int charset=2 // 1 = International (original), 2 = CJK int charset=2 // 1 = International (original), 2 = CJK
@@ -20,4 +21,4 @@ Program.s
{ {
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
} }
page 8//Power on start page boot page 0//Power on start page boot

View File

@@ -12,6 +12,7 @@ Page alarm
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
@@ -23,10 +24,12 @@ Page alarm
vis bt_vacat,0 vis bt_vacat,0
vis bt_bypass,0 vis bt_bypass,0
} }
vis unavailable,0 printh 92
prints "current_page",0
Postinitialize Event printh 00
sendme prints "alarm",0
printh 00
printh FF FF FF
Variable (string) lastclick Variable (string) lastclick
Attributes Attributes
@@ -189,16 +192,6 @@ Text bt_disarm_icon
Text :  Text : 
Max. Text Size : 3 Max. Text Size : 3
Text unavailable
Attributes
ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Picture bt_home_pic Picture bt_home_pic
Attributes Attributes
ID : 4 ID : 4
@@ -399,26 +392,3 @@ Hotspot bt_disarm
printh 00 printh 00
printh FF FF FF printh FF FF FF
Timer wakeup_timer
Attributes
ID : 31
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}

View File

@@ -12,16 +12,15 @@ Page boot
Events Events
Preinitialize Event Preinitialize Event
printh 92
prints "current_page",0
printh 00
prints "boot",0
printh 00
printh FF FF FF
dim=100 dim=100
covx baud,baud_rate.txt,0,0 covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps" baud_rate.txt+=" bps"
vis unavailable,0
Postinitialize Event
sendme
Page Exit Event
dim=0
Variable (int32) counter Variable (int32) counter
Attributes Attributes
@@ -29,13 +28,6 @@ Variable (int32) counter
Scope: local Scope: local
Value: 0 Value: 0
Variable (string) aux1
Attributes
ID : 12
Scope : local
Text :
Max. Text Size: 10
Text ip_addr Text ip_addr
Attributes Attributes
ID : 1 ID : 1
@@ -103,8 +95,8 @@ Text tft_version
Dragging : 0 Dragging : 0
Send Component ID : on press and release Send Component ID : on press and release
Associated Keyboard: none Associated Keyboard: none
Text : 4.3dev3 Text : 4.3.7
Max. Text Size : 9 Max. Text Size : 10
Text esph_version Text esph_version
Attributes Attributes
@@ -113,8 +105,8 @@ Text esph_version
Dragging : 0 Dragging : 0
Send Component ID : on press and release Send Component ID : on press and release
Associated Keyboard: none Associated Keyboard: none
Text : Text : Waiting...
Max. Text Size : 9 Max. Text Size : 10
Text bluep_version Text bluep_version
Attributes Attributes
@@ -123,12 +115,12 @@ Text bluep_version
Dragging : 0 Dragging : 0
Send Component ID : on press and release Send Component ID : on press and release
Associated Keyboard: none Associated Keyboard: none
Text : Text : Waiting...
Max. Text Size : 9 Max. Text Size : 10
Text baud_rate Text baud_rate
Attributes Attributes
ID : 14 ID : 13
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : on press and release Send Component ID : on press and release
@@ -138,7 +130,7 @@ Text baud_rate
Text framework Text framework
Attributes Attributes
ID : 15 ID : 14
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : on press and release Send Component ID : on press and release
@@ -146,15 +138,13 @@ Text framework
Text : Text :
Max. Text Size : 10 Max. Text Size : 10
Text unavailable Progress Bar progress
Attributes Attributes
ID : 16 ID : 15
Scope : local Scope : global
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID: disabled
Associated Keyboard: none Value : 0
Text :
Max. Text Size : 1
Dual-state Button bt_reboot Dual-state Button bt_reboot
Attributes Attributes
@@ -175,19 +165,28 @@ Dual-state Button bt_reboot
Timer tm_esphome Timer tm_esphome
Attributes Attributes
ID : 13 ID : 12
Scope : local Scope : local
Period (ms): 10000 Period (ms): 1000
Enabled : yes Enabled : yes
Events Events
Timer Event Timer Event
if(tm_esphome.tim!=10000)
{
tm_esphome.tim=10000
}
counter.val++ counter.val++
if(counter.val>30) if(counter.val>30)
{ {
rest rest
} }
sendme printh 92
prints "current_page",0
printh 00
prints "boot",0
printh 00
printh FF FF FF
printh 91 printh 91
prints "display_mode",0 prints "display_mode",0
printh 00 printh 00
@@ -199,13 +198,11 @@ Timer tm_esphome
prints charset,0 prints charset,0
printh FF FF FF printh FF FF FF
printh 92 printh 92
prints "tft_version",0 prints "boot.tft_version",0
printh 00 printh 00
prints tft_version.txt,0 prints tft_version.txt,0
printh 00 printh 00
printh FF FF FF printh FF FF FF
covx counter.val,aux1.txt,0,0
esph_version.txt="Retry #"+aux1.txt
sys0=counter.val%10 sys0=counter.val%10
if(sys0==0) if(sys0==0)
{ {

View File

@@ -12,6 +12,7 @@ Page buttonpage01
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
@@ -20,24 +21,31 @@ Page buttonpage01
vis 255,0 vis 255,0
vis button_back,1 vis button_back,1
vis page_label,1 vis page_label,1
page_index.txt+="●" sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
if(is_buttonpage02==1) if(sys0>1)
{ {
page_index.txt+="â—" page_index.txt+="●"
if(is_buttonpage02==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage03==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage04==1)
{
page_index.txt+="â—‹"
}
vis page_index,1
} }
if(is_buttonpage03==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage04==1)
{
page_index.txt+="â—‹"
}
vis page_index,1
} }
printh 92
Postinitialize Event prints "current_page",0
sendme printh 00
prints "buttonpage01",0
printh 00
printh FF FF FF
Variable (string) lastclick Variable (string) lastclick
Attributes Attributes
@@ -62,7 +70,7 @@ Variable (string) page_name
Variable (int32) confirm Variable (int32) confirm
Attributes Attributes
ID : 11 ID : 10
Scope: local Scope: local
Value: 0 Value: 0
@@ -88,7 +96,7 @@ Text page_index
Text button01pic Text button01pic
Attributes Attributes
ID : 12 ID : 11
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -98,7 +106,7 @@ Text button01pic
Text button02pic Text button02pic
Attributes Attributes
ID : 13 ID : 12
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -108,7 +116,7 @@ Text button02pic
Text button03pic Text button03pic
Attributes Attributes
ID : 14 ID : 13
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -118,7 +126,7 @@ Text button03pic
Text button04pic Text button04pic
Attributes Attributes
ID : 15 ID : 14
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -128,7 +136,7 @@ Text button04pic
Text button05pic Text button05pic
Attributes Attributes
ID : 16 ID : 15
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -138,7 +146,7 @@ Text button05pic
Text button06pic Text button06pic
Attributes Attributes
ID : 17 ID : 16
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -148,7 +156,7 @@ Text button06pic
Text button07pic Text button07pic
Attributes Attributes
ID : 18 ID : 17
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -158,7 +166,7 @@ Text button07pic
Text button08pic Text button08pic
Attributes Attributes
ID : 19 ID : 18
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -168,7 +176,7 @@ Text button08pic
Text button01text Text button01text
Attributes Attributes
ID : 20 ID : 19
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -178,7 +186,7 @@ Text button01text
Text button02text Text button02text
Attributes Attributes
ID : 21 ID : 20
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -188,7 +196,7 @@ Text button02text
Text button03text Text button03text
Attributes Attributes
ID : 22 ID : 21
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -198,7 +206,7 @@ Text button03text
Text button04text Text button04text
Attributes Attributes
ID : 23 ID : 22
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -208,7 +216,7 @@ Text button04text
Text button05text Text button05text
Attributes Attributes
ID : 24 ID : 23
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -218,7 +226,7 @@ Text button05text
Text button06text Text button06text
Attributes Attributes
ID : 25 ID : 24
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -228,7 +236,7 @@ Text button06text
Text button07text Text button07text
Attributes Attributes
ID : 26 ID : 25
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -238,7 +246,7 @@ Text button07text
Text button08text Text button08text
Attributes Attributes
ID : 27 ID : 26
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -248,7 +256,7 @@ Text button08text
Text button01icon Text button01icon
Attributes Attributes
ID : 28 ID : 27
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -258,7 +266,7 @@ Text button01icon
Text button02icon Text button02icon
Attributes Attributes
ID : 29 ID : 28
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -268,7 +276,7 @@ Text button02icon
Text button03icon Text button03icon
Attributes Attributes
ID : 30 ID : 29
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -278,7 +286,7 @@ Text button03icon
Text button04icon Text button04icon
Attributes Attributes
ID : 31 ID : 30
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -288,7 +296,7 @@ Text button04icon
Text button05icon Text button05icon
Attributes Attributes
ID : 32 ID : 31
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -298,7 +306,7 @@ Text button05icon
Text button06icon Text button06icon
Attributes Attributes
ID : 33 ID : 32
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -308,7 +316,7 @@ Text button06icon
Text button07icon Text button07icon
Attributes Attributes
ID : 34 ID : 33
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -318,7 +326,7 @@ Text button07icon
Text button08icon Text button08icon
Attributes Attributes
ID : 35 ID : 34
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -328,7 +336,7 @@ Text button08icon
Text button01bri Text button01bri
Attributes Attributes
ID : 36 ID : 35
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -338,7 +346,7 @@ Text button01bri
Text button02bri Text button02bri
Attributes Attributes
ID : 37 ID : 36
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -348,7 +356,7 @@ Text button02bri
Text button03bri Text button03bri
Attributes Attributes
ID : 38 ID : 37
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -358,7 +366,7 @@ Text button03bri
Text button04bri Text button04bri
Attributes Attributes
ID : 39 ID : 38
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -368,7 +376,7 @@ Text button04bri
Text button05bri Text button05bri
Attributes Attributes
ID : 40 ID : 39
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -378,7 +386,7 @@ Text button05bri
Text button06bri Text button06bri
Attributes Attributes
ID : 41 ID : 40
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -388,7 +396,7 @@ Text button06bri
Text button07bri Text button07bri
Attributes Attributes
ID : 42 ID : 41
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -398,7 +406,7 @@ Text button07bri
Text button08bri Text button08bri
Attributes Attributes
ID : 43 ID : 42
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -406,16 +414,6 @@ Text button08bri
Text : Text :
Max. Text Size : 4 Max. Text Size : 4
Text unavailable
Attributes
ID : 52
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Button button_back Button button_back
Attributes Attributes
ID : 6 ID : 6
@@ -432,7 +430,7 @@ Button button_back
Hotspot button01 Hotspot button01
Attributes Attributes
ID : 44 ID : 43
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -468,7 +466,7 @@ Hotspot button01
Hotspot button02 Hotspot button02
Attributes Attributes
ID : 45 ID : 44
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -504,7 +502,7 @@ Hotspot button02
Hotspot button03 Hotspot button03
Attributes Attributes
ID : 46 ID : 45
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -540,7 +538,7 @@ Hotspot button03
Hotspot button04 Hotspot button04
Attributes Attributes
ID : 47 ID : 46
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -576,7 +574,7 @@ Hotspot button04
Hotspot button05 Hotspot button05
Attributes Attributes
ID : 48 ID : 47
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -612,7 +610,7 @@ Hotspot button05
Hotspot button06 Hotspot button06
Attributes Attributes
ID : 49 ID : 48
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -648,7 +646,7 @@ Hotspot button06
Hotspot button07 Hotspot button07
Attributes Attributes
ID : 50 ID : 49
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -684,7 +682,7 @@ Hotspot button07
Hotspot button08 Hotspot button08
Attributes Attributes
ID : 51 ID : 50
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -748,29 +746,6 @@ Timer click_timer
printh FF FF FF printh FF FF FF
click_timer.en=0 click_timer.en=0
Timer wakeup_timer
Attributes
ID : 10
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
TouchCap swipe TouchCap swipe
Attributes Attributes
ID : 1 ID : 1
@@ -782,6 +757,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer swipestore.en=1 // Start swipestore timer
Touch Release Event Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0 swipestore.en=0
// Touch has ended, x // Touch has ended, x
if(tch0==0) if(tch0==0)
@@ -833,7 +812,7 @@ TouchCap swipe
} }
} }
// Down to Up // Down to Up
swipec=0-swipedy swipec2=0-swipedy
if(swipec<-100) if(swipec<-100)
{ {
// Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages. // Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages.

View File

@@ -12,6 +12,7 @@ Page buttonpage02
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
@@ -20,24 +21,31 @@ Page buttonpage02
vis 255,0 vis 255,0
vis button_back,1 vis button_back,1
vis page_label,1 vis page_label,1
if(is_buttonpage01==1) sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
if(sys0>1)
{ {
page_index.txt+="â—‹" if(is_buttonpage01==1)
{
page_index.txt+="â—‹"
}
page_index.txt+="●"
if(is_buttonpage03==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage04==1)
{
page_index.txt+="â—‹"
}
vis page_index,1
} }
page_index.txt+="●"
if(is_buttonpage03==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage04==1)
{
page_index.txt+="â—‹"
}
vis page_index,1
} }
printh 92
Postinitialize Event prints "current_page",0
sendme printh 00
prints "buttonpage02",0
printh 00
printh FF FF FF
Variable (string) lastclick Variable (string) lastclick
Attributes Attributes
@@ -62,7 +70,7 @@ Variable (string) page_name
Variable (int32) confirm Variable (int32) confirm
Attributes Attributes
ID : 11 ID : 10
Scope: local Scope: local
Value: 0 Value: 0
@@ -88,7 +96,7 @@ Text page_index
Text button01pic Text button01pic
Attributes Attributes
ID : 12 ID : 11
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -98,7 +106,7 @@ Text button01pic
Text button02pic Text button02pic
Attributes Attributes
ID : 13 ID : 12
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -108,7 +116,7 @@ Text button02pic
Text button03pic Text button03pic
Attributes Attributes
ID : 14 ID : 13
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -118,7 +126,7 @@ Text button03pic
Text button04pic Text button04pic
Attributes Attributes
ID : 15 ID : 14
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -128,7 +136,7 @@ Text button04pic
Text button05pic Text button05pic
Attributes Attributes
ID : 16 ID : 15
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -138,7 +146,7 @@ Text button05pic
Text button06pic Text button06pic
Attributes Attributes
ID : 17 ID : 16
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -148,7 +156,7 @@ Text button06pic
Text button07pic Text button07pic
Attributes Attributes
ID : 18 ID : 17
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -158,7 +166,7 @@ Text button07pic
Text button08pic Text button08pic
Attributes Attributes
ID : 19 ID : 18
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -168,7 +176,7 @@ Text button08pic
Text button01text Text button01text
Attributes Attributes
ID : 20 ID : 19
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -178,7 +186,7 @@ Text button01text
Text button02text Text button02text
Attributes Attributes
ID : 21 ID : 20
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -188,7 +196,7 @@ Text button02text
Text button03text Text button03text
Attributes Attributes
ID : 22 ID : 21
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -198,7 +206,7 @@ Text button03text
Text button04text Text button04text
Attributes Attributes
ID : 23 ID : 22
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -208,7 +216,7 @@ Text button04text
Text button05text Text button05text
Attributes Attributes
ID : 24 ID : 23
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -218,7 +226,7 @@ Text button05text
Text button06text Text button06text
Attributes Attributes
ID : 25 ID : 24
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -228,7 +236,7 @@ Text button06text
Text button07text Text button07text
Attributes Attributes
ID : 26 ID : 25
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -238,7 +246,7 @@ Text button07text
Text button08text Text button08text
Attributes Attributes
ID : 27 ID : 26
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -248,7 +256,7 @@ Text button08text
Text button01icon Text button01icon
Attributes Attributes
ID : 28 ID : 27
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -258,7 +266,7 @@ Text button01icon
Text button02icon Text button02icon
Attributes Attributes
ID : 29 ID : 28
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -268,7 +276,7 @@ Text button02icon
Text button03icon Text button03icon
Attributes Attributes
ID : 30 ID : 29
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -278,7 +286,7 @@ Text button03icon
Text button04icon Text button04icon
Attributes Attributes
ID : 31 ID : 30
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -288,7 +296,7 @@ Text button04icon
Text button05icon Text button05icon
Attributes Attributes
ID : 32 ID : 31
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -298,7 +306,7 @@ Text button05icon
Text button06icon Text button06icon
Attributes Attributes
ID : 33 ID : 32
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -308,7 +316,7 @@ Text button06icon
Text button07icon Text button07icon
Attributes Attributes
ID : 34 ID : 33
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -318,7 +326,7 @@ Text button07icon
Text button08icon Text button08icon
Attributes Attributes
ID : 35 ID : 34
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -328,7 +336,7 @@ Text button08icon
Text button01bri Text button01bri
Attributes Attributes
ID : 36 ID : 35
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -338,7 +346,7 @@ Text button01bri
Text button02bri Text button02bri
Attributes Attributes
ID : 37 ID : 36
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -348,7 +356,7 @@ Text button02bri
Text button03bri Text button03bri
Attributes Attributes
ID : 38 ID : 37
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -358,7 +366,7 @@ Text button03bri
Text button04bri Text button04bri
Attributes Attributes
ID : 39 ID : 38
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -368,7 +376,7 @@ Text button04bri
Text button05bri Text button05bri
Attributes Attributes
ID : 40 ID : 39
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -378,7 +386,7 @@ Text button05bri
Text button06bri Text button06bri
Attributes Attributes
ID : 41 ID : 40
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -388,7 +396,7 @@ Text button06bri
Text button07bri Text button07bri
Attributes Attributes
ID : 42 ID : 41
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -398,7 +406,7 @@ Text button07bri
Text button08bri Text button08bri
Attributes Attributes
ID : 43 ID : 42
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -406,16 +414,6 @@ Text button08bri
Text : Text :
Max. Text Size : 4 Max. Text Size : 4
Text unavailable
Attributes
ID : 52
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Button button_back Button button_back
Attributes Attributes
ID : 6 ID : 6
@@ -432,7 +430,7 @@ Button button_back
Hotspot button01 Hotspot button01
Attributes Attributes
ID : 44 ID : 43
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -468,7 +466,7 @@ Hotspot button01
Hotspot button02 Hotspot button02
Attributes Attributes
ID : 45 ID : 44
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -504,7 +502,7 @@ Hotspot button02
Hotspot button03 Hotspot button03
Attributes Attributes
ID : 46 ID : 45
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -540,7 +538,7 @@ Hotspot button03
Hotspot button04 Hotspot button04
Attributes Attributes
ID : 47 ID : 46
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -576,7 +574,7 @@ Hotspot button04
Hotspot button05 Hotspot button05
Attributes Attributes
ID : 48 ID : 47
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -612,7 +610,7 @@ Hotspot button05
Hotspot button06 Hotspot button06
Attributes Attributes
ID : 49 ID : 48
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -648,7 +646,7 @@ Hotspot button06
Hotspot button07 Hotspot button07
Attributes Attributes
ID : 50 ID : 49
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -684,7 +682,7 @@ Hotspot button07
Hotspot button08 Hotspot button08
Attributes Attributes
ID : 51 ID : 50
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -748,29 +746,6 @@ Timer click_timer
printh FF FF FF printh FF FF FF
click_timer.en=0 click_timer.en=0
Timer wakeup_timer
Attributes
ID : 10
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
TouchCap swipe TouchCap swipe
Attributes Attributes
ID : 1 ID : 1
@@ -782,6 +757,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer swipestore.en=1 // Start swipestore timer
Touch Release Event Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0 swipestore.en=0
// Touch has ended, x // Touch has ended, x
if(tch0==0) if(tch0==0)
@@ -839,7 +818,7 @@ TouchCap swipe
} }
} }
// Down to Up // Down to Up
swipec=0-swipedy swipec2=0-swipedy
if(swipec<-100) if(swipec<-100)
{ {
if(is_buttonpage03==1&&is_buttonpage04==1) if(is_buttonpage03==1&&is_buttonpage04==1)

View File

@@ -12,6 +12,7 @@ Page buttonpage03
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
@@ -20,24 +21,31 @@ Page buttonpage03
vis 255,0 vis 255,0
vis button_back,1 vis button_back,1
vis page_label,1 vis page_label,1
if(is_buttonpage01==1) sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
if(sys0>1)
{ {
page_index.txt+="â—‹" if(is_buttonpage01==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage02==1)
{
page_index.txt+="â—‹"
}
page_index.txt+="●"
if(is_buttonpage04==1)
{
page_index.txt+="â—‹"
}
vis page_index,1
} }
if(is_buttonpage02==1)
{
page_index.txt+="â—‹"
}
page_index.txt+="●"
if(is_buttonpage04==1)
{
page_index.txt+="â—‹"
}
vis page_index,1
} }
printh 92
Postinitialize Event prints "current_page",0
sendme printh 00
prints "buttonpage03",0
printh 00
printh FF FF FF
Variable (string) lastclick Variable (string) lastclick
Attributes Attributes
@@ -62,7 +70,7 @@ Variable (string) page_name
Variable (int32) confirm Variable (int32) confirm
Attributes Attributes
ID : 11 ID : 10
Scope: local Scope: local
Value: 0 Value: 0
@@ -88,7 +96,7 @@ Text page_index
Text button01pic Text button01pic
Attributes Attributes
ID : 12 ID : 11
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -98,7 +106,7 @@ Text button01pic
Text button02pic Text button02pic
Attributes Attributes
ID : 13 ID : 12
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -108,7 +116,7 @@ Text button02pic
Text button03pic Text button03pic
Attributes Attributes
ID : 14 ID : 13
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -118,7 +126,7 @@ Text button03pic
Text button04pic Text button04pic
Attributes Attributes
ID : 15 ID : 14
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -128,7 +136,7 @@ Text button04pic
Text button05pic Text button05pic
Attributes Attributes
ID : 16 ID : 15
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -138,7 +146,7 @@ Text button05pic
Text button06pic Text button06pic
Attributes Attributes
ID : 17 ID : 16
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -148,7 +156,7 @@ Text button06pic
Text button07pic Text button07pic
Attributes Attributes
ID : 18 ID : 17
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -158,7 +166,7 @@ Text button07pic
Text button08pic Text button08pic
Attributes Attributes
ID : 19 ID : 18
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -168,7 +176,7 @@ Text button08pic
Text button01text Text button01text
Attributes Attributes
ID : 20 ID : 19
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -178,7 +186,7 @@ Text button01text
Text button02text Text button02text
Attributes Attributes
ID : 21 ID : 20
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -188,7 +196,7 @@ Text button02text
Text button03text Text button03text
Attributes Attributes
ID : 22 ID : 21
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -198,7 +206,7 @@ Text button03text
Text button04text Text button04text
Attributes Attributes
ID : 23 ID : 22
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -208,7 +216,7 @@ Text button04text
Text button05text Text button05text
Attributes Attributes
ID : 24 ID : 23
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -218,7 +226,7 @@ Text button05text
Text button06text Text button06text
Attributes Attributes
ID : 25 ID : 24
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -228,7 +236,7 @@ Text button06text
Text button07text Text button07text
Attributes Attributes
ID : 26 ID : 25
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -238,7 +246,7 @@ Text button07text
Text button08text Text button08text
Attributes Attributes
ID : 27 ID : 26
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -248,7 +256,7 @@ Text button08text
Text button01icon Text button01icon
Attributes Attributes
ID : 28 ID : 27
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -258,7 +266,7 @@ Text button01icon
Text button02icon Text button02icon
Attributes Attributes
ID : 29 ID : 28
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -268,7 +276,7 @@ Text button02icon
Text button03icon Text button03icon
Attributes Attributes
ID : 30 ID : 29
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -278,7 +286,7 @@ Text button03icon
Text button04icon Text button04icon
Attributes Attributes
ID : 31 ID : 30
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -288,7 +296,7 @@ Text button04icon
Text button05icon Text button05icon
Attributes Attributes
ID : 32 ID : 31
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -298,7 +306,7 @@ Text button05icon
Text button06icon Text button06icon
Attributes Attributes
ID : 33 ID : 32
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -308,7 +316,7 @@ Text button06icon
Text button07icon Text button07icon
Attributes Attributes
ID : 34 ID : 33
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -318,7 +326,7 @@ Text button07icon
Text button08icon Text button08icon
Attributes Attributes
ID : 35 ID : 34
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -328,7 +336,7 @@ Text button08icon
Text button01bri Text button01bri
Attributes Attributes
ID : 36 ID : 35
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -338,7 +346,7 @@ Text button01bri
Text button02bri Text button02bri
Attributes Attributes
ID : 37 ID : 36
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -348,7 +356,7 @@ Text button02bri
Text button03bri Text button03bri
Attributes Attributes
ID : 38 ID : 37
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -358,7 +366,7 @@ Text button03bri
Text button04bri Text button04bri
Attributes Attributes
ID : 39 ID : 38
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -368,7 +376,7 @@ Text button04bri
Text button05bri Text button05bri
Attributes Attributes
ID : 40 ID : 39
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -378,7 +386,7 @@ Text button05bri
Text button06bri Text button06bri
Attributes Attributes
ID : 41 ID : 40
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -388,7 +396,7 @@ Text button06bri
Text button07bri Text button07bri
Attributes Attributes
ID : 42 ID : 41
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -398,7 +406,7 @@ Text button07bri
Text button08bri Text button08bri
Attributes Attributes
ID : 43 ID : 42
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -406,16 +414,6 @@ Text button08bri
Text : Text :
Max. Text Size : 4 Max. Text Size : 4
Text unavailable
Attributes
ID : 52
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Button button_back Button button_back
Attributes Attributes
ID : 6 ID : 6
@@ -432,7 +430,7 @@ Button button_back
Hotspot button01 Hotspot button01
Attributes Attributes
ID : 44 ID : 43
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -468,7 +466,7 @@ Hotspot button01
Hotspot button02 Hotspot button02
Attributes Attributes
ID : 45 ID : 44
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -504,7 +502,7 @@ Hotspot button02
Hotspot button03 Hotspot button03
Attributes Attributes
ID : 46 ID : 45
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -540,7 +538,7 @@ Hotspot button03
Hotspot button04 Hotspot button04
Attributes Attributes
ID : 47 ID : 46
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -576,7 +574,7 @@ Hotspot button04
Hotspot button05 Hotspot button05
Attributes Attributes
ID : 48 ID : 47
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -612,7 +610,7 @@ Hotspot button05
Hotspot button06 Hotspot button06
Attributes Attributes
ID : 49 ID : 48
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -648,7 +646,7 @@ Hotspot button06
Hotspot button07 Hotspot button07
Attributes Attributes
ID : 50 ID : 49
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -684,7 +682,7 @@ Hotspot button07
Hotspot button08 Hotspot button08
Attributes Attributes
ID : 51 ID : 50
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -748,29 +746,6 @@ Timer click_timer
printh FF FF FF printh FF FF FF
click_timer.en=0 click_timer.en=0
Timer wakeup_timer
Attributes
ID : 10
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
TouchCap swipe TouchCap swipe
Attributes Attributes
ID : 1 ID : 1
@@ -782,6 +757,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer swipestore.en=1 // Start swipestore timer
Touch Release Event Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0 swipestore.en=0
// Touch has ended, x // Touch has ended, x
if(tch0==0) if(tch0==0)
@@ -835,7 +814,7 @@ TouchCap swipe
} }
} }
// Down to Up // Down to Up
swipec=0-swipedy swipec2=0-swipedy
if(swipec<-100) if(swipec<-100)
{ {
// Navigate back up the sequence based on active status // Navigate back up the sequence based on active status

View File

@@ -12,6 +12,7 @@ Page buttonpage04
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
@@ -20,24 +21,31 @@ Page buttonpage04
vis 255,0 vis 255,0
vis button_back,1 vis button_back,1
vis page_label,1 vis page_label,1
if(is_buttonpage01==1) sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
if(sys0>1)
{ {
page_index.txt+="â—‹" if(is_buttonpage01==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage02==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage03==1)
{
page_index.txt+="â—‹"
}
page_index.txt+="●"
vis page_index,1
} }
if(is_buttonpage02==1)
{
page_index.txt+="â—‹"
}
if(is_buttonpage03==1)
{
page_index.txt+="â—‹"
}
page_index.txt+="●"
vis page_index,1
} }
printh 92
Postinitialize Event prints "current_page",0
sendme printh 00
prints "buttonpage04",0
printh 00
printh FF FF FF
Variable (string) lastclick Variable (string) lastclick
Attributes Attributes
@@ -62,7 +70,7 @@ Variable (string) page_name
Variable (int32) confirm Variable (int32) confirm
Attributes Attributes
ID : 11 ID : 10
Scope: local Scope: local
Value: 0 Value: 0
@@ -88,7 +96,7 @@ Text page_index
Text button01pic Text button01pic
Attributes Attributes
ID : 12 ID : 11
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -98,7 +106,7 @@ Text button01pic
Text button02pic Text button02pic
Attributes Attributes
ID : 13 ID : 12
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -108,7 +116,7 @@ Text button02pic
Text button03pic Text button03pic
Attributes Attributes
ID : 14 ID : 13
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -118,7 +126,7 @@ Text button03pic
Text button04pic Text button04pic
Attributes Attributes
ID : 15 ID : 14
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -128,7 +136,7 @@ Text button04pic
Text button05pic Text button05pic
Attributes Attributes
ID : 16 ID : 15
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -138,7 +146,7 @@ Text button05pic
Text button06pic Text button06pic
Attributes Attributes
ID : 17 ID : 16
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -148,7 +156,7 @@ Text button06pic
Text button07pic Text button07pic
Attributes Attributes
ID : 18 ID : 17
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -158,7 +166,7 @@ Text button07pic
Text button08pic Text button08pic
Attributes Attributes
ID : 19 ID : 18
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -168,7 +176,7 @@ Text button08pic
Text button01text Text button01text
Attributes Attributes
ID : 20 ID : 19
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -178,7 +186,7 @@ Text button01text
Text button02text Text button02text
Attributes Attributes
ID : 21 ID : 20
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -188,7 +196,7 @@ Text button02text
Text button03text Text button03text
Attributes Attributes
ID : 22 ID : 21
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -198,7 +206,7 @@ Text button03text
Text button04text Text button04text
Attributes Attributes
ID : 23 ID : 22
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -208,7 +216,7 @@ Text button04text
Text button05text Text button05text
Attributes Attributes
ID : 24 ID : 23
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -218,7 +226,7 @@ Text button05text
Text button06text Text button06text
Attributes Attributes
ID : 25 ID : 24
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -228,7 +236,7 @@ Text button06text
Text button07text Text button07text
Attributes Attributes
ID : 26 ID : 25
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -238,7 +246,7 @@ Text button07text
Text button08text Text button08text
Attributes Attributes
ID : 27 ID : 26
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -248,7 +256,7 @@ Text button08text
Text button01icon Text button01icon
Attributes Attributes
ID : 28 ID : 27
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -258,7 +266,7 @@ Text button01icon
Text button02icon Text button02icon
Attributes Attributes
ID : 29 ID : 28
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -268,7 +276,7 @@ Text button02icon
Text button03icon Text button03icon
Attributes Attributes
ID : 30 ID : 29
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -278,7 +286,7 @@ Text button03icon
Text button04icon Text button04icon
Attributes Attributes
ID : 31 ID : 30
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -288,7 +296,7 @@ Text button04icon
Text button05icon Text button05icon
Attributes Attributes
ID : 32 ID : 31
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -298,7 +306,7 @@ Text button05icon
Text button06icon Text button06icon
Attributes Attributes
ID : 33 ID : 32
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -308,7 +316,7 @@ Text button06icon
Text button07icon Text button07icon
Attributes Attributes
ID : 34 ID : 33
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -318,7 +326,7 @@ Text button07icon
Text button08icon Text button08icon
Attributes Attributes
ID : 35 ID : 34
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -328,7 +336,7 @@ Text button08icon
Text button01bri Text button01bri
Attributes Attributes
ID : 36 ID : 35
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -338,7 +346,7 @@ Text button01bri
Text button02bri Text button02bri
Attributes Attributes
ID : 37 ID : 36
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -348,7 +356,7 @@ Text button02bri
Text button03bri Text button03bri
Attributes Attributes
ID : 38 ID : 37
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -358,7 +366,7 @@ Text button03bri
Text button04bri Text button04bri
Attributes Attributes
ID : 39 ID : 38
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -368,7 +376,7 @@ Text button04bri
Text button05bri Text button05bri
Attributes Attributes
ID : 40 ID : 39
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -378,7 +386,7 @@ Text button05bri
Text button06bri Text button06bri
Attributes Attributes
ID : 41 ID : 40
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -388,7 +396,7 @@ Text button06bri
Text button07bri Text button07bri
Attributes Attributes
ID : 42 ID : 41
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -398,7 +406,7 @@ Text button07bri
Text button08bri Text button08bri
Attributes Attributes
ID : 43 ID : 42
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : disabled Send Component ID : disabled
@@ -406,16 +414,6 @@ Text button08bri
Text : Text :
Max. Text Size : 4 Max. Text Size : 4
Text unavailable
Attributes
ID : 52
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Button button_back Button button_back
Attributes Attributes
ID : 6 ID : 6
@@ -432,7 +430,7 @@ Button button_back
Hotspot button01 Hotspot button01
Attributes Attributes
ID : 44 ID : 43
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -468,7 +466,7 @@ Hotspot button01
Hotspot button02 Hotspot button02
Attributes Attributes
ID : 45 ID : 44
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -504,7 +502,7 @@ Hotspot button02
Hotspot button03 Hotspot button03
Attributes Attributes
ID : 46 ID : 45
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -540,7 +538,7 @@ Hotspot button03
Hotspot button04 Hotspot button04
Attributes Attributes
ID : 47 ID : 46
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -576,7 +574,7 @@ Hotspot button04
Hotspot button05 Hotspot button05
Attributes Attributes
ID : 48 ID : 47
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -612,7 +610,7 @@ Hotspot button05
Hotspot button06 Hotspot button06
Attributes Attributes
ID : 49 ID : 48
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -648,7 +646,7 @@ Hotspot button06
Hotspot button07 Hotspot button07
Attributes Attributes
ID : 50 ID : 49
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -684,7 +682,7 @@ Hotspot button07
Hotspot button08 Hotspot button08
Attributes Attributes
ID : 51 ID : 50
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -748,29 +746,6 @@ Timer click_timer
printh FF FF FF printh FF FF FF
click_timer.en=0 click_timer.en=0
Timer wakeup_timer
Attributes
ID : 10
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
TouchCap swipe TouchCap swipe
Attributes Attributes
ID : 1 ID : 1
@@ -782,6 +757,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer swipestore.en=1 // Start swipestore timer
Touch Release Event Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0 swipestore.en=0
// Touch has ended, x // Touch has ended, x
if(tch0==0) if(tch0==0)
@@ -791,15 +770,15 @@ TouchCap swipe
if(swipec>swipedx) if(swipec>swipedx)
{ {
// Navigate back based on active status // Navigate back based on active status
if(is_entitypage03==1) if(is_buttonpage03==1)
{ {
page entitypage03 page buttonpage03
}else if(is_entitypage02==1) }else if(is_buttonpage02==1)
{ {
page entitypage02 page buttonpage02
}else if(is_entitypage01==1) }else if(is_buttonpage01==1)
{ {
page entitypage01 page buttonpage01
}else }else
{ {
page home page home
@@ -819,14 +798,14 @@ TouchCap swipe
// From Up to Down // From Up to Down
if(swipec>100) if(swipec>100)
{ {
if(is_entitypage03==1&&is_entitypage02==1) if(is_buttonpage03==1&&is_buttonpage02==1)
{ {
page entitypage02 page buttonpage02
}else if(is_entitypage03==1||is_entitypage02==1) }else if(is_buttonpage03==1||is_buttonpage02==1)
{ {
if(is_entitypage01==1) if(is_buttonpage01==1)
{ {
page entitypage01 page buttonpage01
}else }else
{ {
page home page home
@@ -837,19 +816,19 @@ TouchCap swipe
} }
} }
// Down to Up // Down to Up
swipec=0-swipedy swipec2=0-swipedy
if(swipec<-100) if(swipec<-100)
{ {
// Navigate back up the sequence based on active status // Navigate back up the sequence based on active status
if(is_entitypage01==1) if(is_buttonpage01==1)
{ {
page entitypage01 page buttonpage01
}else if(is_entitypage02==1) }else if(is_buttonpage02==1)
{ {
page entitypage02 page buttonpage02
}else if(is_entitypage03==1) }else if(is_buttonpage03==1)
{ {
page entitypage03 page buttonpage03
}else }else
{ {
page home page home

View File

@@ -12,6 +12,7 @@ Page climate
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==1||embedded.val==1) if(api==1||embedded.val==1)
{ {
vis target_icon,0 vis target_icon,0
@@ -32,10 +33,12 @@ Page climate
{ {
page home page home
} }
vis unavailable,0 printh 92
prints "current_page",0
Postinitialize Event printh 00
sendme prints "climate",0
printh 00
printh FF FF FF
Page Exit Event Page Exit Event
covx embedded.val,va2.txt,0,0 covx embedded.val,va2.txt,0,0
@@ -143,56 +146,56 @@ Variable (string) click_comp
Variable (int32) active_slider Variable (int32) active_slider
Attributes Attributes
ID : 42 ID : 41
Scope: local Scope: local
Value: 1 Value: 1
Variable (int32) is_temp_range Variable (int32) is_temp_range
Attributes Attributes
ID : 44 ID : 43
Scope: local Scope: local
Value: 0 Value: 0
Variable (int32) temp_number1 Variable (int32) temp_number1
Attributes Attributes
ID : 48 ID : 47
Scope: local Scope: local
Value: 0 Value: 0
Variable (int32) temp_number2 Variable (int32) temp_number2
Attributes Attributes
ID : 49 ID : 48
Scope: local Scope: local
Value: 0 Value: 0
Variable (string) temp_unit Variable (string) temp_unit
Attributes Attributes
ID : 50 ID : 49
Scope : local Scope : local
Text : ° Text : °
Max. Text Size: 10 Max. Text Size: 10
Variable (int32) temp_low_max Variable (int32) temp_low_max
Attributes Attributes
ID : 51 ID : 50
Scope: local Scope: local
Value: 0 Value: 0
Variable (int32) temp_high_min Variable (int32) temp_high_min
Attributes Attributes
ID : 52 ID : 51
Scope: local Scope: local
Value: 0 Value: 0
Variable (int32) temp_gap Variable (int32) temp_gap
Attributes Attributes
ID : 53 ID : 52
Scope: local Scope: local
Value: 0 Value: 0
Variable (string) dec_separator Variable (string) dec_separator
Attributes Attributes
ID : 55 ID : 53
Scope : local Scope : local
Text : . Text : .
Max. Text Size: 5 Max. Text Size: 5
@@ -526,7 +529,7 @@ Text target_high
Text target_low Text target_low
Attributes Attributes
ID : 43 ID : 42
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID : on press and release Send Component ID : on press and release
@@ -538,16 +541,6 @@ Text target_low
Touch Release Event Touch Release Event
active_slider.val=2 active_slider.val=2
Text unavailable
Attributes
ID : 54
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Slider slider_high Slider slider_high
Attributes Attributes
ID : 7 ID : 7
@@ -583,7 +576,7 @@ Slider slider_high
Slider slider_low Slider slider_low
Attributes Attributes
ID : 41 ID : 40
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -616,7 +609,7 @@ Slider slider_low
Slider climateslider Slider climateslider
Attributes Attributes
ID : 45 ID : 44
Scope : local Scope : local
Dragging : 0 Dragging : 0
Send Component ID: on press and release Send Component ID: on press and release
@@ -831,32 +824,9 @@ Timer click_timer
printh FF FF FF printh FF FF FF
click_timer.en=0 click_timer.en=0
Timer wakeup_timer
Attributes
ID : 40
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
Timer timer1 Timer timer1
Attributes Attributes
ID : 46 ID : 45
Scope : local Scope : local
Period (ms): 1000 Period (ms): 1000
Enabled : no Enabled : no
@@ -876,7 +846,7 @@ Timer timer1
Timer timer2 Timer timer2
Attributes Attributes
ID : 47 ID : 46
Scope : local Scope : local
Period (ms): 1000 Period (ms): 1000
Enabled : no Enabled : no

View File

@@ -12,14 +12,17 @@ Page confirm
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
} }
vis unavailable,0 printh 92
prints "current_page",0
Postinitialize Event printh 00
sendme prints "confirm",0
printh 00
printh FF FF FF
Variable (int32) page_id Variable (int32) page_id
Attributes Attributes
@@ -78,16 +81,6 @@ Text body
Text : Please confirm Text : Please confirm
Max. Text Size : 255 Max. Text Size : 255
Text unavailable
Attributes
ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Button bclose Button bclose
Attributes Attributes
ID : 2 ID : 2
@@ -137,26 +130,3 @@ Button bt_clear
Touch Release Event Touch Release Event
page page_id.val page page_id.val
Timer wakeup_timer
Attributes
ID : 11
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}

View File

@@ -12,14 +12,17 @@ Page cover
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
} }
vis unavailable,0 printh 92
prints "current_page",0
Postinitialize Event printh 00
sendme prints "cover",0
printh 00
printh FF FF FF
Variable (string) va1 Variable (string) va1
Attributes Attributes
@@ -85,16 +88,6 @@ Text battery_icon
Text : Text :
Max. Text Size : 10 Max. Text Size : 10
Text unavailable
Attributes
ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Slider coverslider Slider coverslider
Attributes Attributes
ID : 6 ID : 6
@@ -188,26 +181,3 @@ Button button_back
Touch Press Event Touch Press Event
page back_page_id page back_page_id
Timer wakeup_timer
Attributes
ID : 13
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}

View File

@@ -12,27 +12,37 @@ Page entitypage01
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
} }
vis unavailable,0 sys0=is_entitypage01+is_entitypage02+is_entitypage03+is_entitypage04
page_index.txt+="●" if(sys0>1)
if(is_entitypage02==1)
{ {
page_index.txt+="â—" page_index.txt+="●"
} if(is_entitypage02==1)
if(is_entitypage03==1) {
page_index.txt+="â—‹"
}
if(is_entitypage03==1)
{
page_index.txt+="â—‹"
}
if(is_entitypage04==1)
{
page_index.txt+="â—‹"
}
}else
{ {
page_index.txt+="â—‹" vis page_index,0
} }
if(is_entitypage04==1) printh 92
{ prints "current_page",0
page_index.txt+="â—‹" printh 00
} prints "entitypage01",0
printh 00
Postinitialize Event printh FF FF FF
sendme
Text value01_label Text value01_label
Attributes Attributes
@@ -294,16 +304,6 @@ Text page_index
Text : Text :
Max. Text Size : 12 Max. Text Size : 12
Text unavailable
Attributes
ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Button button_back Button button_back
Attributes Attributes
ID : 28 ID : 28
@@ -330,29 +330,6 @@ Timer swipestore
swipex=tch0 swipex=tch0
swipey=tch1 swipey=tch1
Timer wakeup_timer
Attributes
ID : 30
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
TouchCap swipe TouchCap swipe
Attributes Attributes
ID : 1 ID : 1
@@ -364,6 +341,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer swipestore.en=1 // Start swipestore timer
Touch Release Event Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0 swipestore.en=0
// Touch has ended, x // Touch has ended, x
if(tch0==0) if(tch0==0)
@@ -415,7 +396,7 @@ TouchCap swipe
} }
} }
// Down to Up // Down to Up
swipec=0-swipedy swipec2=0-swipedy
if(swipec<-100) if(swipec<-100)
{ {
if(is_entitypage02==1) // Check if entitypage02 is active if(is_entitypage02==1) // Check if entitypage02 is active

View File

@@ -12,27 +12,37 @@ Page entitypage02
Events Events
Preinitialize Event Preinitialize Event
dim=brightness
if(api==0) if(api==0)
{ {
page home page home
} }
vis unavailable,0 sys0=is_entitypage01+is_entitypage02+is_entitypage03+is_entitypage04
if(is_entitypage01==1) if(sys0>1)
{ {
page_index.txt+="â—‹" if(is_entitypage01==1)
} {
page_index.txt+="●" page_index.txt+="â—"
if(is_entitypage03==1) }
page_index.txt+="●"
if(is_entitypage03==1)
{
page_index.txt+="â—‹"
}
if(is_entitypage04==1)
{
page_index.txt+="â—‹"
}
}else
{ {
page_index.txt+="â—‹" vis page_index,0
} }
if(is_entitypage04==1) printh 92
{ prints "current_page",0
page_index.txt+="â—‹" printh 00
} prints "entitypage02",0
printh 00
Postinitialize Event printh FF FF FF
sendme
Text value01_label Text value01_label
Attributes Attributes
@@ -294,16 +304,6 @@ Text page_index
Text : Text :
Max. Text Size : 12 Max. Text Size : 12
Text unavailable
Attributes
ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Button button_back Button button_back
Attributes Attributes
ID : 28 ID : 28
@@ -330,29 +330,6 @@ Timer swipestore
swipex=tch0 swipex=tch0
swipey=tch1 swipey=tch1
Timer wakeup_timer
Attributes
ID : 30
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}
TouchCap swipe TouchCap swipe
Attributes Attributes
ID : 1 ID : 1
@@ -364,6 +341,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer swipestore.en=1 // Start swipestore timer
Touch Release Event Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0 swipestore.en=0
// Touch has ended, x // Touch has ended, x
if(tch0==0) if(tch0==0)
@@ -421,7 +402,7 @@ TouchCap swipe
} }
} }
// Down to Up // Down to Up
swipec=0-swipedy swipec2=0-swipedy
if(swipec<-100) if(swipec<-100)
{ {
if(is_entitypage03==1&&is_entitypage04==1) if(is_entitypage03==1&&is_entitypage04==1)

Some files were not shown because too many files have changed in this diff Show More