Is it possible to monitor a MQTT topic? I think it would be fun to connect widgets to a existing domotica system like home-assistant.
I am a new user, i googled it. But apologize if i missed something
It is currently April 26th, 2024, 7:30 pm
Monitor MQTT topic's
-
- Posts: 3
- Joined: March 26th, 2019, 7:13 am
-
- Posts: 3
- Joined: September 22nd, 2019, 10:38 pm
Re: Monitor MQTT topic's
Hey Pimmetje,
I’m in the process of creating an Mqtt rainmeter plugin for this purpose.
Let me know if you are still interested in this.
Mvg,
fvanroie
I’m in the process of creating an Mqtt rainmeter plugin for this purpose.
Let me know if you are still interested in this.
Mvg,
fvanroie
-
- Posts: 3
- Joined: March 26th, 2019, 7:13 am
Re: Monitor MQTT topic's
Yes i am
-
- Posts: 3
- Joined: September 22nd, 2019, 10:38 pm
Re: Monitor MQTT topic's
So far, I've coupled the Rainmeter API ParentChild example to the Paho M2Mqtt.Net library. When both dll's are installed, Rainmeter can indeed communicate with an MQTT broker.
You define an MQTT broker and Topics in the config like this:
I'm already using it to read the topic from a powermeter flashed with Tasmota firmware. For simple things it's functional, but I'm not sure how well it'll perform with lots of Meters. Also, only subcribe is implemented. Publishing data to a topic will be added later on...
I can publish the code on github if you want to give it a try yourself.
You define an MQTT broker and Topics in the config like this:
Code: Select all
[mqttServer]
Measure=Plugin
Plugin=MqttPlugin.dll
Server=192.168.1.1
#Username=
#Password=
[mqttTopic1]
Measure=Plugin
Plugin=MqttPlugin.dll
ParentName=mqttServer
Topic=stat/doorbell/ringer
Qos=1
[mqttTopic2]
Measure=Plugin
Plugin=MqttPlugin.dll
ParentName=mqttServer
Topic=tele/sonoffPow/SENSOR
Qos=0
I can publish the code on github if you want to give it a try yourself.
-
- Posts: 3
- Joined: March 26th, 2019, 7:13 am
Re: Monitor MQTT topic's
I can only say Github "Yes please"
-
- Posts: 3
- Joined: September 22nd, 2019, 10:38 pm
Re: Monitor MQTT topic's
You can check it out here: https://github.com/fvanroie/MqttClientPlugin. If you have any questions, don't hesitate to ask!
Any feedback will be much appreciated.
Any feedback will be much appreciated.