How I installed ESPHome on the wt32-eth01

Could you help me which gpio pin I can use as an OUTPUT (apart from gpio14 as it’s working fine but i need one more)? According to the datasheet 39, 36, 35 are inputs only, 2, 4, 12, 15 are labelled as strapping and not recommended to use.

1 Like

i am using this config for windows sensors:

esphome:
  name: esp32lan-kellerfenstersensoren
  platform: ESP32
  board: esp-wrover-kit

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 1
  power_pin: GPIO16
  
mqtt:
  broker: 192.168.1.12
  username: 
  password: 
  discovery: False
  discovery_retain: False
  birth_message:
    topic: $devicename/status
    payload: online
  will_message:
    topic: $devicename/status
    payload: offline
  on_message:
    - topic: $devicename/ota_mode
      payload: 'ON'
      then:
        - mqtt.publish:
            topic: $devicename/ota_mode_status
            payload: "active"
    - topic: $devicename/sleep_mode
      payload: 'ON'
      then:
        - mqtt.publish:
            topic: $devicename/ota_mode_status
            payload: "disabled"


logger:
  level: WARN
ota:
  password: password

binary_sensor:
  - platform: gpio
    pin:
      number: 14
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window1WerkraumLinks"
    device_class: window
  - platform: gpio
    pin:
      number: 15
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window2WerkraumRechts"
    device_class: window
  - platform: gpio
    pin:
      number: 5
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window3Waschküche"
    device_class: window
  - platform: gpio
    pin:
      number: 3
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window4Vorratskeller"
    device_class: window
  - platform: gpio
    pin:
      number: 4
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window5BüroMitte"
    device_class: window
  - platform: gpio
    pin:
      number: 2
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window6BüroRechts"
    device_class: window
  - platform: gpio
    pin:
      number: 33
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window8BüroWEST"
    device_class: window
  - platform: gpio
    pin:
      number: 32
      mode: INPUT_PULLDOWN
      inverted: True
    name: "Window7BüroLinks"
    device_class: window

# Enable Home Assistant API
api:

and it seems to work (i get a warning about gpios when compiling…thats all)

EDIT: You want to use thema as “output”, i have no idea…sorry

4 Likes

If you have a look at the strapping pin description (e.g. Boot Mode Selection - ESP32 - — esptool.py latest documentation), you might still be able to use some of them, depending on your use-case.

I for myself use GPIO2 and GPIO4 for SDA and SCL, both are strapping pins. For download mode, GPIO2 needs to be pulled low while it doesn’t care in regular boot mode. So I’m fine with this, if I have to flash it via serial cable, I have to take out the module anyway (mine sits in a socket).

There is a note regarding GPIO4: It’s unused for any boot mode, so you can use it freely.

I use some other pins as output without problems:
IO12 → Relay
IO14 → Relay
IO17 → Tx
IO33 → Resets another module, so output
IO32 → DTR, so output

1 Like

Thanks for the answer, I was able to use GPIO14 and GPIO4 as output and GPIO2 as input in pulldown mode.

My smart siren project has finally been completed :slight_smile:

4 Likes

I need your help to do the same thing. Would you show me the code?

3 Likes

Thank you so much for your great explanation

