A systemd-integrated, openmetrics-spewing utility for a rasp pi that has an SPS30 connected. Nice for prometheus monitoring.
- Nothing
you do need to have your sps30 set up on your pi / device, and you do need to have a linux driver working. See sps 30 driver notes, below
- just download the latest
.deb
file fromreleases/
to your pi and install withdpkg
. For example, to install v1.9.0, do:dpkg -i piaq-v1.9.0_arm-linux-gnueabi.deb
. - From any machine that's networked, or the pi itself,
curl <pi's IP>:8051
to see your values.
Configure /etc/piaq/piaq.conf
till your heart's content to change port, the files to query, and the time to sleep between queries.
See issues.
- configuration quality of life
- generality to other sensors
- cli args and client apps
Try: fetch_deps.sh
on ubuntu
Otherwise:
- libconfig-dev
- make (gnu)
- g++
- libasio-dev
Build for local machine:
make
make install
In general:
make ARCH=<arch triplet>
make install prefix=<optional prefix>
By default, ARCH=$(gcc -dumpmachine)
. You can use this to cross compile.
Example, cross compile for arm:
make ARCH=arm-linux-gnueabi
Just grab a deb in releases/
dpkg -i deb/piaq-<version>-<arch>.deb
This is not hard, and is well covered by these directions by sensirion but generally looks something like this:
# Load i2c linux driver and crc8 code
sudo modprobe industrialio
sudo modprobe crc8
# initialize sensirion's excellent driver
sudo modprobe sps30
# tell the kernel to find a device at address 0x68 and to use sps30 as its driver
echo sps30 0x69 | sudo tee /sys/class/i2c-adapter/i2c-1/new_device