MQTT notification
Moderators: leecollings, remb0
MQTT notification
Would be great to add support option for MQTT notification. Similar to HTTP but to MQTT chanell. Or I missed something and somehow it works?
- FireWizard
- Posts: 1889
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: MQTT notification
Hi,
Can you explain in more detail what you mean with:
What kind of notification should be send?
Regards
Can you explain in more detail what you mean with:
What should be notified and when?add support option for MQTT notification. Similar to HTTP but to MQTT chanell.
What kind of notification should be send?
Regards
Re: MQTT notification
In setting Notification is Custom HTTP/Action, so just add Custom MQTT/Action with similar fields like HTTP action (subject, topics etc...)
I wrote simple python script as workaround
1/ install mosquitto
2/ set custom HTTP action and create this script, copy to /Domoticz/script/python folder
3/ and set URL action to this script://python/message.py #SUBJECT, #MESSAGE
I wrote simple python script as workaround
1/ install mosquitto
2/ set custom HTTP action and create this script, copy to /Domoticz/script/python folder
3/ and set URL action to this script://python/message.py #SUBJECT, #MESSAGE
Code: Select all
#!/usr/bin/env python3
import subprocess
import sys
try:
command = sys.argv[1]
except:
print("no input")
command = 'X'
p = subprocess.Popen(["mosquitto_pub", "-h", "YOUR_MQQT_IP", "-t", "message", "-m", command])
Who is online
Users browsing this forum: No registered users and 1 guest