Hi
I need help i try to use MCP23017 expander but
when i Scan i2c Im getting this
[02:52:30][C][i2c.arduino:038]: I2C Bus:
[02:52:30][C][i2c.arduino:039]: SDA Pin: GPIO12
[02:52:30][C][i2c.arduino:040]: SCL Pin: GPIO15
[02:52:30][C][i2c.arduino:041]: Frequency: 50000 Hz
[02:52:30][C][i2c.arduino:050]: Recovery: failed, SDA is held low on the bus
[02:52:30][I][i2c.arduino:054]: Results from i2c bus scan:
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x08
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x09
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x0A
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x0B
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x0C
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x0D
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x0E
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x0F
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x10
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x11
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x12
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x13
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x14
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x15
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x16
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x17
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x18
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x19
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x1A
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x1B
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x1C
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x1D
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x1E
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x1F
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x20
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x21
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x22
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x23
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x24
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x25
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x26
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x27
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x28
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x29
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x2A
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x2B
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x2C
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x2D
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x2E
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x2F
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x30
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x31
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x32
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x33
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x34
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x35
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x36
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x37
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x38
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x39
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x3A
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x3B
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x3C
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x3D
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x3E
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x3F
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x40
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x41
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x42
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x43
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x44
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x45
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x46
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x47
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x48
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x49
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x4A
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x4B
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x4C
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x4D
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x4E
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x4F
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x50
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x51
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x52
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x53
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x54
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x55
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x56
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x57
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x58
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x59
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x5A
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x5B
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x5C
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x5D
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x5E
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x5F
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x60
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x61
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x62
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x63
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x64
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x65
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x66
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x67
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x68
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x69
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x6A
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x6B
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x6C
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x6D
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x6E
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x6F
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x70
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x71
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x72
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x73
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x74
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x75
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x76
[02:52:30][E][i2c.arduino:062]: Unknown error at address 0x77

I have try use pin GPIO02 and GPIO04 also but sam result and I have connected A1 A2 A3 to GND for adress 0x20.

But nothing work

I only have simplex code

esphome:

  'name: wt32

  platform: ESP32

  board: esp-wrover-kit

ethernet:

  type: LAN8720

  mdc_pin: GPIO23

  mdio_pin: GPIO18

  clk_mode: GPIO0_IN

  phy_addr: 1

  power_pin: GPIO16

ota:

  password:

# Enable logging

logger:

# Enable Home Assistant API

api:

i2c:

  sda: GPIO12

  scl: GPIO15

  scan: true

did you succeed? If so, can you help me out?

However from what I can see is that these do not use 802.3af PoE standard. They appear to use passive PoE. Would be interested to know if I am wrong about that.

Anybody tell me what pins is for SDA and SCL in this module WT32-ETH01 ?

I have ESP32 POE TTGO in post HOLDESMADE in this thread and i define
i2c:

 - id: bus_a

    sda: 14

    scl: 02

    scan: true

but i dont know it is correct. It works but i have a problem with delay on expander MCP23017 and use it for controll my lights in my home. Some module ESP32 like OLIMEX has descripe pins whis is for i2C but this and my has no describe. WHat pin i must use ?

And does anyone know if the WT32-ETH01 has ADC capability? I cannot see any indication of this on the pin outs that I can find but I can only see pins labelled input with no details beyond that. Maybe It looks like not……

Hi
this are my config for sda and scl and it works witout delay for mcp23017

sphome:

name: wt32-eth01

esp32:

board: esp-wrover-kit

framework:

type: arduino

ethernet:

type: LAN8720

mdc_pin: GPIO23

mdio_pin: GPIO18

clk_mode: GPIO0_IN

phy_addr: 1

power_pin: GPIO16

Enable logging

logger:

Enable Home Assistant API

api:

encryption:

key: 

ota:

password:

i2c:

sda: 14

scl: 15

scan: true

id: bus_a

mcp23017:

  • id: ‘mcp23017_hub’

    address: 0x20

But how many expander use and how many light ?

It’s really nice of you sharing it, but would you mind editing your post to format your yaml properly?

Just add this line before and after your code:

```yaml
Your code
```

And it will look like this (much easier to read when it is real yaml):

Your code

Thank you for sharing your code, but, PLEASE use code tags:

No, it’s standard PoE (802.3at). I have a few of these as well, they work fine.

You can use as many expanders as you can assign i2c addresses - that’s 8 for the MCP23017. And then you can use i2c multiplexers like the TCA9548A. I use them for my lights as well, my biggest system has 7 additional i2c devices (2xMCP23017, 5xPCF8574) with a total of 48 relays (lights, blinds) and 24 digital inputs (light switches). I use

i2c:
  sda: 2
  scl: 4

on my WT32-eth01. Works very well for me!

1 Like

do you notice any delays or so when having so much devices on one ESP?

No noticeable delay with the 7 GPIO expanders. And I’m running the bus only at 50kHz while it could be run at 400kHz.