An open API service indexing awesome lists of open source software.

https://github.com/devopsmariocom/raspberrypi-thermostat-mqtt-switch-homeassistant

Raspberry PI Docker Image managing relay using MMQT for Home Assistant Generic Thermostat
https://github.com/devopsmariocom/raspberrypi-thermostat-mqtt-switch-homeassistant

homeassistant raspberry-pi thermostat

Last synced: 7 months ago
JSON representation

Raspberry PI Docker Image managing relay using MMQT for Home Assistant Generic Thermostat

Awesome Lists containing this project

README

          

# raspberrypi thermostat mqtt switch homeassistant

Raspberry PI Docker Image managing relay using MMQT for Home Assistant Generic Thermostat

## 1. On raspberry pi 3 start docker image

Create config file

```yaml
mqtt:
host: 192.168.0.221
port: 1883
user: ""
password: ""
topic_prefix: boiler_room
status_topic: status
status_payload_running: "online"
status_payload_stopped: "offline"
status_payload_dead: "dead"

gpio_modules:
- name: raspberrypi
module: raspberrypi

digital_outputs:
- name: thermostat
module: raspberrypi
pin: 26
on_payload: "on"
off_payload: "off"
initial: low # This optional value controls the initial state of the pin before receipt of any messages from MQTT. Valid options are 'low' and 'high'.
retain: no # This option value controls if the message is retained. Default is no.
```

Start docker container

$ `docker run -n thermostat_switch --privileged -d -v /srv/config.yml:/srv/config.yml elmariofredo/raspberrypi-thermostat-mqtt-switch-homeassistant:arm32v7-0.1`

## 2. Add switch config to homeassistant `configuration.yaml` file

```yaml
switch:
- platform: mqtt
name: thermostat
state_topic: "boiler_room/output/thermostat"
availability_topic: "boiler_room/status"
command_topic: "boiler_room/output/thermostat/set"
payload_on: "on"
payload_off: "off"
```