Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
  • Gurux Club
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Gurux.MQTT

Gurux.MQTT

Profile picture for user Administrator
By Administrator, 18 April, 2019
View releasesView issues
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.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

Fri, 03/24/2023 - 14:22
gurux.dlms.c 20230324.1
Thu, 03/23/2023 - 11:01
GXDLMSDirector 9.0.2303.2301
Thu, 03/23/2023 - 09:10
Gurux.DLMS.Python 1.0.142
Wed, 03/22/2023 - 13:51
Gurux.DLMS.Net 9.0.2303.2201
Wed, 03/22/2023 - 10:15
gurux.dlms.c 20230322.1

Open bugs

Gurux.DLMS.AMI4
1
Gurux.DLMS.Android
1
gurux.dlms.c
3
gurux.dlms.cpp
3
gurux.dlms.delphi
1
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin