itead / Sonoff_Devices_DIY_Tools

BSD 3-Clause "New" or "Revised" License
548 stars 168 forks source link

Sonoff Mini doesn't go into DIY mode with 3.5.0 update #75

Open Fabien14000 opened 4 years ago

Fabien14000 commented 4 years ago

I have four sonoff mini diy. They were delivered with the 3.3.0 firmware release built in. I managed to set diy mode (with jumper) and update tasmota firmware for three of them.

But when I connected the last one to eWeLink, it proposed me to update to 3.5.0 release. I've done it without any trouble. But when I put the jumper on, the mini still work in standard mode (it connects to my wifi) and replies to eWeLink. There is no way to make it connect to "sonoffDiy" wifi.

Could it be a material defect or is there an issue with the 3.5.0 release ?

Thanks.

chillicrackers commented 4 years ago

I have the same issue - the device does not show up in the DIY tool now since upgrading to 3.5

dbaijot commented 4 years ago

Exactly the same here, i had two of them, both in 3.3.0 . No problem with the first last week, but yesterday after the 3.5.0, impossible to access/install Tasmota on the second one.

Thanks.

Sovetnikov commented 4 years ago

Same issue, with 3.3.0 mini is connecting to sonoffDiy network, with 3.5.0 diy switch is ignored and mini is always accessible in ewelink, but not in sonoffDiy network!

Sovetnikov commented 4 years ago

Even following instructions for DIY mode in v2 protocol description does not help. My device is paired with ewelink, 5 seconds button press makes mini blink forever, but there is no ITEAD-XXXX access point available. Another 5 second button press does make any changes.

CaseyRo commented 4 years ago

I came across this thread as well with the idea that the "jumper doesn't work" or "it won't connect to the DIY network".

That's correct.

Firmware 3.5 changed the process a bit, and itead calls it "protocol 2.0"

There's a benefit to this all, you don't need to worry about the sonofDIY network and a hotspot anymore.

Read through itead's documentation here - https://github.com/itead/Sonoff_Devices_DIY_Tools/blob/master/SONOFF%20DIY%20MODE%20Protocol%20Doc%20v2.0%20Doc.pdf (2.0 protocol) and you'll see how to setup DIY and connecting it to the network.

Since I'm flasing quite a bit of these, I'll make a quick how-to that is in a more understandable language.

The REST (APi) didn't change and also all the commands to flash etc. still work, so no changes there (AFAIK)

Sovetnikov commented 4 years ago

Thanks @Keesromkes! Got some results ...

  1. Long button press until blue led flashes two short, one long
  2. Again long button press until blue led flashes short continuously
  3. ITEAD-XXXX access point available, connec to it and go to http://10.10.7.1 Here i have lots trys becaus not every time mini is able to answer on 10.10.7.1, just hangs ... Reboot device, complete step 1,2,3 again and try to access http://10.10.7.1
  4. Enter WIFI ssid and password mini to connect to
  5. Now i see that mini connects to specified WiFi network, i can find it with open 8081 port and even execute commands on REST API to turn off and on, but tool_01DIY85(3.3.0).exe and tool_01DIY85_v330(log).exe cant find device!

I have flashed another mini with tool_01DIY85(3.3.0).exe sucessfully two weeks earlier without any doubt ... with DIY switch. Seems that 3.5.0 firmware can't be detected by tool_01DIY85(3.3.0).exe

PS. I want to flash mini to Tasmota firmware :)

laziukiewicz commented 4 years ago

I'm also having problems after trying to flash some new minis on 3.5.0 I'm following the v2 instructions, I connect to device's network and set wifi password, it seems to connect to my wifi (I can see it on the list of wireless clients on my router and blinks twice fast), but can't get any response trying to send commands from Postman e.g. on POST http://ip:8081/zeroconf/wifi

The device also doesn't show up in the DIY tool - not sure if it should at this point. A step by step flashing guide on 3.5.0 would be very welcome!

BTW Thanks for doing an amazing job on this! I already flashed a bunch of older sonoffs on 3.3.0 using this tool with no issues, so I'm angry with those firmware changes..

novacco commented 4 years ago

Hi there, I'm also having troubles with this. I tried to flash Sonoff Mini with 3.3.0 by this Tool and it didn't work (or I just can't do it). I updated the firmware and I am trying to flash it by POST Request. What I am supposed to do with this? Host the .bin file somewhere?

Fabien14000 commented 4 years ago

Thanks for the explanation. I followed each step and now I can see it connected to my network. With Chrome ARC plugin, i can send a POST request to http://192.168.1.101:8081/zeroconf/info with a json data (it's important not to forget this laziukiewicz !) :
{ "deviceid": "", "data": { } } And I have the answer đź‘Ť

Have unlock OTA flash with ota_unlock command. But I do not success in updating firmware. Here is my REST call : http://192.168.1.101:8081/zeroconf/ota_flash With json data : { "devideid" : "", "data": { "downloadUrl" : "http://192.168.1.123/tasmota-lite.bin", "sha256sum": "2716fc2b9628b53df8ff040400dda015f82085f470a6b194276ff51abda3425c" } }

it replies 200 OK, the LED blinks several times then the sonoff reboot. Thus I open a new wifi network as usually... In the end, I think this new method appears a little tricky...

novacco commented 4 years ago

Hi there. I managed to flash Sonoff Mini with 3.5.0 firmware. In my case, I used SUPLA.org software. I can write this "step by step":

  1. Download ARC to Chrome and set up Apache server on your PC (i used XAMPP) - put the .bin file in the server (the file must be accessible by "http://ip/path")
  2. Pair Sonoff with Ewelink and update it to the newest version
  3. Delete it from Ewelink.
  4. Hold the button for 5 sec. until it starts to blink constantly (the wifi network should appear)
  5. Connect to the wifi with password: 12345678
  6. Go to 10.10.7.1 and set up Sonoff with your local network
  7. Find IP address of Sonoff (in your local network).
  8. In the ARC send POST Request to with Requested URL like: "http://ip:8081/zeroconf/ota_unlock" to unlock with this JSON: {"deviceid":"","data":{}}
  9. Do the same with URL: "http://ip:8081/zeroconf/ota_flash" with JSON: { "deviceid": "", "data": { "downloadUrl": "http://ip/path_to_file.bin", "sha256sum": "596ff83d9a47a67ac1d9e0cbc7adaebe30d640d602d5c7752285c4e242553c10" } } Remember to check the sha256 of .bin file!
sigalou commented 4 years ago

Pour les français, voici un tuto :

http://sigalou-domotique.fr/domotique/101-sonoff-diy-depuis-firmware-3-5-0-ewelink-protocol-v2

TomekMar commented 4 years ago

Hi i'm not sure what to do after set up wi fi password in 10.01...,

novacco commented 4 years ago

you should start at step 6 from this "tutorial" which I wrote yesterday

Sovetnikov commented 4 years ago

Just to someone that flashes mini by REST API - mini firmware requires HTTP server with HTTP range requests support to download your firmware. I have no luck with REST API because my mini got stuck after flashing :) Just flashed it with serial connection by esptool through Arduino Nano (empty sketch for Arduino required and pins connection Arduino TX= Mini TX, RX=RX, 5V=5V, GND=GND, Mini GPIO0=Mini GND)

dbaijot commented 4 years ago

Just to someone that flashes mini by REST API - mini firmware requires HTTP server with HTTP range requests support to download your firmware. I have no luck with REST API because my mini got stuck after flashing :) Just flashed it with serial connection by esptool through Arduino Nano (empty sketch for Arduino required and pins connection Arduino TX= Mini TX, RX=RX, 5V=5V, GND=GND, Mini GPIO0=Mini GND)

Hi Sovetnikov, I have the same result after flashing the sonoff-classic.bin using the REST API. Response from the REST API was {"seq":4,"error":0} but it was no more accessible after restarting. In the apache log, i can see seven GET commands from the sonoff, all returning a 206 code (Partial Content) and a POST to /api/device/otaFlash which of course does not exist on the webserver. Will check if i have something to flash using the serial connection...

