Run event via MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Run event via MQTT

#1 Post by mackowiakp » 12 Apr 2024, 04:15

My ESP is logged to MQTT broker correctly.
Home assistant properly receive values over this MQTT boker from sensors connected to this ESP.
It is also possible to view such values using "mosquitto_sub" command from CLI.
Question is how to send command via MQTT to run specific event defined in ESP rules.
Of course event has no define "Device".

I try such syntax which is not correct. So please help me to correct one.

Code: Select all

mosquitto_pub -h localhost -t ESP_sysname/ -m "event_name"

User avatar
Ath
Normal user
Posts: 3531
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Run event via MQTT

#2 Post by Ath » 12 Apr 2024, 08:06

You're close.
But luckily it's all documented, specifically for the Home Assistant controller :D
https://espeasy.readthedocs.io/en/lates ... ing-events
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Run event via MQTT

#3 Post by mackowiakp » 12 Apr 2024, 09:34

Yep. In fact - not far :lol:

Code: Select all

mosquitto_pub -h localhost -t ESP_sysname/cmd_arg1/event -m "event_name"

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests