I am using Windows enviroment (already tells something about me 🙂 )
I created custom alert with Add on builder and add this to custom python script
helper.log_info("Alert action runscript started.")
topic = helper.get_param("topic")
message = helper.get_param("message")
cmd= "c:\\Program Files (x86)\\mosquitto\\mosquitto_pub.exe"
subprocess.check_output([cmd, "-r","-t",topic,"-m",message])
# TODO: Implement your alert action logic here
return 0
In my alert seach string, I prepared field called description ($result.description$) and passed it as a parameter to the message variable. Like this, it works and I get MQTT notification on my smartwatch...
... View more