Skip to main content

Simple data logging client for InfluxDB

Project description

PyPi-Package Lines of code Coverage Duplicated lines

Simple python client for logging measured climate data to InfluxDb.

Additional dependencies

Dependencies

Sensor Type

Command

BME680

pip3 install adafruit-circuitpython-bme680

BMP085

pip3 install Adafruit_BMP

BMP3xx

pip3 install adafruit-circuitpython-bmp3xx

SGP30

pip3 install adafruit-circuitpython-sgp30

SGP40

pip3 install adafruit-circuitpython-sgp40

SHT1x (no I2C)

download and install https://bitbucket.org/lunobili/rpisht1x.git

SHT4x

pip3 install adafruit-circuitpython-sht4x

Build and upload

python3 -m build
python3 -m pip install --upgrade twine
python3 -m twine upload dist/klimalogger-0.6.8.tar.gz

Install on server

Software

It is recommended to use a virtual environment.

virtualenv /usr/local/share/klimalogger
. /usr/local/share/klimalogger/bin/activate
pip install klimalogger

Then install hardware specific drivers e. g.

pip3 install adafruit-circuitpython-sht4x

Then setup the configuration file /etc/klimalogger.conf.

The sensor readout can be validated through

/usr/local/share/klimalogger/bin/klimalogger --check

The result should be JSON formatted measurement data.

In order to run the service for debugging use the following command line

/usr/local/share/klimalogger/bin/klimalogger --service --debug

Setup Service

Create a service configuration, for example /etc/systemd/system/klimalogger.service with the following content:

[Unit]
Description=Klimalogger Service
After=multi-user.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/local/share/klimalogger/bin/klimalogger --service

[Install]
WantedBy=multi-user.target

and run

systemctl daemon-reload
systemctl enable klimalogger
service klimalogger start

to run the service.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

klimalogger-0.7.19.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

klimalogger-0.7.19-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file klimalogger-0.7.19.tar.gz.

File metadata

  • Download URL: klimalogger-0.7.19.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for klimalogger-0.7.19.tar.gz
Algorithm Hash digest
SHA256 ee61048a912d7db0b1812dbadc3e478a1592097496d5b0fa2109ef455ab05b3e
MD5 8cb05d474e58f1c7ea4d900b51a5854a
BLAKE2b-256 c057b40a7add407576738127915147577e2e8b294f683776efec805b778f1e2d

See more details on using hashes here.

File details

Details for the file klimalogger-0.7.19-py3-none-any.whl.

File metadata

  • Download URL: klimalogger-0.7.19-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for klimalogger-0.7.19-py3-none-any.whl
Algorithm Hash digest
SHA256 3f8410bcafd92bdd4c60e08473576d4ad84290d53a14ab29f73f77c49a73da98
MD5 e40a4aa734ee9ce904f22d0611fc5b15
BLAKE2b-256 ef015c098ab8c48452f75d0a28aa1958a2a787f6202dc9b30b8629a039f2569f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page