ESPeasy not that easy?

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#31 Post by nick-head » 21 Jan 2017, 12:54

Setup newline/CR/LF at the bottom

Commands I use:



Type "settings" in the send bar press send and it will give you info
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#32 Post by nick-head » 21 Jan 2017, 12:55

ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#33 Post by nick-head » 21 Jan 2017, 13:06

You could probably use PUTTY but I don't use it so cannot tell you how to do it in that.
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#34 Post by CoolRemote » 21 Jan 2017, 16:35

I opened Arduino. > ESPeasy. > I made sure that the COM port was selected, in this case COM3. > I have editted the SSID and the Password. > Next I clicked Save in Arduino. > Started Upload. > Connected the Sonoff while holding the button. > Released the button. > Clicked Upload. > Compiling was filled with Errors (No idea why). > Uploading was done till 100% but the text went "red" while uploading. > The Sonoff does not show up in the WiFi list.

It does upload this way only with the USB to Serial adapter. If I do exactly the same steps with Arduino UNO board I am getting errors again.

warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

It does upload which confirms for me too now that the Sonoff is not defective.

Next step is to find out what went wrong.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#35 Post by nick-head » 21 Jan 2017, 17:42

Are you using a separate 3.3v psu, USB - Serial adaptors only supply a small current.

You said you had a working Sonoff, just power that up as you would if you were
programming it, then try the Com Port to set your wifi settings.

Try uploading a different revision i.e 78, as I had a few compile errors and had to iron them out.
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#36 Post by CoolRemote » 21 Jan 2017, 17:46

At the moment I am only using the CH340 USB adapter or the Arduino, without extra power supply. This is one of the reasons too that I mentioned the extra power supply. However I don't have that but could order it. :)

I might try another version too and will post updates here :)

The first update for now is a Nespresso, after that I give it another try :D

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#37 Post by CoolRemote » 21 Jan 2017, 18:19

Gave it another try.

Used version R147. (Where can I download the version 78 you suggested?)
No succes with uploading. Gives also problems with compiling.

Can you please tell me if I have done one or more steps wrong in the steps followed below? That would be helpful for me in order to learn from it and maybe it helps some others too who start with this. It is a complete new project for me. The Arduino and the Sonoff's.

I opened Arduino. > ESPeasy. > I made sure that the COM port was selected, in this case COM3. > I have editted the SSID and the Password. > Next I clicked Save in Arduino. > Started Upload. > Connected the Sonoff while holding the button. > Released the button. > Clicked Upload. > Compiling was filled with Errors (No idea why). > Uploading was done till 100% but the text went "red" while uploading. > The Sonoff does not show up in the WiFi list.

The working Sonoff I have is with the original software and is linked to Ewelink.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#38 Post by nick-head » 21 Jan 2017, 20:08

Right. Back to basics.

The Sonoff is not programming at all. If it gave you the three errors then nothing went in.

It will not part program. Its all or nothing.

In the Arduino IDE did you install the ESP8266 addon?
It is a library that you down load. At least I think it is. Has been a long time since I had to do it.

Have a look at that first so we can get a 100% compile before uploading.
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#39 Post by nick-head » 21 Jan 2017, 20:10

ESP R.147 may not go into a Sonoff. May do i will try when I get back. I dont remember where V78 came from. Maybe github.
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#40 Post by nick-head » 21 Jan 2017, 20:13

I think I downloaded the older files from sourceforge.net. Really just to have them.
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#41 Post by CoolRemote » 21 Jan 2017, 20:39

Thank you Nick-head.

I have been following these instructions below, see link, to install the ESP8266 Add on. Including setting up the library the way they advise there.
I am still wondering if the current might be an issue. Do you think that LED power supply can be used for this type of projects?
I also have lab power supply, might give that a try and put it on 3,3V.

http://randomnerdtutorials.com/how-to-i ... duino-ide/

Arduino and programming is new for me, I would love to learn it, to give up is the easy way. :D

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#42 Post by nick-head » 21 Jan 2017, 22:38

Had a look at that PSU, maybe it would work but it is a bit elaborate to
get a 3.3v suppply when all that is needed is a 3.3v regulator and maybe
a few capacitors to drop the 5v down.

The only thing about that PSU I would be concerned about is is may have current
regulation, hence specifying that is is an LED PSU and not a standard PSU.
I maybe wrong, but I err on the side of caution most of the time.

If you have a Lab supply then I would try that, or, use the 3.3 rail on the Arduino,
I have used this method many times when I need a quick 3.3v as I have an Arduino
at hand all the time in front of me.

