Sonoff /eWeLink component for original firmware

@peterbuga
making it short. what I understood is if I give you my "deviceid":"10002xxxxx" you can send me my bin.file .

1 Like

if that’s a question, then in theory yes. maybe i haven’t made myself clear yet, but i haven’t figured out yet the “how to download” the bin files (this was a 5min investigation). i’m pretty sure some header needs to be sent along with that digest value.

can someone provide a .bin dump? or point me where i can find one. if/when i do manage to download it, i would like to compare them

what about the chipId and flashChipId ?

I tried to interchange two sonoff basic 1M.bin file but this didn’t work.
then I returned each file to it’s proper device and they work again.

if you need a sonoff basic bin file tell me where I can send it to you .

take a look here
https://github.com/mirko/SonOTA/issues/1#issuecomment-464531033

@Ze_Pico the thread looks interesting, but by the looks of it they try to change the .bin files so that they could be swapped/used between devices, whereas I was proposing that I could simulate the download for the device therefore no need to fuss with the chipId or flashChipId.
i found eventually a .bin file dump and i got a quick peak myself using hex. there are definitely some entries related to my json posted above, ex:

Host: dl.itead.cn User-Agent: itead-device user2.bin user1.bin binList digest downloadUrl http://{"accept":"ws;%u","version":%u,"ts":%u,"deviceid":"%s","apikey":"%s","model":"%s","romVersion":"%s"}

i just need to make some sense from all it, but i still think that a bit of sniffing while updating the device it’s the easy way. unfortunately i’m not very familiar with wireshark and i have only 1 device that can be updated right now. i need to get my hands on some dump-hardware.

If you need any help from my side don’t hesitate.
about flashing / dumping hardware Dr Zzs has may good tutorial videos.

https://www.youtube.com/channel/UC7G4tLa4Kt6A9e3hJ-HO8ng/videos

I have two dump.bin files one before and one after the update.
when I restore the one before the update the device re-update again.
You can do it this way (in the future).

I tried wireshak years ago but it was a bit difficult for me.
How to Find Passwords Using Wireshark

1 Like

I am only using original fw on mine and have a couple of them not yet being used around the house - happy to help with any testing (as long as you allow for a rather big lack of skills!)

1 Like

Woh that’s great news.

@Ze_Pico @mattlambie @peterbuga This is great stuff you guys are working on!

Let me know if I can be of any help.

@peterbuga is our unnamed Sonoff Hero!

i proposed the exact same thing in the 1st post related to this matter. thanks for letting me know it actually works. i just need to some dumping hardware. i’m not too familiar with wireshark myself, but i’m a quick learner (or so i tend to believe :D), but first i’ll try to take care of pending issues before i tackle this problem.

by a long shot overestimated, the guys behind tasmota & alike are the real ones :muscle:!

1 Like

Finally got my sonoff t1 3c light switches.

I saw on YouTube that drzzzs put up a video 8 months ago on how to flash tasmota over the air.

However I was wondering if there is a way to connect Sonoff T1 switches to home assistant without flashing the firmware. I’m confused by this thread as to whether it would work for my light switches.

It seems that the author is still ironing out some wrinkles. Is this true or is this proven to work?

I’m running HassiO and the firmware on the switch is 2.7.1 and this structure:


Yet nothing gets recognized, at least not automatically, but no errors either on restart.

I just found this in the log:

2019-03-13 20:50:32 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-13 20:50:43 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
2019-03-13 20:50:43 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sonoff.switch which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-13 20:50:44 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
2019-03-13 20:50:44 WARNING (SyncWorker_10) [homeassistant.components.device_tracker.bluetooth_le_tracker] No Bluetooth LE devices to track!
2019-03-13 20:50:44 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform bluetooth_le_tracker
2019-03-13 20:50:45 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sonoff.sensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-13 20:52:15 WARNING (MainThread) [custom_components.sonoff] Grace period activated!

OOOhhhhh UPDATE I just saw some items added in the HISTORY:


Den Light is the name I gave the t13c in my ewelink app.

you mean … me :sweat_smile: ?

as a general rule you should look for new devices in the (hold tight) devices list :expressionless:

And where do I find that list?

I just found 4 switches added, which is weird because its a 3C T1:

28

Den Light 4 doesnt do anything
Den Light 3 turns on my light (because I connected it to L3)
Den Light 2 I can hear a relay switching (but there is nothing connected to L2)
Den Light 1 pops up this message:
sonofft1error

hmm I could have sworn the message was different the last time I tried it.

Well the switch is basically working. The weird thing is that it only has 3ch yet ha added 4 toggles switches for it.

Woah! The toggles were there yesterday, now they disappeared and I get this:

01
14

My configuration.yaml is simply:

sonoff:
username: myemail
password: my pass
scan_interval: 60
grace_period: 600
api_region: ‘us’

and when I Check Config I get Config Valid in green.

sonoff:
  username: !secret sonoff_username
  password: !secret sonoff_password
  scan_interval: 5 
  grace_period: 600 
  api_region: 'us'

is your spacing like mine? sonoff:
Indent 2 Spaces > username:

Yes, I just couldnt get it to look like yours. And I know it worked yesterday…

Oh well I just rebooted the hassio/rpi and the den light toggles are back and working.

I guess its just buggy.

Maybe, I have 12 sonoff basic switches that are pretty solid.

If you paste a config, just highlight it with your mouse and then click the </> in the box above and it will format it so its easier to read.

Did you mean the entire yaml of just the sonoff part:

# Example configuration.yaml entry configuring HomeKit
homekit:

mqtt:
  broker: 127.0.0.1
  
sonoff:
  username: myemail
  password: mypass
  scan_interval: 60
  grace_period: 600
  api_region: 'us'
  
# Example configuration.yaml entry
device_tracker:
  - platform: bluetooth_le_tracker

Just a tip, so if somebody asks you to post your config, automation, script etc. its formatted properly and is easier to read so you can get the help you are looking for. Just as you did above, its perfect.
im glad you got the sonoff switches working!