Format of MQTT message from Home Assistant to EspEasy

Moderators: grovkillen, Stuntteam, TD-er

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

Format of MQTT message from Home Assistant to EspEasy

#1 Post by Patou » 27 Feb 2025, 19:26

Hello,
I want to send a message that is triggering an event from Home Assistant to EspEasy.
I set the Controller1 to Home assistant with the parameters as shows bellow.
mqtt_settings.png
mqtt_settings.png (53.29 KiB) Viewed 515 times
In the EspEasy rules I wrote following :

Code: Select all

On ha_start do
 If [Lm_Shutter#State]=0  // shutter closed
  gpio,0,0 // 1 = Open 0 = Close
  TaskValueSet,7,1,0 // Position 0
  TaskValueSet,8,1,0 // Internal Target Position 0
  Publish %sysname%/State,'Fermé'
 endif
endon
How should I formulate the publish message on the Home Assistant side ?
I tried without succes :
- Topic : Volet1/cmd=event Payload : ha_start (Volet1 is the %sysname%)
mqtt_message.png
mqtt_message.png (11.25 KiB) Viewed 515 times
Could you help please ?
Patou

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

Re: Format of MQTT message from Home Assistant to EspEasy

#2 Post by Patou » 28 Feb 2025, 02:16

Found my mistake :
Topic should be : Volet1/cmd
Payload : event, ha_start
Gives in the log :

Code: Select all

EVENT: ha_start

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests