Skip to content

How to Easily Configure New Unknown Devices with ESPHome

Over the years, I’ve configured a few new devices with ESPHome. Lately, I loved being able to use Tuya Convert to flash new devices without ever having to unscrew and screws. While Tuya Convert makes the process of putting the initial firmware very easy, it also means I’m now not taking the devices apart. This means I can’t trace the pins to know which pin is doing what.

For me, most of these devices are ESP8266s in some type of smart home gadget. To identify the pins, I’ve created two firmware configs. The first has all of the pins set as binary inputs and the second has all of the pins set as switches. I’ve provided the code for the firmware and precompiled bin files.

Steps for identifying the pins

  1. Use Tuya Convert to flash device
  2. Flash the device with the binary inputs firmware
  3. Connect to the device on it’s broadcasted SSID, then open the devices webpage
  4. Use the device to activate pins, they’ll be listed in the log output
  5. Flash the device with the switches firmware
  6. Connect to the device webpage and activate one switch at a time
  7. Create your ESPHome config and finally flash your device through the web GUI

The code below is used for both versions of the firmware, I just comment out the conflicting parts. For those that want it the easy way, here are the precompiled versions:

Published inDIY HardwareESPHome