What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

Flashing Sonoff Mini R2 with Tasmota DIY OTA

lucidlad

Banned
BANNED
Rating - 0%
0   0   0
Joined
Sep 22, 2023
Messages
3
Reaction score
0
Points
1,015
Age
53
Location
Centurion
The DIY OTA method of flashing Sonoff Mini R2's has left me some what mystified. I bought a box of five Sonoff Mini R2's and managed to flash three with Tasmota, using the DIY OTA method. However I'm now stuck with two that just won't.

I've tried this procedure: Sonoff DIY - Tasmota and I've tried a variety of other permutations.

I can repeatedly pair the devices with the eWeLink app (so they are not bricked). Upgrade them to v3.7.6. Push them into paring mode (blink: ..- ) and then compatible paring mode (blink: .....). Connect to the ITEAD-XXXXXXXX WiFi hotspot. Open the "WiFi Setup" page on http://10.10.7.1. Configure my WiFi credentials. Restart and find the device IP on my network. I can ping the IP too.
But the server on port 8081, just drops the connection.

Does anyone have experience in this? Is there anything else I can try? What am I missing? Why do manufacturers make this all so obscure?
Is it just time for me to make that pogo pin jig?

Thanks!
 
I seem to remember that with firmware version 3.7.6 any API calls on port 8081 would drop the connection if the deviceid wasn't sent in the request body, or if it was incorrect. There's a slim chance that it's the problem but mentioning it just in case. This took me a good few hours to figure out since the older firmware was happy with a blank string.

My units are still on official firmware - wasn't a need to flash Tasmota for my use-case so can't help with that part unfortunately.
 
I seem to remember that with firmware version 3.7.6 any API calls on port 8081 would drop the connection if the deviceid wasn't sent in the request body, or if it was incorrect.
Thanks for this mention, definitely worth considering.

I'm using, e.g.:
Code:
curl -XPOST --header "Content-Type: application/json" --data-raw '{"deviceid": "", "data": {}}' http://$SONOFF_IP:8081/zeroconf/info

I did however give up, and reach for the POGO pins, actually didn't take too long and works pretty well:
pogo.jpeg


I would still like to find the simple good path for the DIY OTA method, right now the number of steps, entering creds, connecting to WiFi, etc seems quite convoluted.

I used:
as a guide to build the POGO pins solution, less the 3D printing.

And then to flash:
Code:
# In a virtualenv
pip install esptool

SERIAL=/dev/cu.usbserial-A50285BI
BIN=tasmota-lite.bin

curl -Lo "$BIN.gz" "http://ota.tasmota.com/tasmota/release/$BIN.gz"
gunzip "$BIN.gz"

# Hold push button, attach POGOs, release push button, and execute:
esptool.py --port "$SERIAL" write_flash -fs 1MB -fm dout 0x0 "$BIN"

Hope this helps/inspires others who have encountered the same issue :)
 

Users who are viewing this thread

Latest posts

Back
Top Bottom