-
Notifications
You must be signed in to change notification settings - Fork 20
Configuring MQTT on your home automation server
Philibert Cheminot edited this page Jul 7, 2023
·
1 revision
- To light the stove send
ON
toin_topic
, without retain flag. - To turn off the stove send
OFF
toin_topic
, with or without retain flag. - To force extinction of the stove send
force
toin_topic
, without retain flag. - To put the ESP into deep sleep send
Sleep
toin_topic
, with retain flag. - To wake up the ESP send
Wake
toin_topic
, with retain flag. (When the ESP is in deep sleep, it wakes up every 5 minutes to check if theWake
message has been received.)
If you want to reset all the settings here is what you can do:
- send
reset
toin_topic
or - connect the
RESET_PIN
(D5 (GPIO14) on ESP8266 or GPIO25 on ESP32) to GND (this is not the RST pin of the ESP) or -
esptool erase_flash
but this will also delete the program.
Here is what to add to configuration.yaml
:
mqtt:
switch:
- name: "" #E.g. "Living room"
state_topic: "mqtt_topic/onoff" #You have to edit that
command_topic: "mqtt_topic/intopic" #Also that
payload_on: "ON"
payload_off: "OFF"
state_on: "ON"
state_off: "OFF"
retain: false
optimistic: false
qos: 0
sensor:
#Salle à manger
- name: "" #E.g. "Stove controller power state living room"
state_topic: "mqtt_topic/pong"
qos: 0
icon: mdi:power
- name: "" #E.g. "Living room"
state_topic: "mqtt_topic/ambtemp"
qos: 0
unit_of_measurement: "ºC"
icon: mdi:thermometer
- name: "" #E.g. "Fumes temp living room"
state_topic: "mqtt_topic/fumetemp"
qos: 0
unit_of_measurement: "°C"
icon: mdi:thermometer
- name: "" #E.g. "Stove state living room"
state_topic: "mqtt_topic/state"
qos: 0
icon: mdi:fire-alert
- name: "" #E.g. "Flame power living room"
state_topic: "mqtt_topic/flamepower"
qos: 0
unit_of_measurement: "%"
icon: mdi:fire
- name: "" #E.g. "Water temp living room"
state_topic: "mqtt_topic/watertemp"
qos: 0
unit_of_measurement: "ºC"
icon: mdi:coolant-temperature
- name: "" #E.g. "Water pressure living room"
state_topic: "mqtt_topic/waterpres"
qos: 0
unit_of_measurement: "bar"
icon: mdi:gauge