Syntax for send event via MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Patou
Normal user
Posts: 106
Joined: 21 May 2018, 10:33

Syntax for send event via MQTT

#1 Post by Patou » 07 Apr 2020, 03:29

Hello friends,
Sorry I do not find the correct syntax to send a MQTT command from Home assistant to Esp easy
I have tried :
command_topic: 'Esp1/cmd'
payload_on: '=event,ValveOn'
payload_off: '=event,ValveOff'

command_topic: 'Esp1/cmd'
payload_on: 'event,ValveOn'
payload_off: 'event,ValveOff'

command_topic: 'Esp1/cmd='
payload_on: 'event,ValveOn'
payload_off: 'event,ValveOff'

Can somebody help me ?
Patou

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Syntax for send event via MQTT

#2 Post by grovkillen » 07 Apr 2020, 09:29

Code: Select all

command_topic: 'Esp1/cmd'
payload_on: 'event,ValveOn'
payload_off: 'event,ValveOff'
Given that you have the name of the unit and the events correct it should be working.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Patou
Normal user
Posts: 106
Joined: 21 May 2018, 10:33

Re: Syntax for send event via MQTT (solved)

#3 Post by Patou » 07 Apr 2020, 15:26

Hello
Thanks for your answer
Actually I use domoticz and Home assistant
The mqtt controller was set to domoticz.
This is no problem for publishing topics to Home assistant, receiving messages to the generic mqtt helper but do not work with the %sysname%/cmd commands
I set the mqtt controller to home assistant and it works
Patou

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 82 guests