-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Add MQTT Topic monitor #1512
Comments
Can you describe how you'd like it to work? Like subscribe to a topic and alert based on the messages posted? I'm not super-familiar with MQTT. There's a logger which posts to it which I think uses Paho already, which was contributed by someone else. |
i have e.g. an shellyplus1, which report via it's last will on the topic Questions:
Config for the monitors.conf?
On startup, you start listening to all topics in the monitors.conf. On every intervall, you check the saved responses. i don't know how to handle the listing part to the different topics. you need something like the Listener class in the network logger. edit: |
I created a little example: You need a running mqtt server on localhost:
and mqtt client like mosquitto_client or http://mqtt-explorer.com/ for testing Whats your opinion? |
I added a Manager for the mqtt connections to limit them to 1/broker. Happy Holidays! |
Thanks, this is looking good (and better than I'd have known to do!) Let me know when you think it's about done, or feel free to open a PR for it :) |
Hi!
A MQTT monitor would be awesome ;)
Maybe use some kinde of regex like the http monitor for evaluating?
Paho seems the one to go:
https://pypi.org/project/paho-mqtt/
https://eclipse.dev/paho/
Github repo: https://github.com/eclipse-paho/paho.mqtt.python
Here a a list of other python clients:
https://www.emqx.com/en/blog/comparision-of-python-mqtt-client
The text was updated successfully, but these errors were encountered: