rpiweatherd
is a small daemon for the Raspberry Pi, written in C99, that records weather data using temperature sensors.
It can be used as a weather data server, returning JSON-formatted data via a normal HTTP request.
The daemon is designed to be small, efficient and portable, so even though it has some dependencies, most of them are probably already installed on your Raspberry Pi.
The repository contains all code and submodules needed to successfully compile and run the daemon.
Directory | Description |
---|---|
src/ |
Source directory containing C source files |
include/ |
C Header files |
skel/ |
Templates for configuration files and initialization scripts/units |
devices/ |
Device drivers |
extra/ |
Administration script and an Example CLI client |
deps/ |
Dependencies required for building the daemon |
As of version 1.1.1, binary ARMHF debian packages are available on the Releases page. The .deb package will take care of all dependencies needed. You may also compile the daemon from source.
- Raspberry Pi
Tested on Model A+ and RPi 2/3 Model B - Raspbian (late 2015 or newer)
Ubuntu 14.04 or newer
Arch Linux
Other distributions are not officialy supported but might also work. - A Temperature sensor connected to the Pi.
See the list of supported devices for more information. - GCC version 4.6 or newer
Required for some GNU extensions and the C99 standard. - CMake version 3.0 or newer
- SQLite3 development libraries version 3.5 or newer
- WiringPi version 1.1 or newer
- Python version 3.2 or newer
Several development libraries must be installed in order to successfully compile rpiweatherd
.
Distribution Name | Command to Install |
---|---|
Raspbian/Ubuntu | $ sudo apt-get install cmake python3 gcc make git libsqlite3-dev wiringpi |
Arch Linux ARM | $ sudo pacman -S cmake python gcc git make sqlite wiringpi |
- Clone the repository:
$ git clone https://github.com/ronen25/rpiweatherd
- Create a
bin
directory, switch to it, and initiate compilation using CMake.
$ cd rpiweatherd
$ mkdir bin && cd bin
$ cmake -DCMAKE_BUILD_TYPE=RELEASE ..
$ make
- Finally, install the daemon:
$ sudo make install
-
Configure
rpiweatherd
according to the configuration guide. -
Run the program using the appropriate init tool, either as root or with
sudo
:
Distribution Name | Command to Install |
---|---|
Raspbian/Ubuntu | # service start rpiweatherd |
Arch Linux ARM | # systemctl enable rpiweatherd |
- Test the installation by issuing the
current
command from any web browser:
http://[ip-of-pi]/current
- Daemon administration and a reference client can be found in the
extra/
folder.
The repository provides the rpiweatherd-cli.py
client, which is a very simple, proof-of-concept client using a command-line interface.
I also provide a Qt-based GUI client, developed as a separate project - rpiweatherd-qtclient.
This software is licensed under the GNU GPLv3 License.