パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v10.14.0

mqtt_client

Dart用のサーバーおよびブラウザベースのMQTTクライアントで、通常の、セキュアなソケットおよびWebSocketをサポートしています。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
12.5万
いいね数
551
Pub ポイント
160

パッケージをインストール

flutter pub add mqtt_client

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

mqtt_client パッケージは、デバイスとサーバー間のリアルタイム通信を可能にする Dart による MQTT クライアントの実装です。標準、セキュア(TLS)、WebSocket 接続をサポートしており、サーバーサイドおよびブラウザベースのアプリケーションに適しています。クロスプラットフォーム対応として設計されており、Android、iOS、Web、macOS、Windows、Linux でスムーズに動作します。IoT プロジェクトに最適で、低遅延かつ高効率な軽量な発行・購読メッセージングを実現します。

用途

  • IoTデバイス通信
  • リアルタイムデータストリーミング
  • リモートセンサー監視
  • スマートホームオートメーション
  • ライブダッシュボードの更新
  • クラウドからデバイスへのメッセージング

主な機能

  • TCP、TLS、WebSocket を介した MQTT をサポート
  • クロスプラットフォーム互換性
  • 軽量で効率的
  • 堅牢な接続処理
  • 発行/購読メッセージングモデル
  • 自動再接続

適している対象

  • IoT開発者
  • リアルタイムアプリケーションビルダー
  • パブ/サブを必要とするバックエンドサービス
  • ウェブベースのダッシュボード
  • ライブ更新が必要なモバイルアプリ

注意事項

  • 適切なブローカーのセットアップが必要です
  • 安全な接続のための追加構成が必要になる場合があります
  • チューニングなしでは、高頻度・低レイテンシーのシナリオには適していない
  • 外部のMQTTブローカーの利用可能性に依存する

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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

カテゴリー

依存関係

依存関係一覧 7 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

ランキング