Skip to main content

My home tempearture sensor for my RaspberryPi

Project description

Build Status

One Home Sensor

This peace of software reads temperature, pressure and humidity from a BME280 sensor. It then pushes the result to a MongoDB data-base (MongoDB Atlas form my part).

Usage

My setup is as followed :

  +-------------+
  | RaspberryPI |    +-------------+    +-------------+ 
  |             |    |  MongoDB    |    |  Phone /    |
  |  one_home_  +--->|  Atlas      +--->|  WebBrowser |
  |     sensor  |    +-------------+    +-------------+
  +-------------+

I periodically run it (throught systemd) to store the values.

Integration / Instalation

This programe is created and only used/tested/supported in python3. These commande should solve all dificulties.

sudo apt-get update
sudo apt-get install python3-setuptools python3-dev python3-pip i2c-tools 
sudo python3 setup.py install 
python3 -m pip install 'pymongo[snappy,gssapi,srv,tls]'
  1. Create cluster on MongoDB Atlas
  2. Create connection autorization and user
  3. Create configuration file (see next section)
  4. Enable I2C in raspi-config (5 then P5).
  5. Add user to group "i2c" (sudo usermod -a -G i2c leadthesalt)

For my part I install the programe with an Ansible rôle. Sure I could create a debian package, but I only use it on my Raspbery Pi that are already managed throught Ansible.

Configuration file

[MongoDBAtlasConnection]
username = # username set for MongoDB
password = # password set for MongoDB
clusterfqdn = # fqdn to MongoDB server 

Documentations

https://github.com/pimoroni/bme280-python
https://github.com/pimoroni/skywriter-hat/issues/4
https://learn.pimoroni.com/related-products/adafruit-mpl3115a2-i2c-barometric-pressure-altitude-temperature-sensor
https://docs.mongodb.com/

Project details


Download files

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

Source Distribution

one_home_sensor-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file one_home_sensor-0.1.0.tar.gz.

File metadata

  • Download URL: one_home_sensor-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.5.6

File hashes

Hashes for one_home_sensor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e952af905645dcf4852d457017b8f0cc0a6e9bf267621e9bd70240a756331b79
MD5 37f04c5d7d0f3ef457229c0fe93b49e5
BLAKE2b-256 40eca43dd6294c33d07cf8960baaa8704476906bae436d96763eb31fea897cdd

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