Shelly Plus 1 Mini Flash via UART

In case anyone is also trying to flash the Shelly Plus1 Mini via hardware (rather than OTA):

Shelly Plus 1 Mini it does not have a header that allows for easy connections for flashing via UART. However it is possible (if fiddly) to do so using 3 test pads combined with the connections to the power capacitor.

The case can be opened relatively easily without damaging - it just unclips if you gently lever it with a small screwdriver)

I have the GPIO for the button, switch input, LED and relay identified. Have not figured out the temperature sensor yet.

(GPIO9 is the strapping pin that needs to be held low to flash).

1 Like

I flashed Shelly plus PM mini (i guess it’s more or less similar…?), i managed to find pins for energy chip, so it works. I didn’t even search for temp.sensor yet. First “?” on your picture from left is enable (reset) pin, i’d guess that second one is GND…? I did wrote down these pins somewhere, but lost that paper, so… :sob:

Other pins are:

gpio0 : LED
gpio1. button
gpio6: TX
gpio7: RX

note that baudrate must be set to 9600 in order for energy chip to work. Platform is bl0942

EDIT: for some reason bt proxy doesn’t work on this device (esp32-c3). I tried with BT iTag and the moment i turn it on i get tons of warnings from ESP’s debug log - tag refuses to connect to esphome. I didnt’ researh any further yet though…

1 Like

basic yaml tested and working so far (based upon the plus1 work already posted on this site) :

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino
output:
  - platform: gpio
    id: "relay_output"
    pin: GPIO7
switch:
  - platform: output
    id: "relay_switch"
    name: "Relay"
    output: "relay_output"
binary_sensor:
  - platform: gpio
    name: "Switch"
    pin: GPIO10
    on_press:
      then:
        - switch.turn_on: "relay_switch"
    on_release:
      then:
        - switch.turn_off: "relay_switch"
    filters:
      - delayed_on_off: 50ms
  - platform: gpio
    name: "Button"
    pin:
      number: GPIO1
      inverted: yes
      mode:
        input: true
        pullup: true
    on_press:
      then:
        - switch.toggle: "relay_switch"
    filters:
      - delayed_on_off: 5ms
status_led:
  pin:
    number: GPIO0
    inverted: true

I have not tried BT proxy yet - still hope to find the temperature sensor though. I think there is something connected to GPIO2, but it is hard to tell what as there are a fair few components hidden on the other side of the board under the relay daughter board (which makes everything compact, but hides things)

Hi there,
I designed a holder that keeps the Shelly Plus 1 Mini in place and uses regular male Dupont connectors to safely connect to the pins while flashing.
Maybe it’s helpful.

2 Likes

Just for the sake of completeness, here are pictures of the top and bottom side of the main PCB of the (at the moment of writing) latest gen.3 module. The relay has been removed, but there aren’t any other components on that sub-PCB, apart from the relay itself.

Based on @Aktendully’s post , it would appear that the ? on the J10 test point (@teadrinker’s picture, to the right and above center) is actually ground.

the Pins are equal to all other Minis.

Rest
3v3
RX
TX
GPIO_BootSEL
and Ground.

the pinout for GPIO is equal to the other Minis

GPIO00 = Led
GPIO01 = Button
GPIO03 = ADC Temp
GPIO06 = Tx
GPIO07 = Rx
just keep in mind, this chips have a flash size of 8MB, not just 4.

there are 3 Shellys GEN-3:
Shelly 1 Mini Gen. 3 : It has a Switch/Relay, but no Powermeter.
Shelly PM Mini Gen. 3 : it have a PowerMeter, but no Relay/Switch.
Shelly 1PM Mini Gen. 3 : it have both, Relay and PowerMeter.

hope this help a bit.

2 Likes

Hi all,

I have a question out of curiosity. Are there any pins on the Shelly board that I can use as a switch to trigger the relay? I want to mimic the Wi-Fi power-on command so that I can control my device using a physical switch in parallel with Wi-Fi control.

Thanks heaps!

maybe 18 & 19, but i’m not sure!

You mean to control it via esphome software? You can use original (built-in) button. I program all my Shelly’s to toggle relay with that switch. Just solder two wires parallel with switch.
But if you mean to bypass ESP chip and directly turn on relay … well, that will require some digging - you have to find SMD transistor which controls relay and connect base of that NPN to power (+3.3V). Via a resistor, of course.

I just bricked my Shelly PM Gen 3!
So I was able to verify that the pinout is correct: