Commit Graph

13 Commits

Author SHA1 Message Date
SenexCrenshaw
0651716b96
Nextion upload and sensors (#1464)
Co-authored-by: Senex Crenshaw <senexcrenshaw@gmail.com>
2021-07-15 12:51:15 +12:00
needspeed
0f151a8f6b
Extend 'uart:' with 'invert:' for esp32 (#1586) 2021-03-06 10:25:07 -03:00
Otto Winter
62468198d6
Clean up UART Improvements code (#1190) 2020-07-25 13:56:08 +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
Brandon Davidson
aca306d120 Fix logger uart conflict check (#858)
* Fix logger uart conflict check

* Fix class for check func

* Fix syntax

Hope lint is OK with moving the end of the conditional outside the #IFDEF

* Move end of conditional inside ifdef and remove extra whitespace

* Simplify

clang-format did not like the ifdefs and was reformatting in a way that killed clang-tidy.

Simple solution is to use logger's hw_serial as source of truth

Also simplifies the code - uart doesn't need to know what the logger uart settings mean
2019-11-14 13:36: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
78c1adafcd
Make UART flush function consistent (#748)
See also 78be9d2937
2019-10-17 16:54:38 +02:00
Otto Winter
2c995cf145
Fix GPS time source. (#704)
* Change ESP32 default power_save_mode to light

* Update
2019-08-27 22:11:50 +02:00
Guillermo Ruffino
fc465d6d93 SMS Sender / Receiver (#522)
* add sim800l

* Increse SoftwareSerial Buffer Size

* use auto id on action

* lint

* lint

* add to test3.yaml

* lint


Co-authored-by: Guillermo Ruffino <guillermo.ruffino@pampatech.net>
2019-06-17 20:13:52 +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
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