Announcement

Collapse
No announcement yet.

ESP8266 - ESPEasy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ESP8266 - ESPEasy

    For those not aware the ESP8266 is a small, quite powerful Wifi microcontroller. It is now able to be programmed via Arduino and has replaced Arduinos in most of my projects (even ones not requiring Wifi).

    There are alot of impressive features:
    • Wifi!
    • Cheap! ~$5US for dev kit
    • Possible to reload firmware wirelessly.
    • 4M Flash memory
    • Can run a webserver/MQTT/etc.
    • 1 Analog In (poor)
    • PWM support on all pins.
    • I2C, OneWire, 2 UART, SPI
    • 12 GPIO on NodeMCU Dev kit.


    One very easy way to use with (with no plugins!) is the ESPEasy project. It's a sketch you program on to the ESP8266, and the configure via web browser.
    It supports lots of expansion without any extra coding currently.

    http://www.esp8266.nu/index.php/Main_Page
    http://www.esp8266.nu/index.php/ESPEasy
    There are two options for integrating with HS: MQTT (using MQTT plugin) and HTTP (JSON inteface).

    To setup the JSON interface with HS Do the following:
    Go to the config menu of the ESPEasy web config and set:
    Protocol: Generic HTTP
    Controller IP: YourHSIP
    Controller IP: YourHSPort (default: 80)

    Then goto Tools-> System Advanced
    Publish Template: JSON?request=controldevicebyvalue&ref=%id%&value=%value%

    Create a virtual device in homeseer, and note the device ref #. Enter this number as the "idx" number when you create a new sensor in the ESPEasy menu. Keep in mind it is the value that will be updated.

    There's alot of different ESP8266 products out there, but for something Arduino like I'd suggest the NodeMCU dev kit (V1.0) or the WeMos D1 mini.

    If there is alot of interest I may look at a more detailed guide at some point or it could be possible to modify ESPEasy to support HS more directly.
    Last edited by AllanMar; July 1, 2016, 01:52 PM.

    #2
    I agree that they are great devices and that ESPEasy is making adding devices to your system a breeze but there are also some minus points.
    That is, the ESP is rather power hungry. Mostly due to WiFi usage. Just up and running without any special power management it consumes 100mA or more. Secondly they are rather picky on the supply power when programming. You need a good quality power supply and a few 100uF capacitors on the power line close to the CPU to prevent it from a constant watchdog reboot. These problems occur often with the ESP-01 and when using a breadboard test platform.

    However if you are aware of this then you can solve problems quickly and start using these fun devices
    - Bram

    Send from my Commodore VIC-20

    Ashai_Rey____________________________________________________________ ________________
    HS3 Pro 3.0.0.534
    PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

    Comment


      #3
      Originally posted by AshaiRey View Post
      I agree that they are great devices and that ESPEasy is making adding devices to your system a breeze but there are also some minus points.
      That is, the ESP is rather power hungry. Mostly due to WiFi usage. Just up and running without any special power management it consumes 100mA or more. Secondly they are rather picky on the supply power when programming. You need a good quality power supply and a few 100uF capacitors on the power line close to the CPU to prevent it from a constant watchdog reboot. These problems occur often with the ESP-01 and when using a breadboard test platform.

      However if you are aware of this then you can solve problems quickly and start using these fun devices
      People online have done some pretty good analysis of ESP8266 power usage, and as you mention it isn't good. I would agree this is more to do with Wifi than anything else, really Wifi is a terrible choice for what we end up doing with it for home automation, in many cases the overhead is greater than the data. But it's simple and easily integrated so that seems to overcome the shortcomings and I expect it will remain popular.

      I wouldn't recommend ESP8266 for anything battery powered, most of the power quality issues aren't as severe once you use a dev board (like nodemcu or wemos). I personally don't think the ESP-01 is worth it, I have a few but pretty much only use ESP-12's now.

      Comment


        #4
        Originally posted by AllanMar View Post
        For those not aware the ESP8266 is a small, quite powerful Wifi microcontroller. It is now able to be programmed via Arduino and has replaced Arduinos in most of my projects (even ones not requiring Wifi).

        There are alot of impressive features:
        • Wifi!
        • Cheap! ~$5US for dev kit
        • Possible to reload firmware wirelessly.
        • 4M Flash memory
        • Can run a webserver/MQTT/etc.
        • 1 Analog In (poor)
        • PWM support on all pins.
        • I2C, OneWire, 2 UART, SPI
        • 12 GPIO on NodeMCU Dev kit.


        One very easy way to use with (with no plugins!) is the ESPEasy project. It's a sketch you program on to the ESP8266, and the configure via web browser.
        It supports lots of expansion without any extra coding currently.

        http://www.esp8266.nu/index.php/Main_Page
        http://www.esp8266.nu/index.php/ESPEasy
        There are two options for integrating with HS: MQTT (using MQTT plugin) and HTTP (JSON inteface).

        To setup the JSON interface with HS Do the following:
        Go to the config menu of the ESPEasy web config and set:
        Protocol: Generic HTTP
        Controller IP: YourHSIP
        Controller IP: YourHSPort (default: 80)

        Then goto Tools-> System Advanced
        Publish Template: JSON?request=controldevicebyvalue&ref=%id%&value=%value%

        Create a virtual device in homeseer, and note the device ref #. Enter this number as the "idx" number when you create a new sensor in the ESPEasy menu. Keep in mind it is the value that will be updated.

        There's alot of different ESP8266 products out there, but for something Arduino like I'd suggest the NodeMCU dev kit (V1.0) or the WeMos D1 mini.

        If there is alot of interest I may look at a more detailed guide at some point or it could be possible to modify ESPEasy to support HS more directly.
        Allan thanks for the instructions above. I got my NodeMCU dev board up with ESPEasy. I got a DHT11 temp/humid sensor reporting good values but cant seem to get into Homeseer device ref id 1135. I following your JSON command line under published template.

        No error messages in HS log either.

        Can you help where I may have gone wrong?

        Thanks

        Will
        Attached Files

        Comment


          #5
          Hmm, I suspect it's not handling the fact that a dht reports two values. I never did any testing with it.

          I'll have to give it a try later and let you know.

          Comment


            #6
            Thanks for your help. I suspect I am not posting the data correctly. I tried a single variable temperature sensor and a switch.

            Neither report values in HS3 virtual devices.

            Still picking away at it
            Attached Files

            Comment


              #7
              Well that does help rule that out.
              On ESPEasy goto Tools->Advanced, set the debug level to 4 and then
              Tools->Log (for web log) or Serial console for serial log and post the log where it attempts to send your data.

              Comment


                #8
                Got it! I needed to work on my virtual devices to accept a range of values. As soon as I setup the device the data started rolling in.

                Haven't figured out the DHT11 values yet but now that I see how it works it gets me further along.

                Thanks for the pointers. This is slick.

                Will

                Comment


                  #9
                  Is there a particular Dev Kit you would suggest? I see 4-5 of them from various suppliers (Adafruit and others).

                  --Dan
                  Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                  Comment


                    #10
                    I like the NodeMCU v1 or Wemos D1 mini. They're cheap.

                    Comment


                      #11
                      My Nodemcu arrived and I was able to install ESPEasy. I have it reading a DS18b20 and it seems to be accurate.

                      Next step is getting the value into HomeSeer. I have never created a virtual Device before in Homeseer and was hoping you could explain the steps needed to create and how to configure it so I can send the temperature result.

                      Thanks

                      Comment


                        #12
                        Is anyone having connectivity issues with ESPEasy running on Wemos Mini D1?

                        I have used a few of these Wemos devices with my own custom sketches and they are working fine.
                        So I thought I would have a play with ESPEasy. I installed it and was able to configure it via the built-in web based config pages.
                        However, often the UI stops responding and I find I have to login again.

                        Leaving a ping running I can see that often the ping time goes as high as 500ms and then stops responding. It comes back momentarily before disappearing again.
                        It's unusable as it is now.

                        (This is ESPEasy Build 108)
                        Anyone had this or have any ideas?

                        Thanks.
                        Last edited by JimBob; August 24, 2016, 10:43 AM. Reason: Added ESPEasy build version

                        Comment


                          #13
                          Answering my own query here...

                          I updated my Arduino IDE libraries (including the pubsubclient and arduinojson) and I was then able to compile R120 of ESPEasy. It was previously failing to compile.

                          Downloading this to the Wemos seems to have sorted it. The UI is responsive and pings down to expected values of a few ms. Fingers crossed it keeps behaving itself.

                          Comment


                            #14
                            Originally posted by will40 View Post
                            Got it! I needed to work on my virtual devices to accept a range of values. As soon as I setup the device the data started rolling in.

                            Haven't figured out the DHT11 values yet but now that I see how it works it gets me further along.

                            Thanks for the pointers. This is slick.

                            Will
                            For my virtual device it is only showing humidity. Temp and humidly are posting but only the last one shows. Without a firmware change I don't see a work around. I will try some DS18B20 (temp only) sensors.
                            Attached Files


                            ~Bill

                            Comment


                              #15
                              DS18B20 reporting to HS3 is working quite well.
                              Attached Files


                              ~Bill

                              Comment

                              Working...
                              X