The breadboard plug in PSU's are good, 2.5mm Plug 3.3v/5V outputs, and £1 GBP each.

The ESPs are quite power hungry, I have tried direct to USB-TTL adapters and they don't like it.

Even to the point of upgrading the 3.3v regulator to a 1A version has been in my mind but I
never got round to doing it.

You will get a running system, don't know when, but it will happen :)
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#43 Post by nick-head » 21 Jan 2017, 23:15

I have just reprogrammed a Sonoff using :

A 3.3v external breadboard supply
USB-TTL CH340 Adapter
Arduino IDE with ESPEasy R120
Settings for IDE are as below.
Kept Com Port Closed (top right of IDE) until 100% flash
Opened Com Window, watched as the flash Memory is erased and initiated.
The baud rate will have to be found by trial and error mine was 115200, could be others,
when flash is erased, remove power and reapply. A reset did not reboot the Sonoff.

ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#44 Post by nick-head » 21 Jan 2017, 23:22

Board: Generic ESP8266 Module
Flash Mode DIO
Flash Frequency 40Mhz
CPU Frequency 80 MHz
Flash Size 1M (64k Spiffs)
Debug Port Disabled
Debug Level None
Reset Method ck
Upload Speed 115200 (Yours may Differ)
Port Com 3 (Yours May Differ)

RX - TX
TX - RX

Sonoff Pinout

Reset Button at the top
+3.3v
Rxd
Txd
Gnd
GPIO 14 (not used here)
Un-populated header at the bottom
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#45 Post by nick-head » 21 Jan 2017, 23:29

http://www.ebay.co.uk/itm/1Pcs-New-3-3V ... SwEK9Troaf

This is the type of module I am using, but even the Arduino would suffice
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#46 Post by CoolRemote » 21 Jan 2017, 23:37

Insteresting information to move on with. I hope to give it a go again soon. I guess tomorrow and might use the lab power supply.
Will put updates here.

Enjoy your weekend and a Guinness :-)

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#47 Post by nick-head » 21 Jan 2017, 23:44

Yep, will do,

Just tried V147 and it does go on a 1MB Sonoff, I dont fancy removing the flash out of
one of these and putting it to 4MB.

I did it on an ESP-01, that was tricky enough.

I was using the experimental "MEGA" revision, I think that requires more flas mem.

OK, hope you get it done, I am having a ball here it's like a production line.

Regards

Nick
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#48 Post by CoolRemote » 22 Jan 2017, 21:55

While reading through your posts I think we come to the same conclusion that the lack of enough power (current) might be one of the reasons that flashing is not going the way it should go. But ofcourse there can still be other reasons too.

I saw the link to the power supply, they go cheap indeed, however it seems they can cause damage too. Please see this video https://blog.brianmoses.net/2015/07/fig ... p8266.html If you scroll down on the page you will see a video about a simmilar "power supply" and take note of the meter readings. This is a normal effect when a power supply is being turned on because it has a peek and after that it is going to the adjusted value. The bigger power supplies don't have that since they have a soft start circuit build in to avoid this.

I didn't get this; I am having a ball here it's like a production line.

I didn't try yet with the lab power supply I have.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#49 Post by nick-head » 22 Jan 2017, 22:11

Yer, Having a ball, = enjoying what I am doing to the limit

Like a production line = making lots of things at once, doing loads of programming , connecting building

I just enjoy messing about

Try some AA batteries if you don't want to use a PSU, 2 fully charged ones should suffice for a hour or so
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#50 Post by nick-head » 22 Jan 2017, 22:16

And, that power supply is not the one I have.

Mine is a linear converter not digital.

It has 2 regulators on it, one 5v one 3.3v AMS 1Amp type, never had a problem with these.

The one you showed me is totally different
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: ESPeasy not that easy?

#51 Post by vojtishek » 24 Jan 2017, 08:16

@CoolRemote
Did you manage to flash ESPeasy on Sonoff already?

I´m stucked at the moment. Last option for me is to check with my friend all my connections If are wired correctly and also tried laboratory power supply with exact 3.3v with 1A.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#52 Post by nick-head » 24 Jan 2017, 10:12

I have , yes.

I got bored with it, so I also flashed microPython on it.

All they are is an ESP8266 with a few extra bits added.

I am also considering upgrading the memory from 1MB to 4MB as I have with my other ESP8266-01's
but the flash chip is in between components and I am a bit clumsy with my hot air station and need
to be more careful.

I have good results when programming the ESP's, rarely any errors.
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#53 Post by nick-head » 24 Jan 2017, 10:18

