André Klitzing
72cce391ab
Fix some typos found by codespell ( #3598 )
2022-06-27 18:02:46 -03:00
Martin
d620b6dd5e
Refactor Sensirion Sensors ( #3374 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-04-13 10:19:48 +12:00
Keilin Bickar
a9e653724c
Add parameter to control i2c stop signal at endTransmission ( #3370 )
2022-04-11 08:38:29 +12:00
Oxan van Leeuwen
80d03a631e
Force braces around multi-line statements ( #3094 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-01-25 08:56:36 +13:00
Stefan Agner
a02d2e2e11
Explicitly use overloaded begin() for I2C master initialization ( #2978 )
...
Arduino 2.0.1 and newer support slave and master mode. The two modes
have a begin() method with different signature:
```
// Slave Begin
bool TwoWire::begin(uint8_t addr, int sdaPin, int sclPin, uint32_t frequency)
// Master Begin
bool TwoWire::begin(int sdaPin, int sclPin, uint32_t frequency)
```
Use type casting to make sure that overloaded method for master mode
is used.
2022-01-03 16:37:21 +01:00
Martin
b2f05faee0
Move i2c scan to setup ( #2869 )
...
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-12-13 09:12:50 +13:00
Oxan van Leeuwen
c422b2fb0b
Introduce byteswap helpers ( #2661 )
...
* Backport std::byteswap() in helpers.h
* Introduce convert_big_endian() function
* Use convert_big_endian() in i2c byte swap functions
2021-11-10 19:40:18 +01:00
Martin
5461f87ff0
I2c fix ( #2460 )
2021-10-07 21:18:00 +02:00
Otto Winter
54a173dbf1
I2C re-introduce very verbose logging ( #2446 )
2021-10-06 11:57:23 +13:00
Maurice Makaay
5c06cd8eb3
Fix I2C recovery ESP32 esp-idf ( #2438 )
...
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-10-04 12:33:25 +02:00
Maurice Makaay
d0dfc94a61
Fix I2C recovery on Arduino ( #2412 )
...
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-10-01 12:53:37 +02:00
Otto Winter
aec02afcdc
Fix clang-tidy header filter ( #2385 )
...
* Fix clang-tidy header filter
* Allow private members
* Fix clang-tidy detections
* Run clang-format
* Fix remaining detections
* Fix graph
* Run clang-format
2021-09-24 18:02:28 +02:00
Christian Taedcke
963b28181f
Always execute i2c bus recovery on setup ( #2379 )
2021-09-23 20:11:40 +02:00
Martin
262d69308d
fix i2c scanning eror for Arduino ( #2364 )
2021-09-22 19:08:42 +02:00
Stephen Tierney
b20760c93c
Add support for LTR390 ( #1505 )
...
* Add support for ltr390
* Fix linting errors
* Fix more linting errors
* Linting fixes continued
* Linting forever
* Another one
* Fix regression and linting
* Fix narrowing conversion
* Add test and bugfix
* Add codeowners
* Update CODEOWNERS
* Update sensor defs
* Reformatted with black
* Fixed device class import
* Update CODEOWNERS
* Update CODEOWNERS
* Adding all config options
As requested https://github.com/esphome/esphome/pull/1505#discussion_r597326897
* Moving test to different config file
test1.yml runs out of memory
* Update according to comments
* Add safety clause to reading modes
* Fix clang-tidy complaint
* Revert change to i2c component
* Fix for changes in dev
* Revert "Revert change to i2c component"
This reverts commit 2810df59e9
.
Co-authored-by: Otto winter <otto@otto-winter.com>
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-09-22 13:24:19 +02: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
Oxan van Leeuwen
40c474cd83
Run clang-tidy against ESP32 ( #2147 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-09-13 18:11:27 +02:00
Oxan van Leeuwen
0cd24c629a
Compatibility with clang-tidy v14 ( #2272 )
2021-09-13 09:35:55 +02:00
Stefan Agner
501f88ca86
Avoid non-const globals and enable clang-tidy check ( #1892 )
2021-06-11 08:19:44 +12:00
Maurice Makaay
56974153f1
I2c raw cmds with multiplexer ( #1817 )
...
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-06-01 10:36:25 +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
Andreas Hergert
9e23987db8
Add I2CMultiplexer in generel and the TCA9548A in special ( #1410 )
...
* Added I2CMultiplexer in generel and the TCA9548A in special
* cleanup
* tidy
* tidy
* tidy
* tidy
* Update CODEOWNERS
* Update CODEOWNERS
* added CODEOWNERS
* Fix CODEOWNERS
* protected function
* fixed scan
* fixed style
* added to test1.yaml
* Update esphome/components/tca9548a/__init__.py
* Update esphome/components/i2c/__init__.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Update esphome/components/i2c/i2c.cpp
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Update esphome/components/i2c/__init__.py
* Update esphome/components/i2c/__init__.py
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
* Update esphome/components/i2c/i2c.cpp
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
* added define statements for I2C Multiplexer
* fix
* try to tidy
* bug fix
* tidy
* override fix
* only change channel if different
* tidy
* added test
* testfix
* added defines
* tidy
* fix dep
* like recommended
Co-authored-by: Andreas Hergert <andreas.hergert@otrs.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-03-29 16:50:30 -03: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
la7dja
7221337442
Support I2C transactions with combined reads and writes ( #996 )
...
* Support I2C transactions with combined reads and writes
* Add optional send_stop parameter to I2CComponent::raw_end_transmission
* Add convenience methods to I2CDevice
* clang-format
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2020-11-06 17:09:28 +13:00
Otto Winter
4996967c79
Add CODEOWNERS mechanism ( #1199 )
2020-07-25 15:57:18 +02:00
Otto Winter
9a152e588e
Vl53l0x ( #644 )
...
* VL530LX
* VL53L0X
* Updates
* License
* Lint
2019-10-20 17:56:57 +02:00
Otto Winter
cdb9c59662
Add ADE7953 Support ( #593 )
...
* Add ADE795 support
* Lint
* Fix
* Fix, add test
2019-10-16 13:19:41 +02:00
Thomas Eckerstorfer
68e7e5a51c
AS3935 Lightning sensor ( #666 )
...
* added tx20 wind speed sensor
* added test
* fixed lint errors
* fixed more lint errors
* updated tx20
* updated tx20 sensor
* updated to new structure and removed static variables
* removed content from __init__.py
* fixing lint errors
* resolved issues from review
* added as3935 sensor
* updated as3935 with more settings
* update
* support for i2c + spi updated
* added tests and various fixes
* added tx20 wind speed sensor
* fixed lint errors
* fixed more lint errors
* updated tx20
* updated tx20 sensor
* updated to new structure and removed static variables
* removed content from __init__.py
* fixing lint errors
* resolved issues from review
* added as3935 sensor
* updated as3935 with more settings
* update
* support for i2c + spi updated
* added tests and various fixes
* updated tests
* fixed style issues
* Remove debug line
* Update log levels
* Reformat
* Auto-convert to int
Co-authored-by: Thomas <thomas.eckerstorfer@mic-cust.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-12 15:03:35 +02:00
Otto Winter
d41ddf380c
Fix i2c setup priority ( #585 )
...
Fixes https://github.com/esphome/issues/issues/314
2019-05-31 13:40:12 +02:00
Otto Winter
0281914507
CCS811 support ( #536 )
...
* CCS811
* Move define, add test
* Remove sun artifact
* Lint
* Lint
2019-05-13 13:06:14 +02:00
Otto Winter
766f6c045d
Updates
2019-04-24 23:49:02 +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