Skip to content

fvanroie/MqttClientPlugin

Repository files navigation

MqttPlugin for Rainmeter

GitHub release GitHub contributions welcome GitHub issues GitHub Workflow Status Discord

Make your desktop interact with your IOT devices, like smart lights, power meters, temperature and humidity sensors, etc... Monitor sensors and create buttons to trigger an action or scene on your HomeAutomation system.

About

MqttClient Plugin allows you to use data from an MQTT broker within Rainmeter. You can subscribe to multiple topics and use their values in your measures and meters. Publishing messages to MQTT topics is also supported.

Components

This project consists of 2 folders:

  • API : The Rainmeter API files as published in the Rainmeter Plugin SDK
  • MqttClientPlugin : The actual glue that binds the Rainmeter API and the MQTTnet Client.

The MqttClientPlugin is based on the PluginParentChild example from the SDK.

Compilation

There is a dependency on 3 NuGet packages: MQTTnet, Newtonsoft.Json and Costura.Fody. These are automatically downloaded and included when you open the project for the first time.

The solution (.sln) file can be built using the free Visual Studio 2019 Community Edition. If needed, right-click the solution item and run 'Restore NuGet packages' to install all dependencies. Then Build the Solution.

Installation

The plugin is now completely self-contained. Just copy the MqttClient.dll file from bin\x86 or bin\x64 into your %appdata%\Rainmeter\Plugins directory. Optionally, also copy the examples folder to Documents\Rainmeter\Skins.

NOTE: If you previously installed v0.0.1 or v0.0.2, you can remove M2Mqtt.dll from your Rainmeter directory and remove MqttPlugin.dll from your Plugins directory. These aren't needed anymore.

An .rmskin package is also available on the releases page.

Usage

See the examples folder for how to use the Measures. Also check out the documentation.

Contributing

You are welcome to contribute to the development of this plugin:

  • Share examples on how to use the MqttPlugin in Rainmeter skins
  • File a Bug Report
  • Feature requests

Support

For support using MqttClient Plugin, please join the #openHASP on Discord.