• Stars
    star
    533
  • Rank 81,312 (Top 2 %)
  • Language
    Dart
  • License
    Other
  • Created about 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A server and browser based MQTT client for dart

mqtt_client

Build Status FOSSA Status

A server and browser based MQTT client for Dart.

The client is an MQTT v3(3.1 and 3.1.1) implementation(an equivalent MQTT v5 client can be found here) supporting subscription/publishing at all QOS levels, keep alive and synchronous connection. The client is designed to take as much MQTT protocol work off the user as possible, connection protocol is handled automatically as are the message exchanges needed to support the different QOS levels and the keep alive mechanism. This allows the user to concentrate on publishing/subscribing and not the details of MQTT itself.

Examples of usage can be found in the examples directory. An example is also provided showing how to use the client to connect to the mqtt-bridge of Google's IoT-Core suite. This demonstrates how to use secure connections and switch MQTT protocols. The test directory also contains standalone runnable scripts demonstrating subscription, publishing and topic filtering.

The server client supports both normal and secure TCP connections and secure(wss) and non-secure(ws) websocket connections. The browser client supports only secure(wss) and non-secure(ws) websocket connections.

The client has been used successfully with the MQTT brokers from several of the major cloud providers IOT/MQTT platforms, including :-

  • Google IOT Core
  • Amazon AWS
  • Microsoft Azure
  • IBM

It has also been used with a range of both publicly available brokers such as Mosquitto and proprietary ones. An example using the adafruit MQTT broker for flutter can be found here.

The code is originally a port from the C# nMQTT client library to Dart.

Please read the changelog for details related to specific versions.

Installation

If you are using the client in a flutter environment on Android or iOS devices then the following device permission settings are necessary.

iOS

Add the following keys to your Info.plist file, located in ios/Runner/Info.plist:

<key>NSLocalNetworkUsageDescription</key>
<string>Looking for local tcp Bonjour service</string>
<key>NSBonjourServices</key>
<array>
  <string>mqtt.tcp</string>
</array>

Android

Add the following Android permissions to the AndroidManifest.xml file, located in android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

License

FOSSA Status

More Repositories

1

sporran

A PouchDB like browser application in Dart
Dart
67
star
2

xml2json

XML to JSON conversion for Dart
Dart
52
star
3

ethereum

An ethereum RPC client for Dart
Dart
44
star
4

mqtt5_client

A server and browser based MQTT 5 client for dart
Dart
42
star
5

cbor

A CBOR implementation for Dart
Dart
35
star
6

provisoner

Site provisioning 3PC for MODx Revolution
PHP
26
star
7

wilt

Wilt - a server and browser based CouchDB client written in Dart
Dart
25
star
8

coap

A Coap package for dart
Dart
15
star
9

cloudruntest

Test repository for using Dart in cloud run
Dart
15
star
10

frontpage

A front end content editing component for MODx Revolution
PHP
14
star
11

mraa

An implementation of the MRAA linux library for Dart
Dart
12
star
12

C-NativeFunction

Example project showing how to call C# native AOT code libraries from Dart
Dart
10
star
13

iot-home

A google iot-core project using MQTT for Dart
Dart
10
star
14

mod_dart

Apache Dart Module
C
9
star
15

janitor

A site maintenance component for MODx Revolution
PHP
6
star
16

dartamaker

A Dart port of the datamaker test data generation tool
Dart
6
star
17

alpaca

An alpaca implementation in Dart
Dart
5
star
18

dartivity

Iotivity client package for Dart
Dart
5
star
19

modxfs-php

FUSE mount a MODx database using PHP
PHP
5
star
20

sbom

An SBOM generator for Dart packages
Dart
4
star
21

locator

Simple IP Address to country information lookup snippet for MODX Revolution
PHP
4
star
22

huggingface_client

A Hugging Face server and browser based REST API client for the inference and inference endpoint API's
Dart
4
star
23

amqp_client

An AMQP client library for Dart based on Apache QPID using Native Extensions
C++
4
star
24

json_object_lite

JsonObjectLite which allows dot notation access to JSON.parse'd objects, for Dart, lite version
Dart
4
star
25

dartivity_messaging

The messaging component of the Dartivity IOT suite
Dart
3
star
26

anagram

An anagram solving utility for Dart
Dart
3
star
27

aloha

Aloha HTML editor bindings
Dart
2
star
28

grove

A Grove sensor library package for Dart
Dart
2
star
29

dartivity_database

Dartivity suite database component
Dart
2
star
30

cmis

A browser and server based CMIS client in Dart
Dart
2
star
31

iot-voice

Dart
1
star
32

dicerati_proxy

A specialized dynamic reverse proxy system
Dart
1
star