itead / Sonoff_Devices_DIY_Tools

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

Sonoff Mini - v3.6.0 - DIY #103

Open LucasHagen opened 3 years ago

LucasHagen commented 3 years ago

I've been trying to put my Sonoff Mini in DIY mode, but without success.

I've set my Sonoff Mini with the DIY mode v2 and was able to connect to the network ITEAD-XXXXX, access the web interface and set my WIFI connection details. When the device started, it connected to the network and using nmap, I was able to confirm the port was open:

Starting Nmap 7.91 ( https://nmap.org ) at 2020-12-16 22:25 CET
Nmap scan report for 10.0.0.13
Host is up (0.0072s latency).
Not shown: 999 closed ports
PORT     STATE SERVICE
8081/tcp open  blackice-icecap

Nmap done: 1 IP address (1 host up) scanned in 4.50 second

When I try to connect to the interface, it doesn't connect and times out:

lshagen@lucas-xps:~$ curl --request POST -H 'Content-Type: application/json' -d @data.json http://10.0.0.13:8081/ -m 5
curl: (28) Operation timed out after 5000 milliseconds with 0 bytes received

My data.json file:

{
    "deviceid": "1000******",
    "data": {
        "switch": "on"
    }
}

Trying to access http://10.0.0.13:8081/zeroconf/switch using Google Chrome gets me: ERR_CONNECTION_REFUSED

So... by then I tried to set it again to DIY configuration mode, accessed the WIFI AP, and the configuration page doesn't load anymore... I was able after some time to get the eWeLink app working with it again using the Compatibility Mode, because the normal Pair Mode did not work. Am I doing something wrong or is this a bug? I really don't want to relay on the cloud to run my automations.

Thank you

elisey commented 3 years ago

I think I had the same issue. I tried to access device, but got timeout error. Than I tried to aceess device with valid payload and it worked.

POST to 192.168.88.103:8081/zeroconf/info

with payload

{ 
    "deviceid": "", 
    "data": { } 
}

image

Joao-Sousa-71 commented 3 years ago

Sorry to jump in but looks like you have the issue with the Sonoff mini with the FW 3.6 and in DIY mode that I'm facing with the Sonoff Basic R3 with the FW 3.5 and 3.6 also (by the way I have two Sonoff mini with the FW 3.3.0 and in DIY mode which I don't want to upgrade since I fear that might stop work well). Here are the symptoms: The Sonoff tool (Tool_01DIY85(3.3.0) is not able to connect but when I post a json to switch on or off (note that the deviceid field is not required anymore): { "deviceid": "100000140e", "data": { "switch": "on" } } Then the Sonoff is immediately recognized and start to work again. Looks tipically what @elisey shared.

I've noticed this because I have my Sonoffs with the Home Assistant integration and the ones with Fw 3.5 and 3.6 behave exactly with the same problem as the Sonoff DIY tool.

Finally, @LucasHagen we are in the same page since I don't trust in the cloud either to run my automations and I trying to not use tasmota since the json support does what I need. I will open an issue for the Basic (RF)R3

luizbalestreri commented 3 years ago

I'm having the same issue with sonof rfr3 on firmwre 3.6, DYI tool cannot find my sonoff.

I'm able to access it with REST and also did OtaUnlock

Joao-Sousa-71 commented 3 years ago

@luizbalestreri if you post a switch "on" or "off" then DIY the tool should recognize them, at least mines behave like that.

luizbalestreri commented 3 years ago

did not worked for me, it's not changing the switch status: image

elisey commented 3 years ago

@luizbalestreri as I undestand sonoff doesn't work with DIY Tool since firmware 3.5. But you still can use rest api commands to configure and control your device.

Joao-Sousa-71 commented 3 years ago

@luizbalestreri the post for switch "off" and "on" is not done onto the url 'http://192.168.88.145:8081/zeroconf/info' since doesn't make sense, that is to retrieve the device info.Please try again with 'http://192.168.88.145:8081/zeroconf/switch'

@elisey mines, I have many behave exactly the same with fw 3.5.0 and 3.6.0 so the only one that works properly is the 3.3.0.

luizbalestreri commented 3 years ago

@Joao-Sousa-71, ok, now I it turned on and off, but DIY tool still cannot find it

Joao-Sousa-71 commented 3 years ago

@luizbalestreri did you have the tool open when you post the switch off (or on)?

luizbalestreri commented 3 years ago

yes, but I reopened it later

Em qui., 7 de jan. de 2021 às 22:07, Joao-Sousa-71 notifications@github.com escreveu:

@luizbalestreri https://github.com/luizbalestreri did you have the tool open when you post the switch off (or on)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/itead/Sonoff_Devices_DIY_Tools/issues/103#issuecomment-756482485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJL7PADZTX7UROXCVMKUKA3SYZLF7ANCNFSM4U6T6ZIQ .

oxideita commented 3 years ago

Hello, I tried to insert tasmota on a sonoff mini r2 with sw 3.6, but having to have enabled the otaFlash, I can't install via tasmota-lite command, I have this error. The sonoff makes three flashes and there is no way to reset it, I must necessarily remove the 220v power supply immagine immagine

pcb1962 commented 2 years ago

Mini not working at all on fw 3.6

francoismassart commented 2 years ago

@oxideita I’m reading this article https://cgomesu.com/blog/ota-tasmota-sonoff/ and I see this note:

The webserver has a few peculiar requirements (e.g., needs to accept the Ranges header, run in http instead of https) that does not allow us to point to Tasmota’s OTA website, Github releases, or any other official source of the Tasmota firmware binary