Contains code that displays data from the MiniAQI device. For info on the device, see the accompanying blog post.
This repo uses poetry.
You can install
$ pip install poetry
Use poetry to install dependencies:
$ poetry install
Invoke with poetry:
$ poetry run ./main.py
You can get help by passing
By default, this program will scan a few possible
tty ports to find a PMS7003.
You may wish to pass the location explicitly, by using
Also, by default, the program will print quality measurements to the terminal.
It will also print them, in influxdb line protocol format, to
You may wish to disable printing to the terminal with
--log-only, and customize the location of the log file with
Running as a
On a recent Linux, you can run this as a service.
Modify the included
mini-aqm.service file, and edit the
WorkingDirectory should point at the location where you have this repo checked out.
ExecStartPre) should have the path to your
poetry binary -- find it with
You may also wish to customize the arguments to
main.py, for instance to set
To install the service:
cat mini-aqm.service | sudo tee /etc/systemd/system/mini-aqm.service sudo systemctl daemon-reload sudo systemctl start mini-aqm
[[inputs.tail]] files = ["/home/igor47/repos/mini-aqm/measurements.log"]
Customize the path where your
measurements.log file is found.
You may wish to pass an explicit path to