Skip to content

Latest commit

 

History

History
executable file
·
75 lines (45 loc) · 2.68 KB

File metadata and controls

executable file
·
75 lines (45 loc) · 2.68 KB

Changes in this fork

  • Added dark mode
  • Streamlined broker service
  • Upgraded to MQTTNet 4.3.7
  • Added IIS compatibility
  • Removed port configuration as that is managed by IIS
  • Added file logging (https://github.com/adams85/filelogger)
  • Added further telemetry to dashboard (application lifetime, disconnections, subscriptions, etc)
  • Added QoS option to publish panel
  • Fixed memory leak, max records can be configured on appsettings.json
  • Added example REST endpoint for telemetry data export

Mqtt Broker w/ Dashboard

A simple Server-side Application hosting a Mqtt Broker and Dashboard UI for real-time monitoring using ASP.NET Blazor Server to quickly build and test custom Mqtt infrastructure.

Access Dashboard UI in browser: http://localhost:5000, and use protocol "mqtt://" to access mqtt server (ex: mqtt://localhost:1883), a mqtt client such as MQTTX is recommended for debugging.

Dashboard

Information

Run in CLI

  1. Install Microsoft .NET SDK 6.0

  2. Clone Project from GitHub

  3. Start Host from CLI (in Project Root Folder)

    $ dotnet run

  4. Access Dashboard UI in Browser: http://localhost:5000

Run in Docker Container

  1. Install Docker Desktop

  2. Clone Project from GitHub

  3. Run as Docker Service (in Project Root Folder):

    $ docker-compose up -d

  4. Access Dashboard UI in Browser: http://localhost:5000

Host in IIS

Configure application pool normally as any .NET app.

The MQTT server will be acessible on the IP binding/hostname you configure on IIS with the MQTT port you configured on appsettings.json (ex: mqtt://localhost:1883).

Configuration

Port configuration is stored in "HostConfig.json" and loaded at startup.

- Tcp Port: 1883 (regular Mqtt over Tcp)

- Http Port: 5000

All configuration is available on appsettings.json

Endpoints

  • "/" Serves Dashboard UI

  • "/GetConnectedClients" Example telemetry endpoint

  • "/swagger"

Dependencies

  • MQTTnet Mqtt Library that supports Mqtt over WebSockets
  • MudBlazor Material Design UI Framework for Dashboard Web Frontend
  • Json.NET Json Library to load/save Config File
  • Karambolo.Extensions.Logging.File Lightweight implementation of the Microsoft.Extensions.Logging.ILoggerProvider interface for file logging