FLASH Wifi Relay

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

FLASH Wifi Relay

#1 Post by ewaldharmsen » 16 Feb 2017, 09:31

Hi All,

ESP Easy is so amazing and easy that I want to make sure I can flash it on hardware before I buy that hardware.

I want to have relay which can switch on and of a 20 Volt LED light.
I am thinking about the Sonoff SV https://www.itead.cc/sonoff-sv.html, or this one: http://www.ebay.com/itm/ESP8266-5V-10A- ... Sw5cNYIKhJ.

Does anybody know if they can be flashed and how?

I like the idea of a relay and the wifi chip integrated into one module.
It would be even better if I can connect a temperature sensor to it as well.

thanks!

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: FLASH Wifi Relay

#2 Post by paxi » 16 Feb 2017, 10:24

Both can be flashed, instructions are in the Wiki.

The module from ebay uses an esp-01 on which info is all over the web. It has only 2 GPIOs exposed and comes with flash sizes of 512kB to 1MB. The powersupply/relay part seems undocumented which may lead to some guesswork.

Sonoff SV has a nice documentation here including a schematic, seems to have 1MB flash and has 3 additional GPIOs exposed. A button for manual input and bootloader mode is on board. You'll need to solder some pin headers for flashing.

The sonoff is the way to go if you ever want to connect something else.

ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

Re: FLASH Wifi Relay

#3 Post by ewaldharmsen » 16 Feb 2017, 11:09

Ah thanks!

So if I understand https://www.itead.cc/wiki/images/4/40/S ... V-VIEW.pdf well, I can connect GND, TX, RX and 3v3 to my usb to serial adapter to load the firmware onto it.
But how can I put it in flashing mode?

And also I see IO5, IO4 and IO14. They have above the Diagram the letters SVG, do they stand for Serial, Volt and Ground?

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: FLASH Wifi Relay

#4 Post by paxi » 16 Feb 2017, 11:39

To enter flash mode hold the button on power up, this pulls gpio0 to ground. This seems to be too basic knowledge, the wiki doesn't even mention it. :roll:

I think S stands for signal, the pins are directly connected to the respective GPIOs. V is Vcc (3.3V) and G of course ground. It's all in the schematic pdf. ;)

ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

Re: FLASH Wifi Relay

#5 Post by ewaldharmsen » 16 Feb 2017, 12:36

thank you very much!

Also thinking about the Sanoff SC combined with ESP Easy, just flashing the ESP module will that be enough?
But thats another topic

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: FLASH Wifi Relay

#6 Post by paxi » 16 Feb 2017, 13:18

Re the SC have a look at this page. Not exactly espeasy but it's possible to let it talk MTTQ. ;)

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#7 Post by Giome » 03 Mar 2018, 06:25

Hi So I got the sonoff sv but I am unable to flash it with espeasy... No response after Flash... I tried Tasmota and it works so my sonoff is OK.
I tried espeasy mega 20180302 1M in dev normal and test with successful flash but my sonoff never start after that...

Someone could help me please ?

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: FLASH Wifi Relay

#8 Post by TD-er » 03 Mar 2018, 18:54

What version (ESP8266/8285) did you use?
And could you test with the 8285 version?
Also please test the build with DOUT marking.

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#9 Post by Giome » 03 Mar 2018, 19:28

@TD-er Thank you for your reply.

So the version is ESP8266EX with memory XTX PN25F08 so 1M but I also test esp8265 just to try and no luck...
Can you tell me more about the build with DOUT marking ?

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: FLASH Wifi Relay

#10 Post by TD-er » 03 Mar 2018, 19:35

Flashchips can have 1 or more datalines.
  • DIO - SPI host uses the "Dual I/O Fast Read" command (BBh). Two SPI pins are used to write the flash address part of the command, and to read flash data out. Therefore these phases need half the clock cycles compared to standard SPI.
  • DOUT - SPI host uses the "Dual Output Fast Read" command (3Bh). Two SPI pins are used to read flash data out. Slightly slower than DIO, because the address is written via the single MOSI data pin.
  • QIO - SPI host uses the "Quad I/O Fast Read" command (EBh). Four SPI pins are used to write the flash address part of the command, and to read flash data out. Therefore these phases need a quarter the clock cycles compared to standard SPI.
  • QOUT - SPI host uses the "Quad Output Fast Read" command (6Bh). Four SPI pins are used to read the flash data out. Slightly slower than QIO, because the address is written via the single MOSI data pin.
