Commit Graph

32 Commits

Author SHA1 Message Date
Jimmy Hedman 57b7dd0fa2
Refactor ip address representation (#5252) 2023-09-27 21:38:43 +13:00
Samuel Sieb e3eef1cc6d
fix disabled wifi power on 8266 (#5409)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-09-21 09:20:54 +12:00
Jimmy Hedman dadbc1aefa
Enable IPv6 for ESP8266 and Raspberry pi pico w (RP2040) (#4759) 2023-09-13 08:05:02 +12:00
Jimmy Hedman b19c7d462b
Fixed calculation of start and end dhcp range (#4785) 2023-05-10 13:03:43 +12:00
Bella Coola 4c39631428
Add support for passive WiFi scanning (#4666)
* Add support for passive WiFi scanning.

* Apply suggestions from code review

Made changes suggested by @jesserockz

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: BellaCoola <unknown>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-20 03:53:42 +00:00
Oxan van Leeuwen cdda648360
Generate ARDUINO_VERSION_CODE in Python code (#3101)
Co-authored-by: Otto winter <otto@otto-winter.com>
2022-01-24 10:34:34 +01:00
Otto Winter 278863d027
Fix some issues with wifi driver after IDF refactor (#2387) 2021-09-25 09:16:32 +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 d594a6fcbc
Store strings only used for logging in flash (#2274)
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-09-13 09:48:52 +02:00
Oxan van Leeuwen 97a18717e6
Disable automatic usage of SNTP servers from DHCP (#2273) 2021-09-13 12:44:39 +12:00
Oxan van Leeuwen d71996e58d
Reduce static RAM usage (#2140) 2021-08-23 20:43:54 +12:00
Oxan van Leeuwen 5ec9bb0fb5
Clean-up constant definitions (#2148) 2021-08-23 19:21:30 +12:00
Oxan van Leeuwen 8cc3cbb22e
Add macros header with more usable Arduino version defines (#2145) 2021-08-23 19:19:21 +12:00
Stefan Agner a80f9ed336
Support ESP8266 Arduino 3.0.0 (#1897)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-06-15 08:50:58 +02:00
Stefan Agner 501f88ca86
Avoid non-const globals and enable clang-tidy check (#1892) 2021-06-11 08:19:44 +12:00
Otto Winter 360effcb72
Activate some clang-tidy checks (#1884) 2021-06-10 13:04:40 +02:00
Tom Price 10e7abb579
Add support for WPA2-EAP enterprise WiFi to ESP8266s. (#1332)
* Add support for WPA2-EAP enterprise WiFi to ESP8266s.

This is fundamentally the same as on ESP32s only with different function names.

Update config checker to remove requirement for ESP32 for EAP authentication.

* Fix indent for clang
2020-11-01 20:40:18 +13:00
Otto Winter 389889ad70
Mitigate CVE-2020-12638 WiFi WPA Downgrade (#1207)
Co-authored-by: Lukas Bachschwell <lukas@lbsfilm.at>
2020-07-27 18:22:38 +02:00
Otto Winter 7a6df38515
Add ESP8266 core v2.6.2 (#905)
* Add ESP8266 core v2.6.2

* Upstream ESP8266 Wifi fixes

* Replace disable_interrupt with InterruptLock C++ class

* Update code to use InterruptLock

* Lint

* Update dht.cpp

* Improve InterruptLock docs, mark as ICACHE_RAM_ATTR

* Fixes
2019-12-04 19:30:10 +01:00
Otto Winter 5becaebdda
Improve WiFi disconnect messages (#857)
* Improve WiFi disconnect messages

* Fix

* Update wifi_component_esp32.cpp
2019-11-17 23:25:04 +01:00
Otto Winter fad05d5a2e
Add wifi output_power setting (#853)
* Add wifi output_power setting

See also:
 - https://github.com/esphome/feature-requests/issues/471#issuecomment-552350467
 - https://github.com/esp8266/Arduino/issues/6366
 - https://github.com/esp8266/Arduino/issues/6471
 - 849f8cf920/code/espurna/config/general.h (L593-L599)
 - https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t

* Lint
2019-11-12 17:39:27 +01:00
Otto Winter 85c46becdf
WiFi AP apply manual ip settings (#836) 2019-11-05 22:11:15 +01:00
Otto Winter 0cbd373817
ESP8266 remove default opmode check (#835) 2019-11-05 21:56:35 +01:00
Otto Winter 8027facb39
Fix weird ESP8266 wifi crashes (#831)
* Try fix ESP8266 weird crashes

* Only call disconnect if STA is active
2019-11-03 00:19:57 +01:00
Otto Winter 13522c8f19
WIP: ESP8266 work on connection issues (#648)
* Erase all flash for USB uploads on ESP8266s

Previously, only erased "write regions".

Downside: Config for other FWs like tasmota could be affected

Upside: Potentially fixes some ESP8266 connection issues

Related: https://github.com/esphome/issues/issues/455#issuecomment-503524479

* Clear WiFi settings for ESP8266

Clears wifi settings from retained storage on ESP8266 (if set).

Unsure if this is the actual issue, but it won't cause problems either.

* Update wifi_component_esp8266.cpp

* Revert erase chip for testing

* Improve wait_time calculation
2019-07-02 13:03:11 +02:00
Otto Winter 36f47ade70
Add Captive Portal (#624)
* WIP: Captive Portal

* Updates

* Updates

* Lint

* Fixes
2019-06-09 17:03:51 +02:00
Otto Winter c53483a3b2
ESP8266 connect fixes (#605)
* ESP8266 Connection Fixes

* Update client.py

* Update mqtt_client.cpp

* Update mqtt_client.cpp

* Fix ping

* Async dump config

* Update base image to 1.7.0

* Update helpers.py

* Updates

* Update Dockerfile.lint
2019-06-03 15:21:36 +02:00
Otto Winter f921997ee6
Fix addressable effects (#590) 2019-06-01 12:00:00 +02:00
Otto Winter 72a80f559a
Use relative include, add check 2019-05-27 13:06:45 +02:00
Otto Winter 521c080989
Updates 2019-05-08 09:58:03 +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