Contact

Most likely the path in the cronjob is incorrect. Make sure that the file really exists in the path you provide. Copy and paste the whole line (remove * symbols etc) and see what happens.
Start editing a page that will display the graph. The icon you need to click is here:   black_sun
First make sure that everything is wired correctly. Take a look at the wiring pictures and double check. Afterwards run the script manually and check if any readings are taken. Double check the plugin shortcode. Check if the readings are stored in the database. Do that by typing mysql -u root -p and then type in your mysql password. Type in show databases;which will display all databases, select the WordPress database. In my case it is named WordPressDB, I can select it with use WordPressDB;.  The table that stores all the readings is named temperatures. Display everything in it with select * from temperatures;. It should display all the readings taken. If all of the above works, it is very likely that you have a faulty sensor.
You can contact me via Skype (my username is peterslo85) or email me at . Alternatively you can use the comment section below to write a public comment. I will do my best to help you out with any problems you might encounter. Do not hesitate to contact me, together we can fix any problems you might run into.    
  • Everything went smooth following the tutorial until I had to install the MySQL-python module. this is what I am getting:

    easy_install MySQL-python
    Traceback (most recent call last):
    File “/usr/local/bin/easy_install”, line 9, in
    load_entry_point(‘distribute’, ‘console_scripts’, ‘easy_install’)()
    File “/usr/local/lib/python2.7/dist-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py”, line 519, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
    File “/usr/local/lib/python2.7/dist-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py”, line 2629, in load_entry_point
    raise ImportError(“Entry point %r not found” % ((group, name),))
    ImportError: Entry point (‘console_scripts’, ‘easy_install’) not found

    I am not proficient in Python setup on Linux, so am dead in the water.

    The weather station I am setting up extends what you have by adding an atmospheric pressure sensor and an anemometer. I will send you the details of the new hardware setup and the tweaks to the code to add them to new tables.

    Thanks in advance if you have any idea of how to fix my little snafu.

    –alessandro

    • peterk

      We have managed to resolve this issue via email. If anyone else runs into such problems try the following:

      Check your /usr/bin and /usr/local/bin for easy_install installations and remove any old script:

      sudo rm -f /usr/bin/easy_install*

      sudo rm -f /usr/local/bin/easy_install*

      Download and run distribute:

      curl -O https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.py

      sudo python distribute_setup.py

      sudo rm distribute_setup.py

      Try again, and enjoy. E.g.:

      sudo easy_install pip

  • David

    Hello,

    This is an incredible post that I’m trying to do, but I need a one spec more (if is possible) my programming level is 0 and i want to do is that, when the temperature exceeds a x degrees, the Rasp, sends me an email notification, is possible to do?

    A lot of thanks

    • peterk

      Hi there David,

      sure it is possible. If you managed to get the station up and running you need to do two things. One is to set up the email – follow the tutorial http://askubuntu.com/a/12933.
      Afterwards you only need to put an if clause which checks if the temperature is above X degrees. If true, then send an email.

      Give it a try and contact me if you’re having problems – we will solve them together! Good luck!

  • Steve

    Hi,

    I’ve unpacked the phpmyadmin files but when it says to login with your details i don’t know what to type in.

  • Christian

    Hello,

    can you please Write a German Tutorial ? My English is not so good.

    Best Regards, Chris

  • Kristian

    root@raspberrypi:/var/www# wget http://www.raspberryweather.com/wp-content/uploads/2015/02/phpMyadmin-4.3.9-all-languages.tar.gz
    –2015-10-29 19:42:31– http://www.raspberryweather.com/wp-content/uploads/2015/02/phpMyadmin-4.3.9-all-languages.tar.gz
    Resolving http://www.raspberryweather.com (www.raspberryweather.com)… 89.212.138.37
    Connecting to http://www.raspberryweather.com (www.raspberryweather.com)|89.212.138.37|:80… connected.
    HTTP request sent, awaiting response… 404 Not Found
    2015-10-29 19:42:32 ERROR 404: Not Found.

  • Kristian

    hi.

    when i try to get the phpMyadmin.

    it just say this ?
    what did i do wrong ?
    im lvl 0 too 🙂

    can u help me out ?

  • Kristian

    ok now it work.

    it need to be with BIG letters as u write 🙂

    thx the help 😀

    love this projekt !!

    • peterk

      Glad to hear that! Thanks, hope you finish the whole process 🙂

      • Kristian

        hi again.

        can u add me on skype ?

        as i think i need some more help.

        and dont want to fill this hole site ?

        i sent a invite to u ? :/

  • First of all I would like to thank you for such a clear step by step procedure for setting up this station.
    I am able to get as far as pasting my IP and PHP Admin to my browser but I get a 404 along with this message..
    Apache/2.2.22 (Debian) Server at 192.168.1.4 Port 80
    I cannot see any SQL info other than a table setup. If I try to set up WordPress I get an error message.

    • peterk

      Hi Terry!

      There is just too much problems with phpMyAdmin, so I’ve decided to take another route.
      For anyone else having difficulties – now it should be much easier to create a database without phpMyAdmin.

  • Hi I have gone though the setup of your weather pi system. All is working.

    In want to add more than one temperature sensor. I have hacked Perl for year but this is my first python hack. do setup the array to access more than one sensor? also were is the code that places it in the data base. I am going to have to add fields to the db etc to accommodate that..

    I know that there are a lot of changes to be made in the wp module as well to read more than one value..

    Great project

    Thanks for the help.
    Shanta

    • peterk

      Hi Shanta, very glad to hear that everything is working fine! Also thank you for your kind words.

      The table for storing temperatures is stored in the same folder as the script that reads the temperature/humidity. You can modify it all you want, its very basic.

      Yes, you can add multiple sensors, but I do not cover that part at the moment. Which sensor are you using?

  • Michiel

    hi,
    just setup you great tutorial and now have the weatherstation working.
    since i have a bmp180 i wanted to add the presure too.
    mad this work by testing the scripts by hand.
    however when using the forked raspberry-weather scripts from /root/temp/Raspberry-weather i get the messag no WordPressDB available….

  • Jason Borneman

    How much change to these instructions and hardware needs is there to support the newer Raspberry Pi 3 Model Bs?

    • peterk

      Absolutely none! This site is running on a Raspberry Pi 3 and all is working fine.

  • conception

    Hi
    Every time I want to test the python getInfo.py script, to see if the wiring is ok it just shows this:
    root@raspberrypi:~/Raspberry-Weather/production# python getInfo.py
    Traceback (most recent call last):
    File “getInfo.py”, line 9, in
    import MySQLdb as mdb
    ImportError: No module named MySQLdb

    • peterk

      You need to install it by typing in easy_install MySQL-python. It should work afterwards.

  • MRC

    With the recent update (Jessie?), I’m stuck.
    This no longer works: /etc/apache2/sites-available/default….only 000-default.conf and default-ssl.conf and those don’t have the same lines. Only apache2/apache2.conf has syntax that resembles the instructions.

  • I am getting a “NameError: name ‘root’ is not defined” when I run sudo python getInfo.py. I followed the tutorial and the DB username was set to root (I logged in to MySQL with it successfully).

    • peterk

      Hmmm…. So you are able to log in mysql via terminal, but not by using the script? Did you do any changes to the script, apart from setting the root password?

      • No, I didn’t change anything. What does ROOT#!/usr/bin/python define? Just where python is? The error is at line 1, which would be this part of the code. Thanks.

        • peterk

          Please add me to peterslo85 on skype, it will go faster 🙂

  • John Paul

    When setting up the crontab, i put in 0,30 * * * * /usr/bin/python/root/Raspberry-Weather/production/getInfo.py
    and the graph on my website didn’t display anything. I went into my pi and that directory doesn’t exist.

    • peterk

      You need to create that folder first. Afterwards make sure that it contains all the needed files that take the readings and store them in the database.

  • John Paul

    Now the problem is the crontab. it’s not updating like it should be. I have the correct code in there. Any ideas?

    • peterk

      Can you please copy&paste the crontab? Also make sure that it points to the right path (file exists)

      • John Paul

        Got it figured out. The crontab wanted “python” inserted in between the code for time and the code for the directory.

        0,30 * * * * python /directory_example/getInfo.py

  • MRC

    Last paragraph of /raspberry-pi-as-webserver…
    configuration of apache2.conf different than indicated.
    The first two “AllowOverride” are:

    Options FollowSymLinks
    AllowOverride None
    Require all denied

    AllowOverride None
    Require all granted

    the provided image on your site says to change:

    AND

    which are the first and third lines. will try that and see if it works…

  • MRC

    On “create your own wordpress site”
    Everything goes fine until I try to install wordpress installation wizard on the IP of my RasPi. I get the Apache2 Debian Default Page “It works!” but the wordpress wizard is not there

    • peterk

      We’ll solve both problems via email.
      My first guess would be that you probably forgot to unzip the WordPress files to /var/www.

  • Chris Okeefe

    Hi!

    Excited to start this tutorial and build my own PWS!

    Question:

    What would be needed to make this run off solar?

    Can this build include the PI camera?

    How much difficulty would the above add to this build for a noob.

    Email response is preffered. And thank you for such awesome content!

    Thank you!

    • peterk

      Replied on your mail.

      In case anyone else is interested – you could easily run it on a solar panel.
      It’s also possible to include a camera, why not. It would take some modifications of the plugin if you wanted to display the pictures on the site. The code is opensource, so anyone can edit it.

    • peterk

      Replied on your mail.

      In case anyone else is interested – you could easily run it on a solar panel.
      It’s also possible to include a camera, why not. It would take some modifications of the plugin if you wanted to display the pictures on the site. The code is opensource, so anyone can edit it.

  • Hello again Peter. I’m not getting the humidity output on my graph. It looks to me like the plugin code is checking for both in the DB but I am only getting temperature.

    • peterk

      Hi Suzanne,

      hmmmm.

      Are you using the sensor that records humidity?
      If you run the script, does it display the humidity and is it stored in the database?

      Lets start at these three questions and see where they take us.

      • Yes to all.

        • peterk

          Okay, so it has to be something with the plugin. Can you please check the shortcode? Especiall the following part: display=”Both”

          • Suzanne

            That was it – thank you! I’ve finally got the project completely up and running!

          • peterk

            Awesome, very glad to hear it!

  • pakoR

    Hi, amazing tutorial!, I managed to run all the project on my oldest raspberry pi B 256mb and seems to run fine, but I can’t find the Quick Cache plugin on the search of WordPress, it’s still available?

    • peterk

      Hi! So glad to hear that! 🙂

      Looks like Quick Cache got renamed to ZenCache. I have not tried it so far, but I’m guessing it should work.

  • JR

    Great plugin. How do I get the yesterday graph to work as the examples on your page? Is it only to change the “day=”Today”” ? Do you have any more examples of the plugin?

    • peterk

      Yes, its that simple. Change it to yesterday. If I remember correctly you can also put in a date and it should work.

      • JR

        Thanks and for a month?

        • peterk

          Sorry, it is not possible to display monthly readings. I should do that someday….

  • Arthur

    Nice work! Thanks to you I learn so much things about weather and how to measure it!
    I managed to get the python code working including pressure, and it populates the sql database for 3 days now.

    But here is my problem:
    in WordPress, when creating a new page or post, I click on the addon icon to add the shortcode, I save and publish the page/post, and … nothing appears, no graphs, no text, nothing at all :/

    Any suggestions ? (I’m new to WordPress thing by the way, but managed to get all your setup instruction working)

    • peterk

      Great to hear that Arthur!

      Are you using any caching plugins by any chance? Also, try reinstalling the plugin and disabling all other plugins and try again.

      • Arthur

        Yes, I installed CometCache (actual QuickCache name).
        After reading you, I removed plugins, reboot the Pi and reinstall only raspberryweather plugin: same result, nothing to show.
        There is a blanck space corresponding to the chart size, without any data in it.
        By the way, I forgot to mention I changed the sql database name prefix, as I wanted to create multi wordpress site to learn side by side how to use it…
        Then I tried to adapt all variable calls in the script to the right prefix, but still blanck space showing up.

        • peterk

          Anything apart from QuickCache will definitively cause problems.

          Is the table named Temperatures in the same database as WordPress database? If its not then it’s not going to work.

          What if you reinstall WordPress completely and test the plugin first? 🙂

  • As I was doing your “basic settings” step I updated the pi per the commands, and rebooted.

    Reboot appeared to start fine, with the 4 Pi symbols at the top as it booted. Then the screen went black with the cursor in the top left corner, and the screen would not stop blinking.

    This is on a Pi 3 B from Adafruit. Used the pre-installed Raspbian Jessie that comes with their kit.

    • peterk

      That’s too bad Barry. I can’t give you a definitive solution for this, lots of things could be wrong.
      Can you start fresh by downloading NOOBS from raspberrypi.org? You’re at the beginning so it’s not going to be too much work.

  • GD

    I tried loading the pressure plug in and loaded it but when I try and activate it there is a error saying there is a new version and when I install the update it says that plugin files does not exist.
    Thanks Gary

    • peterk

      Try completely removing the plugin and install it again. It should help.

      • GD

        Thanks that did it ! Now I want to find the kitchen sink to click on and display the dummy data ? By the way great tutorial and thanks for all the help !
        Thanks Gary

        • peterk

          No problem Gary, glad to help especially now that you’re so close!

          Take a look at the third FAQ it shows where the icon is.

  • I had to tweek the code to get the readings but now I get this error message Would you explain what I am doing wrong so I can learn please ?

    Pressure = 93556.90 Pa
    Pressure2 = 27.63 In Hg
    Temp = 85.7 Deg F
    Temp2 = 29.8 Deg C
    Humidity = 63 %
    Traceback (most recent call last):
    File “getInfo.py”, line 100, in
    status=readInfo()
    File “getInfo.py”, line 53, in readInfo
    output = subprocess.check_output([“/root/Raspberry-Weather/Adafruit_DHT”, “2302”, “4”]);
    File “/usr/lib/python2.7/subprocess.py”, line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
    File “/usr/lib/python2.7/subprocess.py”, line 710, in __init__
    errread, errwrite)
    File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory

    • peterk

      The last line says that the file or directory does not exist.

      A few lines above you can see a path, /root/Raspberry-Weather/Adafruit_DHT. Does it exist?

  • GD

    I did not mention that I am only using the BMP280 sensor to get my measurements.
    Gary

  • JP

    I don’t know enough about programming to do this myself, but I would like to upload to wunderground.com for pws. they have requirements as displayed on this site. http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol what code would it take to get readings and send it off?

    • peterk

      Took a quick look at the wiki. You would have to modify the script that gets the readings. After they are saved you would need to build a URL according to their specification. Afterwards you’d have to call the URL.

      Sounds easy, but it might take some time to figure everything out.

    • peterk

      Open the getInfo.py file. On the very first line paste:
      import requests

      Scroll down to the line that says:
      print “Saved temperature”

      Below that line paste the following:

      page=requests.get(“https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=YOUR_ID_HERE&PASSWORD=YOUR_PASSWORD_HERE&dateutc=now&tempf=”+str(temperature)+”&softwaretype=vws%20versionxx&action=updateraw”)

      You have to register https://www.wunderground.com/personal-weather-station/signup.asp to get the username and password.

      • JP

        Thanks a lot peter. this is great!

      • JP

        tried that and this is what i’m getting

        File “getInfo.py”, line 37
        page=requests.get(“https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?

        SyntaxError: EOL while scanning string literal

        • peterk

          You did not paste the whole line. Compare it with mine. It has some other text after the question mark and ends with “).
          Paste it again, make sure that it’s whole and on one line.

  • Josh

    Hi! Your tutorial seems awesome. My programming skills is a level 0. I’m about to start the project, but before I do I was wondering if it was possible if there was a way to incorporate an anemometer like this one: https://www.adafruit.com/products/1733 it would be awesome if it was possible but I would not know how to do it at all.

    Thanks. Josh

    • peterk

      Hi Josh,

      thanks, it means a lot to me 🙂

      I’m not sure because I haven’t ever tried using this sensor. Alesssandro started a similar thing and modified my code to display pressure, but he did not do the wind sensor yet – more info http://www.raspberryweather.com/pressure-and-wind-expansion/.

      • Josh

        Yeah I’m definitely adding that too. If someone can get that working then it would be almost a fully equalized station. I would totally do it if I knew how. Like I said my coding skills are a complete 0. But I appreciate everyone’s work on this. It’s awesome that everyone wants to share their work and knowledge on all of this. Thanks again!

  • Tommy

    Hi, just to say my device isn’t 28* and appears as 10-*
    It’s a DS18S20+ from farnell # 2519401
    temperature is read fine.

    pi@raspberrypi:/sys/bus/w1/devices/10-000802e88a5c $ ls
    driver id name subsystem uevent w1_slave

    • peterk

      Thanks for that Tommy. I did not know that. Looks like I’ll have to update the site a little bit in the following days.

  • Josh

    Hi Peter, After I install apache I need to remove the default index. But when I paste the command it says no such file or directory. Is there another command I need to run to get into the directories first?

    pi@raspberrypi:~ $ rm /var/www/index.html
    rm: cannot remove ‘/var/www/index.html’: No such file or directory
    pi@raspberrypi:~ $ sudo rm /var/www/index.html
    rm: cannot remove ‘/var/www/index.html’: No such file or directory
    pi@raspberrypi:~ $ pi@raspberrypi:~ $ rm /var/www/index.html
    -bash: pi@raspberrypi:~: command not found

  • Josh

    Never mind I figured it out the actual directory is /var/www/html/index.html

    • peterk

      Glad you sorted it out yourself 🙂

  • Dave

    Hi Peter,

    Just a small note – you change the database name slightly in between your code and the site. The code uses “WordPressDB” and the site says “WordPressDB”. I don’t know if case is important as I made the changes on the way through to keep it consistent.

    Thank you for all your hard work on this site and software!

    Cheers,

    Dave

    • Dave

      Sorry for this second post, but in my previous comment the first mention of “WordPressDB” was automatically capitalised for me! I did not type it this way. Perhaps this is what has happened elsewhere 🙂

      I am typing the following in all lowercase to see what happens: “wordpressdb”.

      • peterk

        Thanks for the warning. I’ll fix it so its consistent over the site.

  • Anthony

    Hi, I am a little confused with the wordpress database setup at http://www.raspberryweather.com/create-your-own-wordpress-site/ as I have created the database using CREATE DATABASE WordPressDB; however there are no instructions for table & field names. Therefore following the instructions at http://www.raspberryweather.com/raspberry-weather-graph/. when i type select * from temperatures; i get TABLE WordPressDB.tempratures does not exist.

    • peterk

      The tables are created automatically, when you run the python script for reading temperatures. You need to run in the first time, before checking if the readings are stored.

  • A tutorial guide on how to push data to a local MS SQL Server would be super useful…I managed to do so after a few hours of research and programming.

    • peterk

      Hi Bradley,
      I did not write a how to for storing readings, because it is done automatically. When the python plugin is run, it takes a reading and stores it by itself.

  • Hi, how adapter sensor BMP280? Thank you!

  • Qukoyk

    Hello Peter,

    Thanks for your awesome tutorial.
    I built it successfully, everything runs perfect except the auto-runing, eh, the part of cronjob.
    Nothing wrong with directory which I can run the getInfo.py manually and saved to the database successfully. The code in crontab are as same as the tutorial, unfortunately it didn’t work.

    I need your help!

    Qukoyk

    • peterk

      Hi Qukoyk,

      please copy the whole line (skip the * etc) and run it in the terminal. Does it save the readings?
      I’ve seen cases, where the cron job had an incorrect path – the file itself did not exist.

      • Qukoyk

        This is the code in crontab:

        TZ=’Asia/Tokyo’
        0,30 * * * * /usr/bin/python /root/Raspberry-Weather/production/getInfo.py

        I can run “python /root/Raspberry-Weather/production/getInfo.py” successfully. It save to database.

        But cron job didn’t save readings.

        • peterk

          You are 100% sure that if you run the following command manually:
          /usr/bin/python /root/Raspberry-Weather/production/getInfo.py

          that the data is stored?

          What if you remove the TZ line and see if that helps.

          • Qukoyk

            I run that command with sudo successfully and the data was stored too. Also when I “sudo su” first, turn “$” to “#”, the command worked too.
            But if I removed sudo, it said “[Errno 13] Permission denied”.

            After removed the TZ line it still not work……

            I think maybe the problem was caused by permission.

          • Qukoyk

            By the way, I’ve tried to search some solutions of “cron didn’t run” on the internet.
            Most answer said checking the log of cron will be useful such like

            “cat /var/log/cron”

            or check the “system mail sent to root administrator”
            but it seems raspbian don’t have that “mail”
            Also after “ls /var/log/”, but there’re no log files about cron.

          • peterk

            Type in sudo crontab -e and then paste the whole line starting with 0,30 etc.
            That has to work.

          • Qukoyk

            IT WORRRRRRRRRRRRRRKED!!!!!!

            助かりました!

            It’s fun that if I added the TZ line in it, the time in graph will turn to GMT; but if I removed the TZ line, time in graph shows in GMT+9(Tokyo). Maybe there’re some conflcts between command TZ line and WordPress TZ setting (or maybe system TZ setting?).

            Thank you very much!
            ありがとうございました!

          • peterk

            それが働いたうれしいです

  • Zig

    Hello,

    I am very interested in setting this up for myself and sharing this project with others. I am planning to use the DS18B20 sensor since it will be used outside and planning to enclose all the contents in a plastic coffee container. I am really wanting to use the pressure expansion (BMP 180) with this, but I read that only the DHT22 can coeexist with the BMP 180. Is that is the case, do you think the DHT22 would read correctly being in an enclosed box? How are other people doing this, since the DHT22 may not be water resistant?

    I am also not seeing anything regarding adding a Wind sensor (Anemometer) https://www.adafruit.com/products/1733. Is there a tutorial around that will show how to setup the DHT22, BMP 180, and an Anemometer on the same breadboard? Is that even something that is possible?

    Thanks for all of the information, by the way. I am really excited about this.

    • peterk

      Hi Zig!

      Sounds really interesting and much more advanced than this tutorial.
      I’ve never used the pressure and wind sensors. But you could try http://www.raspberryweather.com/pressure-and-wind-expansion/ .

      It should be possible, but the WordPress graph and android application support only the DHT22 or DS18B20 sensors.

  • Wigwam

    Hi,
    I was interested in setting this up however when I came to run the program I had the problem that I have not got the exact same sensor as in the tutorial (I have a non-Adafruit DH11 that i got off amazon). And it had trouble importing Adafruit DHT (it said line 3, full error below.) I was wondering if there was an easy fix to this problem that anyone knows.

    Traceback (most recent call last):
    File “getInfo.py”, line 3, in
    import Adafruit_DHT
    ImportError: No module named Adafruit_DHT

  • Bill Kunkle

    Hello and many thanks for the excellent guide to set up the Raspberry Pi weather graph. Initially I tried to use the DHT22 sensor to monitor the outside temperature. This required a +/- 10 meter long wire to get outside. Because of the distance, the sensor gave intermittent and inaccurate readings using 3 volts or 5 volts. I switched to the DS18B20 and now the readings are consistent and accurate. This is a great project for the Raspberry Pi.

    Thanks again,

    Bill

    • Peter

      Bill thanks for you input! I’ve never tried such long sensors, but your information might come in handy for other tinkerers that are building their own weather station.

  • Maciej Bartczak

    When it comes to sudo python getInfo.py i am getting this error:

    Traceback (most recent call last):
    File “getInfo.py”, line 78, in
    status=readInfo() #get the readings
    File “getInfo.py”, line 42, in readInfo
    print “Temperature: %.1f C” % temperature
    TypeError: float argument required, not NoneType

    How can i fix this?

    • Peter

      Hi Maciej,

      can you verify that the sensor is wired correctly? I have just searched my email and so far I had one person contact me for the exact same error. Turns out that his sensor was broken.

      • Maciej Bartczak

        I just tested the sensor with my arduino and it is indeed broken. Thanks for help.

        • Peter

          Too bad… Buy one off from ebay, they’re cheap 🙂

          • Maciej Bartczak

            I had DHT11 around, i tried running the code for DHT22 with it and at least i got some readings but i definitely don’t have 460 degrees Celsius in my room 🙂
            Is there a way to make it work with DHT11?

          • Maciej Bartczak

            Oh, never mind i just saw the “sensor=” in getInfo.py, it works fine now

  • Angelo Serra

    Peter,

    awesome project – wired up mybtemp sensor and getting good data in the database. One thing I run into is that the graph on the WP site will revert to only show the default data and not what is in the database. Any ideas on what I can do to troubleshoot? I am new to WP so K am not sure where to start.

    -Angelo

    P.S. – just received my BMP180 in the mail. Can’t wait to wire it up!

    • Peter

      Hi Angelo, thanks!

      Please take a look at the FAQ above. Third FAQ tells you how to check if the readings are stored in your database. You could also try disabling all plugins except Raspberry weather. It has helped others before.

      • Angelo Serra

        Thank you for the info. The data is being stored, so I went ahead and restarted the PI and that seemed to clear it up.

        • Peter

          A good old “restart everything” is always a good idea to try out :).

  • I have a Lacrosse wifi thermometer on the North side of a tree outside. Is there any way I could capture and use its data in your weather system?
    As well, my old Raspberry Pi-II B currently has a LAMP server installed. (Apache-II, PHP5.5) I just use it as a webserver for testing web apps. Is there any way I could incorporate your stuff into this instead of starting from scratch?
    Thanx.

    • Peter

      Hi Tony,

      I’ve never used this type of thermometer. It might be possible, check if this thermometer has a way of accessing its readings via an API or something like that. If that’s possible you’d also have to change the existing python script to get readings.

      • Thanx- there ARE some wifi devices that read the stuff. I’ll check into them. O/W I’ll get the one suggested by you.

        BUT
        Can I keep my present Raspian (phpinfo below) and its webserver and just add your stuff?
        ————————————————–
        System Linux raspberrypi 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l
        Build Date Dec 16 2016 23:42:51
        Server API Apache 2.0 Handler
        Virtual Directory Support disabled
        Configuration File (php.ini) Path /etc/php5/apache2
        Loaded Configuration File /etc/php5/apache2/php.ini
        ————————————-
        Apache Version Apache/2.2.22 (Debian)
        Apache API Version 20051115
        Server Administrator aqk@localhost
        Hostname:Port pi:80
        ———————————————-
        mysql
        MySQL Support enabled
        Active Persistent Links 0
        Active Links 0
        Client API version 5.5.54
        ————————————-

        • Peter

          Sure, you have already done most of the hard work. You can keep your current configuration.

  • Angelo Serra

    https://uploads.disquscdn.com/images/8b45204fd47505bdbd862fff4b70613e58bf3fbae8b63488b5f4548bae216d29.png Peter – Just finalized wiring up the BMP sensor and I have a question regarding the getInfo.py location.

    “Get the latter with git clone -b PressureWind https://github.com/peterkodermac/Raspberry-Weather.git. ”

    After I do the git, where should the “Raspberry-Weather” folder reside? Mine is at /home/pi/Raspberry-Weather. The reason I ask is that when I sudo getInfo.py I have a few errors throw as if the script does not know where to find other dependencies (see pic)

  • icommentonstupidity

    Is it possible to reference a database outside the wordpress database? If so how? I already have a database storing temperatures gathered every 15 minute period using my raspberry pi as a mqtt broker and utilizing a esp12-e /w ds18b20. esp12-e reads the temperature, then transmits this to the pi via a mqtt message where node-red grabs the message and inserts it into a database.

    • Yes, it should be possible to get the database readings from outside. Start by opening correct ports to the database and allowing remote connections. Afterwards, try editing the plugin – take a look at functions.php. In the very beginning you have to connect to the database and the rest should work normally…

      • icommentonstupidity

        The database is a local database. Finally got it to connect to the database, and even query it. Working on changing variables around, just got it to graph the data, have yet to get the axis labels correct however. My issue ultimately lies in I’m using a DateTime field rather than just Date, so I’ve got to figure out how to parse the time strictly from the date and display that on my x axis. Currently is just shows 01-01 all the way across lol.

        • Very glad to hear that you’ve made progress! The charts used are from Google, maby that info will help you with googling 🙂

      • icommentonstupidity

        Also, can I create a git fork of your code? I plan on using this graphing ability in a tutorial for an automation system and feel its only right to ask permission first.

        • Don’t ask, just fork 🙂 I can’t wait to see what you’ll come up with. You are free to do anything you please with the code, its totally open sourced.

  • Yes, it should be possible to get the database readings from outside. Start by opening correct ports to the database and allowing remote connections. Afterwards, try editing the plugin – take a look at functions.php. In the very beginning you have to connect to the database and the rest should work normally.

  • AbsorbedBarrel3

    I have set up a static ip address for my raspberry pi, but wordpress does not recognize it. How do I make wordpress recognize it?

    • What happens if you open a new tab with this static IP? Are you 100% sure that Raspberry is using this static IP?

      • AbsorbedBarrel3

        Oh I fixed the problem by going to the wifi icon at the top of the screen and changed my pi’s ip address there.

        • Cool, good to hear that!

  • AbsorbedBarrel3

    I have done almost everything on the wiring page but instead of 28-**********, I am getting 00-**0000000000

    • AbsorbedBarrel3

      Also, My wires for the DS18B20 came red, yellow, and blue.

      • Hmm, you sure it’s not black and not blue?

        And you did add dtoverlay=w1-gpio-pullup,gpiopin=4 to /boot/config.txt right?

        • AbsorbedBarrel3

          Yes, but just in case I asked someone else to check the wire colors and I did add dtoverlay=w1-gpio-pullup,gpiopin=4 to /boot/config.txt

  • EnemyNL

    I first followed the tutorial which worked out fine. Then i decided to step it up and work with both temperature sensors. the second sensor is working fine as well and data is being stored in the database.
    Modified the functions.php script to make it possible to display the other temperature as well, which works, only it displays a scatter chart instead of a line. Any idea why and how i could fix that? It seems very strange to me, cause as far as i understand the code (not too much of a programmer myself) it generates the chart in the same way, regardless which data is being used (however for original temperature it still gives me a line).

    • Hey EnemyNL,

      congrats on getting both sensors working together! The “engine” that is used for drawing these graphs is Google Chart. Maby if you search around in this specific direction you’ll be able to find some anwsers.
      What if you store only a few readings and try displaying them. Are they connected with a line?

  • Sarmad Raza

    Hello fellow, i have been following tutorials for Weather Station and i got till fixing the DHT22 it works fine but i cannot expand it with bmp180 when i run sudo python simpletest.py i get this error :

    Traceback (most recent call last):
    File “simpletest.py”, line 37, in
    sensor = BMP085.BMP085()
    File “build/bdist.linux-armv7l/egg/Adafruit_BMP/BMP085.py”, line 69, in __init__
    File “build/bdist.linux-armv7l/egg/Adafruit_BMP/BMP085.py”, line 72, in _load_calibration
    File “build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py”, line 200, in readS16BE
    File “build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py”, line 177, in readS16
    File “build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py”, line 164, in readU16
    File “build/bdist.linux-armv7l/egg/Adafruit_PureIO/smbus.py”, line 173, in read_word_data
    IOError: [Errno 5] Input/output error

    i dont understand whats the reason pressure sensor is connected fine on the same board with DHT22 my pressure sensor has only four pins Vin,Gnd,scl,sda and they are connected according to the circuit diagram ! Help

  • Gangaram

    Hi I’m facing this problem

    root@raspberrypi:~/Raspberry-Weather/production# sudo python getInfo.py
    Temperature: None C
    Humidity: None %
    Failed to get reading. Try again!

    What is the cause ?

    • Hi Gangaram,

      please double check if everything is wired correctly. Also, do you have a spare sensor to see if the current one is broken?

  • Seth Bickford

    I’m having a few problems.

    1: When I log on into the Pi it doesn’t ask for a login, or to turn on SSH. I ran “userdel pi” and it said: “user pi is currently being used by process 730”.

    2: I tried to get a static IP, and I ran “nano /etc/network/interfaces” and the window I got was different than what you said was the default.


    auto lo
    iface lo inet loopback

    iface eth0 inet manual

    allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    allow-hotplug wlan1
    iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    It also says no write permission (even though it gives me an option to save progress, but I’ve never saved changes).These were all default.

    3: I run “rm /var/www/html/index.html” and it says it’s a write-protected file. I type “y” and it said “Permission denied”. I’ve done all the software commands up to this point and got an Apache website working saying I need to remove index.html. Is all of this the fault of the login process I could never find?

    FYI, I have a Raspberry Pi 3 Version B model.

    • Fear not Seth, we’re here to help! 🙂

      – You cannot ssh to pi if I understand correctly? If so, please turn it on by typing sudo raspi-config and find the option to turn on SSH
      – Create a new user for example seth reboot and login as seth. Now you can delete user Pi
      – You cannot modify system files unless you are a super user. So before nano /etc/…. type in sudo nano /etc/…. With sudo you become a super user while editing the file in question
      – Same as deleting the index file. Type sudo rm index.html and you will be able to delete it

      Give it a go and let me know if you have other problems.

      • Seth Bickford

        When I rebooted it didn’t give me a chance to log in. When I clicked “log off” there was only user “pi” available and “Other”. I selected “Other” and typed in a new name and password and it said “Incorrect Password”. So, now I’m unaware of how to make accounts.

        edit: I found out how to do it

        • What do you get when you reboot, login as seth and userdel pi?

          I forgot to tell you to add user seth to sudo users (to make user seth an administrator). Do that by opening terminal and typing su then the password. You are now using the shell as a super user. To make seth a superuser, type in adduser seth sudo.

          • Seth Bickford

            I’m actually using the name “scott” because it is technically not mine, it’s his and I’m only helping him set it up.

            1st thing: Logging in as “scott” still makes the pi refuse to look for a wifi access point, even as a sudo user.
            Rebooting the pi makes it default by loading user “pi”.

            2nd thing:

            scott@raspberrypi:~ $ sudo deluser pi
            Removing user ‘pi’ …
            Warning: group ‘pi’ has no more members.
            userdel: user pi is currently used by process 1152
            /usr/sbin/deluser ‘/usr/sbin/userdel pi’ returned error code 8. Exiting.
            scott@raspberrypi:~ $ sudo userdel pi
            userdel: user pi is currently used by process 1152

            Edit: I did the same thing a few minutes later and it said process 1154.

          • What if you do sudo raspi-config, Boot options, Desktop CLI and select console. This means that you will not boot to the graphic interface, which is probably preventing you from deleting the user. Reboot when you set boot to console and then login as scott, then try removing user Pi.
            Or you could simply leave user pi and change its password to something more secure 🙂

            For wifi, try https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

          • Seth Bickford

            Okay, I managed to delete the “pi” user, and I look at the site where wifi connections should be set up, but I followed the steps and did the commands and the information for the networks I was able to connect to as the “pi” user are still there, and it should be able to get some kind of connectivity. The Ethernet isn’t working either. Am I missing something?

          • That is something totally new. Ethernet has to work, regardless of the user.

            What do you say if you start completely from scratch, leaving the user pi untouched? First test Ethernet and then setup Wifi.

          • Seth Bickford

            We have a bunch of Raspberry Pi’s, so we definitely can restart. My questions for that would be: Would it use the same IP and will that get messed up with the Apache site? Would the current Pi I use work with a different SD card untouched for the same model?

            Or, do you think this is a result of some code that needs to be fixed? I’d rather think it’s that than hardware problems. Speaking of which, I really don’t want to undo the hardware setup, which is complete.

          • You will most likely get the same IP assigned, but its not guaranteed

            Sure, try a different SD card – that is an even better idea. Use a different card with a clean installation of Raspbian. That way you do not have to start completely from scratch.

            I really have no idea what could be wrong. I have installed Raspbian at least 50 times and was able to connect to wifi and ethernet without any problems.

            Give it a try with a different SD card and we’ll see what happens.

          • Seth Bickford

            It worked!

            Except now I’m confused on “mv wordpress/*.”. It says that no destination is selected. I think I know what this means, but where would I send it to?

            Edit: Is it too late now that I’ve done “rm -rf wordpress”?

          • I think that you forgot to put a whitespace between /* and . That’s why it did not know where to move the folder.

            WordPress folder holds files that are necessary for it to run. If you move the contents of WordPress folder to /var/www, you can easily delete the WordPress folder.

          • Seth Bickford

            So, I moved the contents out of the WordPress folder into /var/www, I removed the WordPress folder, set up the database and entered the IP into the Pi’s browser, and this happened…
            https://uploads.disquscdn.com/images/615790b67ca2dace4a70a5172a497ca74c9d58d23880a6a8cc1451af6a7a0f9d.jpg
            Those links on the top lead to the same page. Clicking on lastest.zip downloads the zip file into the Downloads folder in File Manager. I deleted that because it was a copy. The only thing I thought of doing was moving the files from the zip file from /var/www to /var/www/html. I tried to do that in the File Manager and it said “permission denied”. My next guess was to type in sudo commands to move them except I don’t know what those commands are. Should I be doing this, or am I missing something?

            PS: I posted this earlier without the picture and copied the contents of the site into here, and this site said that it needed approval because it was too long, I think. Sorry for a repost.

          • I believe that you removed all files except for the latest.zip. Don’t worry, I will guide you through the process. Follow it exactly and you will not have any problems

            1. cd /var/www/
            2. sudo chmod html
            3. wget http://www.wordpress.org/latest.zip
            4. unzip latest.zip
            5. mv wordpress/* .
            6. rm -r wordpress

            Go to the IP of your Raspberry Pi and you will see the installation wizard

            Yes, the phone has to be nearby. It is not going to be detected if its too far away. I just read on reddit.com a few hours that Hologram.io is giving away free SIM cards! I just ordered one for free. If you do the same, you’ll have to wait a bit, so I can get it and write a tutorial.

            Yes, IP can be changed: https://www.raspberryweather.com/set-a-static-ip/

            You can send data to cloud. You just need to implement it 🙂

          • Seth Bickford

            I actually did sudo mv to every file of lastest.zip from /var/www to /var/www/html and it worked. I got to the WordPress site but the username and password we want to assign didn’t work and it says that the username and password were in a config php file. The only thing related to that I saw was a a config sample php file, and that didn’t get me anywhere. Before hand, WordPress had only asked me to enter a password. We got that set up.

            Edit: Also, what are SIM cards?

          • So wordpress is installed but you don’t have the username and password?

            SIM card is the small card you put inside your telephone and enables you to call or text people. They are giving away 1000 of these SIM cards, with one you can send 1000 texts per month, free of charge.

          • Seth Bickford

            The only username or password that the Pi has asked us to set is the MySQL password. We’ve had no windows asking us to set any username or any other password. Would the username be root? Because we didn’t change any of that.

            Also, looking at your “Raspberry Pi as webserver” page, in the second paragraph, it says: “because it can cause problems with installin WordPress”. You’re missing a “g” or an apostrophe. I thought I’d let you know.

            Edit: Okay so using the password I entered and having the username “root” works, but it says “Can’t select database”. Is there something else I’m missing?

          • Seth Bickford

            Okay, I’m an idiot. I typed in “WordPressDB” for the database name and it worked.

          • Haha no you’re not, we have all been there 🙂 Hope all goes smooth from now on 😉

          • Seth Bickford

            Looking closer at our hardwiring though, it looks like our your model uses the Pi Cobbler, while we have the Pi Cobbler +. Also, the download link you provided to buying the cobbler online shows the + version. Is there an updated model, or do we just merely deviate from the model?

            Edit: Forgot to mention, using DHT22 by the way.

          • I’m on my phone so I can’t google for specific details – does it have the same number of pins? Or simply put, have you tried wiring it to see if it works 🙂

          • Seth Bickford

            It doesn’t have the same number of pins. It has more.

            We’ve made some wire connections with an idea in mind that it would be relative to what the model shows.

            I’d provide a picture, but it’s not easy to provide a high resolution picture with a flip phone.

          • Seth Bickford

            OK, so what I did to solve this issue was moving the cables around to match the area where the names of the pins match. So, even though it’s farther away from the left side of the cobbler, I can still connect the yellow cable to pin 4, the red cable to pin 3V3, and the black cables didn’t actually have to move at all.

            pi@raspberrypi:~/Raspberry-Weather/production $ sudo python getInfo.py
            Traceback (most recent call last):
            File “getInfo.py”, line 78, in
            status=readInfo() #get the readings
            File “getInfo.py”, line 42, in readInfo
            print “Temperature: %.1f C” % temperature
            TypeError: float argument required, not NoneType

          • This error is popping up lately…. I’m not sure if the sensor is broken or if the reason lies within the operating system. Do you have a spare sensor at hand?

          • Seth Bickford

            We tested the sensor with a multimeter and it got voltage readings with all three cables, so I don’t think the sensor is broken. We ordered both the DHT22 and DS18B20 sensors, but only the DHT22 has showed up. The operating system was brand new and updated like you wanted us to, and we believe the sensor is also brand new.

            Are we looking for resistance readings on the sensor? Do you think it’s a problem in the script? Is our hard-wiring incorrect because we have a bigger cobbler? Is our sensor testing inaccurate? Do you think moving the files around a lot to make the commands work could’ve caused this?

            Edit: Does a resistor need to be connected?

          • I’m not sure, but the script should not be the cause. There is another fellow asking the same question – his set up has been working for some time and all of the sudden it’s not.
            We can also rule out file moving.

            It has to be connected exactly as shown in the picture 😀

          • Seth Bickford

            Well we ordered a new DHT22 sensor and we still have the same problem. Almost every hardware connection was tested by a multimeter and they all got successful readings. With a complete exchange of hardware, getting the same problem doesn’t make sense. There are a few things I think could be the problem:

            Using a Pi Cobbler + instead of the regular version could make the script not recognize it.

            There may be something up with the pi or the OS. We took the cobbler out of the pi’s pins once and the pins were slightly bent. We don’t think that should cause any negative effect.

            Not everything was downloaded. That would be embarrassing.

            There’s something wrong with the script.

            The hardwiring placements are incorrect. I don’t want to believe that though.

          • Seth Bickford

            Okay, so what I decided to do was use another method with the DHT22 to just only get readings, and not store or display them, and that worked.

            Right after that, I decide to run sudo python getInfo.py and it actually worked!

            So, it’s possible that I missed something while installing or not everything was updated.

          • Really? Wow, very glad to hear that.

            I do have a theory. DHT22 sometimes does not get a reading, but returns null. My script does not handle null values and crashes. I should fix it so that if DHT22 returns null, then do nothing.

          • Seth Bickford

            Actually the secondary method I used involved the Adafruit library, so that could’ve fixed it.

            But now I’m not getting continual readings every 30 minutes. Also, is there a way to get a reading every 1 minute?

          • Can you please paste me the line that you changed?

            Yes, it’s easy to get a reading every minute. You have a cronjob set to 0,30 * * * * which means that 30 minutes the script is executed. Change 0,30 to * and save.

          • Seth Bickford

            I didn’t change anything to getInfo.py. Maybe I just had to install a few more files and update them.

            Where would I find the cronjob? I don’t see cronjob or 0,30 * * * * in getInfo.py.

          • :))))))
            Okay, I’ll keep on digging to try and figure out what’s the cause of the problem.

          • Seth Bickford

            TZ=’America/Chicago’
            * * * * * /usr/bin/python Raspberry-Weather/production/getInfo.py

            I refresh the graph page every few minutes and the only reading that shows up is the reading that happened when I manually ran the code.
            I can confirm that is the correct path because sudo python Raspberry-Weather/production/getInfo.py works.

            One last thing: Our phone we’re using for the hotspot which hosts the WordPress site was dropped last night and the screen’s cracked, and we’re getting another one. We would have to change the IP, but to what? If we transferred the data, would the IP of the new phone be the same? I don’t recommend using a phone because if the hotspot is turned off, then the site won’t load. The only other nearby networks to the pi are college WiFi networks, and using them wouldn’t work, and it would be a nightmare. Yes, we’re doing this in a college. Would bringing in a personal router work?

          • You were really close – the path is the problem You’re missing the whole path, something like /home/seth/Raspberry-Weather/production/getInfo.py . Go to the folder where getInfo.py is located. Type in pwd and you’ll get the whole path.

            No humidity? Are you telling the graph to display humidity and temperature by using

            display=”Both”

            in the plugin shortcode?

            About the phone – I’m guessing that the IP will be assigned automatically. A personal router would work if it was plugged into the network and to the weather station. If you want the weather station to be accessible outside the college, you’d have to set up port forwarding on the router. But let’s not get into that part just yet.

          • Seth Bickford

            Okay, configuring the humidity visibility shouldn’t be too hard.

            I feel like I’ll just leave the Raspberry-Weather folder in /root.

            We just bought a new router. Its IP shouldn’t interfere with the networks of the college so we can host the site without problems.

            Also, every piece of equipment we use belongs to a professor, Scott. I’m just helping him build this.

          • If it works in /root then by all means – leave it be

            Greetings to professor Scott also, hope he’ll give you good marks when you finish this project 🙂

          • Seth Bickford

            It turns out bringing in a personal router stands no chance against the college’s security. Anyway, this was a great project to work on and thank you for your help!

          • Oh well… I’m glad you got this far 🙂

          • Tnx for the spellcheck, the guide must be full of such bugs 😀 its fixed now.

            Double check the username and password for mysql. In fact, try logging in to mysql with
            mysql -u root -p
            It should then ask you for the password, input it. When you’re connected to mysql, simply type in exit and you’ll be back. Wp-config.php needs to have the username and password for mysql. It also needs to have localhost as database host. Check that first.

            Then check if you have created the database for WordPress and if that database name is in wp-config.

  • Qukoyk

    Hi Peter

    It’s Qukoyk again.

    The weather station had worked in the lab perfectly for 10 month. Everyone including professor love this budget very much.

    But these days something wrong with the weather station.

    It couldn’t get temperature and humidify anymore, so I run getInfo.py manually and error information are:

    pi@raspberrypi:~ $ sudo python /root/Raspberry-Weather/production/getInfo.py
    Traceback (most recent call last):
    File “/root/Raspberry-Weather/production/getInfo.py”, line 78, in
    status=readInfo() #get the readings
    File “/root/Raspberry-Weather/production/getInfo.py”, line 40, in readInfo
    humidity, temperature = Adafruit_DHT.read_retry(sensor, pinNum)#read_retry – retry getting temperatures for 15 times
    File “build/bdist.linux-armv7l/egg/Adafruit_DHT/common.py”, line 90, in read_retry
    File “build/bdist.linux-armv7l/egg/Adafruit_DHT/common.py”, line 76, in read
    File “build/bdist.linux-armv7l/egg/Adafruit_DHT/common.py”, line 56, in get_platform
    File “build/bdist.linux-armv7l/egg/Adafruit_DHT/Beaglebone_Black.py”, line 24, in
    ImportError: No module named Beaglebone_Black_Driver

    It never happened before, so I think maybe it was caused by upgrade of kernel.
    Should I re-install raspberry-weather again just like solutions in other problem caused by “kernel upgrade”?
    Or do something else to fix it up?

    I need your help.

    Qukoyk

    • I’m not using DHT22 so I’m not sure what could be the case.

      Please try: sudo python setup.py install

      Have you recently ran sudo rpi-update that updated the firmware? If yes, you could try rolling it back. But not before making an image. In fact, make an image of the SD card right away. I’m speaking from my own experiences 🙂

      • Qukoyk

        I re-installed it and there’s some error info:

        root@raspberrypi:~/Raspberry-Weather/production# python getInfo.py
        getInfo.py:67: Warning: Table ‘temperatures’ already exists
        cur.execute(query)

        And the 2nd time I ran getInfo.py it showed like this:

        root@raspberrypi:~/Raspberry-Weather/production# python getInfo.py
        Traceback (most recent call last):
        File “getInfo.py”, line 78, in
        status=readInfo() #get the readings
        File “getInfo.py”, line 42, in readInfo
        print “Temperature: %.1f C” % temperature
        TypeError: float argument required, not NoneType

        • First error is because the table Temperatures already existed. The second time the same error was not present, so that’s okay.

          What happens if you simply comment out the line 42 and check if it is saved in the DB.

          • Qukoyk

            It still can’t get reading, also not saved in the DB.

            pi@raspberrypi:~ $ sudo python /root/Raspberry-Weather/production/getInfo.py
            Humidity: None %
            Failed to get reading. Try again!

          • I see, it actually does not read anything. As you posted, humidity is None.

            Is it possible that the sensor is somehow broken? Do you have anonther DHT22 sensor that you can wire, double check and re-run the script?

          • Qukoyk

            Hmmm… actually the sensor was placed indoor and nobody had moved it before. So I think it could hardly broken.

            Unfortunately that’s the only sensor we have. But anyway, I’m trying to buy another one and do a double check.

          • Hmmm, I hope that the other one works! And that you get it soon from China 🙂