T O P

  • By -

WereCatf

You look up the ESP32-WROOM-32 pinout either in the official datasheet or by e.g. searching on Google, you find out where UART0 RX and TX, GPIO0, EN, VCC and GND pins are, you solder wires to those. You connect VCC to 3.3V, GND to GND, GPIO0 to GND and you reset the ESP32 by briefly connecting EN to GND -- now it's in flashing mode and you can use the UART pins to flash it with whatever you like.


RoganDawes

To add to the above, ESPHome probably already has a suitable configuration that attaches the correct functions to the various GPIO pins. It could almost be as simple as downloading an existing config (yaml), installing ESPHome using `pip3 install esphome && esphome run config.yaml`.


rlowens

> now it's in flashing mode and you can use the UART pins to flash it with whatever you like. Which could be an FT232 USB UART adapter (what I recommend using). Could also use another ESP32 board or raspberry pi etc. Anything with a 3.3V UART.


SteveisNoob

> Anything with a 3.3V UART. Can't highlight this part enough, make sure it's a 3.3V UART. Or, failing that, using a voltage divider should work aswell?


LabThink

If you're lucky the manufacturer made some connections available at the back of the PCB, if not you're going to have to solder extremely small wires to an overcrowded component. It's possible, but unless you have experience soldering such small things I would not expect too much from it.


jpristel

You'll want to check the encryption fuses before flashing. if the device is already encrypted or requires a signed application l be out of luck without the necessary RSA key pair. if you try to flash over one that is encrypted or requires a signed, it'll just boot loop.


giobs111

I did something similar with light bulb, flashed it with Tasmota, but it had ESP8266. Flashing esp32 should be similar. Check this [Website](https://tasmota.github.io/docs/Getting-Started/) and get something to provide external 3.3 volt with enough amp, serial programmer don't have enough amp. I used Breadboard Power Supply


omegaaf

With how much technology spies on us and opens us up to vulnerabilities, I feel like we will all have to learn how to flash our own custom firmwares and go what is known as "off-branch"


SanjaBgk

First check if current firmware has OTA (over-the-air) update mechanism built in. Open the device's webpage and add `/update` after the IP address. For example, http://192.168.1.12/update If you are presented with an upload form, you are lucky and you don't need to solder wires to ESP32. Just make your own BIN file in Arduino IDE and flash it. But make sure new firmware implements OTA as well.


alesi_97

Do you have any reference or tutorial to this? How to implement OTA?


SanjaBgk

check out https://github.com/jandrassy/ArduinoOTA, https://github.com/Fishwaldo/esp_ghota and https://github.com/ayushsharma82/ElegantOTA But first check the wiring (trace where the relay, button and LED are connected). There are quite high chances that it matches some popular relay and enthusiasts at ESPHome or Tasmota have done the work for you.


salat92

In that case you should read the partition table first since it can not be changed over the air and you have to build your custom firmware with the exact same partition scheme. This problem does not arise when flashing via uart - the custom partition table will be written in that case


Simon-RedditAccount

If you don't have OTA or UART pinout on PCB, you can use 'ESP32 pogo programmer' tools (i.e. something like [https://www.reddit.com/r/esp32/comments/sqsub0/pogo\_pin\_programmer\_for\_in\_circuit\_programming/](https://www.reddit.com/r/esp32/comments/sqsub0/pogo_pin_programmer_for_in_circuit_programming/) ) as an alternative to soldering wires (especially if you never soldered them before to such a package).


Sword_Thain

[Tasmota Supported Devices Repository (blakadder.com)](https://templates.blakadder.com/) Check if your device is here


weird_is_good

Is there anything “better” in this device, compared to a DIY one, except maybe a stronger relay than in the typical Chinese relay boards?


bono_Nico

The best part is that I have this thing laying around and not using it because of the crappy software. It also has a built in LoRa module, maybe I get use of it in the future


Got2Bfree

The Lora module is pretty sick, otherwise it would have been completely overkill to use a esp32 for this device.


bono_Nico

It was used as a bridge for the optical reader of my meter. You are right, otherwise a esp would be an overkill. The only way to control the relay right now is with the proprietary app of the my gridowner. I had no chance to implement it to Home Assistant or to set a timer for the relay


xmsxms

One advantage of esp32 is it can run as a matter device without a hub when using tasmota.


bono_Nico

It looks like it is a Mokosmart MK114 plug. Does some already have a schematic for this thing?


Cantonius

Moko white labels their stuff so you may be in luck


Fezzik77

You can. You will need to trace out the circuit. I was happy that I could figure out what it was from building a similar project with a generic board and generic relays. There's more pins connected than I can figure out what they do but the circuit is pretty unmistakable.


bono_Nico

I already figured out the RGB LED pins and the pin for the button. Next step is the relay and currentsensor. Didn’t managed to find a similar project online so far


mmx22

Please be careful- the power supply is not isolated so you’ll have mains voltage on any data connections you might add. If you connect the esp via usb serial and plug in the socket you will fry your computer and might get shocked


MissTortoise

You don't plug it in when flashing it! Just run it off the 3v3 supply without powering anything else.


[deleted]

[удалено]


elcaron

You can absolutely have an unhealthy potential difference to ground on that thing. Of course it doesn't RUN on mains, just the circuit's ground might be offset.


WereCatf

I did tell in my comment above to use 3.3V to power the ESP32 up with