Commit Graph

25 Commits

Author SHA1 Message Date
Kuba Szczodrzyński a9630ac847
Support for LibreTiny platform (RTL8710, BK7231 & other modules) (#3509)
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
Co-authored-by: Sam Neirinck <git@samneirinck.com>
Co-authored-by: David Buezas <dbuezas@users.noreply.github.com>
Co-authored-by: Stroe Andrei Catalin <catalin2402@gmail.com>
Co-authored-by: Sam Neirinck <github@samneirinck.be>
Co-authored-by: Péter Sárközi <xmisterhu@gmail.com>
Co-authored-by: Hajo Noerenberg <hn@users.noreply.github.com>
2023-09-05 10:16:08 +12:00
Sergey Dudanov bbf3d382e8
added uart final validate data bits (#5079) 2023-07-12 16:12:40 +12:00
Jesse Hills e95d6041d8
Allow final validate of uart stop bits and parity (#4376) 2023-02-02 19:34:25 +13:00
Jesse Hills de79171815
RP2040 uart support (#3990) 2022-11-07 10:01:40 +13:00
Leon Loopik 11330af05f
Expand uart invert feature to ESP8266 (#1727) 2021-12-01 20:31:04 +01:00
Maurice Makaay ceb9b1d1ff
Allow empty UART debug: option, logging in hex format by default (#2771)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Maurice Makaay <account-github@makaay.nl>
2021-11-25 11:51:56 +13:00
Maurice Makaay 9e1c3e8f01
Allow UART debug configuration with no after: definition (#2753) 2021-11-18 22:41:26 +01:00
Maurice Makaay e99af991ec
Uart debugging support (#2478)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
Co-authored-by: Maurice Makaay <account-github@makaay.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-11-11 11:34:17 +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 2419bc3678
Improve config final validation (#1917) 2021-06-18 07:54:14 +12:00
Guillermo Ruffino c79d700d03
Add validate to components (#1631)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-05-31 10:06:45 +12:00
Otto Winter aebad04c0b
Convert core components to async-def coroutine syntax (#1658)
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-05-23 22:10:30 +02:00
Guillermo Ruffino 69879920eb
add-black (#1593)
* Add black

Update pre commit

Update pre commit

add empty line

* Format with black
2021-03-07 16:03:16 -03:00
needspeed 0f151a8f6b
Extend 'uart:' with 'invert:' for esp32 (#1586) 2021-03-06 10:25:07 -03:00
Otto Winter 4996967c79
Add CODEOWNERS mechanism (#1199) 2020-07-25 15:57:18 +02:00
Kamil Trzciński cd7af19e7c
Extend uart: with rx_buffer_size: (#1006)
* Extend `uart:` with `rx_buffer_size:`

This allows to configure `rx_buffer_size:`
to efficiently receive big payloads over UART

* lint

* remove old default value

* add test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-09 21:22:06 -03:00
0hax fb2b7ade41
Uart improvments (#1024)
* uart: Add support for specifying the number of bits and parity.

ESP8266SwSerial doesn't really check parity but just read the parity bit
and ignore it when receiving data.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: support begin and end methods.

A component may need to reset uart buffer/status by using begin() and
end() methods. This is useful for example when a component needs to be
sure it is not reading garbage from previously received data over uart.
For end() methods with software serial, disabling interrupt is
currently impossible because of a bug in esp8266 Core:
https://github.com/esp8266/Arduino/issues/6049

Signed-off-by: 0hax <0hax@protonmail.com>

* esphal: add support for detaching an interrupt.

That's needed when a component needs to enable/disable interrupt on a
gpio.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use static const uint32_t instead of #define.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use an enum to handle parity.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: split between esp32 and esp8266.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: check_uart_settings for parity and number of data bits.

Signed-off-by: 0hax <0hax@protonmail.com>

* name param data_bits

* add new params to test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-24 18:59:07 -03:00
Otto Winter 056c72d50d
Drop Python 2 Support (#793)
* Remove Python 2 support

* Remove u-strings

* Remove docker symlinks

* Remove from travis

* Update requirements

* Upgrade flake8/pylint

* Fixes

* Manual

* Run pyupgrade

* Lint

* Remove base_int

* Fix

* Update platformio_api.py

* Update component.cpp
2019-12-07 18:28:55 +01:00
Otto Winter e077ad56bd
Add PZEM004T/PZEMAC/PZEMDC Support (#587)
* Add PZEM004T Support

* Don't flush as much

* Update pzem004t.cpp

* Add generalized modbus

* Add PZEMAC

* Add PZEMDC

* Fix file modes

* Lint

* Fix

* Fix

* Add check_uart_settings
2019-10-20 19:24:20 +02:00
Otto Winter 22aecdfc6f
Use higher default baudrate for USB upload (#761)
See also https://github.com/espressif/esptool/issues/435
2019-10-18 10:23:06 +02:00
Otto Winter 369d175694
Create Protobuf Plugin for automatically generating native API stubs (#633)
* Create Protobuf Plugin for automatically generating native API stubs

* Format

* Delete api.proto

* Cleanup, use no_delay conditionally

* Updates

* Update

* Lint

* Lint

* Fixes

* Camera

* CustomAPIDevice

* Fix negative VarInt, Add User-defined services arrays

* Home Assistant Event

* Fixes

* Update custom_api_device.h
2019-06-18 19:31:22 +02:00
Otto Winter 31ddd3f668
Add uart.write action (#567)
* Add uart.write action

* Lint
2019-05-29 19:32:18 +02:00
Otto Winter e373620393
Use int_range validator (#542)
* Use int_range validator

Just keeping code clean.

* Lint
2019-05-11 11:40:29 +02: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