OOps, sorry, I think I answered a message to someone else, apologies
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#54 Post by CoolRemote » 25 Jan 2017, 13:34

vojtishek, I have been trying again and without succes. Wiring is correct. I am using two AA batteries at the moment since I did not manage yet to have the lab power supply ready, but when I read your experience it looks like that won't help either.

A few posts back I have written down all the steps I went through, can someone verify if there are mistakes made in that?

Later today I am going to try again.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#55 Post by nick-head » 27 Jan 2017, 20:33

Are you sure the ttl converter is working ?

Connect the RX to TX pin on the converter and use a comms program to check if it loops back
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

nick-head
Normal user
Posts: 48
Joined: 15 Nov 2016, 11:09
Location: North East UK

Re: ESPeasy not that easy?

#56 Post by nick-head » 27 Jan 2017, 21:14

And I have just tried the AA batteries, it doesn't boot. So that's out of the window :(
ESP32, Arduino's,Raspberry Pi's, ESP8266's, Nextion's, Sonoff's, LightWaveRF's, RFXCom 433, and a headache
And a HackRF One, as a present to myself.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#57 Post by CoolRemote » 28 Jan 2017, 03:06

It took me a bit, but I am here and back with an update. Since the very first time it seems the flash was done correct and the Sonoff was working. I have been following the video I mentioned before and the flash was done correct and I could have done the setup of the Sonoff.

However.....on the devices I used I could NOT see the Sonoff showing up in the list, no matter what I did.
I decided to take another mobile phone and do a wifi scan with that, and voila, in the first scan the Sonoff was there, online.

For some reasons I have been strugling all this time with just that it didn't show up at the network list.

Anyways. Now I can move on with adding it to the Domoticz. Are there clear and simple instructions for that too?
Several people say that this is easy. I am excited to move on now I know that it was working all the time.

Suggestion for other ones who read this, try a different phone or tablet and it might show up anyways in your network list. :)

I look forward for the next step to add it to Domoticz. :D

data
Normal user
Posts: 93
Joined: 10 Dec 2016, 11:26

Re: ESPeasy not that easy?

#58 Post by data » 28 Jan 2017, 08:12

Ok, quick & dirty:

In Domoticz:

Go to Setup -> Hardware, Select 'Dummy' from the drop down list and click add.

Then, after the page reloads, you'll see the new dummy hardware in your list.
Click on 'Create Virtual Sensors', enter name and choose your type.

Go to Setup -> Devices and search for your newly created device.
Note down the IDX value.

Open the the device page of your sonoff and enter the IDX in the according device.

Go to the config page of your sonoff device.
Enter the IP of your domoticz server in the 'Controller IP' Field, choose 'Domoticz HTTP' as protocol

That's it.

CoolRemote
Normal user
Posts: 47
Joined: 17 Jan 2017, 15:27
Location: Groningen (Nederland)

Re: ESPeasy not that easy?

#59 Post by CoolRemote » 29 Jan 2017, 01:27

Thank you Data.

I managed to enter two Sonoff modules. In both I entered new credentials like SSID and new pasword. However the SSID for both remains ESP_0 and ESP_1, I confirmed all the steps with "Submit" which was accepted without any error. Also I did enter the other Domoticz details you told me to enter into those fields.

I adjusted the LED settings to GIO13, also submitted, but none of the LED's work.

I guess since the SSID is not updating to the new network names I gave the Sonoff modules I also can not connect it to Domoticz.

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: ESPeasy not that easy?

#60 Post by vojtishek » 02 Feb 2017, 22:39

Hi,

so I was finally succesfull. My problem was bad solder job, after resoldering flashed without any problem. 3.3V and 120mA is enough to program device.
Configuration of Domoticz was easy without any problem.

This is how looks success via flashcmd from ESPeasy :)

Code: Select all

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
Pokračujte stisknutím libovolné klávesy...

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: ESPeasy not that easy?

#61 Post by vojtishek » 02 Feb 2017, 22:47

@CoolRemote

If you have problems with adding to Domoticz. Make sure you add correct address into controller ip address in settings of espeasy. Then do not forget to fill in password If your domoticz is protected by password.
Then add dummy device in settings technical...and add virtual device Switch. Do not forget to match idx with espeasy.

Then go to Switches tab and settings for new switch. Change Icon for Generic ON/OFF switch and use this link for

turn on action: http://<ESPeasy IP adress>/control?cmd=GPIO,12,1
turn off action:http://<ESPeasy IP adress>/control?cmd=GPIO,12,0

If you will have still troubles, then I can make some screens or you can provide yours to find an issue.

Cheers
Vojta

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests