This repository contains code for sensors used in the SiteVisor Project.
This code randomly generates simple data within the specified range and sends it to a Kafka Broker accesible over HTTP via Kafka Bridge.
Setup dependencies:
pip install -r requirements.txt
Example usage:
python .\simulated_env_sensor.py --topic='my-topic' --sensor-id='sensor-42' --min-value=10.0 --max-value=30.0 --sensor-type='temperature' --unit='C'
To run mutliple simulated sensors at once:
python run_multiple_sim_sensors.py --num-sensors=5 --topic='my-topic' --base-min-value=15.0 --base-max-value=25.0 --sensor-type='temperature' --unit='C'
Script to read data from DHT11 sensor on GPIO04 and send it to Kafka Bridge.
Recommended to setup a new venv. Then install dependencies:
pip install -r requirements_rpi.txt
Example usage:
python sitevisor_dht11_sensor.py --topic='my-topic' --sensor-id='dht11' --ip='sitevisor.local'