BizHostNC IT & Networking

Monitor your Home Lab Temperature & Humidity Environment with ESP8266 and DHT11 Sensor

Ever wanted to monitor ambient temperature and humidity in your home lab or server room, but didn’t want to spend money on something extravagant? Most guys who work with electronics already have these parts laying around whether in a kit, or just deals. Otherwise you can get these parts for under 10$ and put this simple piece of hardware anywhere you want to monitor temperature and humidity. The footprint of the hardware is quite small, and we have implemented ESP8266 deep sleep to reduce the amount of power usage as well. Our setup is monitoring the temperature in our home lab, which has quite a few electronics running and we like to know what the ambient is to ensure our GPU and CPU temps are stable. We also have this same setup running at multiple businesses on closed networks for their automation.

The code I am using is written in the Arduino IDE, so you will have to download it. The code is quite simple, it will read the data from the sensor; then send that data to a ThingSpeak channel. This will allow you to aggregate the data somewhere central, without fighting a bunch of local servers and code. It works great, and allows you to send your data and deep sleep for your required delay. We will add more technical data and information as this post matures.

You will need to have, or order the following parts:

It’s quite simple, wire up your ESP-8266 NodeMCU with 3v to the positive pin, Ground to the Negative (-) pin, and then your Sensor pin will go to D5 on your NodeMCU.

Then, you will need to open up your Arduino IDE and install the DHTesp Library. There will be two DHT libraries, but we want the one that has ESP8266 in the description. You may also need to add the ESP8266 to your board manager if you have not already, follow the instructions here: https://arduino-esp8266.readthedocs.io/en/latest/installing.html

Now that you have your sensor wired up, and your code in the Arduino IDE. You will need to fill in the settings (WiFi, and ThingSpeak). Sign up on thingspeak and create your channel, then add the API key to your code.

Once you are signed in, click on Channels > My Channels.

Then, you click on “New Channel”

Insert your information (Our code is setup as Temperature in Field 1, Humidity in 2)

Click on API Keys, and copy/paste your Write API key to your Arduino script.

 

When you are doing your upload, please make sure your deep sleep pin is disconnected. To enable the deep sleep mode, you will need to connect D0 to RST pin. It will be GPIO 16 (known as D0 on NodeMCU). You CANNOT upload your script to your ESP8266 with these pins connected, so simply remove for flashing then reconnect once it’s complete.

Now that everything is setup, you can 3D print a case to make it look pretty or just simply leave it how it is and stash it somewhere with a 5V power source. Mine is powered from a USB port on one of my towers, and I mounted it in a case from Thingiverse on the wall away from any of my PC fans. Then monitor your data!

 

Original Code we adapted from: https://github.com/squix78/esp8266-dht-thingspeak-logger

When is it time to change your web hosting provider?

Are you thinking it’s time to transfer away from these cheap or free web hosting providers and upgrade to a professional managed service? We offer FREE transfer of your website from your current hosting to our servers! If you are experiencing lots of errors, bots or security issues then you are likely using a cheap service that is not being properly managed. Other issues could be running out of storage space, bandwidth, or just plain hosting with very few features. BHNC offers tons of features for your business, with our cPanel control panel you can literally take control of every aspect of your hosting account. View some of our features by reviewing the “Managed Hosting” area, or simply send us an email via the Contact page.

Does your webhosting provider offer these?

• Usable web design tools. And an updated server software.

• E-commerce advice as well as options likes form remailer, chat, or bulletin board.

• Remote access. Allows access to and uploading of files from anywhere in the world.

• Unparalleled services. Answers to technical questions as well as solutions to problems. Customer service must be 24×7 in actuality.

• Plan options.

• Sufficient disk space and bandwidth.

• A 24×7 uptime.

• A free trial option.

• Quality Internet connection plans. The host should be clear about what they can offer for example, if they offer T1 then it allows only 1.544 Mbps while an OC-256 allows 13,000 Mbps.

• Server speeds that are not hindered by the number of sites being accessed simultaneously. Ping a site and see the response time.

• Processors that can take immense load and not slow down the site’s transmission.

• Tight and dependable security measures. Ensure that your site will be protected from unwanted intrusions. Security protocols should be clearly outlined. The hosting company must have plans in place to upgrade and maintain security measures.

Sadly a web hosting dream can become a nightmare when: the host does not keep promises, the site outgrows the hosting plan, there are no responses to your e-mails or phone calls of distress, the charges are way beyond your budget, the server has a virus or other problems.

Do not panic, take a breath and try and solve hosting problems by using web hosting talk forums. These are interactive and you will get many suggestions and offers within a minute or two of posting your dilemma.

Do your homework well visit one of the links below it will narrow as well as facilitate your work.

Web hosting is not difficult if you plan well, know your options, and keep abreast of technological developments. BizHostNC is here to make your web hosting adventure much easier.

Top