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. Hardware
  3. esp8266 to dht22

esp8266 to dht22

Scheduled Pinned Locked Moved Hardware
7 Posts 3 Posters 2.6k Views 3 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.
  • Jim DanforthJ Offline
    Jim DanforthJ Offline
    Jim Danforth
    wrote on last edited by
    #1

    Ok. Thought I had ordered a batch of the right stuff, now I can't find a suitable sketch to get me going. I have my gateway talking to a sensbender just fine. Now I want to get the dht22/esp8266 combo going.
    Comfortable with the wiring, and the controller.

    So I just use a sketch like a arduino uno with radio and dht22 sensor, or am I going to have to start all over? Tryng to monitor a greenhouse and we are expecting our first hard freeze tonight.

    1 Reply Last reply
    0
    • korttomaK Offline
      korttomaK Offline
      korttoma
      Hero Member
      wrote on last edited by korttoma
      #2

      Since you are using the ESP8266 you will need to start from the ESP Gateway sketch. You need to treat it as a GW in your controller. Then if you only will have "local" sensor and not connect NRF24L01 or RFM69 you will need to disable radio by commenting out the following like this:

      //#define MY_RADIO_NRF24
      

      Then add the "local" sensor code by transferring all needed parts from the DHT sketch in to your ESP gateway sketch.

      BTW, witch controller are you using?

      • Tomas
      Jim DanforthJ 1 Reply Last reply
      1
      • korttomaK korttoma

        Since you are using the ESP8266 you will need to start from the ESP Gateway sketch. You need to treat it as a GW in your controller. Then if you only will have "local" sensor and not connect NRF24L01 or RFM69 you will need to disable radio by commenting out the following like this:

        //#define MY_RADIO_NRF24
        

        Then add the "local" sensor code by transferring all needed parts from the DHT sketch in to your ESP gateway sketch.

        BTW, witch controller are you using?

        Jim DanforthJ Offline
        Jim DanforthJ Offline
        Jim Danforth
        wrote on last edited by
        #3

        @korttoma right now playing with domoticz. I commented out the radio definition, but it only appeared to run as a server, not look for the real gateway.

        Jim DanforthJ 1 Reply Last reply
        0
        • Jim DanforthJ Jim Danforth

          @korttoma right now playing with domoticz. I commented out the radio definition, but it only appeared to run as a server, not look for the real gateway.

          Jim DanforthJ Offline
          Jim DanforthJ Offline
          Jim Danforth
          wrote on last edited by
          #4

          @Jim-Danforth Here is the serial output (base is my outer SSID):
          connected with base, channel 6
          dhcp client start...
          cnt
          0;255;3;0;9;TSM:PDT
          chg_B1:-40
          ip:192.168.1.108,mask:255.255.255.0,gw:192.168.1.1

          Jim DanforthJ 1 Reply Last reply
          0
          • Jim DanforthJ Jim Danforth

            @Jim-Danforth Here is the serial output (base is my outer SSID):
            connected with base, channel 6
            dhcp client start...
            cnt
            0;255;3;0;9;TSM:PDT
            chg_B1:-40
            ip:192.168.1.108,mask:255.255.255.0,gw:192.168.1.1

            Jim DanforthJ Offline
            Jim DanforthJ Offline
            Jim Danforth
            wrote on last edited by
            #5

            Still in a holding patterns. In looking at other sketches, and as above I see My_radio being defined. Do I not need to define the esp radio? If not, I don't see how it will know to look for a gateway, ect.
            I really thought this would be the simplest temp/humidity node, with only 2 basic pieces of hardware.
            JimD

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kimot
              wrote on last edited by
              #6

              You do not need MySensors gateway. Use only ESP8266 with ESPeasy "frmware" connected directly through wifi to Domoticz. Create dummy switch to obtain correct free IDX and on ESPeasy webpage create DHT22 sensor with this IDX. If you activate the watchdog to sending once per 5 min, you can work with 2200mAh powerbank one week.
              https://www.domoticz.com/forum/viewtopic.php?t=7815

              Jim DanforthJ 1 Reply Last reply
              0
              • K kimot

                You do not need MySensors gateway. Use only ESP8266 with ESPeasy "frmware" connected directly through wifi to Domoticz. Create dummy switch to obtain correct free IDX and on ESPeasy webpage create DHT22 sensor with this IDX. If you activate the watchdog to sending once per 5 min, you can work with 2200mAh powerbank one week.
                https://www.domoticz.com/forum/viewtopic.php?t=7815

                Jim DanforthJ Offline
                Jim DanforthJ Offline
                Jim Danforth
                wrote on last edited by
                #7

                @kimot Tried that. Ca't get domoticz to see the sensor.

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


                12

                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