laziukiewicz commented 4 years ago

Tried with my Sonoff RFR3 today and got further, but still no luck. I can now get a response on /zeroconf/ota_unlock but still getting timeouts on /zeroconf/ota_flash I've set up an apache server and I can even sometimes see a request in access logs (not always though) 192.168.0.133 - - [06/Apr/2020:12:22:21 +0200] "GET /tasmota-wifiman.bin HTTP/1.1" 200 464144 but the request times out. Any ideas?

CaseyRo commented 4 years ago

@laziukiewicz have you tried the minimal version? That is usually the trick before you can use the tasmota firmware itself to set up a bigger bit of firmware.

Also make sure the checksum is correct that you send with it.

MubiTec commented 4 years ago

Hi, how do I create the right check sum? Is it only the check sum of the string of e.g. "tasmota-lite.bin"

novacco commented 4 years ago

@MubiTec try this: https://emn178.github.io/online-tools/sha256_checksum.html

Fabien14000 commented 4 years ago

I confirm that this sha256 method worked with me. Here is the sum for current tasmota-lite.bin "2716fc2b9628b53df8ff040400dda015f82085f470a6b194276ff51abda3425c"

good luck

MubiTec commented 4 years ago

OK, thank you. And after flashing the ap of tasmota will appear?

Fabien14000 commented 4 years ago

If it's ok, you will see an open wifi network and you will be able to connect to it with your smartphone for example to put in your own wifi settings (be careful of the count down at bottom).

Le lun. 6 avr. 2020 Ă  22:49, MubiTec notifications@github.com a Ă©crit :

OK, thank you. And after flashing the ap of tasmota will appear?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itead/Sonoff_Devices_DIY_Tools/issues/75#issuecomment-610029218, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBHLQRFLFZDGPWL4JCU5Y3RLI56HANCNFSM4L25RT5Q .

unbreakmat commented 4 years ago

can somebody show me step 7? In the ARC send POST Request to with Requested URL like: "http://ip:8081/zeroconf/ota_unlock" to unlock with this JSON: {"deviceid":"","data":{}}

i dont get maanged to do it with the arc app please send a printscreeen if possible i know my ip of my sonos mini!

MubiTec commented 4 years ago

Screenshot_2020-04-06-23-08-26-18_487f2ca1fe605dc40ba5328ab2d75ec3

unbreakmat commented 4 years ago

thnx you mubitec its working now Now for step 7 can i use the direct github link in this request url? I have an sonoff mini and i want a tasmotta on it

Help is reallly really appreciated!!!!

MubiTec commented 4 years ago

I confirm that this sha256 method worked with me. Here is the sum for current tasmota-lite.bin "2716fc2b9628b53df8ff040400dda015f82085f470a6b194276ff51abda3425c"

