RaspberryPi Temperature Monitor with Temper2 (server+client)
-
Get a server with Ubuntu installed. (in my case, I'm using one from AWS EC2)
-
Git clone the repository into /home/ubuntu/Sandbox/temperpi/.
-
Run the following commands in bash:
# Install all required packages.
sudo apt-get install python pip
sudo pip install cherrypy python-dateutil mako
# Configure the service in /etc/init.d.
sudo ln -s /home/ubuntu/Sandbox/temperpi/server/temperpi.server.sh /etc/init.d/temperpi
sudo /etc/init.d/temperpi start
sudo systemctl enable temperpi
service --status-all
After this, the server should be happily running under http://localhost:4284.
-
Configure a new RaspberryPi with Raspbian and plug in the Temper2 USB thermometre.
-
Git clone the repository into ~/Sandbox/temperpi/.
-
Install required packages for the C compilation:
sudo apt-get install libusb-dev
- Run the following commands to compile temper2.
cd ~/Sandbox/temperpi/client/TEMPer2/
make
- Add the the send.sh command to your root crontab. (the binary produced above needs to run as root)
sudo crontab -e
And add a line that looks like the one below updating the server url to wherever your actual server is located at.
* * * * * /home/ruibm/Sandbox/temperpi/client/send.sh 'http://my.server.url:4284'