technyon / nuki_hub

Use an ESP32 as a Hub between a NUKI Lock and your smarthome.
MIT License
518 stars 40 forks source link

[Feature request] Add support for DM9051NP Ethernet adapter (ETH01-Evo) #431

Closed drstil closed 2 months ago

drstil commented 3 months ago

PROBLEM DESCRIPTION

Is there a reason, why ESP32-C3 SoC / DM5051NP are not supported via ethernet connection?

Note: LAN8720 modules are only supported on the ESP32, not on the ESP32-S3, ESP32-C3 or ESP-C6

In my special case I have a ETH01-Evo DM9051NP WT ESP32C3-S5 board supporting PoE. Is there a way how I could add the support by myself? Is there any hardware restriction?

REQUESTED INFORMATION

TO REPRODUCE

Use listed device.

EXPECTED BEHAVIOUR

Support of listed device.

(Please, remember to close the issue when the problem has been addressed)

technyon commented 3 months ago

Do you have a link to the board?

drstil commented 3 months ago

Do you have a link to the board?

This are the only links I found:

Which information do you need?

iranl commented 3 months ago

DM9051 is not supported by Nuki Hub and is not planned. You can of course try to add support yourself and create a PR.

technyon commented 3 months ago

Looks like an interesting board, just why don't they add a USB to serial converter. Wiring via a USB dongle usually involves a lot of trial and error.

We'd need to add driver code and configuration for this specific module, it should be possible to make it work, but unfortunately I don't have one and they're hard to get hold off here.

For reference, someone seems to have made it work:

https://github.com/AI6YP/eth01-evo/issues/2

drstil commented 3 months ago

@technyon

This board is one of the cheapest for having ethernet with also POE-support, so very nice! Flashing with a CP2102 adapter was straight forward.

If there is anything I could support, please let me know! If you would be nearer to me (Germany), I could have send you one of my boards. But with Bangkok the shipping fee would be higher than the whole board. Ordering here (without POE-Module?) is hard for you? But maybe I could test it for you?

technyon commented 3 months ago

I've found one on shoppee. 380 Baht, that's just under 10 Euro, not too bad.

I know that flashing via a serial adapter works, but for the average user just plugging in USB is a lot easier.

iranl commented 3 months ago

@technyon Will you be working on this?

If so we should label this as a feature request and enhancement. Otherwise it should be closed.

Although I get the appeal of a cheap PoE solutions the DM9051NP only seems to be used in S2 (not supported because of no BLE) and C3 ESP's which imho are not really worth the time being the slowest of the supported ESP32 versions.

drstil commented 3 months ago

@iranl In principle the software support the ESP32-C3:

Tested stable builds are provided for the ESP32, ESP32-S3 and ESP32-C3.

Do you think the ESP32-C3 has to less performance for nuki_hub? Have you ever done performance testings so that you can say what are the minimum requirements and if it makes a difference in production with ESP32 vs ESP32-C3 (e. g. in latency of mqtt, what are the performance rich processes?)?

iranl commented 3 months ago

I added the support for all devices other than the original ESP32 including the C3 (and wrote the text you're quoting to me).

The C3 and C6 are about 10 times as slow as the ESP32 and ESP32-S3 and they don't support running 2 tasks concurrently as they are single instead of dual core. Although they work in general they don't offer the best experience compared with the ESP32 and S3.

Ethernet chip compatibility is completely separate from this. The 8720 and W5500 are much more common for ESP's than the DM9051 and are available as separate modules that can be added to different boards.

If PoE for a low price is desired I would look at a ESP32-S3 with an added W5500 and an Ethernet PoE to Ethernet and USB-C power splitter. That would be about 12 euros on Ali or double on Amazon.de

As to adding the DM9051: @technyon and I are the ones doing most of the development here. I don't see a good case to work on this, so you will have to work on this yourself and create a PR or hope technyon is willing to work on this.

technyon commented 3 months ago

I'll look into it once I get the module. I'd see how hard or easy it is to add the code, maybe it's not too hard to do. Also, we'd already have the DM9051 driver in case other boards with the chip pop up.

technyon commented 2 months ago

Unfortunately the ESP I found wasn't the ETH01-Evo, but the older WT32-ETH01 model. I'll look again if I can find it somewhere.

P.S.: Found one on aliexpress.

drstil commented 2 months ago

Thank you for the feedback! Perfect! 👍

iranl commented 2 months ago

@drstil: You should be able to give these binaries a try: https://github.com/technyon/nuki_hub/actions/runs/10417095071/artifacts/1819235732

They should support Ethernet on your C3.

drstil commented 2 months ago

@iranl Thank you very much for implementing, works like a charm! 😃

iranl commented 2 months ago

Np, credits in large part to @technyon

technyon commented 2 months ago

My ETH01-Evo hasn't even arrived yet, and it's already working :D