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
- Host: GitHub
- URL: https://github.com/devopsmariocom/raspberrypi-thermostat-mqtt-switch-homeassistant
- Owner: devopsmariocom
- License: mit
- Created: 2019-01-13T15:04:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-14T06:09:08.000Z (over 6 years ago)
- Last Synced: 2025-02-25T00:07:19.076Z (7 months ago)
- Topics: homeassistant, raspberry-pi, thermostat
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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: raspberrypidigital_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"
```