Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. WAF in jeopardy today

WAF in jeopardy today

Scheduled Pinned Locked Moved General Discussion
18 Posts 5 Posters 2.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kimot
    wrote on last edited by
    #4

    Can you connect to Sonoffs web pages?
    Or can you see its SSID if they are in AP mode?
    My Sonoffs Basic is switched off four times per every day and works like charm.
    No DHCP, fixed IP, Domoticz. It is the most stable part of my sensors network.
    It Is not probable, that all of yours are bad.
    It must je different problem.

    1 Reply Last reply
    0
    • dbemowskD Offline
      dbemowskD Offline
      dbemowsk
      wrote on last edited by
      #5

      UPDATE: So the Vera plugin that I modified to work with my sonoffs will show the status (online/offline) next to the switch controls on my Vera device list. This is done by the plugin using a ping signal to it's web address.
      0_1551148529628_e835119a-4cc8-4b45-89d7-ba85a29e6cfb-image.png
      All of my Sonoff devices showed offline. When I tried to access the web pages of them, the browser couldn't connect, which was no surprise. One of them controls a tabletop lamp in my living room which I just have the controller spliced into a 2 prong extension cord. I reset that one a couple times and it came to life. Most of the other ones are mounted in the ceiling light/fan housing with no easy way to reset power. I ended up cycling the circuit breakers at the electric panel and was able to get all of them back online.

      The power outage that killed them was a split second power outage. My wife and I were watching a movie on our Roku box and when it happened, the Roku box reset, but the TV did not shut off, which told me that it was just a quick flash. If that's all it takes to flake out a sonoff basic, all the more reason for me to lean towards switching to MySensors controllers for those. In all the times my MySensors switches and other devices have gone through power outages, even the brief ones like the other day, they have not skipped a beat when the power has come back on. Don't get me wrong, I still like the sonoff devices, I am just looking for the kind of reliability that doesn't put the WAF of my automation system into question.

      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

      1 Reply Last reply
      0
      • dbemowskD Offline
        dbemowskD Offline
        dbemowsk
        wrote on last edited by
        #6

        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.
        0_1551150111576_ff416624-3b8a-471a-b8a1-3616076d65fa-image.png
        0_1551150119814_cf5662ef-2132-4b59-93e8-8cd7a2b564b7-image.png

        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.

        Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
        Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

        K 1 Reply Last reply
        1
        • dbemowskD dbemowsk

          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.
          0_1551150111576_ff416624-3b8a-471a-b8a1-3616076d65fa-image.png
          0_1551150119814_cf5662ef-2132-4b59-93e8-8cd7a2b564b7-image.png

          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.

          K Offline
          K Offline
          kimot
          wrote on last edited by kimot
          #7

          @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_id

          Erase flash:
          esptool.py --port /dev/ttyUSB0 erase_flash

          Program ESPeasy bin:
          esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 ESP_Easy_v2.0-20180322_normal_ESP8285_1024.bin

          Look here:
          https://www.letscontrolit.com/forum/viewtopic.php?f=4&t=6415&p=35265#p35265

          1 Reply Last reply
          0
          • dbemowskD Offline
            dbemowskD Offline
            dbemowsk
            wrote on last edited by
            #8

            @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?

            Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
            Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

            K 1 Reply Last reply
            0
            • dbemowskD dbemowsk

              @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?

              K Offline
              K Offline
              kimot
              wrote on last edited by kimot
              #9

              @dbemowsk
              It is from here:
              https://github.com/letscontrolit/ESPEasy/releases/tag/v2.0-20180322

              I connect it like you wrote.

              dbemowskD 2 Replies Last reply
              1
              • K kimot

                @dbemowsk
                It is from here:
                https://github.com/letscontrolit/ESPEasy/releases/tag/v2.0-20180322

                I connect it like you wrote.

                dbemowskD Offline
                dbemowskD Offline
                dbemowsk
                wrote on last edited by
                #10

                @kimot Thanks, I will try flashing them tonight.

                Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                1 Reply Last reply
                0
                • K kimot

                  @dbemowsk
                  It is from here:
                  https://github.com/letscontrolit/ESPEasy/releases/tag/v2.0-20180322

                  I connect it like you wrote.

                  dbemowskD Offline
                  dbemowskD Offline
                  dbemowsk
                  wrote on last edited by dbemowsk
                  #11

                  @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.bin
                  

                  This 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.

                  Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                  Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                  K 1 Reply Last reply
                  0
                  • dbemowskD dbemowsk

                    @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.bin
                    

                    This 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.

                    K Offline
                    K Offline
                    kimot
                    wrote on last edited by kimot
                    #12

                    @dbemowsk

                    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--linux

                    Attention, 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 )

                    dbemowskD 2 Replies Last reply
                    0
                    • K kimot

                      @dbemowsk

                      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--linux

                      Attention, 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 )

                      dbemowskD Offline
                      dbemowskD Offline
                      dbemowsk
                      wrote on last edited by
                      #13

                      @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]# 
                      

                      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                      1 Reply Last reply
                      0
                      • wallyllamaW Offline
                        wallyllamaW Offline
                        wallyllama
                        wrote on last edited by
                        #14

                        I know WAF is not a joking matter, but I immediately heard Greg Kihn sing, " my WAf's in jeopardy, baby".

                        dbemowskD 1 Reply Last reply
                        1
                        • wallyllamaW wallyllama

                          I know WAF is not a joking matter, but I immediately heard Greg Kihn sing, " my WAf's in jeopardy, baby".

                          dbemowskD Offline
                          dbemowskD Offline
                          dbemowsk
                          wrote on last edited by
                          #15

                          @wallyllama YES.....Drop the mic.

                          Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                          Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                          1 Reply Last reply
                          0
                          • K kimot

                            @dbemowsk

                            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--linux

                            Attention, 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 )

                            dbemowskD Offline
                            dbemowskD Offline
                            dbemowsk
                            wrote on last edited by
                            #16

                            @kimot So I'm a bit confused. I ran this:

                            pip install esptool
                            

                            and 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 error
                            

                            I 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.

                            Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                            Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                            K 1 Reply Last reply
                            0
                            • dbemowskD dbemowsk

                              @kimot So I'm a bit confused. I ran this:

                              pip install esptool
                              

                              and 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 error
                              

                              I 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.

                              K Offline
                              K Offline
                              kimot
                              wrote on last edited by
                              #17

                              @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.

                              dbemowskD 1 Reply Last reply
                              0
                              • K kimot

                                @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.

                                dbemowskD Offline
                                dbemowskD Offline
                                dbemowsk
                                wrote on last edited by
                                #18

                                @kimot The main thing is that I got them flashed. I still have yet to figure out the new firmware and test them, but I am confident I can get them to work.

                                Thanks again.

                                Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                                Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                22

                                Online

                                11.7k

                                Users

                                11.2k

                                Topics

                                113.1k

                                Posts


                                Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • MySensors
                                • OpenHardware.io
                                • Categories
                                • Recent
                                • Tags
                                • Popular