All Projects → linfx → Mqttfx

linfx / Mqttfx

Licence: mit
MqttFx is a mqtt v3.1.1 client using DotNetty

Labels

Projects that are alternatives of or similar to Mqttfx

Addon Zwave2mqtt
Z-Wave to MQTT - Home Assistant Community Add-ons
Stars: ✭ 58 (-17.14%)
Mutual labels:  mqtt
Cocoamqtt
MQTT for iOS and macOS written with Swift
Stars: ✭ 1,129 (+1512.86%)
Mutual labels:  mqtt
Blinker Library
An IoT Solution,Blinker library for embedded hardware. Works with Arduino, ESP8266, ESP32.
Stars: ✭ 1,095 (+1464.29%)
Mutual labels:  mqtt
Luamqtt
luamqtt - Pure-lua MQTT v3.1.1 and v5.0 client
Stars: ✭ 58 (-17.14%)
Mutual labels:  mqtt
Flogo Contrib
Flogo Contribution repo. Contains activities, triggers, models and actions.
Stars: ✭ 60 (-14.29%)
Mutual labels:  mqtt
What Mqtt
What MQTT? MQTT on websocket sample.
Stars: ✭ 64 (-8.57%)
Mutual labels:  mqtt
Gleam
An operation cluster based on MQTT
Stars: ✭ 53 (-24.29%)
Mutual labels:  mqtt
Python Paho Mqtt For Aws Iot
Use Python and paho client with AWS IoT for MQTT messaging
Stars: ✭ 68 (-2.86%)
Mutual labels:  mqtt
Nanodemqtt
MQTT for Nanode
Stars: ✭ 61 (-12.86%)
Mutual labels:  mqtt
Thingsboard
Open-source IoT Platform - Device management, data collection, processing and visualization.
Stars: ✭ 10,526 (+14937.14%)
Mutual labels:  mqtt
Pysmartnode
Micropython Smarthome framework
Stars: ✭ 58 (-17.14%)
Mutual labels:  mqtt
Mqtt
MQTT broker written in D, using vibe.d
Stars: ✭ 59 (-15.71%)
Mutual labels:  mqtt
Mhi Ac Ctrl
Reads and writes data (e.g. power, mode, fan status etc.) from/to a Mitsubishi Heavy Industries (MHI) air conditioner (AC) via SPI controlled by MQTT
Stars: ✭ 64 (-8.57%)
Mutual labels:  mqtt
Mqtt Siemens S7 300
MQTT library block written in Siemens SCL for S7-300 PLC with CP343-1
Stars: ✭ 57 (-18.57%)
Mutual labels:  mqtt
Lwmqtt
a light weight MQTT implementation
Stars: ✭ 67 (-4.29%)
Mutual labels:  mqtt
Homeautomation.codesys3
Home Automation system build in CoDeSys 3 with MQTT communication to any third party Home Automation software
Stars: ✭ 55 (-21.43%)
Mutual labels:  mqtt
Aws Iot Certificate Vending Machine
The CVM allows a device to apply for its own certificate and installation.
Stars: ✭ 64 (-8.57%)
Mutual labels:  mqtt
Mqtt Explorer
An all-round MQTT client that provides a structured topic overview
Stars: ✭ 1,162 (+1560%)
Mutual labels:  mqtt
Mqtt Chat
MQTT Chat Using Mosca
Stars: ✭ 67 (-4.29%)
Mutual labels:  mqtt
Rabbitmq Server
Open source RabbitMQ: core server and tier 1 (built-in) plugins
Stars: ✭ 9,064 (+12848.57%)
Mutual labels:  mqtt

MqttFx

c# mqtt 3.1.1 client

官方交流群: 241445317


Install

PM> Install-Package MqttFx

Examples

    class Program
    {
        static async Task Main(string[] args)
        {
            var services = new ServiceCollection();
            services.AddMqttClient(options =>
            {
                options.Host = "118.126.96.166";
            });
            var container = services.BuildServiceProvider();

            var client = container.GetService<MqttClient>();
            client.Connected += Client_Connected;
            client.Disconnected += Client_Disconnected;
            client.MessageReceived += Client_MessageReceived;
            if (await client.ConnectAsync() == ConnectReturnCode.ConnectionAccepted)
            {
                var top = "$SYS/brokers/+/clients/#";
                Console.WriteLine("Subscribe:" + top);

                var rcs = (await client.SubscribeAsync(top, MqttQos.AtMostOnce)).ReturnCodes;

                foreach (var rc in rcs)
                {
                    Console.WriteLine(rc);
                }

                for (int i = 1; i < int.MaxValue; i++)
                {
                    await client.PublishAsync("/World", Encoding.UTF8.GetBytes($"Hello World!: {i}"), MqttQos.AtLeastOnce);
                    await Task.Delay(1000);
                    //Console.ReadKey();
                }
            }
            Console.ReadKey();
        }

        private static void Client_Connected(object sender, MqttClientConnectedEventArgs e)
        {
            Console.WriteLine("Connected Ssuccessful!");
        }

        private static void Client_Disconnected(object sender, MqttClientDisconnectedEventArgs e)
        {
            Console.WriteLine("Disconnected");
        }

        private static void Client_MessageReceived(object sender, MqttMessageReceivedEventArgs e)
        {
            //$SYS/brokers/+/clients/+/connected
            //$SYS/brokers/+/clients/+/disconnected
            //$SYS/brokers/+/clients/#
            var message = e.Message;
            var payload = Encoding.UTF8.GetString(message.Payload);

            if (new Regex(@"\$SYS/brokers/.+?/connected").Match(message.Topic).Success)
            {
                //{ "clientid":"mqtt.fx","username":"mqtt.fx","ipaddress":"127.0.0.1","clean_sess":true,"protocol":4,"connack":0,"ts":1540949660}

                var obj = JObject.Parse(payload);
                Console.WriteLine($"【Client Connected】 client_id:{obj.Value<string>("clientid")}, ipaddress:{obj.Value<string>("ipaddress")}");

            }
            else if (new Regex(@"\$SYS/brokers/.+?/disconnected").Match(message.Topic).Success)
            {
                //{"clientid":"mqtt.fx","username":"mqtt.fx","reason":"normal","ts":1540949658}

                var obj = JObject.Parse(payload);
                Console.WriteLine($"【Client Disconnected】 client_id:{obj.Value<string>("clientid")}");
            }
            else
            {
                Console.WriteLine(payload);
            }
        }
    }

EMQ 百万级分布式开源物联网MQTT消息服务器

http://www.emqtt.com/


概览

MQTT是一个轻量的发布订阅模式消息传输协议,专门针对低带宽和不稳定网络环境的物联网应用设计

MQTT 官网:            http://mqtt.org
MQTT V3.1.1协议规范:  http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html
MQTT 协议英文版:      http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html
MQTT 协议中文版:      https://mcxiaoke.gitbooks.io/mqtt-cn/content/
MQTT 协议中文版:      https://legacy.gitbook.com/book/mcxiaoke/mqtt-cn

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].