https://github.com/mje-nz/rpi-docker-temperature-logger
Measure temperature and humidity with an HTU21D, and publish to MQTT.
https://github.com/mje-nz/rpi-docker-temperature-logger
docker htu21d mqtt raspberry-pi smart-home
Last synced: 3 months ago
JSON representation
Measure temperature and humidity with an HTU21D, and publish to MQTT.
- Host: GitHub
- URL: https://github.com/mje-nz/rpi-docker-temperature-logger
- Owner: mje-nz
- Created: 2017-05-31T01:57:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-09T23:28:37.000Z (about 9 years ago)
- Last Synced: 2026-02-15T06:20:27.337Z (5 months ago)
- Topics: docker, htu21d, mqtt, raspberry-pi, smart-home
- Language: Python
- Homepage: https://hub.docker.com/r/mjenz/rpi-temperature-logger/
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Measure temperature and humidity with an HTU21D, and publish to MQTT
[](https://microbadger.com/images/mjenz/rpi-temperature-logger "Get your own image badge on microbadger.com")
To run:
```docker run -t --rm --device /dev/i2c-1 --volume /etc/localtime:/etc/localtime:ro --net=host mjenz/rpi-temperature-logger```
To install as a service:
```docker run --detach -t --device /dev/i2c-1 --volume /etc/localtime:/etc/localtime:ro --net=host --restart unless-stopped --name temp-logger mjenz/rpi-temperature-logger```
To enable i2c on osmc:
```
echo "i2c-bcm2708" | sudo tee -a /etc/modules
echo "i2c-dev" | sudo tee -a /etc/modules
echo "dtparam=i2c_arm=on" | sudo tee -a /boot/config.txt
sudo adduser osmc i2c
reboot
```