Sonoff Binding without tasmota

Tags: #<Tag:0x00007fc8f115df80>

I have an issue with the wireless flashing method and I’m hoping someone can explain why it’s not working as advertised:
Equipment: Sonoff 433RF Bridge R2 V1.0 2017.11.23
Laptop running Windows 10 - current patch level
Android phone

Method with comments:

  1. Download and install Python3
  2. Update Python3: ‘python3 -m pip install –upgrade pip’
  3. Download SonOtA: https://github.com/mirko/SonOTA - ensure that you download the zip file not just the sonota.py file
  4. Win10 install C++ tools – http://landinghub.visualstudio.com/visual-cpp-build-tools - this link is broken, I downloaded Visual Studio 2019 Community version from the Microsoft site
  5. Navigate to SonOtA directory and get all the requirements
    Run: ‘pip3 install –user -r requirements.txt’ - multiple runtime errors if you skip this step!
  6. Disable any firewalls and Windows Defender
  7. Press and hold the onboard button for around 6 seconds until the blue LED goes solid then flashes in a 3 flash, pause, 3 flash pattern - hold the button again for around 6 seconds and the LED will flash rapidly.
  8. Run SonOtA: ‘python.exe sonota.py’
  9. Choose the IP address for the computer you’re running Sonota.py on
  10. Input your Wifi name and password when asked
    Note: if you get the password wrong you will receive no warning
  11. Watch for iTead Wifi SSID and select it when it’s available password 12345678 – if it does not appear try setting the computer to use only 2.4GHz wireless
  12. Reconnect to your home wifi when the iTead SSID disappears.
  13. Select Final Stage Wifi SSID when it appears – This is where I go wrong, FinalStage does not appear - I used the Android phone with a WiFi scanner app to confirm this - I also hot-spotted the Android phone to ensure a good WiFi signal close to the bridge

The instructions carry on, I did not get this far:
14. Connect to ‘sonoff-###” Wifi SSID
15. Configure Tasmota with your Wifi name and PW
16. Reconnect to your home Wifi SSID
17. Find the IP address for your new sonoff from your router, or something like Fing
18. Finish configuring Tasmota

After several tries with the hotspot running, I got this:

Traceback (most recent call last): 
  File "sonota.py", line 736, in <module> 
    main() 
  File "sonota.py", line 731, in main 
    stage1() 
  File "sonota.py", line 613, in stage1 
    "http://10.10.7.1/ap", "POST", json.dumps(data)) 
  File "C:\Python\Python37\lib\site-packages\httplib2\__init__.py", line 1953, in request 
    cachekey, 
  File "C:\Python\Python37\lib\site-packages\httplib2\__init__.py", line 1618, in _request 
    conn, request_uri, method, body, headers 
  File "C:\Python\Python37\lib\site-packages\httplib2\__init__.py", line 1556, in _conn_request 
    response = conn.getresponse() 
  File "C:\Python\Python37\lib\http\client.py", line 1336, in getresponse 
    response.begin() 
  File "C:\Python\Python37\lib\http\client.py", line 306, in begin 
    version, status, reason = self._read_status() 
  File "C:\Python\Python37\lib\http\client.py", line 267, in _read_status 
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") 
  File "C:\Python\Python37\lib\socket.py", line 589, in readinto 
    return self._sock.recv_into(b) 
socket.timeout: timed out 
 

I downloaded the eWeLink app and used it to pair the bridge - this worked right off so the bridge is okay.
Anyone able to assist with this?

IMHO the “newer” firmware editions did not allow the update over the air, that was already the case when I gone my Sonoff Basics nearly two years ago!

I flashed mine without soldering! Just holding the pins onto the board.

Thanks, trust the manufacturers to ruin a good thing!

I bought couple of sonoffs and just flashed without solder. I got the male pin cables and inserted in the respective header holes on sonoff and just laid the sonoff board on the pins from the side they were coming giving a good temporary contact due to lateral pressure of the weight of board itself. held the switch and plugged the usb to pc. then flashed without issues.

I did the same thing a week ago. I flashed four Sonoff TH16s without soldering and it was pretty easy. I thought there were more hoops going the OTA route
Here is all I used

  1. One CH340G adapter ( WINGONEER 3.3V / 5V USB to TTL converter CH340G UART Serial Adapter Module Golden):
  2. Jumper wires
  3. Tasmota software (tasmota.bin).
  4. I followed the instructions from here

As dadd said, I also did not solder anything. The jumper pins fit pretty tight into the “holes”.
Good luck

1 Like

Looks like the newer firmware of the sonoffs mean you can access them locally via local commands - I am not a programmer but anyone fancy trying to figure out how AlexxIT did it for Home Assisstant ?

3 Likes

Just flash tasmota and use MQTT much easier.

1 Like

Not really an answer for the general consumer which wants to jump on the smart home path.

@swampdogmash I’ll be taking a look a little further down the line (just started using my pow r2 I bought for testing) and A: I don’t use MQTT, B: don’t wanna have to mess about every time I buy a new device, just want to wire in, discover and away we go

I don’t think from what I’ve found the POW R2 works atm, although I have got LAN mode enabled in the eWeLink app so maybe it does. Haven’t got time to look right now but it’s on the horizon

All the info on how to make a openhab binding is publicly avalable and I have all the info needed to write one for the sonoff lan mode on my github except for the mdns. You can make it plug and play in a binding to make it easy for beginners if you like.

I have already written a binding for lightwaverf so it’s just the Mdns I need to look into. Not got time right this minute tho

2 Likes

Hi @delid4ve
I have a pow R2 as well for heavy loads.
Were you able to look into how to connect / integrate this with openhab? Right now I am doing a round about by exposing it via alexa binding as a smarthome device and controlling it from openhab. I would love to control it directly without internet from local lan via http/mqtt etc.
Any suggestions?

Thanks

I haven’t yet what with a new baby and Xmas around the corner.

I should hopefully get some time to have a look over the coming days.

It shouldn’t take me too long to create either looking at the api.

2 Likes

Just thought I’d let you all know I’m on my way to this.
Have got the binding set up and logging in to my eWeLink account.
Now just to add discovery and control :+1:

And will have ‘local’ control too, but due to encryption since v3 firmware needs to query online to get the device keys first. Once you have them then I’ll add an option at some point to disable cloud control

2 Likes

Awesome. Thank you for this

Hopefully by new year :+1:

2 Likes

Thank you. Bring a but cheesy but OH3 version of the binding too please :slight_smile:

Haven’t forgotten about this.
Have the binding working for polling, but really want web socket functionality - which I’m really struggling getting the request accepted by the server.

Ill make a v3 version once I’ve got it near on finished as its not much work.

3 Likes

Hi Dave

I’ve been watching this topic with inertrest. Is your binding likely to work for a wide range of Sonoff products.
Of particular interest to me is the Sonoff TX T2 UK. Or perhaps if there is something I can do to help test this device for you?

New Thread for the binding: