Flash Wio Node to ESPHome or Tasmota

Wio Nodes are tiny wireless controller boards built by Seeed Studio as part of the Grove system which supports hundreds of hardware widgets and sensors. The nodes were designed to be configured with the Wio app and linked through a Wio server.

It's unclear if the Seeed Studio Wio service is just down temporarily or entirely deprecated, but the Wio server displayed an error while trying to setup some old Wio Nodes I had sitting in a box. I assumed these nifty little boards were rendered useless by service deprecation, and none of my favorite open source firmwares mentioned support for the "ESP-WROOM-02" chip on the board.

It wasn't until a few days ago when I learned that "ESP-WROOM-02" is not the chip but an assembly, which uses the popular ESP8266 chip at its core. Now the question was not if but how can I flash it?

Seeed Studio's Github repo didn't include flashing instructions but did include the board schematics which held the key to flashing.

Wio Node GPIO

The Wio schematic lists the following GPIO connections to grove connectors:

Grove portSilkscreen grove labelGrove pin #Wire colorIOSchematic label
0
UART/I2C0/D0
1Yellow3U0RXD/SPICS1/GPIO3
2White1U0TXD/GPIO1
1
ANALOG/I2C1/D1
1Yellow5GPIO5
2White4GPIO4

Oddly, the silkscreened grove labels don't match the schematic labels for those GPIO. For example, both grove ports list I2C, but SDA is not mentioned at all in the Wio schematic. The ESP schematic includes SDA, but it's on GPIO2 which is not connected to a grove port. It turns out that ESP8266 GPIO supports some software re-assignment, which is how the same grove connector can switch between digital, analog, and I2C.

The schematics also include the following GPIO details:
  • GPIO0 - Func button
  • GPIO2 - Onboard blue LED
  • GPIO15 - Grove VCC power switch
As with other ESP8266 devices, you can boot to flash mode by shorting GPIO0 (Func button) during boot, then send the new firmware over UART (grove port 0).

Requirements

This guide details the process for flashing a Wio Node device and assumes you have some experience flashing other ESP8266 devices. If not, check out the Tasmota getting started guide before continuing.

You'll need the following hardware:
  • USB-TTL adapter such as a CH340 device
  • A grove to jumper cable or any way to connect grove to TTL. I used alligator clips.
  • MicroUSB cable for power (microUSB won't work for flashing)
  • PC/server/Arduino running ESPHome, Tasmotizer, or your preferred ESP flashing tool

Flashing

  1. Connect the USB-TTL Tx/Rx/gnd pins to the grove port 0 (UART). Do not connect VCC
  2. Connect the microUSB port for power
  3. Boot to flash mode:
    - Hold the Func button (GPIO0)
    - Press the RST button
    - Wait a few seconds then release Func
  4. Start flashing using ESPHome, Tasmotizer, or your preferred flashing tool
If the ESP8266 is not found by the flashing tool, try reversing the Tx/Rx wires and/or changing the USB TTL com port baud rate to 115200.

I first flashed ESPHome but decided to reflash to Tasmota as it's flexible webUI makes prototyping faster. As a side note, you can flash the tasmota.bin over-the-air from the ESPHome onboard webUI!

Tasmota setup

The Generic (0) module can be used since there's no specific Wio module. Select the components to be used on each GPIO. 

For a quick PoC test, I used the PWM component on GPIO3 to control a red LED and Relay_i (inverted) on GPIO2 to test the onboard blue LED.


This automatically generates a PWM slider control and on/off toggles on the Tasmota main menu, which is useful for testing but impractical for anything else.


Connecting this to my existing Tasmota integration in Home Assistant was as easy as clicking on the Tasmota Configure MQTT button and entering my server details. Home Assistant magically picked up the device and generated toggles and a slider which work the same as in Tasmota. Here's a video of the auto-generated controls in action.

ESPHome

ESPHome requires less configuration, as it includes a Wio Node device type, however, it seems to only support D0 and D1 as digital I/O out of the box. I don't recall if it's possible to reconfigure these as I2C or analog, or to enable additional GPIO pins (grove pin2) in yaml, so I'll just stick with Tasmota for now.

Comments

Popular posts from this blog

Raspberry Pi-based Home Assistant Control Panel

KingNovyPC M6 N100 Alder Lake-N Slim Mini PC Review

Railway Museum (鉄道博物館, Tetsudō Hakubutsukan)