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. Troubleshooting
  3. nodeMCU, MY_GATEWAY_ESP8266 and Temp Sensor

nodeMCU, MY_GATEWAY_ESP8266 and Temp Sensor

Scheduled Pinned Locked Moved Troubleshooting
22 Posts 6 Posters 8.2k 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.
  • korttomaK Offline
    korttomaK Offline
    korttoma
    Hero Member
    wrote on last edited by
    #12

    @mysensors-6043 said:

    Do not use:

     delay(1000);
    

    Instead try:

    wait(1000);
    
    
    • Tomas
    1 Reply Last reply
    0
    • scalzS Offline
      scalzS Offline
      scalz
      Hardware Contributor
      wrote on last edited by
      #13

      @mysensors-6043

      As @Yveaux said, it can be lib compatibility with esp.
      So If you want to try, I use this lib for ds18b20, with other mcus : http://www.pjrc.com/teensy/td_libs_OneWire.html (his stuff is neat).
      I have not tried with esp8266 though, but i'm pretty sure it works ;) there are defines for esp8266 which are not present in mysensors git..

      1 Reply Last reply
      0
      • mysensors-6043M Offline
        mysensors-6043M Offline
        mysensors-6043
        wrote on last edited by
        #14

        ok, i'll try, hmmmm how to import / use this lib ?

        1 Reply Last reply
        0
        • scalzS Offline
          scalzS Offline
          scalz
          Hardware Contributor
          wrote on last edited by scalz
          #15

          @mysensors-6043
          how did you import Mysensors? ;) that's the same for every lib :)
          So if you don't find it in lib manager, then download it and unzip it in your lib folder. restart arduino. go to examples. simple.
          You will find this one in lib manager (look at the one with Paul PaulStoffregen contributor). or download it from his git

          1 Reply Last reply
          0
          • CravecodeC Offline
            CravecodeC Offline
            Cravecode
            wrote on last edited by
            #16

            @mysensors-6043,
            Have you been able to confirm that you get temperature readings on the sensor? I would try to simplify your sketch to rule things out.

            Here's what I'd do, in the following order:

            • Remove all MySensors related code and just get the sensor reading to the serial monitor.
            • I see you're looping over several temperature sensors on the node, simplify this, only read one for starters.
            • Verify your gateway is on the network by using telnet or netcat. I.e.: nc xxx.xxx.xxx.xxx 5003
            • Try just getting your node to "present" to the gateway. Reading the sensor debug via the serial monitor and watch the gateway via netcat.
            1 Reply Last reply
            0
            • mysensors-6043M Offline
              mysensors-6043M Offline
              mysensors-6043
              wrote on last edited by
              #17

              Hi, yes, the Hardware is ok. running a Dallas example script shows the temperature from the sensor.
              The Gateway is on the Network, I see a DHCP request and get Messages on the iobroker.

              1 Reply Last reply
              0
              • CravecodeC Offline
                CravecodeC Offline
                Cravecode
                wrote on last edited by
                #18

                @mysensors-6043,
                The sketch you posted looks like you combined the sensors with the NodeMCU, is this true? Is this NodeMCU acting as a gateway as well?

                1 Reply Last reply
                0
                • mysensors-6043M Offline
                  mysensors-6043M Offline
                  mysensors-6043
                  wrote on last edited by mysensors-6043
                  #19

                  yes, but i'm not shure whether this is correct
                  All I Need is a sensor that sends the temperature via WLAN to UDP Port 5003 of the iobroker (acting as Controller)

                  Could also be an Arduino Nano with a Radio, e.g. NRF24L01

                  1 Reply Last reply
                  0
                  • CravecodeC Offline
                    CravecodeC Offline
                    Cravecode
                    wrote on last edited by
                    #20

                    @mysensors-6043,
                    The normal setup involves 3 pieces:

                    1. The sensor (aka node) emitting data via RF using something like a NRF24L01
                    2. A gateway that receives the sensor data via the RF module (NRF24L01) and sends it to a controller over ethernet or wifi.
                    3. A controller to manage connected nodes and present data to the user.

                    It seems like you're combining the sensor and gateway into one device. If this is the case, I think you can comment out the #define MY_RADIO_RFM69 line as there is no radio connected. I don't know how this plays into the registration process of a sensor. There is no ID getting associated to the sensor because this is a gateway.

                    Maybe someone else can chime in who knows whether it's okay to combine the gateway and sensor into one device. If so, how is registration and ID assignment handled?

                    @mysensors-6043,
                    Post a updated version of your sketch.

                    1 Reply Last reply
                    0
                    • mysensors-6043M Offline
                      mysensors-6043M Offline
                      mysensors-6043
                      wrote on last edited by
                      #21

                      ok, looks better, I included the library from Paul Stoffregen and commented out #define MY_RADIO_RFM69.
                      So far no exception. I still can join my home WLAN, but sensor data can not be read.
                      All I Need is a temp sensor and send the data do a iobroker instance.

                      The question is whether I'm on the right track with a nodeMCU ?

                      1 Reply Last reply
                      0
                      • mysensors-6043M Offline
                        mysensors-6043M Offline
                        mysensors-6043
                        wrote on last edited by
                        #22

                        Hey Folks
                        Thank's a lot, the issue is solved. nodeMCU as a gateway measures the temperature, pass it over to an iobroker / mysensors instance. There with a JavaScript, I set a Homematic System Variable which is displayed in the iPad.
                        So now, I know, when the coffee machine has the right temp.

                        cheers

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


                        19

                        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