Giter Site home page Giter Site logo

Comments (14)

sillyfrog avatar sillyfrog commented on July 2, 2024 1

Sounds similar to an issue here: sillyfrog#1

I have a fork that has pre-built binary files, but it also works slightly differently in that your computer hosts all the binary files (rather than reaching to the public internet).

In theory you should be able to just download and run my fork, and update things. I would be curious if you have a similar issue to these people, and if updating the original Sonoff firmware helps. (Probably best to update the linked issue if doing this on my fork, as it has not been merged in yet, and I'm tweaking based on this feedback).

from sonota.

rajid avatar rajid commented on July 2, 2024 1

I was just trying to do this initial setup of a new sonoff device and here's what worked for me.

  1. press the reset button for 7 seconds. This makes the green light flash but not in a continuous flashing. so...
  2. press the reset button for 7 seconds again. This results in the green light flashing continuously.
  3. set your wifi to the newly created "LEAD" named wifi, password "12345678".
  4. send the aforementioned "http://10.10.7.1/device" URL and save the output.
  5. Now I sent (using Postman) a POST to http://10.10.7.1/ap", with body:
    {
    "version": 4,
    "ssid": "my-wifi-name",
    "password": "my-wifi-password",
    "serverName": "my-server-ip",
    "port": 8080
    }
    (Note, the lack of quotes around the port number and around version number, but quotes around other parts. I selected port 8080 because I already have a server running on port 80.)
    This results in the reply of:
    {
    "error": 0
    }
    and now I see the device on my local wifi trying to communicate with my server at 8080 (which I don't have up yet, so it'll just have to chill for a little while!)

from sonota.

DerFetzer avatar DerFetzer commented on July 2, 2024

Same here.
@fusionfsn Did you find any solution yet?

from sonota.

fmaule avatar fmaule commented on July 2, 2024

Not really. I've just flashed tasmota soldering the connector.
I have tried some debug but i'm unable to get anything after the boot messages.

Honestly i don't even know if the original firmware is outputting something to the serial or not.
Other 3 brand new POWs are waiting to be flashed, if someone gives me some advice on how to debug via serial i'll be glad to post the results

from sonota.

zobelhelas avatar zobelhelas commented on July 2, 2024

I ran into the same issue. I found out, that i need to upgrade to the latest Sonoff upstream firmware first, connecting to their cloud and upgrading via cell phone app. Afterwards, using SonOTA worked like a charm.

from sonota.

fmaule avatar fmaule commented on July 2, 2024

thanks for the hint.
how do you exactly use SonOTA after you connect the sonoff through the app?
I've also tried that but can't get the sonoff in AP mode afterwards therefore i can't send the provision

from sonota.

sillyfrog avatar sillyfrog commented on July 2, 2024

Pressing the button for 7 seconds should get you into AP mode again (sometimes you need to hold it for a 2nd time for 7 seconds), and you should be able to flash using SonOTA.

from sonota.

echox avatar echox commented on July 2, 2024

I got the same problem with the Sonoff POW which seems to be related to #21

So this is the setup/discovery I made:

Got two Sonoff POW via Amazon today. Sadly I can't find any datecode or serial which could help to identify the age. The installed firmware is 2.0.2.
Only thing is a barcode with 160810001 which could be 10/08/16 but this is highly speculative, anyway:

Same problem like mentioned in the links bevore, 404 Debug Message, Timeouts and no "FinalStage" SSID.
I checked the DHCP Server log and saw a assigned ip for the sonoff device.
I also captured some network data on my computer which was interesting:

Endless ACK requests to open a TCP connection for port 8081. This port is closed and therefore the connection request is terminated via RST, ACK.

This is the DEBUG log from the device:

<< {
    "deviceid": "10000bb90d",
    "apikey": "88bf5043-233c-42d0-861e-299bb95af5d6",
    "accept": "post"
}
>> HTTP POST /10.10.7.1/ap
>> %s {
    "version": 4,
    "ssid": "some-ssid",
    "password": "some-password",
    "serverName": "192.168.1.10",
    "port": 8443
}
<< {
    "error": 0
}

This made me wonder, maybe the Sonoff POW did ignore the port:8443 parameter.
To test this I changed DEFAULT_PORT_HTTP = 8080 to 8081 in sonata.py and I got one step further.

Now I see some websocket connections and the transfer of the firmware in the default log, e.g.:

2017-10-06 19:45:13,483 (INFO) 200 GET /ota/image_user2-0x81000.bin?deviceid=10000bb90d&ts=1994719310&sign=ac5bc413fd91c386605d0d8a9fbfd7c483c52f0ddce07b0c02d3f6e81eb6eee0 (192.168.1.130) 18.89ms

Occasionally the switch sends it sate to the "server" but still no "FinalStage" SSID :-/
I tried the Master branch and the D-OUT Branch (81a775c).

from sonota.

zobelhelas avatar zobelhelas commented on July 2, 2024

@echox: IIRC the latest firmware version from Sonoff is 2.0.4. Did you try to upgrade (at least) one of them to the latest version?

from sonota.

echox avatar echox commented on July 2, 2024

I've updated the Firmware from 2.0.2 to 2.0.4 via the offical EWELink app.
After that the process of flashing the Sonoff POW works smoothly.
.......No longer on "FinalStage" SSID, all done!

from sonota.

echox avatar echox commented on July 2, 2024

( @zobelhelas Sorry didn't saw your comment. I wasn't aware of the 2.0.2 version before creating a account with email, etc. for the EWELink app. As mentioned, after upgrading to 2.0.4 everything works fine. Thanks.)

from sonota.

sillyfrog avatar sillyfrog commented on July 2, 2024

Glad that worked, should you come across any older versions again, there is a --legacy flag that would be worth giving a go, it hosts things on the default ports as well for the older devices that did not use the custom port field during the provisioning step.

Cheers.

from sonota.

NiekN avatar NiekN commented on July 2, 2024

@rajid

i also try POSTMAN but i cannot get it working

i get
Could not get any responce
there was an error connectinmg to http://10.10.7.1/ap
why this might have happend
-the server coul not send a responce
-self-signed SSL certificate are being blocked
-prox config incorrect
-request time out

i used same settings, only a headers:application/json

what is wrong?

from sonota.

haimkastner avatar haimkastner commented on July 2, 2024

@NiekN
you shuld notice that you need to fill The HTTP/1.1 request fields in POSTMAN
For example if body is:
{"version":4,"ssid":"Nxxx","password":"0xxxxxxxxx","serverName":"192.168.1.65","port":1081}
The Headres need to be:
Content-Type : application/json
Accept : application/json
Connection : close
Content-Length : 91
host : 10.10.7.2

from sonota.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.