I’m trying to get this to work, but am not succeeding yet.
I have ESPEasy build R120 on a Wemos D1 Mini with a relay shield on top of it.
With mosquitto_pub -t /WemosD1/gpio/5 -m 1 i can turn the relay on.
With mosquitto_pub -t /WemosD1/gpio/5 -m 0 i can turn it off again.
With mosquitto_sub -h 192.168.4.14 -p 1883 -v -t '/WemosD1/#' i can see that the GPIO is turned on/off:
/WemosD1/gpio/5 1 /WemosD1/gpio/5 0
I created a switch in HASS:
- platform: mqtt
name: "Switch"
state_topic: "WemosD1/gpio/5/state"
command_topic: "WemosD1/gpio/5/set"
payload_on: "1.0"
payload_off: "0.0"
optimistic: true
qos: 0
retain: true
value_template: '{{ value.x }}'
But nothing happens when i click the on/off icons.
In my configuration.yaml i added the mqtt component:
mqtt:
broker: 192.168.4.14
client_id: home-assistant
keepalive: 60
protocol: 3.1
I know it is working, because i grab the temperatures from my OpenTherm gateway over MQTT. I use a separate VM running Mosquitto as my broker.
What is going wrong with the HASS <> ESPEasy part?