All Projects → xljiulang → Paho.mqttdotnet

xljiulang / Paho.mqttdotnet

A .Net wrapper for eclipse/paho.mqtt.c

Projects that are alternatives of or similar to Paho.mqttdotnet

asyncio-mqtt
Idomatic asyncio wrapper around paho-mqtt
Stars: ✭ 137 (+315.15%)
Mutual labels:  mqtt, mqtt-client
Wolfmqtt
wolfMQTT is a small, fast, portable MQTT client implementation, including support for TLS 1.3.
Stars: ✭ 316 (+857.58%)
Mutual labels:  mqtt, mqtt-client
node-deepstackai-trigger
Detects motion using Deepstack AI and calls registered triggers based on trigger rules.
Stars: ✭ 154 (+366.67%)
Mutual labels:  mqtt, mqtt-client
WeConnect-mqtt
MQTT Client that publishes data from Volkswagen WeConnect
Stars: ✭ 14 (-57.58%)
Mutual labels:  mqtt, mqtt-client
Qmqtt
MQTT Client for Qt
Stars: ✭ 409 (+1139.39%)
Mutual labels:  mqtt, mqtt-client
ESPecial
ESP32 automation with web interface and telegram bot
Stars: ✭ 77 (+133.33%)
Mutual labels:  mqtt, mqtt-client
Mqtt Panel
A web interface for MQTT
Stars: ✭ 315 (+854.55%)
Mutual labels:  mqtt, mqtt-client
zmosq
MQTT/Mosquitto / ZeroMQ proxy
Stars: ✭ 22 (-33.33%)
Mutual labels:  mqtt, mqtt-client
Hivemq Mqtt Client
HiveMQ MQTT Client is an MQTT 5.0 and MQTT 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and backpressure support
Stars: ✭ 402 (+1118.18%)
Mutual labels:  mqtt, mqtt-client
Tdm
GUI application to discover and monitor devices flashed with https://github.com/arendst/Sonoff-Tasmota
Stars: ✭ 385 (+1066.67%)
Mutual labels:  mqtt, mqtt-client
ArduinoMqtt
MQTT client for Arduino
Stars: ✭ 58 (+75.76%)
Mutual labels:  mqtt, mqtt-client
Mosquitto Php
A wrapper for the Eclipse Mosquitto™ MQTT client library for PHP.
Stars: ✭ 448 (+1257.58%)
Mutual labels:  mqtt, mqtt-client
wyzesense2mqtt
Configurable WyzeSense to MQTT Gateway intended for use with Home Assistant or other platforms that use MQTT discovery mechanisms.
Stars: ✭ 55 (+66.67%)
Mutual labels:  mqtt, mqtt-client
Mqttx
MQTT X - Elegant MQTT 5.0 Client Tool of Cross-platform
Stars: ✭ 892 (+2603.03%)
Mutual labels:  mqtt, mqtt-client
mqtt-mock
mqtt压测工具。支持subscribe、publish压测方式,支持模拟客户端连接数。
Stars: ✭ 78 (+136.36%)
Mutual labels:  mqtt, mqtt-client
Kmansonoff
Firmware for ESP8266 based itead Sonoff switches for use with HomeAssistant / mqtt
Stars: ✭ 282 (+754.55%)
Mutual labels:  mqtt, mqtt-client
CODESYS-MQTT
MQTT client library for CODESYS, supporting all QoS
Stars: ✭ 63 (+90.91%)
Mutual labels:  mqtt, mqtt-client
mqtt-datasource
MQTT Datasource for Grafana allows streaming data from any MQTT broker running either locally or remotely.
Stars: ✭ 99 (+200%)
Mutual labels:  mqtt, mqtt-client
Mqtt C
A portable MQTT C client for embedded systems and PCs alike.
Stars: ✭ 342 (+936.36%)
Mutual labels:  mqtt, mqtt-client
Adafruit mqtt library
Arduino library for MQTT support
Stars: ✭ 441 (+1236.36%)
Mutual labels:  mqtt, mqtt-client

Paho.MqttDonet

A .Net wrapper for eclipse/paho.mqtt.c, support async/await asynchronous

Dependencies

  • eclipse/paho.mqtt.c
  • vs2012/.net framework 4.0 or later
  • Visual C++ Redistributable 2015

Support

  • Asp.net / WCF
  • WinForm / WPF
  • Console / Service

Demo

async static Task DemoAsync()
{
    // Trace
    MqttClient.SetTraceLevel(MqttTraceLevels.Protocol);
    MqttClient.SetTraceCallback((level, message) => Console.WriteLine(message));

    // Listening message
    var client = new MqttClient("mqtt://127.0.0.1", "clientId");
    client.OnMessageArrived += (sender, topic, message) =>
    {
        Console.WriteLine("got message " + message);
        var msg = new MqttMessage(message.QoS, "from MqttDotnet client");
        var mqClient = sender as MqttClient;
        mqClient.SendMessageAsync(topic, msg);
    };

    // Process Connection Lost
    client.OnConnectionLost += async (sender) =>
    {
        var mqClient = sender as MqttClient;
        while (mqClient.IsConnected == false)
        {
            await mqClient.ReConnectAsync();
        }
        await client.SubscribeAsync("mqtt/dotnet/xljiulang", MqttQoS.ExactlyOnce);
    };

    // Connect & subscribe
    await client.ConnectAsync(new ConnectOption
    {
        Username = "MqttDotnet",
        Password = "123456",
    });
    await client.SubscribeAsync("mqtt/dotnet/xljiulang", MqttQoS.ExactlyOnce);
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].