Page 1 of 1

Run event via MQTT

Posted: 12 Apr 2024, 04:15
by mackowiakp
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"

Re: Run event via MQTT

Posted: 12 Apr 2024, 08:06
by Ath
You're close.
But luckily it's all documented, specifically for the Home Assistant controller :D
https://espeasy.readthedocs.io/en/lates ... ing-events

Re: Run event via MQTT

Posted: 12 Apr 2024, 09:34
by mackowiakp
Yep. In fact - not far :lol:

Code: Select all

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