good luck Neither with this checksum nor with this I created by myself it work :-(

MubiTec commented 4 years ago

thnx you mubitec its working now Now for step 7 can i use the direct github link in this request url? I have an sonoff mini and i want a tasmotta on it

Help is reallly really appreciated!!!!

I do not know. I put it on my apache server but it did not work

unbreakmat commented 4 years ago

can you provid eme again with a printscreen if possible?

unbreakmat commented 4 years ago

and which github file did you use from tasmota?

MubiTec commented 4 years ago

I do not want to do because it did not work by myself. So now 4 of my minis do not response anymore... I guess I have to do it the soldering way...

MubiTec commented 4 years ago

and which github file did you use from tasmota?

Tasmota-lite.bin

unbreakmat commented 4 years ago

why not the norma tasmota.bin file? is it to big?

MubiTec commented 4 years ago

why not the norma tasmota.bin file? is it to big?

Exactly

unbreakmat commented 4 years ago

ok so its a risk to do it it is possible that it is totally not accessible anymore aftwarths? i only have 1 mini so it has to work :p

MubiTec commented 4 years ago

ok so its a risk to do it it is possible that it is totally not accessible anymore aftwarths? i only have 1 mini so it has to work :p

I have 10 of them and 4 are not working anymore... But I guess it should not be a problem to solder them and flash it serial

unbreakmat commented 4 years ago

i took the manual and there are 2 notes The maximum firmware size is 508KB. ==> ok so to minimal bin obviously The SPI flash read mode must be DOUT ==> what is this?

MubiTec commented 4 years ago

There are some different flash modes at serial flashing and you have so use the right one otherwise the flashing will finished but tasmota won't work. But no worry, even if you use the wrong one you can do it many times again

unbreakmat commented 4 years ago

would it work to directly set the download url to: https://github.com/arendst/Tasmota/releases/download/v8.2.0/tasmota-lite.bin hash = bde52065ba4af5fc16c170321364d056d06961382f739d5d26a32a850b81ecf1

MubiTec commented 4 years ago

would it work to directly set the download url to: https://github.com/arendst/Tasmota/releases/download/v8.2.0/tasmota-lite.bin cash = bde52065ba4af5fc16c170321364d056d06961382f739d5d26a32a850b81ecf1

I don't now. Maybe, maybe niz

unbreakmat commented 4 years ago

i will take the risk

unbreakmat commented 4 years ago

image

MubiTec commented 4 years ago

i will take the risk

Goodluck!

unbreakmat commented 4 years ago

i got blinking like this now : 3 times fast, 3times fast ..... what now?

unbreakmat commented 4 years ago

so i pulled th plug and i dont think that anything happend because i reseted the device and it is still accessible through the ew link app?

unbreakmat commented 4 years ago

maybe another question with version do you try? directly the 8.2 or do you start lower?

Fabien14000 commented 4 years ago

I had these three led flashes during my tries. It means that the file can't be reached, I think.

You have to host the file on a local server that can be reached from the sonoff mini -- not through the internet -- Also check the permissions of the file. In my case, I've put the file with ftp client on my rasp. apache server in /var/www/html/ so it can directly appear at the root or your http server ip address. You should be able to dl this file from any machine on your network as a test.

If you manage to get the file then your sonoff will do it as well.

Le lun. 6 avr. 2020 Ă  23:44, unbreakmat notifications@github.com a Ă©crit :

maybe another question with version do you try? directly the 8.2 or do you start lower?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itead/Sonoff_Devices_DIY_Tools/issues/75#issuecomment-610053132, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBHLQVFQN5QAG77LHUZXTTRLJEMLANCNFSM4L25RT5Q .

unbreakmat commented 4 years ago

OMG!!! IT WORKED. This goes from step 7 So i downloaded the litefrom this link: https://github.com/arendst/Tasmota/releases/download/v8.2.0/tasmota-lite.bin

i downloaded wampserver X86, made a root folder and pasted the bin folder there in my appache httpd-vhost.conf i replaced everything with thi

<VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot "${INSTALL_DIR}/www" <Directory "${INSTALL_DIR}/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require all granted

i pulled the plug out of my mini and plugge dit back in after 5 secondes i drectly sended the command from the advanced rest client like 2-3 times it goes very very very quick

then the 3 blinks happend i pulle dit out plugge dit back in and looked in my wifi list and suddenly there was a tasmota XXXX wifi network

connected to it and it auto opened tasmota (the flashed sonoff)

ui hope this help someone

image

unbreakmat commented 4 years ago

should i upgrade to to tasmoto.bin now?

Fabien14000 commented 4 years ago

You have to upgrade to minimal first, just to have enough space, then update to tasmota.bin or the one of your mother tongue

Le mar. 7 avr. 2020 Ă  00:20, unbreakmat notifications@github.com a Ă©crit :

should i upgrade to to tasmoto.bin now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itead/Sonoff_Devices_DIY_Tools/issues/75#issuecomment-610067180, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBHLQQ62FABXZOI4IXWFW3RLJITNANCNFSM4L25RT5Q .

unbreakmat commented 4 years ago

wiltry it!