A domestic weather station system build with Raspberry Pi + HTU21D. User can report sensory data to InitState, Blynk or a local/remote MySQL database.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
config_template.json
dht22.py
htu21d.py
i2c_base.py
main.py

README.md

RaspberryPi Indoor Environment Sensing

This project is a personal indoor weather station that uses Raspberry Pi and HTU21 to get indoor temperature and humidity. Also support options to submit measured data to InitialState, Yeelink or a remote MySQL database.

  • HTU21D is a digital temperature + humidity sensor and it is connected to RPi by iic.
  • Raspberry Pi is a popular open-source hardware. This program is tested on RPi 1B, but should support all versions of RPi.

Requirement

Usage

  1. Change to home directory: cd ~
  2. Clone project: git clone https://github.com/automaticdai/rpi-indoor-environment-sensing
  3. Copy configuration from template: cp config_template.json config.json
  4. Edit the configuration file config.json and save
  5. Run the main script: python3 main.py

Configuration

System options

  • 'report_periodic': run the script periodically / or only run one time.
  • 'report_interval_sec': set the report period (in second). If 'report_periodic' is false, this parameter will be ignored.

Yeelink

  • 'enable': enable functionality.
  • 'api_key': developer API key from Yeelink.
  • 'xxxx_url': the device API address, e.g., "/v1.0/device/3365/sensor/387420/datapoints".

InitialState

  • 'enable': enable functionality.
  • 'bucket_name', 'bucket_key': bucket name and key from your data bucket.
  • 'access_key': provided by InitialState.

Blynk

  • 'enable'
  • 'auth'

MySQL

  • 'enable': enable report to MySQL.
  • 'host', 'port': database IP and port.
  • 'user', 'password': login user information.
  • 'db', 'table': database and table name (should be an existed database).