Compare commits
513 Commits
e9aa032f66
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c887023191 | |||
| 930fd8aeed | |||
|
|
e667aa2c82 | ||
|
|
33b966c356 | ||
|
|
1325055d13 | ||
|
|
9ea9f626dd | ||
|
|
7d2db5e606 | ||
|
|
0af27acb91 | ||
|
|
0497417939 | ||
|
|
7b406d85f1 | ||
|
|
7ffaba6ef1 | ||
|
|
ddf92517b8 | ||
|
|
7f260a3108 | ||
|
|
ea603a46c7 | ||
|
|
5987abae14 | ||
|
|
e9a35a4aec | ||
|
|
ead60e7a82 | ||
|
|
35dc8aa3b5 | ||
|
|
43fd89a679 | ||
|
|
720e5c3a15 | ||
|
|
02c8168667 | ||
|
|
c37d2695a7 | ||
|
|
96986dcecd | ||
|
|
450810a222 | ||
|
|
6331f247b5 | ||
|
|
c9338404ba | ||
|
|
db578c34bf | ||
|
|
3e51445c62 | ||
|
|
eac6dd1cf7 | ||
|
|
1d247db8e8 | ||
|
|
c0d9d70c58 | ||
|
|
61bdaf0fa3 | ||
|
|
c4b91b8ea0 | ||
|
|
72d4cd4b01 | ||
|
|
bd4a8d5946 | ||
|
|
163e28c6fd | ||
|
|
9063030ba2 | ||
|
|
fe26e30a06 | ||
|
|
85e207914c | ||
|
|
baef06fadf | ||
|
|
79253683f9 | ||
|
|
1c43b8a874 | ||
|
|
fdae613124 | ||
|
|
4e329cb58c | ||
|
|
0654a54730 | ||
|
|
376a9c2c0b | ||
|
|
29baa6c808 | ||
|
|
e20c4d2af2 | ||
|
|
6278cd739e | ||
|
|
edd1d3fdb8 | ||
|
|
1cbb5c17d7 | ||
|
|
075ec9f7fb | ||
|
|
66c5e58c02 | ||
|
|
403f69c25c | ||
|
|
6021afc0f4 | ||
|
|
d0152de676 | ||
|
|
78cf4333f1 | ||
|
|
fcc1b54b6c | ||
|
|
d106243bd5 | ||
|
|
a44b1750ba | ||
|
|
9cdaca8371 | ||
|
|
0c634cfc55 | ||
|
|
52be1226e5 | ||
|
|
8be27ae04b | ||
|
|
4b049312da | ||
|
|
246f301490 | ||
|
|
6c10d13a28 | ||
|
|
2b7287e89d | ||
|
|
8026ee1846 | ||
|
|
2f26b759da | ||
|
|
da98f9570d | ||
|
|
02b0b25cae | ||
|
|
e3605eab5d | ||
|
|
5c867d1653 | ||
|
|
822b6dab97 | ||
|
|
5206898c98 | ||
|
|
5274b97551 | ||
|
|
544b2bc9cf | ||
|
|
c9be4d2422 | ||
|
|
a5092a5939 | ||
|
|
62bd8eed17 | ||
|
|
6276551560 | ||
|
|
ca10827074 | ||
|
|
ddea304d1b | ||
|
|
85d6abae93 | ||
|
|
6c2c9ab5bd | ||
|
|
acf96d4f30 | ||
|
|
a6f62a053c | ||
|
|
94d51c4b49 | ||
|
|
7da53ef510 | ||
|
|
8a60a15682 | ||
|
|
e265acfcf1 | ||
|
|
40eae7c065 | ||
|
|
2f562cdd72 | ||
|
|
d1d0a124b1 | ||
|
|
d59361f937 | ||
|
|
f0f64738ef | ||
|
|
2a0f92d548 | ||
|
|
60078bd680 | ||
|
|
3b2a6b7554 | ||
|
|
f76eccd06d | ||
|
|
359c9ed4f0 | ||
|
|
2378e171d0 | ||
|
|
53aeb3e1ec | ||
|
|
f93c4d8d47 | ||
|
|
a4fb6324d4 | ||
|
|
89f95899a1 | ||
|
|
ba1e074bf8 | ||
|
|
0529e39c31 | ||
|
|
178b940b46 | ||
|
|
dcde6ce3fb | ||
|
|
3f28641903 | ||
|
|
9cb230fd5f | ||
|
|
1cdd417340 | ||
|
|
77f9cf66f1 | ||
|
|
b5784187ae | ||
|
|
94ad0211e0 | ||
|
|
706864a4da | ||
|
|
b07f88b5db | ||
|
|
f3a67bb3d3 | ||
|
|
d3ec9a2a2f | ||
|
|
9babe8984d | ||
|
|
4ad2619108 | ||
|
|
36d0027845 | ||
|
|
9e52f7f39d | ||
|
|
86d5859045 | ||
|
|
47fb10ed1b | ||
|
|
9e5fb231cb | ||
|
|
4cb526b8cc | ||
|
|
9ac00037ae | ||
|
|
1e90d63b94 | ||
|
|
bed4c7dad0 | ||
|
|
4ad14d5e0f | ||
|
|
dc8fdbc44e | ||
|
|
64489159ac | ||
|
|
6acd5c945b | ||
|
|
fc0f727d83 | ||
|
|
bc590b9ccf | ||
|
|
a3c707b4e3 | ||
|
|
6f4e1f610f | ||
|
|
99a86408a2 | ||
|
|
34889bac3b | ||
|
|
4477fe9e50 | ||
|
|
94018819f0 | ||
|
|
c7f7e0c7c3 | ||
|
|
ff6a21df39 | ||
|
|
2f45083db5 | ||
|
|
cd4fef6870 | ||
|
|
c64132d7b5 | ||
|
|
376d91aa5a | ||
|
|
b8d8252c19 | ||
|
|
75c35399f1 | ||
|
|
694ab4f98f | ||
|
|
896f86ddab | ||
|
|
12837077da | ||
|
|
70c11efd96 | ||
|
|
10e0a47b6f | ||
|
|
88cca0d1bf | ||
|
|
c727fcd17b | ||
|
|
6be727d4af | ||
|
|
3a2dd23f86 | ||
|
|
e1e157a2b8 | ||
|
|
c6d4929a53 | ||
|
|
ca7dcd92a9 | ||
|
|
593f05feb9 | ||
|
|
b30ba76960 | ||
|
|
c98f50543d | ||
|
|
019efade79 | ||
|
|
a96ac51ed6 | ||
|
|
ea6b8bc1b3 | ||
|
|
bf508ae8cb | ||
|
|
610563f80d | ||
|
|
cc787deba0 | ||
|
|
05a4b1363b | ||
|
|
113984a7e3 | ||
|
|
314a0a8eab | ||
|
|
d75d559a1e | ||
|
|
e4b00d5e71 | ||
|
|
e98a6a45a3 | ||
|
|
6f432a54fd | ||
|
|
0eb8654663 | ||
|
|
d368cb2239 | ||
|
|
9920d23477 | ||
|
|
93b3281e6e | ||
|
|
03b993a83c | ||
|
|
8bb708b448 | ||
|
|
185c6f5d65 | ||
|
|
674c3d909d | ||
|
|
fba844f261 | ||
|
|
2f697923cc | ||
|
|
5fbae3128f | ||
|
|
d1b973847e | ||
|
|
c58dbc3516 | ||
|
|
61aa97f64e | ||
|
|
0ca7b9fcc7 | ||
|
|
1718d9d6cf | ||
|
|
aafbc722fd | ||
|
|
41b2dc0d58 | ||
|
|
25885620b6 | ||
|
|
b66d78bcbd | ||
|
|
c0e34f284d | ||
|
|
a5ab52653c | ||
|
|
5db3f59679 | ||
|
|
96b0e0a6c6 | ||
|
|
fddaf9bc6e | ||
|
|
2542386c2d | ||
|
|
140cbdd409 | ||
|
|
3bb4bdd49f | ||
|
|
a78a282b41 | ||
|
|
0e6853f3bf | ||
|
|
b0d4d22404 | ||
|
|
d09680b87c | ||
|
|
9b3f64835d | ||
|
|
d9d7e66bbf | ||
|
|
49170c1b6a | ||
|
|
8a80839aec | ||
|
|
4ede301ffa | ||
|
|
54b87d3d6a | ||
|
|
53113a26d9 | ||
|
|
7eed2adcc6 | ||
|
|
6632404c4d | ||
|
|
f46ea5dc14 | ||
|
|
6e0137bcec | ||
|
|
59f9b1ffb5 | ||
|
|
1f835c5a48 | ||
|
|
f2eabcf059 | ||
|
|
2e802607bb | ||
|
|
29c5e8eea5 | ||
|
|
d0fe64fd67 | ||
|
|
c20f88a3ee | ||
|
|
fdec06482d | ||
|
|
913d43959b | ||
|
|
e40aa6d1ca | ||
|
|
235a5b2970 | ||
|
|
c9d2f0d846 | ||
|
|
bedd30c68f | ||
|
|
18e9458a57 | ||
|
|
e61f78fdcf | ||
|
|
22e655d0e3 | ||
|
|
3b12a95ae0 | ||
|
|
a2870f9080 | ||
|
|
b044561e11 | ||
|
|
2b00485249 | ||
|
|
bf2ce54279 | ||
|
|
58c158a426 | ||
|
|
f3100081a4 | ||
|
|
2580eeb668 | ||
|
|
5cdadc79ce | ||
|
|
e49657230d | ||
|
|
0b0e0a4982 | ||
|
|
0248a825e1 | ||
|
|
720f640ec0 | ||
|
|
4e421bdc23 | ||
|
|
7fc9214667 | ||
|
|
072e1c6bd5 | ||
|
|
aad0c3daf1 | ||
|
|
383d5d3d52 | ||
|
|
60c9bfc072 | ||
|
|
2d895f8ae8 | ||
|
|
6f9090a866 | ||
|
|
0fccde0385 | ||
|
|
410d4b789d | ||
|
|
887c3155c2 | ||
|
|
87d292496a | ||
|
|
f0d1b9a7aa | ||
|
|
c7bfe4096a | ||
|
|
8531a49621 | ||
|
|
6a93083eb7 | ||
|
|
2393834ae8 | ||
|
|
0e089b292b | ||
|
|
89bda1e0c4 | ||
|
|
a7574100f0 | ||
|
|
29effe36f8 | ||
|
|
af055283f7 | ||
|
|
e5c6f25181 | ||
|
|
530697642e | ||
|
|
684e6e24a5 | ||
|
|
9d48e766b3 | ||
|
|
c281a037c2 | ||
|
|
1718bd55f6 | ||
|
|
c51ca1bd06 | ||
|
|
41aa61c76e | ||
|
|
77d7d7ee23 | ||
|
|
2fd5881c66 | ||
|
|
f03f825df8 | ||
|
|
d039c04a95 | ||
|
|
ff6e524548 | ||
|
|
565df092d4 | ||
|
|
c6f692b0f9 | ||
|
|
acba8b053e | ||
|
|
840554ae8e | ||
|
|
2eeda11841 | ||
|
|
f6f032ae22 | ||
|
|
f304a5c078 | ||
|
|
41c320a3d6 | ||
|
|
bf0aa0f8fb | ||
|
|
c3d55a284e | ||
|
|
ae05f133e1 | ||
|
|
c74eabbe95 | ||
|
|
cbd341a784 | ||
|
|
67892fb6ed | ||
|
|
63dd57d7f3 | ||
|
|
5d102472a1 | ||
|
|
e1dd490d4f | ||
|
|
6c52b16ed1 | ||
|
|
27b458ae2c | ||
|
|
f964620f57 | ||
|
|
a00e87b147 | ||
|
|
cb1f214179 | ||
|
|
ab04f7a86d | ||
|
|
ea5e349d7a | ||
|
|
653b525bf0 | ||
|
|
a665abd22c | ||
|
|
cccbdd96fd | ||
|
|
ea459c8bf4 | ||
|
|
386d39d85a | ||
|
|
37cf913c0b | ||
|
|
48f60c7f99 | ||
|
|
ec74ebcc79 | ||
|
|
c2ad0e9669 | ||
|
|
04ae094baf | ||
|
|
b85883993f | ||
|
|
39d41914f4 | ||
|
|
5df7602fc8 | ||
|
|
ccecd91f6f | ||
|
|
53781082e6 | ||
|
|
071007124b | ||
|
|
dd844d1d3c | ||
|
|
fe7eae4191 | ||
|
|
801324744c | ||
|
|
e338d130e5 | ||
|
|
47d8425683 | ||
|
|
844cc0ec4e | ||
|
|
c27a097a5d | ||
|
|
efdd18995d | ||
|
|
82ceca57a7 | ||
|
|
942bd84874 | ||
|
|
cf4b2b8f3c | ||
|
|
808db53981 | ||
|
|
d62623eef7 | ||
|
|
eb640fb09d | ||
|
|
7e9118a3ce | ||
|
|
f7459b0148 | ||
|
|
5f5b7cb36c | ||
|
|
1c61acbb63 | ||
|
|
9b2f7bd2b8 | ||
|
|
dd9e0ec79e | ||
|
|
a012b17653 | ||
|
|
4d7e4da594 | ||
|
|
d5a0bde06c | ||
|
|
7db6e4598d | ||
|
|
3fb8343246 | ||
|
|
d2b924b355 | ||
|
|
dbf57053db | ||
|
|
d35c2a77ba | ||
|
|
64b72ca2d5 | ||
|
|
6d5af5a6e0 | ||
|
|
69bf13326c | ||
|
|
72fa7abb2a | ||
|
|
772ede7f48 | ||
|
|
1b8c1265e9 | ||
|
|
fddf3bda9f | ||
|
|
ad8cc7788b | ||
|
|
a3f54d5c43 | ||
|
|
828a07a636 | ||
|
|
5e5476f6e2 | ||
|
|
231c9aa426 | ||
|
|
7455df28e8 | ||
|
|
e263047b15 | ||
|
|
a85f6fb6c3 | ||
|
|
fc9017b3c6 | ||
|
|
98aae56235 | ||
|
|
ff9de5bf26 | ||
|
|
2f47ffc42b | ||
|
|
6af2ddac99 | ||
|
|
a647c69f53 | ||
|
|
e2c639a32d | ||
|
|
7a18b75204 | ||
|
|
e0415c35cd | ||
|
|
7fda931f67 | ||
|
|
b1412f1d12 | ||
|
|
94782bf9fc | ||
|
|
3dbf577a92 | ||
|
|
ce43a31242 | ||
|
|
cc756fda35 | ||
|
|
f28a02fd5d | ||
|
|
5f850ae6a3 | ||
|
|
4e7bbef1a0 | ||
|
|
447a07c65b | ||
|
|
480848558f | ||
|
|
8f52de210c | ||
|
|
54a4e7775f | ||
|
|
9059b20773 | ||
|
|
8226ea6a5b | ||
|
|
3f39dbcad8 | ||
|
|
56813c795b | ||
|
|
9c807f288d | ||
|
|
271362511f | ||
|
|
7fca55361c | ||
|
|
16b5ce4b0b | ||
|
|
114ea35e55 | ||
|
|
a9dae8fd08 | ||
|
|
27bd854bd5 | ||
|
|
ac3be262fd | ||
|
|
01e99b2f72 | ||
|
|
9cd8f6121f | ||
|
|
d28ab920c8 | ||
|
|
9e6fb6eb85 | ||
|
|
0d4293b6e4 | ||
|
|
59d4c09857 | ||
|
|
05f7932d04 | ||
|
|
05bb498e34 | ||
|
|
79573eb541 | ||
|
|
4a52b06704 | ||
|
|
bac85239d0 | ||
|
|
218c551c3e | ||
|
|
153a906215 | ||
|
|
efee51ea3d | ||
|
|
3d1baba9cb | ||
|
|
7e00837d8b | ||
|
|
fb8448fb7d | ||
|
|
7829382653 | ||
|
|
61c2c93c40 | ||
|
|
2e4b7f2a87 | ||
|
|
55ed3775d1 | ||
|
|
fc53bfc8d8 | ||
|
|
cd19e9174b | ||
|
|
1179f94ae2 | ||
|
|
7ce40bc4b7 | ||
|
|
37232e19a0 | ||
|
|
afbeb7a816 | ||
|
|
9db404c099 | ||
|
|
45c5453c2f | ||
|
|
28eb2d064e | ||
|
|
c1f4eef816 | ||
|
|
8603bb9687 | ||
|
|
5f2045ff95 | ||
|
|
904937f06f | ||
|
|
40a75fe4fe | ||
|
|
9e14c2f5d8 | ||
|
|
3980458fcc | ||
|
|
c0a0d2b96b | ||
|
|
79363673d3 | ||
|
|
ce04dd7b99 | ||
|
|
0dc3d86d2e | ||
|
|
fe27f8c619 | ||
|
|
0be79ea5c4 | ||
|
|
6e57b20edf | ||
|
|
6b3fe0cf84 | ||
|
|
8be3f8a177 | ||
|
|
57fee3c1c6 | ||
|
|
82341613df | ||
|
|
5bc1e7db96 | ||
|
|
bd7c6590f7 | ||
|
|
16097a5c1d | ||
|
|
b00798b6ae | ||
|
|
05edda7ceb | ||
|
|
acb3b7f82e | ||
|
|
dd6dd172e2 | ||
|
|
1d95198312 | ||
|
|
585d3142ae | ||
|
|
953d0b6139 | ||
|
|
4f21cb442a | ||
|
|
f49aadd51e | ||
|
|
72f74ddbe4 | ||
|
|
c6be70c7f2 | ||
|
|
9151358284 | ||
|
|
d90c180d91 | ||
|
|
1fb11564d6 | ||
|
|
fc2bd3d40b | ||
|
|
b02f3c080a | ||
|
|
bfe27f0693 | ||
|
|
4ff219075e | ||
|
|
0e8c98e798 | ||
|
|
6fd55ce65d | ||
|
|
5288cf68b6 | ||
|
|
e3fb149b58 | ||
|
|
7422704fcc | ||
|
|
358c363077 | ||
|
|
427604712d | ||
|
|
083ed5bc61 | ||
|
|
0c83264750 | ||
|
|
8af43c2bcc | ||
|
|
33fd9dfd38 | ||
|
|
619c18fddc | ||
|
|
b26f10fc03 | ||
|
|
04d7be368c | ||
|
|
b41caf73be | ||
|
|
edd3e3532d | ||
|
|
9bd6b4504d | ||
|
|
45994f3c0b | ||
|
|
d61e71a605 | ||
|
|
356d799f92 | ||
|
|
c8bb294e5e | ||
|
|
5ab53b794e | ||
|
|
8af0802c2d | ||
|
|
2fb273a4cf | ||
|
|
e39489e6ad | ||
|
|
1045ce1860 | ||
|
|
8342532536 | ||
|
|
92940d82f2 | ||
|
|
4545174cf1 | ||
|
|
8191762c51 | ||
|
|
01161b9f25 | ||
|
|
7179c21bd8 | ||
|
|
5a5e963321 | ||
|
|
855e606bc8 | ||
|
|
fd5c7e2a73 | ||
|
|
d704de853a | ||
|
|
4d73312b18 | ||
|
|
f5f2c05550 | ||
|
|
9acc00c6df | ||
|
|
29087e2ca0 |
23
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -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.
|
||||||
...
|
...
|
||||||
|
|||||||
427
.github/workflows/validate_esphome.yml
vendored
@@ -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,225 +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'
|
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"
|
|
||||||
...
|
...
|
||||||
|
|||||||
57
.github/workflows/validate_esphome_beta.yml
vendored
@@ -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,7 @@ 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'
|
if: github.ref == 'refs/heads/dev' || github.base_ref == 'dev'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
@@ -196,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
|
||||||
|
|||||||
25
.github/workflows/validate_python.yml
vendored
@@ -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
@@ -10,4 +10,4 @@ Nextion2Text.*
|
|||||||
.idea
|
.idea
|
||||||
|
|
||||||
# Ignore dev folder
|
# Ignore dev folder
|
||||||
#dev
|
dev
|
||||||
|
|||||||
@@ -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
|
||||||
...
|
...
|
||||||
240
.test/esphome_ard_advanced_climate_heat_customizations.yaml
Normal 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
|
||||||
|
...
|
||||||
14
.test/esphome_ard_basic.yaml
Normal 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
|
||||||
|
...
|
||||||
@@ -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:
|
||||||
@@ -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
|
||||||
...
|
...
|
||||||
@@ -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
|
||||||
...
|
...
|
||||||
@@ -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
|
|
||||||
...
|
|
||||||
17
.test/esphome_idf5_advanced.yaml
Normal 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
|
||||||
|
...
|
||||||
16
.test/esphome_idf5_basic.yaml
Normal 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
|
||||||
|
...
|
||||||
17
.test/esphome_idf5_ble_tracker.yaml
Normal 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
|
||||||
|
...
|
||||||
17
.test/esphome_idf5_bluetooth_proxy.yaml
Normal 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
|
||||||
|
...
|
||||||
@@ -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
|
||||||
...
|
...
|
||||||
@@ -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
|
|
||||||
...
|
...
|
||||||
17
.test/esphome_idf5_climate_heat.yaml
Normal 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
|
||||||
|
...
|
||||||
11
.test/esphome_idf_advanced.yaml
Normal 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
|
||||||
|
...
|
||||||
@@ -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
|
|
||||||
...
|
...
|
||||||
10
.test/esphome_idf_basic.yaml
Normal 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
|
||||||
|
...
|
||||||
11
.test/esphome_idf_ble_tracker.yaml
Normal 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
|
||||||
|
...
|
||||||
11
.test/esphome_idf_bluetooth_proxy.yaml
Normal 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
|
||||||
|
...
|
||||||
@@ -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:
|
|
||||||
...
|
...
|
||||||
12
.test/esphome_idf_climate_cool_bluetooth_proxy.yaml
Normal 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
|
||||||
|
...
|
||||||
11
.test/esphome_idf_climate_dual.yaml
Normal 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
|
||||||
|
...
|
||||||
11
.test/esphome_idf_climate_heat.yaml
Normal 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
|
||||||
|
...
|
||||||
576
ReleaseNotes.md
@@ -125,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
|
||||||
@@ -218,7 +218,568 @@ This addition allows for a more comprehensive at-a-glance view of your essential
|
|||||||
### Automatic Font Size Adjustment for Entity Page Values
|
### 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.
|
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.
|
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.
|
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**".
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> [!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,
|
||||||
@@ -236,6 +797,13 @@ Your efforts have significantly improved its functionality and reliability (#183
|
|||||||
Your contributions have made our guides more informative and accessible, enriching the user experience for everyone (#1865).
|
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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
24
components/nspanel_ha_blueprint/ha_components.cpp
Normal 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
|
||||||
@@ -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
|
||||||
|
|||||||
21
components/nspanel_ha_blueprint/hardware.cpp
Normal 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
|
||||||
@@ -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
|
||||||
|
|||||||
61
components/nspanel_ha_blueprint/icons.cpp
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
32
components/nspanel_ha_blueprint/icons.h
Normal 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);
|
||||||
|
}
|
||||||
64
components/nspanel_ha_blueprint/mdiicons.cpp
Normal 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);
|
||||||
|
}
|
||||||
33
components/nspanel_ha_blueprint/mdiicons.h
Normal 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
|
||||||
36
components/nspanel_ha_blueprint/nextion_components.cpp
Normal 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
|
||||||
@@ -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
|
* Converts an RGB color represented as a vector of integers to the 16-bit 5-6-5 format supported by Nextion displays.
|
||||||
result.page = input.substr(0, dotPos);
|
*
|
||||||
result.component_id = input.substr(dotPos + 1);
|
* This function takes a vector containing three integer values representing
|
||||||
result.is_current_page = false; // Since there's a dot, it's assumed not to be the current page
|
* the red, green, and blue components of an RGB color, each in the range 0-255.
|
||||||
|
* It then converts these values into a single uint16_t value in 5-6-5 format,
|
||||||
// Check for the special case of "alarm_control_panel"
|
* commonly used for color displays. The conversion process masks and shifts
|
||||||
if (result.page == "alarm_control_panel") {
|
* the components to fit into the 5 bits for red, 6 bits for green, and 5 bits for blue.
|
||||||
result.page = "alarm";
|
*
|
||||||
|
* @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
|
||||||
}
|
}
|
||||||
} else {
|
return ((rgb[0] & 0xF8) << 8) | ((rgb[1] & 0xFC) << 3) | (rgb[2] >> 3);
|
||||||
// No dot found, the entire input is considered as component_id
|
|
||||||
result.page = defaultPage;
|
|
||||||
result.component_id = input;
|
|
||||||
result.is_current_page = true; // No specific page mentioned, so it's the current page
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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
|
||||||
|
|||||||
26
components/nspanel_ha_blueprint/pages.cpp
Normal 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
|
||||||
@@ -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
|
||||||
|
|||||||
49
components/nspanel_ha_blueprint/text.cpp
Normal 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
|
||||||
@@ -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
|
|
||||||
* start with a valid number, it is returned unchanged.
|
|
||||||
*
|
*
|
||||||
* @param input The string potentially containing a numeric value followed by text.
|
* @param c The character to check.
|
||||||
* @param decimalSeparator The character to use as the decimal separator.
|
* @return True if the character is part of a number; false otherwise.
|
||||||
* @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) {
|
bool isNumberChar(char c);
|
||||||
// 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
|
||||||
|
|||||||
32
components/nspanel_ha_blueprint/upload_tft.cpp
Normal 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
|
||||||
34
components/nspanel_ha_blueprint/upload_tft.h
Normal 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
|
||||||
73
components/nspanel_ha_blueprint/utilities.cpp
Normal 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
|
||||||
44
components/nspanel_ha_blueprint/utilities.h
Normal 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
|
||||||
20
components/nspanel_ha_blueprint/versioning.cpp
Normal 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
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -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("b") != std::string::npos) relative_branch = "beta";
|
|
||||||
else if (branch.find("d") != 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
|
|
||||||
@@ -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
@@ -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.
|
||||||
65
docs/addon_bluetooth_proxy.md
Normal 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.
|
||||||
@@ -19,7 +19,7 @@ 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]
|
> [!NOTE]
|
||||||
> Occasionally, ESPHome updates may result in the `entity_id` of embedded thermostats being appended with `_2`.
|
> Occasionally, ESPHome updates may result in the `entity_id` of embedded thermostats being appended with `_2`.
|
||||||
@@ -46,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
|
||||||
@@ -116,14 +118,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
|
||||||
```
|
```
|
||||||
|
|
||||||
### Heater
|
### Heater
|
||||||
@@ -155,16 +159,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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Dual
|
### Dual
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -197,25 +204,27 @@ 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
|
### 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.
|
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.'
|
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.
|
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.
|
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.3°C` below and `0.1°C` above the target temperature, respectively.
|
I have set these values to `0.1°C` below and `0.1°C` above the target temperature, respectively.
|
||||||
These adjustments, `0.3` and `0.1`, have been effectively maintaining the desired temperature in all of our four rooms.
|
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.
|
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 `21.2°C` as the default target temperature.
|
Furthermore, I have selected `18.3°C` as the default target temperature.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
##### addon-configuration #####
|
##### addon-configuration #####
|
||||||
@@ -224,21 +233,23 @@ Furthermore, I have selected `21.2°C` as the default target temperature.
|
|||||||
temp_min: "15"
|
temp_min: "15"
|
||||||
temp_max: "22"
|
temp_max: "22"
|
||||||
temp_step: "0.1"
|
temp_step: "0.1"
|
||||||
cold_tolerance: "0.3"
|
cold_tolerance: "0.1"
|
||||||
hot_tolerance: "0.1"
|
hot_tolerance: "0.1"
|
||||||
|
|
||||||
##### CHANGE ME END #####
|
##### CHANGE ME END #####
|
||||||
climate:
|
climate:
|
||||||
- id: !extend thermostat_embedded
|
- id: !extend thermostat_embedded
|
||||||
|
visual:
|
||||||
|
temperature_step: ${temp_step}
|
||||||
preset:
|
preset:
|
||||||
- name: Home
|
- name: Home
|
||||||
default_target_temperature_low: 21.2
|
default_target_temperature_low: 18.3
|
||||||
mode: "heat"
|
mode: "heat"
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that employing any filter to smooth the temperature readings, such as averaging, is discouraged.
|
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.
|
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.
|
Despite this, the temperature stability achieved is quite satisfactory, as illustrated in the graph below.
|
||||||
|
|
||||||

|

|
||||||
*On March 5th, around 9:30 PM, a window was opened, and all heaters were set to 'off.'*
|
*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*
|
||||||
|
|||||||
25
docs/api.md
@@ -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.
|
||||||
@@ -693,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.
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -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!"
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# Panel startup issues
|
# 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:**
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**When ESPHome is connected:**
|
**When Home Assistant/ESPHome is connected:**
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -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.
|
||||||
|
|
||||||
@@ -76,13 +76,17 @@ You can use this button to force a reboot of your panel. This button is availabl
|
|||||||
|
|
||||||

|

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

|
||||||
|
|
||||||
<!-- markdownlint-disable MD013 MD033 -->
|
<!-- markdownlint-disable MD013 MD033 -->
|
||||||
| Possible causes | Suggestions |
|
| Possible causes | Suggestions |
|
||||||
| :-- | :-- |
|
| :-- | :-- |
|
||||||
| 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. |
|
||||||
| Your panel's connection to Home Assistant may have issues.<br>This could be from an invalid entity Id, 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.|
|
| 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
|
||||||
@@ -90,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.
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
More information: https://esphome.io/components/rtttl.html#common-beeps
|
More information: https://esphome.io/components/rtttl.html#common-beeps
|
||||||
|
|
||||||
|
|||||||
@@ -80,18 +80,29 @@ 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.
|
||||||

|

|
||||||
|
|
||||||
3. Select **ESP32** as the device type.
|
3. Select **ESP32** as the device type.
|
||||||

|

|
||||||
|
|
||||||
4. Click **Skip** as we're not starting the installation yet.
|
4. Click **Skip** as we're not starting the installation yet.
|
||||||

|

|
||||||
|
|
||||||
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**.
|
||||||

|

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

|

|
||||||
|
|
||||||
|
which can be edited clicking `secrets` at the top right of your ESPHome menu.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
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`.
|
||||||

