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. Development
  3. ESP8266 as WiFi gateway that posts to Thingspeak

ESP8266 as WiFi gateway that posts to Thingspeak

Scheduled Pinned Locked Moved Development
6 Posts 3 Posters 2.8k Views 5 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.
  • LendogL Offline
    LendogL Offline
    Lendog
    wrote on last edited by
    #1

    Thanks to Hek/Yveaux/nikil511 I’ve got an ESP8266 wifi gateway that posts sensors readings directly to thingspeak without need for a computer :)

    At the moment my code is setup for sending temperature and wind speed readings to two separate thing speak channels. It could be easily modified for single or even more channels or diffrent data

    I have only changed the original Esp8266Gateway.ino code but have included the GatewayUtil.h in it for completeness. Also note it requires all the same mysensor library’s etc.

    The code can be found here
    https://github.com/Lendog/Mysensors-ESP8266-Wifi-gateway-post-to-thingspeak

    One thing to note: is thingspeak requires 15 second wait before readings. This is handled on the sensor side and not on the esp8266. I think readings just don't get posted if it’s less than 15 seconds, this is not critical in my application so i haven’t worried about investigated alternative solutions.

    Would be awesome if part of the code gets integrated into the original, as posting to thingspeak maybe beneficial to other users.

    also my wificheck is handled slightly differently. I've heard the esp locks up if no valid connection and http post occurs. Haven’t tried it, I just figured it’s good to check first before posting.

    Anyway hope someone else may find this useful.

    jumpingJ 1 Reply Last reply
    1
    • LendogL Lendog

      Thanks to Hek/Yveaux/nikil511 I’ve got an ESP8266 wifi gateway that posts sensors readings directly to thingspeak without need for a computer :)

      At the moment my code is setup for sending temperature and wind speed readings to two separate thing speak channels. It could be easily modified for single or even more channels or diffrent data

      I have only changed the original Esp8266Gateway.ino code but have included the GatewayUtil.h in it for completeness. Also note it requires all the same mysensor library’s etc.

      The code can be found here
      https://github.com/Lendog/Mysensors-ESP8266-Wifi-gateway-post-to-thingspeak

      One thing to note: is thingspeak requires 15 second wait before readings. This is handled on the sensor side and not on the esp8266. I think readings just don't get posted if it’s less than 15 seconds, this is not critical in my application so i haven’t worried about investigated alternative solutions.

      Would be awesome if part of the code gets integrated into the original, as posting to thingspeak maybe beneficial to other users.

      also my wificheck is handled slightly differently. I've heard the esp locks up if no valid connection and http post occurs. Haven’t tried it, I just figured it’s good to check first before posting.

      Anyway hope someone else may find this useful.

      jumpingJ Offline
      jumpingJ Offline
      jumping
      wrote on last edited by
      #2

      @Lendog Hello, is the sketch compatible with Mysensosr 2.0 ?
      thanks

      Raspberrry PI3 - Domoticz
      ESP8266 GW - MySensors 2.1.1

      1 Reply Last reply
      0
      • LendogL Offline
        LendogL Offline
        Lendog
        wrote on last edited by
        #3

        It should work. If it doesn't let me know and I may have a look at it.

        But I've been happy with it, once i got it sorted I haven't looked at the code since. Haven't needed to :)

        1 Reply Last reply
        0
        • L Offline
          L Offline
          leeoz
          wrote on last edited by
          #4

          Hi. It doesnt work with mysensors 2.0 compling it. Any chance to covert it to be able to compile with 2.0 version?

          1 Reply Last reply
          0
          • LendogL Offline
            LendogL Offline
            Lendog
            wrote on last edited by
            #5

            Thanks. Might try to updated it in the next few days if I get a chance. Think the original library I used was 1.5.1 if that's any help

            1 Reply Last reply
            0
            • LendogL Offline
              LendogL Offline
              Lendog
              wrote on last edited by
              #6

              I've created a new branch at

              https://github.com/Lendog/Mysensors-ESP8266-Wifi-gateway-post-to-thingspeak/tree/My-sensors-library-2.0

              I feel a bit slack not properly testing it yet and putting it online, but it compiles fine just haven't loaded it on or tested with sensors. Might need to look into updating a sensor or 2 to run on the new libary

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


              10

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 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