In terms of performance: QIO > QOUT > DIO > DOUT

Also a DOUT-only flash chip cannot communicate at higher speeds.

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#11 Post by Giome » 03 Mar 2018, 19:47

Thank you for this explanation.

For Tasmota it's only in DOUT so I thank this could fix the thing but with espeasy how can I do that ?

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: FLASH Wifi Relay

#12 Post by TD-er » 03 Mar 2018, 20:30

in the released binaries is one with dout in the name. (there should be one)

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#13 Post by Giome » 03 Mar 2018, 20:36

Not sure to understand... For 1024 their is
ESP_Easy_mega-20180302_dev_ESP8266_1024.bin
ESP_Easy_mega-20180302_dev_ESP8266PUYA_1024.bin
ESP_Easy_mega-20180302_dev_ESP8266PUYA_1024_VCC.bin
ESP_Easy_mega-20180302_dev_ESP8285_1024.bin
ESP_Easy_mega-20180302_normal_ESP8266_1024.bin
ESP_Easy_mega-20180302_normal_ESP8285_1024.bin
ESP_Easy_mega-20180302_test_ESP8266_1024.bin
ESP_Easy_mega-20180302_test_ESP8285_1024.bin

So wich one ? because I can not see DOUT... Help please...

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: FLASH Wifi Relay

#14 Post by grovkillen » 03 Mar 2018, 21:09

You could try my Flasher and force DOUT checked.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#15 Post by Giome » 03 Mar 2018, 21:31

@grovkillen Thank you for your tool, I tried and I ahve an error :

Code: Select all

######2018-03-03######
#######0.00.021#######
######FLASH INFO######
BIN file: ESP_Easy_mega-20180302_normal_ESP8266_1024.bin
COM port: (COM3) USB Serial Port
Baud rate: 115200
! FORCED DOUT ENABLED !
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -bm dout -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf "P:\Domotique\NEW\BIN\ESP_Easy_mega-20180302_normal_ESP8266_1024.bin"]
[03/03/2018 15:26:20] esptool v0.4.12 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
[03/03/2018 15:26:20] setting flash mode from qio to dout
[03/03/2018 15:26:20] 	setting board to nodemcu
[03/03/2018 15:26:20] 	setting baudrate from 115200 to 115200
[03/03/2018 15:26:20] 	setting port from  to COM3
[03/03/2018 15:26:20] 	setting address from 0x00000000 to 0x00000000
[03/03/2018 15:26:20] 	espcomm_upload_file
[03/03/2018 15:26:20] 	espcomm_upload_mem
[03/03/2018 15:26:20] 	setting serial port timeouts to 1000 ms
[03/03/2018 15:26:20] opening bootloader
[03/03/2018 15:26:20] resetting board
[03/03/2018 15:26:20] trying to connect
[03/03/2018 15:26:20] 	flush start
[03/03/2018 15:26:20] 	setting serial port timeouts to 1 ms
[03/03/2018 15:26:20] 	setting serial port timeouts to 1000 ms
[03/03/2018 15:26:20] 	flush complete
[03/03/2018 15:26:20] 	espcomm_send_command: sending command header
[03/03/2018 15:26:20] 	espcomm_send_command: sending command payload
[03/03/2018 15:26:20] 	read 0, requested 1
[03/03/2018 15:26:20] trying to connect
[03/03/2018 15:26:20] 	flush start
[03/03/2018 15:26:20] 	setting serial port timeouts to 1 ms
[03/03/2018 15:26:20] 	setting serial port timeouts to 1000 ms
[03/03/2018 15:26:20] 	flush complete
[03/03/2018 15:26:20] 	espcomm_send_command: sending command header
[03/03/2018 15:26:20] 	espcomm_send_command: sending command payload
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] Uploading 608112 bytes from P:\Domotique\NEW\BIN\ESP_Easy_mega-20180302_normal_ESP8266_1024.bin to flash at 0x00000000
[03/03/2018 15:26:20] 	erasing flash
[03/03/2018 15:26:20] 	size: 094770 address: 000000
[03/03/2018 15:26:20] 	first_sector_index: 0
[03/03/2018 15:26:20] 	total_sector_count: 149
[03/03/2018 15:26:20] 	head_sector_count: 16
[03/03/2018 15:26:20] 	adjusted_sector_count: 133
[03/03/2018 15:26:20] 	erase_size: 085000
[03/03/2018 15:26:20] 	espcomm_send_command: sending command header
[03/03/2018 15:26:20] 	espcomm_send_command: sending command payload
[03/03/2018 15:26:20] 	setting serial port timeouts to 15000 ms
[03/03/2018 15:26:20] 	setting serial port timeouts to 1000 ms
[03/03/2018 15:26:20] 	espcomm_send_command: receiving 2 bytes of data
[03/03/2018 15:26:20] 	writing flash
[03/03/2018 15:26:29] ................................................................................ [ 13% ]
[03/03/2018 15:26:39] ...........................................................................	read 0, requested 1
[03/03/2018 15:26:39] warning: espcomm_send_command: didn't receive command response
[03/03/2018 15:26:39] warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
[03/03/2018 15:26:39] 	read 0, requested 1
[03/03/2018 15:26:39] warning: espcomm_send_command: didn't receive command response
[03/03/2018 15:26:39] closing bootloader
[03/03/2018 15:26:39] 	flush start
[03/03/2018 15:26:39] 	setting serial port timeouts to 1 ms
[03/03/2018 15:26:39] 	setting serial port timeouts to 1000 ms
[03/03/2018 15:26:39] 	flush complete
[03/03/2018 15:26:39] error: espcomm_upload_mem failed
[2018-03-03 15:26:39] DONE! BUT WITH (1) ERRORS!
############################
[2018-03-03 15:26:39] JOB COMPLETED, over and out!
Any help please...

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: FLASH Wifi Relay

