WAF in jeopardy today
-
One other reason I'd like to switch to a MySensors based solution is that I bought a new batch of 5 Sonoff Basics, only to find that they changed the design of the board. The one on the right in the two images is the old version, and the left is the new updated version.


The old version was based off of the ESP8266 controller like the NodeMCU devices. The new ones are ESP8285 based. The firmware that I use on my Sonoff devices is the ESPEasy firmware. My Vera plugin, which is a modified version of the "HTTP Switch (WiFi Switch)" plugin. My ESP8266 based sonoff devices were easily programmed using the Arduino IDE selecting ESP8266 with 64M No SPIFFS. Even after selecting ESP8285 and trying multiple SPIFFS settings, I cannot get them to flash. The ESPEasy website claims that the 8285 is supported, but they don't seem to show a way of flashing them that works. I have read a number of forum posts from various places that say they are difficult to program, with no one having a clear cut set of instructions to program them. Another reason to go the MySensors route.
-
One other reason I'd like to switch to a MySensors based solution is that I bought a new batch of 5 Sonoff Basics, only to find that they changed the design of the board. The one on the right in the two images is the old version, and the left is the new updated version.


The old version was based off of the ESP8266 controller like the NodeMCU devices. The new ones are ESP8285 based. The firmware that I use on my Sonoff devices is the ESPEasy firmware. My Vera plugin, which is a modified version of the "HTTP Switch (WiFi Switch)" plugin. My ESP8266 based sonoff devices were easily programmed using the Arduino IDE selecting ESP8266 with 64M No SPIFFS. Even after selecting ESP8285 and trying multiple SPIFFS settings, I cannot get them to flash. The ESPEasy website claims that the 8285 is supported, but they don't seem to show a way of flashing them that works. I have read a number of forum posts from various places that say they are difficult to program, with no one having a clear cut set of instructions to program them. Another reason to go the MySensors route.
@dbemowsk
I have 12 of these new and working without any problems.
There is a missing gpio14 pin, where I connected the DS18B20, but I used the RX pin instead.
PCB design is more solid to me - you can even see the power fuse.
ESPeasy flashing without problem using esptool.
My way to program new Sonoffs:To check comunication:
esptool.py --port /dev/ttyUSB0 flash_idErase flash:
esptool.py --port /dev/ttyUSB0 erase_flashProgram ESPeasy bin:
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ESP_Easy_v2.0-20180322_normal_ESP8285_1024.binLook here:
https://www.letscontrolit.com/forum/viewtopic.php?f=4&t=6415&p=35265#p35265 -
@kimot Do you have a copy of your ESP_Easy bin file? It would be nice to program these and use them, it's just been a big struggle trying to find out how to do it. The earlier ones I got were ESP8266 based and flashed really easy with the arduino IDE. I am assuming you are hooking it up with the standard gnd-gnd, tx-rx, rx-tx and 3.3v-3.3v, correct?
-
@kimot Do you have a copy of your ESP_Easy bin file? It would be nice to program these and use them, it's just been a big struggle trying to find out how to do it. The earlier ones I got were ESP8266 based and flashed really easy with the arduino IDE. I am assuming you are hooking it up with the standard gnd-gnd, tx-rx, rx-tx and 3.3v-3.3v, correct?
-
@dbemowsk
It is from here:
https://github.com/letscontrolit/ESPEasy/releases/tag/v2.0-20180322I connect it like you wrote.
-
@dbemowsk
It is from here:
https://github.com/letscontrolit/ESPEasy/releases/tag/v2.0-20180322I connect it like you wrote.
@kimot So I don't do a lot with python, and when I try to use a command similar to what you posted I get errors. So here is some background on the file structure that I have. I downloaded the ESPEasy_v2.0-20180322.zip file and unpacked it to a folder. That contained a source folder, the .bin files and a set of windows esp flash tools. I noticed that it didn't include the esptool.py python scripts, so I downloaded the source code zip file and unpacked the test folder into the same folder as the .bin files, since that looked like it had the necessary python scripts. So now I have a source and test folder, the .bin files and the windows executables. I navigated a terminal window into the test folder and ran this:
./esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.binThis is the errors that I got when I ran it.
[dbemowsk@phpwebscripting test]$ ./esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin esptool.py v1.3 Traceback (most recent call last): File "./esptool.py", line 1328, in <module> main() File "./esptool.py", line 1236, in main esp = ESPROM(args.port, initial_baud) File "./esptool.py", line 75, in __init__ self._port = serial.serial_for_url(port) File "/usr/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url instance.open() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 265, in open self._update_dtr_state() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 595, in _update_dtr_state fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) IOError: [Errno 5] Input/output error [dbemowsk@phpwebscripting test]$I must be missing something, but I cannot figure out what it is.
EDIT: if it matters, I am running Fedora 28 linux.
-
@kimot So I don't do a lot with python, and when I try to use a command similar to what you posted I get errors. So here is some background on the file structure that I have. I downloaded the ESPEasy_v2.0-20180322.zip file and unpacked it to a folder. That contained a source folder, the .bin files and a set of windows esp flash tools. I noticed that it didn't include the esptool.py python scripts, so I downloaded the source code zip file and unpacked the test folder into the same folder as the .bin files, since that looked like it had the necessary python scripts. So now I have a source and test folder, the .bin files and the windows executables. I navigated a terminal window into the test folder and ran this:
./esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.binThis is the errors that I got when I ran it.
[dbemowsk@phpwebscripting test]$ ./esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin esptool.py v1.3 Traceback (most recent call last): File "./esptool.py", line 1328, in <module> main() File "./esptool.py", line 1236, in main esp = ESPROM(args.port, initial_baud) File "./esptool.py", line 75, in __init__ self._port = serial.serial_for_url(port) File "/usr/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url instance.open() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 265, in open self._update_dtr_state() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 595, in _update_dtr_state fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) IOError: [Errno 5] Input/output error [dbemowsk@phpwebscripting test]$I must be missing something, but I cannot figure out what it is.
EDIT: if it matters, I am running Fedora 28 linux.
You must install esptool:
https://diyprojects.io/esp-easy-flash-firmware-esptool-py-esp8266/
or
https://github.com/arendst/Sonoff-Tasmota/wiki/Esptool#esptool-executable-windows--linuxAttention, there are some dependencies...
Then normally go to folder where .bin file is placed and run command:
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin
or
python esptool.py .........................
not ./esptool.py
But I suggest first try :
esptool.py --port /dev/ttyUSB0 flash_id
To check if every is OK ( port, etc )
-
You must install esptool:
https://diyprojects.io/esp-easy-flash-firmware-esptool-py-esp8266/
or
https://github.com/arendst/Sonoff-Tasmota/wiki/Esptool#esptool-executable-windows--linuxAttention, there are some dependencies...
Then normally go to folder where .bin file is placed and run command:
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin
or
python esptool.py .........................
not ./esptool.py
But I suggest first try :
esptool.py --port /dev/ttyUSB0 flash_id
To check if every is OK ( port, etc )
@kimot I had already tried that through dnf prior to running that, but I did it again.
[root@phpwebscripting test]# sudo dnf install esptool Last metadata expiration check: 2:13:12 ago on Wed 27 Feb 2019 04:35:51 AM CST. Package esptool-2.3.1-1.fc27.noarch is already installed, skipping. Dependencies resolved. Nothing to do. Complete! [root@phpwebscripting test]# -
I know WAF is not a joking matter, but I immediately heard Greg Kihn sing, " my WAf's in jeopardy, baby".
-
I know WAF is not a joking matter, but I immediately heard Greg Kihn sing, " my WAf's in jeopardy, baby".
@wallyllama YES.....Drop the mic.
-
You must install esptool:
https://diyprojects.io/esp-easy-flash-firmware-esptool-py-esp8266/
or
https://github.com/arendst/Sonoff-Tasmota/wiki/Esptool#esptool-executable-windows--linuxAttention, there are some dependencies...
Then normally go to folder where .bin file is placed and run command:
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin
or
python esptool.py .........................
not ./esptool.py
But I suggest first try :
esptool.py --port /dev/ttyUSB0 flash_id
To check if every is OK ( port, etc )
@kimot So I'm a bit confused. I ran this:
pip install esptooland then got this:
[root@phpwebscripting test]# esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin esptool.py v2.6 Serial port /dev/ttyUSB0 Connecting.... Detecting chip type... ESP8266 Chip is ESP8285 Features: WiFi, Embedded Flash MAC: dc:4f:22:92:eb:55 Uploading stub... Running stub... Stub running... Configuring flash size... Auto-detected Flash size: 1MB Compressed 609280 bytes to 403063... Wrote 609280 bytes (403063 compressed) at 0x00000000 in 36.0 seconds (effective 135.4 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin...So it worked. BUT, I connected a second one and tried running it again and got this:
[root@phpwebscripting test]# esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin esptool.py v2.6 Serial port /dev/ttyUSB0 Traceback (most recent call last): File "/usr/bin/esptool.py", line 2959, in <module> _main() File "/usr/bin/esptool.py", line 2952, in _main main() File "/usr/bin/esptool.py", line 2646, in main esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace) File "/usr/bin/esptool.py", line 258, in detect_chip detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled) File "/usr/bin/esptool.py", line 222, in __init__ self._port = serial.serial_for_url(port) File "/usr/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url instance.open() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 265, in open self._update_dtr_state() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 595, in _update_dtr_state fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) IOError: [Errno 5] Input/output errorI ended up getting them all programmed, but I had to unplug and plug in the serial adapter a few times to reset it. It had even reset the device to /dev/ttyUSB1 for a couple of them. STRANGE...
Thanks for the help.
-
@kimot So I'm a bit confused. I ran this:
pip install esptooland then got this:
[root@phpwebscripting test]# esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin esptool.py v2.6 Serial port /dev/ttyUSB0 Connecting.... Detecting chip type... ESP8266 Chip is ESP8285 Features: WiFi, Embedded Flash MAC: dc:4f:22:92:eb:55 Uploading stub... Running stub... Stub running... Configuring flash size... Auto-detected Flash size: 1MB Compressed 609280 bytes to 403063... Wrote 609280 bytes (403063 compressed) at 0x00000000 in 36.0 seconds (effective 135.4 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin...So it worked. BUT, I connected a second one and tried running it again and got this:
[root@phpwebscripting test]# esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ../ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin esptool.py v2.6 Serial port /dev/ttyUSB0 Traceback (most recent call last): File "/usr/bin/esptool.py", line 2959, in <module> _main() File "/usr/bin/esptool.py", line 2952, in _main main() File "/usr/bin/esptool.py", line 2646, in main esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace) File "/usr/bin/esptool.py", line 258, in detect_chip detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled) File "/usr/bin/esptool.py", line 222, in __init__ self._port = serial.serial_for_url(port) File "/usr/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url instance.open() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 265, in open self._update_dtr_state() File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 595, in _update_dtr_state fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) IOError: [Errno 5] Input/output errorI ended up getting them all programmed, but I had to unplug and plug in the serial adapter a few times to reset it. It had even reset the device to /dev/ttyUSB1 for a couple of them. STRANGE...
Thanks for the help.
-
@dbemowsk
Yes, sometimes it got USB1 instead of USB0.
You can create fix symlink for your USBtoSerial adapter and then write for example ttySonoff and allways will be right.