https://github.com/martabal/dht-raspberry-docker
Monitor temperature and humidity with your Raspberry and Grafana
https://github.com/martabal/dht-raspberry-docker
Last synced: 2 months ago
JSON representation
Monitor temperature and humidity with your Raspberry and Grafana
- Host: GitHub
- URL: https://github.com/martabal/dht-raspberry-docker
- Owner: martabal
- License: gpl-3.0
- Created: 2021-09-09T07:51:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-23T13:06:40.000Z (over 3 years ago)
- Last Synced: 2024-10-19T00:18:12.977Z (8 months ago)
- Language: Python
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DHT_Raspberry
Monitor temperature and humidity with your Raspberry, dockers and Grafana### 1. Connect your DHT with your Raspberry pi with GPIO
Connect gnd, 3.3V and GPIO4
### 2. Edit temperatureloop.sh
Edit temperatureloop.sh with **sudo nano temperatureloop.sh** and change /YOUR/PATH/
### 3. Execute python script on your Raspberry pi
Copy temperature.py and temperatureloops.sh on your raspberry pi and execute temperatureloop.sh on background.
>(Edit DHT11 h,t = adht.read_retry(adht.DHT11, 4) if you use another DHT).You can also use script/temp/notelegraf.py where telegraf is not required. You have to edit notelegraf.py to match your influxdb settings. You have to create a databse in influxdb.
### 4. Create a docker-compose.yml file
Copy docker-compose.yml change paths with yours and start docker-compose with **sudo docker-compose up**
### 5. Configure a data-source in grafana
Click on "Add data source" put your Raspberry pi URL and your Database name (temperature in appadata/Telegraf/telegraf.conf)
### 6. Import my Grafana dashboard
Go on the side menu on Grafana, then Create and click on import. Copy dashboard.json and paste it in the "Import via panel json" section then Load
### 7. Enjoy!
## Use MQTT
## 1. Edit script/mqtt.py
Edit USERNAME, PASSWORD, PORT with the right informations of your mqtt server
## Add script/mqtt.py to your crontab