Commit Graph
24 Commits
Author SHA1 Message Date
Edward FirmoandGitHub e753ac3a97 Fix Nextion set_component_picture call (#6378)
This fixes the call to the Nextion display to change the pic id from a component.
It was previously changing the attribute `val`, which is related to something else.
In addition, I've changed the parameter for picture_id to be uint_8, as Nextion requires an integer from 0 to 255 on this attribute.
2024-03-16 00:19:25 -05:00
Edward FirmoandGitHub 4812997429 Nextion TFT upload IDF memory optimization (#6128)
* Nextion TFT upload IDF memory optimization

This optimizes the memory in use for TFT upload when using `esp-idf` framework.

Basically, the engine establishes 3 connections to the the http/https server:
1. Fetch the file size (used to manage chunks and file size)
2. Transfer the 1st chunk (when it evaluates Nextion response to define either to continue from that point or to another point in the file)
3. Transfer the remaining data.

Until now, connection 1 was kept open during the whole process taking aprox 40kb of heap in a esp32dev (NSPanel in my tests) and the same amount of memory was needed to the 2nd and 3rd connections (which never competes to each other).
With this change, each connection is closed and released before opening the next one with a significant reduction on the required heap needed for this transfer.

This can still be improved to use a persistent connection, but I will look at this in the future, so it is not part of this change.

In addition to the better connection management, I've added quite a lot of log (mostly at VERBOSE level), which was used for troubleshooting here.
I was unsure about removing this. As it can be useful for others, I decided to keep it, but I will be fine about removing it if this is now in line with ESPHome best practices.

* clang-format

* Log response length
2024-01-23 01:49:28 -06:00
Edward FirmoandGitHub 869cdf122d Nextion draw QR code at runtime (#6027) 2024-01-09 09:47:48 +09:00
Edward FirmoandGitHub 2bb5343d27 Extends UART change at runtime to ESP8266 (#6019) 2024-01-09 09:45:46 +09:00
Edward FirmoandGitHub 6061699eff Nextion enable upload from https when using esp-idf (#6051) 2024-01-09 09:41:34 +09:00
Edward FirmoandGitHub d3567f9ac6 Nextion queue size (#6029)
* Nextion `queue_size` function

Returns the size of Nextion queue.
For troubleshooting only.

* Move `queue_size` to `nextion.h`

This is where the queue is

* Inline doc

* clang-format
2023-12-28 23:15:06 -06:00
Edward FirmoandGitHub 5e2df0b6a2 Nextion allow underscore on names (#5979) 2023-12-21 02:34:33 -06:00
Edward FirmoandJesse Hills 917e0f93ed UARTComponent inline doc (#5930) 2023-12-18 16:51:10 +09:00
Edward FirmoandGitHub 94904f44f9 UARTComponent inline doc (#5930) 2023-12-18 08:19:30 +09:00
Edward FirmoandGitHub 81aa48a5f3 Exposes load_settings to UARTComponent class (#5920) 2023-12-14 07:45:08 +09:00
9daaadb3b6 UART change at runtime (#5909)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-13 20:29:05 +13:00
Edward FirmoandGitHub 049a7a0113 Add framework info to Nextion log tags (#5864) 2023-12-07 08:57:06 +09:00
f026f49415 Nextion exit reparse mode on startup (#5868)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-06 00:55:07 -06:00
Edward FirmoandGitHub 4d3730b50e Nextion support to idf with cinttypes (#5876) 2023-12-04 19:09:44 -06:00
3940c6ac4e Improve reliability of Nextion TFT uploads (Arduino) (#5683)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-11-27 23:25:20 -06:00
Edward FirmoandGitHub 2f888ff7c5 Nextion colors parameters (#5699)
* Add `foreground` color

- Adds `set_component_foreground_color` and `set_component_pressed_foreground_color` which does the same as `set_component_font_color` and `set_component_pressed_font_color` but with a more intuitive name, as this can be used for any component and not only the ones with a text (font).
- I've also reviewed some docstring when related to colors.

* Add numeric color to drawing methods

Should I've used uint32_t instead? In order to keep consistency?

* component color support to uint6_t

This is the right format and is now consistent with colors on drawings.
I'm keeping uint32_t also to avoid breaking changes.

* Enforces uint16_t for colors

uint32_t is incorrect for Nextion display colors.

* Fix clang-format
2023-11-27 22:50:14 -06:00
Edward FirmoandGitHub d1be686c54 Nextion on_touch trigger (#5833) 2023-11-28 17:14:59 +13:00
Edward FirmoandGitHub ab1cc0ed6e Nextion - Align strings on dump_config (#5824) 2023-11-27 18:24:43 -06:00
Edward FirmoandGitHub 460362b11f Nextion - Standardizing log messages (#5837) 2023-11-27 21:09:57 +00:00
Edward FirmoandGitHub ccd7f0661c Add is_detected() for Nextion displays (#5825) 2023-11-25 02:38:45 -06:00
d81bec860b Nextion support to esp-idf (#5667)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-07 19:50:45 -06:00
Edward FirmoandGitHub a8a9c6192d Remove page jump on Nextion startup (#5673) 2023-11-06 18:48:15 -06:00
Edward FirmoandGitHub 7e27e98bff set Nextion protocol reparse mode (#5484) 2023-10-24 08:02:57 +13:00
Edward FirmoandGitHub 3d7d0d4f73 Remove unnecessary checks in Nextion component (#5578) 2023-10-21 14:38:22 -05:00