How to ESP32 custom on Shelly 1mini Gen4

Hello everyone,
I’ve bought a Shelly 1mini Gen4 for a project (need to put inside a fan) to be able to control it trough the addon for home assistant BLE ADV Ceiling Fan / Lamps.

So I need to be able to Send/broadcast BLE advertisements to control the fan.
Which seems is not possible with the stock firmware of the shelly.
I created a new firmware, but I don’t know how to patch it, since it seems it not possible anymore over OTA, and the pads of the Mini are damn small.

Also i didn’t found a exact schema, but I think is the same as this: Shelly 1 Mini Gen3 | ESPHome Devices

Does anyone have experience in patching those?
I don’t have a the moment a small solderer tip - and since the pads are so small and so near, I’m not really confident in doin that.

Any advice is very welcome!

(I have a CP2102 USB-to-TTL adapter and pogo pins, but couldn’t make reliable contact with the pads without soldering.)

Why don’t you use wifi?

Because the FAN is controlled via BT, and the only way to control it is through the addon of HA (GitHub - NicoIIT/ha-ble-adv: BLE ADV Ceiling Fan / Lamp HA custom integration · GitHub).
So I need to reflash the Shelly 1mini Gen4

Ok, I understand this, but what’s the role of Shelly here and why Shelly needs to be controlled by BLE ?

Afaik Shelly gen4 stock FW can’t be flashed to esphome without wired connection.

Is not the shelly that has to be controlled with BLE, it need to have BLE ADV to be able to control the FAN… that’s why I want to refléash it.

That’s why im asking how to reflash it.

(waht will happen is then : HA → SHELLY → FAN , and the BLE on the shelly has to be ble adv, that’s why i need to reflash it).

Maybe I’m slow today or there’s something I didn’t see here.
So why are you using Shelly in the first place instead of esphome devboard?
99+ % of people are using Shelly mini to switch mains circuit…

1 Like

Because it seemed the fastest way to have a 220V board with the ability of reflashing (which were made otterly complicated in gen4, which I didn’t know).
But again - I was asking if someone could help me - not fight my choices…

I think you actually just need a 220v to USB PSU and the cheapest ESP32 board you can get.

Not fighting with you.
But until last post your choice didn’t make any sense.

Pick some other device that has flash header better exposed.
Or some device from Atom tech or similar that comes with esphome fw.

1 Like

I was having similiar ideas. Having a compact 220V ESP device is intreaguing, especially if a gen4 can use esphome with thread.
I got a non mini G4 converted but even that is not easily done over small serial pins. For the mini you might temporarily solder connections to the board?

Did you get it flashed through addon header?

Yes, with the last shelly i did not disassemble the casing as the holes for the addon did work from the outside.