#16 Post by grovkillen » 03 Mar 2018, 21:34

Tried more than once?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#17 Post by Giome » 03 Mar 2018, 21:48

OK I tried few times and now no more errors on flash but my sonoff never boot, no led on, no wifi hotspot... I will try all *1024.bin files just in case...

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: FLASH Wifi Relay

#18 Post by grovkillen » 03 Mar 2018, 21:55

Did you post flash with dhcp or just a plain flash?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#19 Post by Giome » 03 Mar 2018, 22:04

Not sure to understand what you mean but if your question is to know if I fill in the "Post Flash Action" of your tool the answer is no.
First I just want my sonoff to boot to be sure everything is OK and I need its MAC adress to add it to my network.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: FLASH Wifi Relay

#20 Post by grovkillen » 03 Mar 2018, 22:06

Aha, sorry but I thought you did the programming with the tool since the AP might take some minute to get active in worst case.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: FLASH Wifi Relay

#21 Post by TD-er » 03 Mar 2018, 23:40

@Grovkillen: The firmware itself should also be compiled with DOUT.

Could you try one of these, I compiled this morning for someone else: https://www.dropbox.com/s/w71xizrdgv0jx ... r.rar?dl=0
It's branch v2.0 of this morning.

Giome
New user
Posts: 8
Joined: 03 Mar 2018, 06:19

Re: FLASH Wifi Relay

#22 Post by Giome » 04 Mar 2018, 01:07

I did it !!! after the first try of this french tuto : http://www.compu-tek.fr/blog/1325-2/ and using the tools on this website with this firmware : ESP_Easy_mega-20180302_normal_ESP8266_1024.bin

So I don't know what was wrong before but now my garage door is connected with my sonoff sv powered by the garage door opener battery backup !!!

Thank you for your help

dbemowsk
Normal user
Posts: 46
Joined: 06 Aug 2017, 22:27

Re: FLASH Wifi Relay

#23 Post by dbemowsk » 20 May 2018, 19:16

I may have missed it looking through the comments, but is the relay on this on the same GPIO port as the standard sonoff modules? GPIO 12? I see GPIO 14, 4 and 5 on the headers, but not sure what the relay is.

Post Reply

Who is online

Users browsing this forum: No registered users and 60 guests