Gurux.MQTT

Join the Gurux Community or follow @Gurux for project updates.

Open Source MQTT media component, made by Gurux Ltd, is a part of GXMedias set of media components, which programming interfaces help you implement communication by chosen connection type. Gurux media components also support the following connection types: Serial,Network, Terminal, SMS.

Functionality

Purpose of Gurux MQTT library is to allow GXDLMSDirector to access meters where it's not possible to client establishes the connection to the meter, for example when dynamic IP addresses are used.
Note! You must use GXDLMSDirector for .Net framework 4.6. You can get it here.
You can get more information from MQTT.

Gurux MQTT consists of three different parts.

Gurux.MQTT

Gurux.MQTT is media component, used to send data using MQTT broker and bridge to the meter.

Gurux.Broker

Gurux.Broker is MQTT broker. You can use any MQTT broker you want to.

Gurux.Bridge

Gurux.Bridge connects your meter to the MQTT broker. It sends received data from the meter to the Broker and vice versa.

Simple example

First, you need to start Gurux.Broker. You can use other brokers as well, but in this example, we use a local broker. Start broker running "dotnet Gurux.Broker.dll"
Next start Gurux.Bridge. You do it running "dotnet Gurux.Bridge.dll -h broker_address". When you run it the first-time app creates connections.json-file and closes right away.
Open connectios.json file. It looks something like:

{
  "BrokerAddress": "localhost",
  "BrokerPort": 1883,
  "Connections": [
    {
      "Name": "Test",
      "Settings": "localhost4061",
      "Type": "Net"  
    },
    {
      "Settings": "COM1",
      "Type": "Serial",
      "UseOpticalHead": "true"
    }],
  "Name": "eab3395c-8b41-4e75-ac44-a18bce465e31"
}

Broker Address

Broker Address is TCP/IP address of the broker. Default is localhost.

BrokerPort

Broker port is TCP/IP port of the broker. Default is 1883.

Bridge Name

The Name is a unique address of the bridge. Each bridge must have a unique address. If you copy the file to the other computer change name. Name is autogenerated when a file is created, but you can change it.

Media Name

Name is an optional field that you can use to describe your meter. If the name is not given meters are defined by index number.

Type

The type describes the type of meter. At the moment only serial and network connections are supported.

Settings

Settings field defines used media settings.
After you have set the correct settings you can start the bridge again. You can see bridge and meter topics (address) in the command line output.
Next, start GXDLMSDirector and create a new device. Select MQTT as a media type. Update broker address and port number and topic. Select the topic of the meter where you want to make a connection from the Bridge output and paste it to the topic field.
If your settings are correct, you can now read your meter.
If you have problems you can ask your questions in Gurux Forum.

Trouble shooting

If you have problems first check that the topic of the Bridge is correct. You can also use command line parameter -t Verbose to show more information from the sent and received messages.

Project type: 
Full project
Short name: 
gurux.mqtt
Enable issue tracker: 
Yes
Has project releases: 

Downloads