Trouble using Sonoff Basic with ESPeasy

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tino
New user
Posts: 3
Joined: 31 Jan 2017, 19:42

Trouble using Sonoff Basic with ESPeasy

#1 Post by tino » 31 Jan 2017, 19:51

Hi all,

I recently ran into a problem that I am unable to solve. I have flashed my (four) Sonoff Basic switches with ESPEasy, but they won't work when the Sonoff's are in their original case. But they do work without the case.. This would suggest a hardware problem but all four of the Sonoff's have this problem. Did anyone else encounter this issue?

Looking forward to any suggestions!

Tino

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: Trouble using Sonoff Basic with ESPeasy

#2 Post by mrwee » 31 Jan 2017, 20:30

Not only does this sound strange, it sounds very strange :shock:
What do you mean by 'they don't work'?

tino
New user
Posts: 3
Joined: 31 Jan 2017, 19:42

Re: Trouble using Sonoff Basic with ESPeasy

#3 Post by tino » 31 Jan 2017, 20:51

When I connect my Sonoff Basic's without any of the (plastic) case elements that originally came with the Sonoff, it works perfectly and boots into ESPEasy without any problem. But, when I do the exact same thing with the case around it, it won't boot at all. Tried it multiple times but no different results... I tried to remove the pushbutton of one of my Sonoff's to make sure it wasn't booting into programming mode. This gave me the exact same results: it works fine without casing. But not at all with the casing around it.

Any suggestion on how to debug/test/whatever? I have no clue on how to solve this... every idea and suggestion is more than welcome!

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: Trouble using Sonoff Basic with ESPeasy

#4 Post by mrwee » 01 Feb 2017, 10:02

All I can think of is poor soldering which is affected by the mechanical difference.

JustmeNL
Normal user
Posts: 26
Joined: 09 Dec 2016, 23:10

Re: Trouble using Sonoff Basic with ESPeasy

#5 Post by JustmeNL » 01 Feb 2017, 14:25

I had the same problem but in my case it was the button that was pushed down by the case. Had to widen the hole a bit to solve this.

JayMalinowski
New user
Posts: 5
Joined: 02 Feb 2017, 23:26

Re: Trouble using Sonoff Basic with ESPeasy

#6 Post by JayMalinowski » 02 Feb 2017, 23:30

I am having a problem where the flash indicates correctly, but will not reboot to indicate Wi-Fi SSID esp_0.
I have flashed with ESPeasy Flash.cmd. I was able to use arduino ide to write a blink code that would work.
am I missing something?

JustmeNL
Normal user
Posts: 26
Joined: 09 Dec 2016, 23:10

Re: Trouble using Sonoff Basic with ESPeasy

#7 Post by JustmeNL » 03 Feb 2017, 10:11

I have seen this behaviour sometimes.

Usually just flashing again helps.

Sometimes it helps to issue the reset command over the serial link after flashing:
http://www.letscontrolit.com/wiki/index ... _Reference

Can you see any messages over the serial connection?

JayMalinowski
New user
Posts: 5
Joined: 02 Feb 2017, 23:26

Re: Trouble using Sonoff Basic with ESPeasy

#8 Post by JayMalinowski » 05 Feb 2017, 01:04

the only thing I get from serial monitor is right after the flash. This is what I get: c_'Ï

JayMalinowski
New user
Posts: 5
Joined: 02 Feb 2017, 23:26

Re: Trouble using Sonoff Basic with ESPeasy

#9 Post by JayMalinowski » 05 Feb 2017, 01:32

This is my screen dump when I run flash.cmd.

Comport (example 3, 4, ..) :3
Flash Size (example 512, 1024, 4096) :1024
Build (example 71, 72, ..) :120
Using com port: 3
Using bin file: ESPEasy_R120_1024.bin
esptool v0.4.6 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM3
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
stat ESPEasy_R120_1024.bin success
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_open
Uploading 411264 bytes from ESPEasy_R120_1024.bin to flash at 0x00000000
erasing flash
size: 064680 address: 000000
first_sector_index: 0
total_sector_count: 101
head_sector_count: 16
adjusted_sector_count: 85
adjusted_size: 055000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 10000 ms
setting serial port timeouts to 1000 ms
espcomm_send_command: receiving 2 bytes of data
writing flash
..................................................................................................................................................................................................................................................................................................................................................................................................................
starting app without reboot
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
Press any key to continue . . .

looks like it worked to me. but no serial monitor data and no wifi signal. no lights or anything.
Any help would be appreciated.

Madbanana
Normal user
Posts: 13
Joined: 16 Oct 2016, 20:48

Re: Trouble using Sonoff Basic with ESPeasy

#10 Post by Madbanana » 05 Feb 2017, 10:39

I've got two of these that successfully work on ESPeasy, flashed in the way you describe below.

I'm sure you've tried all this, however what's worked for me is 1) after flashing, connect serial terminal at 115000 (I use the terminal in Arduino IDE as its simple) 2) power cycle 3) assuming you can see the ESP boot after 2), I use the command line to set access point and password, followed by save - then power cycle.

Sounds as if you're not getting as far as 3) - maybe try different baud rates?

On occasions this hasn't worked first time for me, but always got there in the end. Good luck!

JayMalinowski
New user
Posts: 5
Joined: 02 Feb 2017, 23:26

Re: Trouble using Sonoff Basic with ESPeasy

#11 Post by JayMalinowski » 06 Feb 2017, 19:55

I got it to work! I had to hold the button down then disconnect the USB cable while FTDI was connected to the Sonoff. Count to three. Then while holding the button down (for the entire flash process) plug in USB. Hit enter on the flash.com, and waited. After "Hit any key" I released the button, and unpluged USB. Then hooked up mains. Low and behold it worked! Now I just have to configure it to turn the relay on. I have my RasPi MQTT up and running. I can send message from phone to Broker to switch. I only need to figure out the Relay turn on part.

JustmeNL
Normal user
Posts: 26
Joined: 09 Dec 2016, 23:10

Re: Trouble using Sonoff Basic with ESPeasy

#12 Post by JustmeNL » 06 Feb 2017, 20:30

Glad to read you got it working.

I used the output (domoticz mqtt helper) to set the relay from domoticz. You can even use the button if you use rules. There an multiple examples about this in the forum.

Good luck.

Madbanana
Normal user
Posts: 13
Joined: 16 Oct 2016, 20:48

Re: Trouble using Sonoff Basic with ESPeasy

#13 Post by Madbanana » 06 Feb 2017, 21:03

Great work!

I've recently got a Sonoff S20 - basically a plug & socket version of the Basic. Flash the same ESPEasy software and control over IP - works great!

mgac84
New user
Posts: 2
Joined: 09 Feb 2017, 16:29

Re: Trouble using Sonoff Basic with ESPeasy

#14 Post by mgac84 » 09 Feb 2017, 16:38

Hy, I flashed my sonoff with espeasy r120. After installing it in fhem(on a raspBerry Pi) i get no readings/status of the gpio. Setting the switch is possible. Why does the sonoff not send readings? Whats wrong?

Madbanana
Normal user
Posts: 13
Joined: 16 Oct 2016, 20:48

Re: Trouble using Sonoff Basic with ESPeasy

#15 Post by Madbanana » 09 Feb 2017, 20:56

Hi, regret I know nothing about FHEM however for getting status back to Domotcz, set up in ESPeasy a 'Switch Input' device using the same GPIO as the relay.

The IDX/Variable is set to the same number as the corresponding switch in Domoticz. You may need to toggle Pull Up and Inversed in ESPEasy to get it to return the correct state.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 31 guests