Commit Graph

28 Commits

Author SHA1 Message Date
Edward Firmo 8c323e2e4c
Nextion - Review set_protocol_reparse_mode() (#6567) 2024-04-18 11:07:05 +12:00
Edward Firmo 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 Firmo 869cdf122d
Nextion draw QR code at runtime (#6027) 2024-01-09 09:47:48 +09:00
Edward Firmo 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 Firmo 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 Firmo 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 Firmo d1be686c54
Nextion `on_touch` trigger (#5833) 2023-11-28 17:14:59 +13:00
Edward Firmo 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 Firmo a8a9c6192d
Remove page jump on Nextion startup (#5673) 2023-11-06 18:48:15 -06:00
Gustavo Ambrozio 40c001bdc2
Fix nextion waveform sending for multiple waveforms (#4408) 2023-11-01 20:09:12 -05:00
Edward Firmo 7e27e98bff
set Nextion protocol reparse mode (#5484) 2023-10-24 08:02:57 +13:00
Jesse Hills 302dea4169
Move ESPTime into core esphome namespace (#4926)
* Prep-work for datetime entities

* Fix some includes and remove some restrictions on printing time on displays

* format

* format

* More formatting

* Move function contents

* Ignore clang-tidy
2023-06-08 17:24:44 -05:00
Jesse Hills 9273e3775b
Add vector includes (#4080) 2022-11-24 13:12:55 +13:00
anatoly-savchenkov ac10e27f08
[Nextion] Add on_page trigger (#3673) 2022-08-09 12:44:20 +12:00
Otto Winter 15b5968418
Revert nextion clang-tidy changes (#2566) 2021-10-21 07:31:13 +13:00
Otto Winter ac0d921413
ESP-IDF support and generic target platforms (#2303)
* Socket refactor and SSL

* esp-idf temp

* Fixes

* Echo component and noise

* Add noise API transport support

* Updates

* ESP-IDF

* Complete

* Fixes

* Fixes

* Versions update

* New i2c APIs

* Complete i2c refactor

* SPI migration

* Revert ESP Preferences migration, too complex for now

* OTA support

* Remove echo again

* Remove ssl again

* GPIOFlags updates

* Rename esphal and ICACHE_RAM_ATTR

* Make ESP32 arduino compilable again

* Fix GPIO flags

* Complete pin registry refactor and fixes

* Fixes to make test1 compile

* Remove sdkconfig file

* Ignore sdkconfig file

* Fixes in reviewing

* Make test2 compile

* Make test4 compile

* Make test5 compile

* Run clang-format

* Fix lint errors

* Use esp-idf APIs instead of btStart

* Another round of fixes

* Start implementing ESP8266

* Make test3 compile

* Guard esp8266 code

* Lint

* Reformat

* Fixes

* Fixes v2

* more fixes

* ESP-IDF tidy target

* Convert ARDUINO_ARCH_ESPxx

* Update WiFiSignalSensor

* Update time ifdefs

* OTA needs millis from hal

* RestartSwitch needs delay from hal

* ESP-IDF Uart

* Fix OTA blank password

* Allow setting sdkconfig

* Fix idf partitions and allow setting sdkconfig from yaml

* Re-add read/write compat APIs and fix esp8266 uart

* Fix esp8266 store log strings in flash

* Fix ESP32 arduino preferences not initialized

* Update ifdefs

* Change how sdkconfig change is detected

* Add checks to ci-custom and fix them

* Run clang-format

* Add esp-idf clang-tidy target and fix errors

* Fixes from clang-tidy idf round 2

* Fixes from compiling tests with esp-idf

* Run clang-format

* Switch test5.yaml to esp-idf

* Implement ESP8266 Preferences

* Lint

* Re-do PIO package version selection a bit

* Fix arduinoespressif32 package version

* Fix unit tests

* Lint

* Lint fixes

* Fix readv/writev not defined

* Fix graphing component

* Re-add all old options from core/config.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-20 11:47:51 +02:00
Otto Winter a4867a00ea
Activate owning-memory clang-tidy check (#1891)
* Activate owning-memory clang-tidy check

* Lint

* Lint

* Fix issue with new NfcTag constructor

* Update pointers for number and select

* Add back the NOLINT to display buffer

* Fix merge

* DSMR fixes

* Nextion fixes

* Fix pipsolar

* Fix lwip socket

* Format

* Change socket fix

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-13 11:31:02 +02:00
Oxan van Leeuwen a3dcac62f9
Fix a bunch of typos (#2058)
Co-authored-by: Stefan Agner <stefan@agner.ch>
Co-authored-by: Otto Winter <otto@otto-winter.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-07-26 14:48:57 +02:00
SenexCrenshaw 0651716b96
Nextion upload and sensors (#1464)
Co-authored-by: Senex Crenshaw <senexcrenshaw@gmail.com>
2021-07-15 12:51:15 +12:00
vxider 5d136a18af
brightness support for nextion (#1109) 2020-07-12 15:12:28 -03:00
Otto Winter adf2a463fd
Fix some binary_sensor not having an initial state (#819)
Fixes https://github.com/home-assistant/home-assistant/issues/28384
2019-10-31 21:03:57 +01:00
Otto Winter 28f2a7f99c
Update nextion.h 2019-05-27 19:12:43 +02:00
Otto Winter 0d9f5ef363
Update nextion.h 2019-05-27 16:51:01 +02:00
Otto Winter 7b5c4359c6
Update nextion.h 2019-05-27 15:39:01 +02:00
Aalian Khan 6fff2e5957
Added more examples 2019-05-13 21:24:45 -04:00
Aalian Khan a1b6a91642
Update nextion.h 2019-05-13 14:51:21 -04:00
Otto Winter 8e75980ebd
Cleanup dashboard JS (#491)
* Cleanup dashboard JS

* Add vscode

* Save start_mark/end_mark

* Updates

* Updates

* Remove need for cv.nameable

It's a bit hacky but removes so much bloat from integrations

* Add enum helper

* Document APIs, and Improvements

* Fixes

* Fixes

* Update PULL_REQUEST_TEMPLATE.md

* Updates

* Updates

* Updates
2019-04-22 21:56:30 +02:00
Otto Winter 6682c43dfa
🏗 Merge C++ into python codebase (#504)
## Description:

Move esphome-core codebase into esphome (and a bunch of other refactors). See https://github.com/esphome/feature-requests/issues/97

Yes this is a shit ton of work and no there's no way to automate it :( But it will be worth it 👍

Progress:
- Core support (file copy etc): 80%
- Base Abstractions (light, switch): ~50%
- Integrations: ~10%
- Working? Yes, (but only with ported components).

Other refactors:
- Moves all codegen related stuff into a single class: `esphome.codegen` (imported as `cg`)
- Rework coroutine syntax
- Move from `component/platform.py` to `domain/component.py` structure as with HA
- Move all defaults out of C++ and into config validation.
- Remove `make_...` helpers from Application class. Reason: Merge conflicts with every single new integration.
- Pointer Variables are stored globally instead of locally in setup(). Reason: stack size limit.

Future work:
- Rework const.py - Move all `CONF_...` into a conf class (usage `conf.UPDATE_INTERVAL` vs `CONF_UPDATE_INTERVAL`). Reason: Less convoluted import block
- Enable loading from `custom_components` folder.

**Related issue (if applicable):** https://github.com/esphome/feature-requests/issues/97

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-17 12:06:00 +02:00