Support W5500 SPI-Ethernet polling mode if framework is supported - #7503
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #7503 +/- ##
==========================================
+ Coverage 53.70% 53.98% +0.27%
==========================================
Files 50 50
Lines 9408 9765 +357
Branches 1654 1344 -310
==========================================
+ Hits 5053 5272 +219
- Misses 4056 4167 +111
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
|
This change is a requirement for correct functioning on a few devices I have had issues using, both for the same reason:
Both using W5500 with no INTn pin connected |
|
This works for me on an m5stack lite with the Atom POE. Previously I was seeing symptoms similar to esphome/issues#6217. My crash was in a gpio setup function. |
What for config did you use? |
|
At commit cc2f39a I used esphome:
name: study-bluetooth-proxy
friendly_name: Study Bluetooth Proxy
esp32:
board: m5stack-atom
framework:
type: esp-idf
version: "5.3.1"
platform_version: "6.9.0"
ethernet:
type: W5500
clk_pin: GPIO22
mosi_pin: GPIO33
miso_pin: GPIO23
cs_pin: GPIO19
clock_speed: 20MHz
polling_interval: 10ms
manual_ip:
static_ip: ...
gateway: ...
subnet: ...
dns1: ...
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "..."
ota:
- platform: esphome
password: "..."
esp32_ble_tracker:
scan_parameters:
# We currently use the defaults to ensure Bluetooth
# can co-exist with WiFi In the future we may be able to
# enable the built-in coexistence logic in ESP-IDF
active: true
bluetooth_proxy:
active: true
button:
- platform: safe_mode
id: button_safe_mode
name: Safe Mode Boot
- platform: factory_reset
id: factory_reset_btn
name: Factory reset |
There was a problem hiding this comment.
This LGTM and I've been running it for a while. I left some comments/suggestions but I think nothing which really affects the functionality
@jesserockz @JeroenVanOort would it be possible to get this on the radar for a future release?
cc2f39a to
d02228f
Compare
4619cf6 to
c788262
Compare
|
Moved the polling_interval and interrupt_pin setting checks to _validate(). Compared to the previous code, there are the following differences:
|
There was a problem hiding this comment.
LGTM. I've built and uploaded this to my device.
BTW, I have merged the 2024.10.0 release tag into my checkout of your branch so actually not quite testing exactly what is here, but I think it makes no practical impact.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
77f6789 to
ce22b44
Compare
|
|
FYI I've uploaded a new build from bc71786 to my system and it seems to be working well. |
|
I built W5500+bluetooth_proxy with commit 162e521, and I run for a few days and no issue occ
67E6
ured. |
FWIW I saw these too. I think they are due to the non-default version of esp-idf and/or platform I/O and not directly related to this PR (other than it requiring the non-default version). |
What does this implement/fix?
W5500 can work without interrupt(IRQ) pin, but crash at init if configure without
interrupt_pin.This patch adds polling mode to SPI-based ethernet if ESP-IDF framework is supported.
Types of changes
Related issue or feature (if applicable): fixes esphome/issues#6268
Pull request in esphome-docs with documentation (if applicable): esphome/esphome.io#4389
Test Environment
Example entry for
config.yaml:Checklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: