esphome / feature-requests

ESPHome Feature Request Tracker

Home Page:https://esphome.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Olimex ESP32-POE(-ISO) Ethernet & Wifi at the same time

sipodd opened this issue · comments

commented

Describe the problem you have/What new integration you would like

Possibility to enable Ethernet, Wifi and Bluetooth, on this particular Boards at the same time.

Please describe your use case for this integration and alternatives you've tried:

While the Olimex ESP32-POE seems to be capable, it is not possible to enable Ethernet Component and Wifi Component at the same time within ESPHome.
ref: https://github.com/OLIMEX/ESP32-POE/tree/master/SOFTWARE/ARDUINO/ESP32_PoE_Ethernet_WIFI_test

Additional context

I would like to use Olimex ESP32-POE Boards as Wifi AP while the devices are connected and powered via POE-Ethernet. (so: using Ethernet as an uplink; the ESP32-POE as a bridge)
If there is enough memory left, using it as a Bluetooth proxy would be greate, but not the main concern of this FR.

This is not specific to Olimex ESP32-POE. ESPHome doesn't support parallel usage of Ethernet and Wifi, regardless of the board:
https://esphome.io/components/ethernet.html

commented

This is not specific to Olimex ESP32-POE. ESPHome doesn't support parallel usage of Ethernet and Wifi, regardless of the board: https://esphome.io/components/ethernet.html

I know, thats the reason for this FR...i'd like to have it supported.

Using an ESP32 as an ethernet backed wifi access point would require more than just being able to use the two components simultaneously, as traffic would need to be routed between the two interfaces. Although I couldn't help you with the specifics because I simply don't know, I believe it would take quite some work to add this to esphome.

Out of curiosity, I looked for ESP32 based AP's outside of esphome and while there are some projects, I don't have the impression that your use case is a common one. From this I take that people have found other solutions to be better suited. Unless you want a hobby project to spend many hours on, I would advise you to buy a (second hand) AP and use a PoE splitter. From the 12V jack, you can (using some DIY) feed both the AP and the ESP32. Most AP's also serve as an ethernet switch, so the ESP could take it's connectivity from there. This is what I use for PoE powering some (OpenWrt based) AP's that don't support PoE directly.

Is there a way just only to enable wifi association. i.e. I'd like to open my garadge door once esp home completes a WPA 4-way handshake with my carplay.

I too would like to use both Ethernet and WiFi simultaneously, but not as an AP or bridge... just regular 'client' connectivity on both interfaces.

+1
Bluetooth and Ethernet at the same time needed

+1 Bluetooth and Ethernet at the same time needed

@Grandma-Betty that's already possible. This is about wifi.

Hmm...in my case BLE does not connect when ethernet is enabled on the ESP32 baord. When connecting via WiFi, BLE works as intended.
I have the Olimex ESP32-PoE-ISO-EA board. Maybe it's a board limitation, I have to figure out. Thanks @ssieb

Works for me with the same board... what Bluetooth devices are you trying to use?

It's a medical cooling box, here is the link on how I set it up:
Lifeina/lifeinabox-communication-protocol#1

This is my ESPHome code for ethernet:

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12

Are you using the same code for ethernet?

lol, now it works without changing anything. Seems something being flaky over here.
Nevermind, I will figure out. Apologies, my fault @ssieb and @nagyrobi

Are you using the same code for ethernet?

Yes, and use a static IP address with manual_ip and use_address for higher stability.

If you use manual_ip, you don't need use_address.

Off-topic, but just in case anyone is interested or this helps anyone, I found out that the ESP32 needs to be synchronized to an NTP server in order for BLE to work properly. I can only imagine that ESPHome does not initialize the according timer needed for BLE when it does not have a time source (such as an NTP server) available to connect to.
I could easily reproduce by giving the ESP32 a fake DNS server IP address instead of a real one. Then it stops to work.

I suspect it does not need to be 'synchronized to an NTP server', it just needs to have the wall-clock time set in some fashion. Using the homeassistant time platform should be sufficient as well.