element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Noob questions: Arduino Wi-Fi thermometer?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 7 replies
  • Answers 4 answers
  • Subscribers 393 subscribers
  • Views 918 views
  • Users 0 members are here
Related

Noob questions: Arduino Wi-Fi thermometer?

sammybeany
sammybeany over 6 years ago

Apologies if this is in the wrong spot, I had some trouble navigating around the element14 site.

 

TL;DR summary: I need a simple way to get temperature and humidity readings into a PHP script. I want it to be powered by USB, but I want the data to be transferred over wi-fi. Where should I start?

 

Full story:

I have a tidy little PHP website I've made that pulls data from my Nest Thermostat via the unofficial API and generates this glanceable graph to show the current comfort level in my living room:

 

image

 

This is useful to me and I'm happy with it, but I want to enhance it with temperature and humidity readings from my second floor and my basement.

 

Nest makes their own external sensors, but they inexplicably lack a humidity reading. They're also battery powered, which I don't like, and they cost $40 each. I feel like I'd be better off trying to roll my own solution here.

 

I have extra USB charging outlets in the spots where I'd like to stash these sensors, so I figure that's the best way to power them.

 

I came across this tutorial, which seems quite close to what I'm looking for: https://www.instructables.com/id/Arduino-IOT-Temperature-and-Humidity-With-ESP8266-/

 

This guide seems to be a few years old, though, and I'm too much of a novice to know if there are ways to simplify and improve it. For one, I don't need data logging, I just need the sensor readings to be available on demand.

 

Any suggestions or ideas?

  • Sign in to reply
  • Cancel

Top Replies

  • neilk
    neilk over 6 years ago +6 suggested
    ntewinkel kindly gave me access to his code and scripts as a starting point for my development of 2 channel ESP8266 based temperature monitoring system, with data sent over wifi to my own server. It's…
  • mp2100
    mp2100 over 6 years ago +5 suggested
    A quick look at that instructables makes me think that method is ok, and not too archaic. The funny thing is, those instructions areusing the esp8266 to add wifi to the arduino. If you really want to use…
  • ntewinkel
    ntewinkel over 6 years ago in reply to mp2100 +5 verified
    mp2100 wrote: ...the esp8266 is smart enough on its own... True, I've used some inexpensive ESP based boards to log data around the house here too. My favourite right now is still the Wemos D1 Mini. It…
Parents
  • mp2100
    0 mp2100 over 6 years ago

    A quick look at that instructables makes me think that method is ok, and not too archaic.  The funny thing is, those instructions areusing the esp8266 to add wifi to the arduino.  If you really want to use the arduino, that’s great.  But the esp8266 is smart enough on its own to grab temperature and humidity from the DHT sensor, and I think, send it to your web client.  And the esp8266 can be programmed using the Arduino IDE, just using the 8266 library added in.

     

    Here’s one example that does that:

    https://learn.adafruit.com/esp8266-temperature-slash-humidity-webserver

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • mp2100
    0 mp2100 over 6 years ago

    A quick look at that instructables makes me think that method is ok, and not too archaic.  The funny thing is, those instructions areusing the esp8266 to add wifi to the arduino.  If you really want to use the arduino, that’s great.  But the esp8266 is smart enough on its own to grab temperature and humidity from the DHT sensor, and I think, send it to your web client.  And the esp8266 can be programmed using the Arduino IDE, just using the 8266 library added in.

     

    Here’s one example that does that:

    https://learn.adafruit.com/esp8266-temperature-slash-humidity-webserver

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • clem57
    0 clem57 over 6 years ago in reply to mp2100

    sammybeany  And alternate method is a Raspberry Pi zero W which can attach the sensors and use WiFi as well. If soldiering not great, MicroCenter has the headers already for a few more dollars.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 6 years ago in reply to mp2100

    mp2100  wrote:

     

    ...the esp8266 is smart enough on its own...

     

    True, I've used some inexpensive ESP based boards to log data around the house here too.

    My favourite right now is still the Wemos D1 Mini. It's super affordable, like seriously less than $3 Canadian these days.

    The ESP-01 in that Adafruit example is more effort to program and more effort to power, so it probably won't save you anything to go that route.

     

    That Wemos board connects directly via USB for power and also to program the board via the Arduino IDE. I used a little old iPhone charger cube to power it where I was reading the temperature.

     

    For sending to your own server, feel free to look through my samples. My server side scripts do more than you need, but it sounds like you can handle the PHP side well enough to just make it do what you need.

     

    This example shows the Arduino side - basically it calls the server script with the current temperature. You should be able to expand it to add humidity without too much pain.

    https://github.com/ntewinkel/electronics/tree/master/ESP-01

     

    Hope that helps!

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 6 years ago in reply to ntewinkel

    The Wemos board is fine - I've actually used a NodeMCU Amica with CP2102 for much the same price for my outdoor solar-powered weather station programmed with the Arduino IDE, and that's been working well for me for a while. Adafruit Feather also has an ESP8266 variety as well. Additionally, Arduino has their own MKR WiFi although I've not tried it.

     

    - Gough

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • sammybeany
    0 sammybeany over 6 years ago in reply to ntewinkel

    Wow, the Wemos D1 Mini looks brilliant. Tiny, cheap, USB and Wi-Fi right on the board. Everything I asked for. I just ordered 3 of them. And I'll definitely be looking at your scripts when my hardware arrives. Thanks!

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube