My goal of this project was to track the temperature in different rooms in my house using multiple temperature sensors to send the data back to a raspberry pi and have the data stored historically so I could display it in charts and send alerts. As a follow up to my wireless power outlet project, I wanted to use the 433mhz receiver. I came across some wireless temperature sensors that work over 433mhz. These temperature sensors are great because they are cheap, well built, battery powered and outdoor resistant. I was surprised at how difficult it is to decode the signal coming from the temperature sensors.
After a lot of searching, I came across a great post on reverse engineering temperature sensors. The code in this article helped tremendously. I was able to get the temperature readings for the AcuRite 606TX Wireless Temperature Sensor. The next part was to store the temperature readings. I decided to use a sqlite database since it would be easy to use in php. Finally, I wrote a simple php file to read the sqlite database and display the temperature readings in a line chart.
So with everything working, I ran into a major problem that I haven’t been able to resolve. Currently, the receiver only works from at a max of 10 feet. Obviously, this will not work. I’ve tried different receivers and antennas with no success. I’m hoping someone will have a suggestion on boosting the receiver strength so it will work over 150 feet.
- Connect wires to Rf receiver chip(wiring diagram). See this article for more info on gpio pins.
- Install Rasbian on Raspberry Pi
- Install Wiring Pi
- Install Apache and PHP on the Raspberry Pi
- Install php sqlite3: sudo apt-get install php5-sqlite
- Clone web files
- Install git: sudo apt-get install git
- Then type: sudo git clone https://github.com/timleland/temperaturesensor.git /var/www/html/temperaturesensor
- You should now be able to capture the temperature readings from the command line.
- Change to the directory: cd /var/www/html/temperaturesensor
- Then type: sudo ./capture
- Browse to Raspberry Pi ip address: http://<your-pi-ip>/temperaturesensor/
- You should see a graph with the temperature readings
- AcuRite 606TX sends updates every 30 seconds
- Gpio 21/27 is wiringPi pin 2. To use a different pin, edit this line.
- Command to compile capture.cpp: sudo c++ -std=c++0x capture.cpp -o capture -lwiringPi -lsqlite3
Let me know if you have any questions in the comments below.Follow @Tim_Leland
Also published on Medium.