I have ESPEasy firmware on some devices. Currently I’m controling it via HTTP commands. Now it’s time to change from HTTP to MQTT and here I need help of you guys…
So probably this is important pictures so that I can make correct mqtt protocol…
Config:
Controllers:
Is this correct MQTT configuration?
I can choose also some other MQTT protocol, but probably OpenHAB is OK, or need to be Domoticz MQTT?
Hardware:
Devices:
Info page:
HOME ASSISTANT:
Current lovelace GUI:
Switch sensor (via HTTP):
#KONTROLA: http://192.168.3.99/
# HA - 192.168.3.99 - ESPEasy Klop - LED (ON/OFF) - stalna svetloba
- platform: command_line
switches:
espeasy_klop_led_stalna:
command_on: "/usr/bin/curl -X POST http://192.168.3.99/control?cmd=relay,1,1"
command_off: "/usr/bin/curl -X POST http://192.168.3.99/control?cmd=relay,1,0"
friendly_name: Klop - LED osvetlitev (stalno)
#KONTROLA: http://192.168.3.99/
# HA - 192.168.3.99 - ESPEasy Klop - LED (ON/OFF) - preko senzorja
- platform: command_line
switches:
espeasy_klop_led_senzor:
command_on: "/usr/bin/curl -X POST http://192.168.3.99/control?cmd=relay,0,1"
command_off: "/usr/bin/curl -X POST http://192.168.3.99/control?cmd=relay,0,0"
friendly_name: Klop - LED osvetlitev (senzor)
So, how to define correct MQTT switch? So that it will have switch icon instead of lightning icon:
Is ESPEasy MQTT defined correctly? Do I need only add MQTT switch in HA? MQTT broker is already working in Home Assistant as many other devices use MQTT (Shelly, Tasmota, etc…).
Thank you for your help…