Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kirbs-/rpi2mqtt
https://github.com/kirbs-/rpi2mqtt
home-assistant mqtt raspberry-pi
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kirbs-/rpi2mqtt
- Owner: kirbs-
- Created: 2018-08-04T13:23:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-10T15:44:39.000Z (11 months ago)
- Last Synced: 2024-10-01T05:41:32.333Z (about 1 month ago)
- Topics: home-assistant, mqtt, raspberry-pi
- Language: Python
- Homepage:
- Size: 246 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rpi2mqtt
Simplify interacting Raspberry Pi sensors and GPIO pins remotely via MQTT. Also integrates with Home Assistant.
# Supported Devices
- Temperature/Humidity
- DHT22/DHT11
- One wire (DS18B20, MAX31850, etc)
- BME280
- Binary
- Generic reed switches
- Thermostat
- HestiaPi
- Switch GPIO pins on/off. e.g. activate relay, LED, etc.# Installation
1. `sudo pip install rpi2mqtt`
2. `rpi2mqtt --generate-config`
3. Update config.yaml. See configuration info.
# Configuration
### Setup MQTT
1. Open config.yaml.
2. Edit MQTT broker details
```yaml
# config.yaml
mqtt:
host: example.com
port: 8883
ca_cert: '/path/to/example.com.crt'
username: mqtt_user
password: secure_password
retries: 3
```
3\. add sensors to config.yaml
```yaml
# config.yaml
sensors:
- type: dht22
name: laundry_room_climate
pin: 16
topic: 'homeassistant/sensor/laundry_room_climate/state'
- type: reed
name: laundry_room_door
pin: 24
normally_open: true
topic: 'homeassistant/sensor/laundry_room_climate/state'
```
3. Start rpi2mqtt
`rpi2mqtt -c /path/to/config.yaml`### Install systemd service
4. `rpi2mqtt --install-service` and enter run user and absolute path to config.yaml
5. Enable and start service `sudo systemctl enable rpi2mqtt`
6. `sudo systemctl start rpi2mqtt`