|

|
||||||
|
|
||||||
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:
|
||||||
@@ -113,26 +124,30 @@ Follow these steps to add a new device in the ESPHome Dashboard:
|
|||||||
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
|
||||||
```
|
```
|
||||||
|
|
||||||

|

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

|

|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
|||||||
@@ -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)).
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 819 KiB |
BIN
docs/pics/ha_developer_tools_services_rtttl_play.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 68 KiB |
BIN
docs/pics/ha_esphome_dashboard_new_device_05c.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 18 KiB |
@@ -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
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### 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.
|
||||||
> 
|
> 
|
||||||
|
|
||||||
### 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.
|
|||||||
> 
|
> 
|
||||||
|
|
||||||
### 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.
|
||||||
|
|||||||
@@ -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 | 2024.3.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 |
|
||||||
|
|||||||
36
esphome/nspanel_esphome_addon_ble_tracker.yaml
Normal 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
|
||||||
|
...
|
||||||
43
esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
Normal 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
|
||||||
|
...
|
||||||
@@ -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
|
||||||
@@ -108,6 +113,53 @@ script:
|
|||||||
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: |-
|
||||||
@@ -121,11 +173,11 @@ script:
|
|||||||
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();
|
||||||
|
|
||||||
disp1->set_component_text_printf("page_label", id(addon_climate_friendly_name).c_str());
|
disp1->set_component_text("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();
|
||||||
@@ -135,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);
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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: beta # To do: Change it for releasing
|
|
||||||
components:
|
|
||||||
- nspanel_ha_blueprint_upload_tft
|
|
||||||
refresh: 300s
|
|
||||||
|
|
||||||
# yamllint disable rule:comments-indentation
|
# yamllint disable rule:comments-indentation
|
||||||
api:
|
api:
|
||||||
@@ -57,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
|
||||||
|
|
||||||
@@ -73,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
|
||||||
@@ -99,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:
|
||||||
@@ -136,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
|
||||||
@@ -160,16 +155,23 @@ script:
|
|||||||
message: string
|
message: string
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
ESP_LOGD("addon_upload_tft.script.report_upload_progress", "%s", message.c_str());
|
ESP_LOGD("addon_upload_tft.script.report_upload_progress", 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: |-
|
||||||
@@ -187,6 +189,25 @@ 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";
|
||||||
@@ -203,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"
|
||||||
@@ -418,15 +474,21 @@ 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();
|
||||||
|
} else {
|
||||||
ESP_LOGW(TAG, "Display mode: %i", int(display_mode->state));
|
ESP_LOGW(TAG, "Display mode: %i", int(display_mode->state));
|
||||||
ESP_LOGW(TAG, "Valid TFT: False");
|
ESP_LOGW(TAG, "Valid TFT: False");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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}
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -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:**
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ framework.txt="esp-idf"
|
|||||||
ip_addr.txt="192.168.0.123"
|
ip_addr.txt="192.168.0.123"
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Home page
|
## Home page
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ value03_state.txt="715 W"
|
|||||||
value03_icon.txt=""
|
value03_icon.txt=""
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**US version:**
|
**US version:**
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ value03_state.txt="715 W"
|
|||||||
value03_icon.txt=""
|
value03_icon.txt=""
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Settings page
|
## Settings page
|
||||||
|
|
||||||
@@ -108,8 +108,8 @@ value03_icon.txt=""
|
|||||||
page settings
|
page settings
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## Buttons pages (DRAFT)
|
## Buttons pages (DRAFT)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ 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_utilities=0
|
int is_utilities=0
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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,8 +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
|
||||||
sendme
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "alarm",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (string) lastclick
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
@@ -187,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
|
||||||
@@ -397,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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +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
|
|
||||||
sendme
|
|
||||||
|
|
||||||
Page Exit Event
|
|
||||||
dim=0
|
|
||||||
|
|
||||||
Variable (int32) counter
|
Variable (int32) counter
|
||||||
Attributes
|
Attributes
|
||||||
@@ -27,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
|
||||||
@@ -101,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.3.0b2
|
Text : 4.3.7
|
||||||
Max. Text Size : 9
|
Max. Text Size : 10
|
||||||
|
|
||||||
Text esph_version
|
Text esph_version
|
||||||
Attributes
|
Attributes
|
||||||
@@ -111,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
|
||||||
@@ -121,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
|
||||||
@@ -136,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
|
||||||
@@ -144,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
|
||||||
@@ -173,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
|
||||||
@@ -197,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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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,6 +21,9 @@ Page buttonpage01
|
|||||||
vis 255,0
|
vis 255,0
|
||||||
vis button_back,1
|
vis button_back,1
|
||||||
vis page_label,1
|
vis page_label,1
|
||||||
|
sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
|
||||||
|
if(sys0>1)
|
||||||
|
{
|
||||||
page_index.txt+="â—"
|
page_index.txt+="â—"
|
||||||
if(is_buttonpage02==1)
|
if(is_buttonpage02==1)
|
||||||
{
|
{
|
||||||
@@ -35,7 +39,13 @@ Page buttonpage01
|
|||||||
}
|
}
|
||||||
vis page_index,1
|
vis page_index,1
|
||||||
}
|
}
|
||||||
sendme
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "buttonpage01",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (string) lastclick
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
@@ -60,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
|
||||||
|
|
||||||
@@ -86,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
|
||||||
@@ -96,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
|
||||||
@@ -106,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
|
||||||
@@ -116,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
|
||||||
@@ -126,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
|
||||||
@@ -136,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
|
||||||
@@ -146,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
|
||||||
@@ -156,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
|
||||||
@@ -166,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
|
||||||
@@ -176,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
|
||||||
@@ -186,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
|
||||||
@@ -196,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
|
||||||
@@ -206,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
|
||||||
@@ -216,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
|
||||||
@@ -226,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
|
||||||
@@ -236,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
|
||||||
@@ -246,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
|
||||||
@@ -256,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
|
||||||
@@ -266,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
|
||||||
@@ -276,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
|
||||||
@@ -286,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
|
||||||
@@ -296,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
|
||||||
@@ -306,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
|
||||||
@@ -316,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
|
||||||
@@ -326,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
|
||||||
@@ -336,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
|
||||||
@@ -346,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
|
||||||
@@ -356,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
|
||||||
@@ -366,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
|
||||||
@@ -376,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
|
||||||
@@ -386,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
|
||||||
@@ -396,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
|
||||||
@@ -404,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
|
||||||
@@ -430,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
|
||||||
@@ -466,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
|
||||||
@@ -502,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
|
||||||
@@ -538,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
|
||||||
@@ -574,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
|
||||||
@@ -610,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
|
||||||
@@ -646,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
|
||||||
@@ -682,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
|
||||||
@@ -746,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
|
||||||
@@ -780,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)
|
||||||
@@ -831,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.
|
||||||
|
|||||||
@@ -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,6 +21,9 @@ Page buttonpage02
|
|||||||
vis 255,0
|
vis 255,0
|
||||||
vis button_back,1
|
vis button_back,1
|
||||||
vis page_label,1
|
vis page_label,1
|
||||||
|
sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
|
||||||
|
if(sys0>1)
|
||||||
|
{
|
||||||
if(is_buttonpage01==1)
|
if(is_buttonpage01==1)
|
||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
@@ -35,7 +39,13 @@ Page buttonpage02
|
|||||||
}
|
}
|
||||||
vis page_index,1
|
vis page_index,1
|
||||||
}
|
}
|
||||||
sendme
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "buttonpage02",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (string) lastclick
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
@@ -60,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
|
||||||
|
|
||||||
@@ -86,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
|
||||||
@@ -96,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
|
||||||
@@ -106,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
|
||||||
@@ -116,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
|
||||||
@@ -126,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
|
||||||
@@ -136,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
|
||||||
@@ -146,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
|
||||||
@@ -156,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
|
||||||
@@ -166,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
|
||||||
@@ -176,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
|
||||||
@@ -186,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
|
||||||
@@ -196,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
|
||||||
@@ -206,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
|
||||||
@@ -216,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
|
||||||
@@ -226,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
|
||||||
@@ -236,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
|
||||||
@@ -246,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
|
||||||
@@ -256,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
|
||||||
@@ -266,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
|
||||||
@@ -276,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
|
||||||
@@ -286,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
|
||||||
@@ -296,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
|
||||||
@@ -306,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
|
||||||
@@ -316,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
|
||||||
@@ -326,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
|
||||||
@@ -336,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
|
||||||
@@ -346,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
|
||||||
@@ -356,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
|
||||||
@@ -366,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
|
||||||
@@ -376,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
|
||||||
@@ -386,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
|
||||||
@@ -396,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
|
||||||
@@ -404,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
|
||||||
@@ -430,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
|
||||||
@@ -466,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
|
||||||
@@ -502,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
|
||||||
@@ -538,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
|
||||||
@@ -574,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
|
||||||
@@ -610,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
|
||||||
@@ -646,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
|
||||||
@@ -682,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
|
||||||
@@ -746,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
|
||||||
@@ -780,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)
|
||||||
@@ -837,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)
|
||||||
|
|||||||
@@ -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,6 +21,9 @@ Page buttonpage03
|
|||||||
vis 255,0
|
vis 255,0
|
||||||
vis button_back,1
|
vis button_back,1
|
||||||
vis page_label,1
|
vis page_label,1
|
||||||
|
sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
|
||||||
|
if(sys0>1)
|
||||||
|
{
|
||||||
if(is_buttonpage01==1)
|
if(is_buttonpage01==1)
|
||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
@@ -35,7 +39,13 @@ Page buttonpage03
|
|||||||
}
|
}
|
||||||
vis page_index,1
|
vis page_index,1
|
||||||
}
|
}
|
||||||
sendme
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "buttonpage03",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (string) lastclick
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
@@ -60,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
|
||||||
|
|
||||||
@@ -86,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
|
||||||
@@ -96,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
|
||||||
@@ -106,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
|
||||||
@@ -116,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
|
||||||
@@ -126,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
|
||||||
@@ -136,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
|
||||||
@@ -146,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
|
||||||
@@ -156,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
|
||||||
@@ -166,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
|
||||||
@@ -176,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
|
||||||
@@ -186,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
|
||||||
@@ -196,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
|
||||||
@@ -206,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
|
||||||
@@ -216,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
|
||||||
@@ -226,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
|
||||||
@@ -236,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
|
||||||
@@ -246,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
|
||||||
@@ -256,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
|
||||||
@@ -266,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
|
||||||
@@ -276,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
|
||||||
@@ -286,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
|
||||||
@@ -296,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
|
||||||
@@ -306,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
|
||||||
@@ -316,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
|
||||||
@@ -326,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
|
||||||
@@ -336,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
|
||||||
@@ -346,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
|
||||||
@@ -356,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
|
||||||
@@ -366,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
|
||||||
@@ -376,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
|
||||||
@@ -386,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
|
||||||
@@ -396,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
|
||||||
@@ -404,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
|
||||||
@@ -430,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
|
||||||
@@ -466,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
|
||||||
@@ -502,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
|
||||||
@@ -538,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
|
||||||
@@ -574,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
|
||||||
@@ -610,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
|
||||||
@@ -646,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
|
||||||
@@ -682,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
|
||||||
@@ -746,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
|
||||||
@@ -780,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 +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
|
||||||
|
|||||||
@@ -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,6 +21,9 @@ Page buttonpage04
|
|||||||
vis 255,0
|
vis 255,0
|
||||||
vis button_back,1
|
vis button_back,1
|
||||||
vis page_label,1
|
vis page_label,1
|
||||||
|
sys0=is_buttonpage01+is_buttonpage02+is_buttonpage03+is_buttonpage04
|
||||||
|
if(sys0>1)
|
||||||
|
{
|
||||||
if(is_buttonpage01==1)
|
if(is_buttonpage01==1)
|
||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
@@ -35,7 +39,13 @@ Page buttonpage04
|
|||||||
page_index.txt+="â—"
|
page_index.txt+="â—"
|
||||||
vis page_index,1
|
vis page_index,1
|
||||||
}
|
}
|
||||||
sendme
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "buttonpage04",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (string) lastclick
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
@@ -60,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
|
||||||
|
|
||||||
@@ -86,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
|
||||||
@@ -96,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
|
||||||
@@ -106,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
|
||||||
@@ -116,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
|
||||||
@@ -126,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
|
||||||
@@ -136,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
|
||||||
@@ -146,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
|
||||||
@@ -156,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
|
||||||
@@ -166,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
|
||||||
@@ -176,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
|
||||||
@@ -186,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
|
||||||
@@ -196,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
|
||||||
@@ -206,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
|
||||||
@@ -216,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
|
||||||
@@ -226,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
|
||||||
@@ -236,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
|
||||||
@@ -246,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
|
||||||
@@ -256,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
|
||||||
@@ -266,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
|
||||||
@@ -276,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
|
||||||
@@ -286,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
|
||||||
@@ -296,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
|
||||||
@@ -306,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
|
||||||
@@ -316,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
|
||||||
@@ -326,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
|
||||||
@@ -336,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
|
||||||
@@ -346,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
|
||||||
@@ -356,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
|
||||||
@@ -366,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
|
||||||
@@ -376,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
|
||||||
@@ -386,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
|
||||||
@@ -396,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
|
||||||
@@ -404,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
|
||||||
@@ -430,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
|
||||||
@@ -466,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
|
||||||
@@ -502,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
|
||||||
@@ -538,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
|
||||||
@@ -574,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
|
||||||
@@ -610,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
|
||||||
@@ -646,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
|
||||||
@@ -682,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
|
||||||
@@ -746,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
|
||||||
@@ -780,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)
|
||||||
@@ -789,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
|
||||||
@@ -817,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
|
||||||
@@ -835,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
|
||||||
|
|||||||
@@ -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,8 +33,12 @@ Page climate
|
|||||||
{
|
{
|
||||||
page home
|
page home
|
||||||
}
|
}
|
||||||
vis unavailable,0
|
printh 92
|
||||||
sendme
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
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
|
||||||
@@ -141,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
|
||||||
@@ -524,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
|
||||||
@@ -536,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
|
||||||
@@ -581,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
|
||||||
@@ -614,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
|
||||||
@@ -829,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
|
||||||
@@ -874,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
|
||||||
|
|||||||
@@ -12,12 +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
|
||||||
sendme
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "confirm",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (int32) page_id
|
Variable (int32) page_id
|
||||||
Attributes
|
Attributes
|
||||||
@@ -76,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
|
||||||
@@ -135,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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +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
|
||||||
sendme
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "cover",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (string) va1
|
Variable (string) va1
|
||||||
Attributes
|
Attributes
|
||||||
@@ -83,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
|
||||||
@@ -186,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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,14 @@ 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
|
||||||
|
if(sys0>1)
|
||||||
|
{
|
||||||
page_index.txt+="â—"
|
page_index.txt+="â—"
|
||||||
if(is_entitypage02==1)
|
if(is_entitypage02==1)
|
||||||
{
|
{
|
||||||
@@ -30,7 +33,16 @@ Page entitypage01
|
|||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
}
|
}
|
||||||
sendme
|
}else
|
||||||
|
{
|
||||||
|
vis page_index,0
|
||||||
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "entitypage01",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Text value01_label
|
Text value01_label
|
||||||
Attributes
|
Attributes
|
||||||
@@ -292,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
|
||||||
@@ -328,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
|
||||||
@@ -362,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)
|
||||||
@@ -413,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
|
||||||
|
|||||||
@@ -12,11 +12,14 @@ 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(sys0>1)
|
||||||
|
{
|
||||||
if(is_entitypage01==1)
|
if(is_entitypage01==1)
|
||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
@@ -30,7 +33,16 @@ Page entitypage02
|
|||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
}
|
}
|
||||||
sendme
|
}else
|
||||||
|
{
|
||||||
|
vis page_index,0
|
||||||
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "entitypage02",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Text value01_label
|
Text value01_label
|
||||||
Attributes
|
Attributes
|
||||||
@@ -292,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
|
||||||
@@ -328,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
|
||||||
@@ -362,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)
|
||||||
@@ -419,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)
|
||||||
|
|||||||
@@ -12,11 +12,14 @@ Page entitypage03
|
|||||||
|
|
||||||
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(sys0>1)
|
||||||
|
{
|
||||||
if(is_entitypage01==1)
|
if(is_entitypage01==1)
|
||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
@@ -30,7 +33,16 @@ Page entitypage03
|
|||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
}
|
}
|
||||||
sendme
|
}else
|
||||||
|
{
|
||||||
|
vis page_index,0
|
||||||
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "entitypage03",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Text value01_label
|
Text value01_label
|
||||||
Attributes
|
Attributes
|
||||||
@@ -122,7 +134,7 @@ Text value08_label
|
|||||||
Text :
|
Text :
|
||||||
Max. Text Size : 60
|
Max. Text Size : 60
|
||||||
|
|
||||||
Text value01_pic
|
Text value01_icon
|
||||||
Attributes
|
Attributes
|
||||||
ID : 12
|
ID : 12
|
||||||
Scope : local
|
Scope : local
|
||||||
@@ -292,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 : 29
|
ID : 29
|
||||||
@@ -328,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
|
||||||
@@ -362,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)
|
||||||
@@ -413,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_entitypage04==1)
|
if(is_entitypage04==1)
|
||||||
|
|||||||
@@ -12,11 +12,14 @@ Page entitypage04
|
|||||||
|
|
||||||
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(sys0>1)
|
||||||
|
{
|
||||||
if(is_entitypage01==1)
|
if(is_entitypage01==1)
|
||||||
{
|
{
|
||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
@@ -30,7 +33,16 @@ Page entitypage04
|
|||||||
page_index.txt+="â—‹"
|
page_index.txt+="â—‹"
|
||||||
}
|
}
|
||||||
page_index.txt+="â—"
|
page_index.txt+="â—"
|
||||||
sendme
|
}else
|
||||||
|
{
|
||||||
|
vis page_index,0
|
||||||
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "entitypage04",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Text value01_label
|
Text value01_label
|
||||||
Attributes
|
Attributes
|
||||||
@@ -292,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
|
||||||
@@ -328,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
|
||||||
@@ -362,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)
|
||||||
@@ -417,7 +400,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
|
||||||
|
|||||||
@@ -12,13 +12,18 @@ Page fan
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
dim=brightness
|
||||||
if(api==0)
|
if(api==0)
|
||||||
{
|
{
|
||||||
page home
|
page home
|
||||||
}
|
}
|
||||||
vis unavailable,0
|
|
||||||
vis bt_oscillate,0
|
vis bt_oscillate,0
|
||||||
sendme
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "fan",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (string) fansetting
|
Variable (string) fansetting
|
||||||
Attributes
|
Attributes
|
||||||
@@ -64,19 +69,9 @@ Text icon_state
|
|||||||
Text :
|
Text :
|
||||||
Max. Text Size : 10
|
Max. Text Size : 10
|
||||||
|
|
||||||
Text unavailable
|
|
||||||
Attributes
|
|
||||||
ID : 16
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 1
|
|
||||||
|
|
||||||
Text bt_oscillate
|
Text bt_oscillate
|
||||||
Attributes
|
Attributes
|
||||||
ID : 17
|
ID : 15
|
||||||
Scope : local
|
Scope : local
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -331,29 +326,6 @@ Timer timer0
|
|||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
|
||||||
Timer wakeup_timer
|
|
||||||
Attributes
|
|
||||||
ID : 15
|
|
||||||
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 : 4
|
ID : 4
|
||||||
|
|||||||
@@ -12,7 +12,18 @@ Page home
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
back_page_id=0
|
dim=brightness
|
||||||
|
if(boot.progress.val<100)
|
||||||
|
{
|
||||||
|
page boot
|
||||||
|
}
|
||||||
|
printh 92
|
||||||
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "home",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
back_page_id=1
|
||||||
if(qrcode.qrcode_value.txt=="")
|
if(qrcode.qrcode_value.txt=="")
|
||||||
{
|
{
|
||||||
vis bt_qrcode,0
|
vis bt_qrcode,0
|
||||||
@@ -30,8 +41,6 @@ Page home
|
|||||||
vis left_bt_text,0
|
vis left_bt_text,0
|
||||||
vis right_bt_text,0
|
vis right_bt_text,0
|
||||||
}
|
}
|
||||||
vis unavailable,0
|
|
||||||
sendme
|
|
||||||
|
|
||||||
Variable (string) lastclick
|
Variable (string) lastclick
|
||||||
Attributes
|
Attributes
|
||||||
@@ -42,10 +51,10 @@ Variable (string) lastclick
|
|||||||
|
|
||||||
Variable (string) click_comp
|
Variable (string) click_comp
|
||||||
Attributes
|
Attributes
|
||||||
ID : 39
|
ID : 38
|
||||||
Scope : local
|
Scope : local
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size: 8
|
Max. Text Size: 14
|
||||||
|
|
||||||
Text time
|
Text time
|
||||||
Attributes
|
Attributes
|
||||||
@@ -75,13 +84,22 @@ Text indr_temp
|
|||||||
Max. Text Size : 8
|
Max. Text Size : 8
|
||||||
|
|
||||||
Events
|
Events
|
||||||
|
Touch Press Event
|
||||||
|
click_comp.txt="indr_temp"
|
||||||
|
click_timer.en=1
|
||||||
|
|
||||||
Touch Release Event
|
Touch Release Event
|
||||||
|
if(click_timer.en==1)
|
||||||
|
{
|
||||||
|
click_timer.en=0
|
||||||
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||||
printh 92
|
printh 92
|
||||||
prints "localevent",0
|
prints "localevent",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
prints lastclick.txt,0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
}
|
||||||
|
|
||||||
Text outdoor_temp
|
Text outdoor_temp
|
||||||
Attributes
|
Attributes
|
||||||
@@ -118,7 +136,7 @@ Text value01
|
|||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
Associated Keyboard: none
|
Associated Keyboard: none
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size : 10
|
Max. Text Size : 30
|
||||||
|
|
||||||
Text left_bt_text
|
Text left_bt_text
|
||||||
Attributes
|
Attributes
|
||||||
@@ -258,7 +276,7 @@ Text value04
|
|||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
Associated Keyboard: none
|
Associated Keyboard: none
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size : 10
|
Max. Text Size : 30
|
||||||
|
|
||||||
Text value04_icon
|
Text value04_icon
|
||||||
Attributes
|
Attributes
|
||||||
@@ -288,7 +306,7 @@ Text value02
|
|||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
Associated Keyboard: none
|
Associated Keyboard: none
|
||||||
Text :
|
Text :
|
||||||
Max. Text Size : 10
|
Max. Text Size : 30
|
||||||
|
|
||||||
Text wifi_icon
|
Text wifi_icon
|
||||||
Attributes
|
Attributes
|
||||||
@@ -318,13 +336,22 @@ Text indr_temp_icon
|
|||||||
Max. Text Size : 3
|
Max. Text Size : 3
|
||||||
|
|
||||||
Events
|
Events
|
||||||
|
Touch Press Event
|
||||||
|
click_comp.txt="indr_temp_icon"
|
||||||
|
click_timer.en=1
|
||||||
|
|
||||||
Touch Release Event
|
Touch Release Event
|
||||||
|
if(click_timer.en==1)
|
||||||
|
{
|
||||||
|
click_timer.en=0
|
||||||
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||||
printh 92
|
printh 92
|
||||||
prints "localevent",0
|
prints "localevent",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
prints lastclick.txt,0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
}
|
||||||
|
|
||||||
Text bt_notific
|
Text bt_notific
|
||||||
Attributes
|
Attributes
|
||||||
@@ -439,7 +466,7 @@ Text meridiem
|
|||||||
|
|
||||||
Text button01
|
Text button01
|
||||||
Attributes
|
Attributes
|
||||||
ID : 36
|
ID : 35
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -467,7 +494,7 @@ Text button01
|
|||||||
|
|
||||||
Text button02
|
Text button02
|
||||||
Attributes
|
Attributes
|
||||||
ID : 37
|
ID : 36
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -495,7 +522,7 @@ Text button02
|
|||||||
|
|
||||||
Text button03
|
Text button03
|
||||||
Attributes
|
Attributes
|
||||||
ID : 38
|
ID : 37
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -523,7 +550,7 @@ Text button03
|
|||||||
|
|
||||||
Text button04
|
Text button04
|
||||||
Attributes
|
Attributes
|
||||||
ID : 41
|
ID : 40
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -551,7 +578,7 @@ Text button04
|
|||||||
|
|
||||||
Text button05
|
Text button05
|
||||||
Attributes
|
Attributes
|
||||||
ID : 42
|
ID : 41
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -579,7 +606,7 @@ Text button05
|
|||||||
|
|
||||||
Text button06
|
Text button06
|
||||||
Attributes
|
Attributes
|
||||||
ID : 43
|
ID : 42
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -605,19 +632,9 @@ Text button06
|
|||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|
||||||
Text unavailable
|
|
||||||
Attributes
|
|
||||||
ID : 44
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 1
|
|
||||||
|
|
||||||
Text bt_utilities
|
Text bt_utilities
|
||||||
Attributes
|
Attributes
|
||||||
ID : 45
|
ID : 43
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -634,7 +651,7 @@ Text bt_utilities
|
|||||||
|
|
||||||
Text value03_icon
|
Text value03_icon
|
||||||
Attributes
|
Attributes
|
||||||
ID : 46
|
ID : 44
|
||||||
Scope : global
|
Scope : global
|
||||||
Dragging : 0
|
Dragging : 0
|
||||||
Send Component ID : on press and release
|
Send Component ID : on press and release
|
||||||
@@ -644,13 +661,30 @@ Text value03_icon
|
|||||||
|
|
||||||
Text value03
|
Text value03
|
||||||
Attributes
|
Attributes
|
||||||
ID : 47
|
ID : 45
|
||||||
Scope : global
|
Scope : global
|
||||||
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 :
|
||||||
Max. Text Size : 10
|
Max. Text Size : 30
|
||||||
|
|
||||||
|
Text bt_icon
|
||||||
|
Attributes
|
||||||
|
ID : 46
|
||||||
|
Scope : global
|
||||||
|
Dragging : 0
|
||||||
|
Send Component ID : on press and release
|
||||||
|
Associated Keyboard: none
|
||||||
|
Text :
|
||||||
|
Max. Text Size : 5
|
||||||
|
|
||||||
|
Events
|
||||||
|
Touch Press Event
|
||||||
|
settings_timer.en=1
|
||||||
|
|
||||||
|
Touch Release Event
|
||||||
|
settings_timer.en=0
|
||||||
|
|
||||||
Picture weather
|
Picture weather
|
||||||
Attributes
|
Attributes
|
||||||
@@ -661,9 +695,20 @@ Picture weather
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Touch Press Event
|
Touch Press Event
|
||||||
if(api==1)
|
click_comp.txt="weather"
|
||||||
|
click_timer.en=1
|
||||||
|
|
||||||
|
Touch Release Event
|
||||||
|
if(click_timer.en==1)
|
||||||
{
|
{
|
||||||
page weather01
|
click_timer.en=0
|
||||||
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||||
|
printh 92
|
||||||
|
prints "localevent",0
|
||||||
|
printh 00
|
||||||
|
prints lastclick.txt,0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer swipestore
|
Timer swipestore
|
||||||
@@ -689,32 +734,9 @@ Timer settings_timer
|
|||||||
Timer Event
|
Timer Event
|
||||||
page settings
|
page settings
|
||||||
|
|
||||||
Timer wakeup_timer
|
|
||||||
Attributes
|
|
||||||
ID : 35
|
|
||||||
Scope : local
|
|
||||||
Period (ms): 50
|
|
||||||
Enabled : yes
|
|
||||||
|
|
||||||
Events
|
|
||||||
Timer Event
|
|
||||||
if(dim<brightness)
|
|
||||||
{
|
|
||||||
dimdelta=brightness-dim
|
|
||||||
dimdelta/=25
|
|
||||||
if(dimdelta<1)
|
|
||||||
{
|
|
||||||
dimdelta=1
|
|
||||||
}
|
|
||||||
dim+=dimdelta
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
wakeup_timer.en=0
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer click_timer
|
Timer click_timer
|
||||||
Attributes
|
Attributes
|
||||||
ID : 40
|
ID : 39
|
||||||
Scope : local
|
Scope : local
|
||||||
Period (ms): 800
|
Period (ms): 800
|
||||||
Enabled : no
|
Enabled : no
|
||||||
@@ -739,9 +761,13 @@ TouchCap swipe
|
|||||||
Events
|
Events
|
||||||
Touch Press Event
|
Touch Press Event
|
||||||
swipestore.en=1 // Start swipestore timer
|
swipestore.en=1 // Start swipestore timer
|
||||||
wakeup_timer.en=1 // Set brightness to saved value (from HA)
|
dim=brightness // Set brightness to saved value (from HA)
|
||||||
|
|
||||||
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)
|
||||||
@@ -763,9 +789,6 @@ TouchCap swipe
|
|||||||
}else if(is_buttonpage01==1)
|
}else if(is_buttonpage01==1)
|
||||||
{
|
{
|
||||||
page buttonpage01
|
page buttonpage01
|
||||||
}else
|
|
||||||
{
|
|
||||||
// Do nothing
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Right to Left swipe now navigates to home, looping back to the start.
|
// Right to Left swipe now navigates to home, looping back to the start.
|
||||||
@@ -785,9 +808,6 @@ TouchCap swipe
|
|||||||
}else if(is_buttonpage04==1)
|
}else if(is_buttonpage04==1)
|
||||||
{
|
{
|
||||||
page buttonpage04
|
page buttonpage04
|
||||||
}else
|
|
||||||
{
|
|
||||||
// Do nothing
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -816,13 +836,10 @@ TouchCap swipe
|
|||||||
}else if(is_buttonpage02==1&&is_buttonpage01==1)
|
}else if(is_buttonpage02==1&&is_buttonpage01==1)
|
||||||
{
|
{
|
||||||
page buttonpage01
|
page buttonpage01
|
||||||
}else
|
|
||||||
{
|
|
||||||
// Do nothing
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 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
|
||||||
@@ -844,9 +861,6 @@ TouchCap swipe
|
|||||||
}else if(is_buttonpage03==1&&is_buttonpage04==1)
|
}else if(is_buttonpage03==1&&is_buttonpage04==1)
|
||||||
{
|
{
|
||||||
page buttonpage04
|
page buttonpage04
|
||||||
}else
|
|
||||||
{
|
|
||||||
// Do nothing
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,17 @@ Page keyb_num
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
dim=brightness
|
||||||
if(api==0)
|
if(api==0)
|
||||||
{
|
{
|
||||||
page page_id.val
|
page page_id.val
|
||||||
}
|
}
|
||||||
vis unavailable,0
|
printh 92
|
||||||
sendme
|
prints "current_page",0
|
||||||
|
printh 00
|
||||||
|
prints "keyb_num",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
|
||||||
Variable (int32) page_id
|
Variable (int32) page_id
|
||||||
Attributes
|
Attributes
|
||||||
@@ -83,16 +88,6 @@ Text title
|
|||||||
Text : Alarm
|
Text : Alarm
|
||||||
Max. Text Size : 30
|
Max. Text Size : 30
|
||||||
|
|
||||||
Text unavailable
|
|
||||||
Attributes
|
|
||||||
ID : 24
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 1
|
|
||||||
|
|
||||||
Button b1
|
Button b1
|
||||||
Attributes
|
Attributes
|
||||||
ID : 3
|
ID : 3
|
||||||
@@ -301,26 +296,3 @@ Button bview
|
|||||||
pin.pw=1
|
pin.pw=1
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer wakeup_timer
|
|
||||||
Attributes
|
|
||||||
ID : 23
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||