Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

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

Breadcrumb

  1. Home
  2. Tutorial On Gurux DLMS AMI

Tutorial on Gurux DLMS AMI

By fariqghani , 27 April, 2023
Forums
Gurux.DLMS.AMI

Hi
Is there any tutorial on how to compile and use the Gurux DLMS AMI?

I've downloaded the files from Github, and I've compile using dotnet with the following command:

dotnet build Gurux.DLMS.AMI.sln

the build was successful and I can find the Gurux.DLMS.AMI.dll inside the bin->debug->netcoreapp3.1

Then I try to run dotnet Gurux.DLMS.AMI.dll and got the following error:

Unhandled exception. fail: Gurux.DLMS.AMI.Reader.ReaderService[0]
Failed to connect to the DB server.
fail: Gurux.DLMS.AMI.Reader.ReaderService[0]
Failed to connect to the DB server.

Question:
1. Where can I edit details of the database?
2. How can I run Gurux.DLMS.AMI.UI ? Do I need to compile again?
3. Can I read serial connection on Gurux.DLMS.AMI?
4. From Gurux AMI youtube, I can see that your GuruxDirector has a data concentrator tab menu. My GuruxDirector don't have this tab. How can I get the tab?

Thanks in advance.

Regards,
Fariq

Profile picture for user Kurumi

Kurumi

3 years 1 month ago

Hi Fariq, Make sure that you…

Hi Fariq,

Make sure that you have downloaded the Gurux.DLMS.AMI4 from here:
https://github.com/Gurux/Gurux.DLMS.AMI4

Check this:
https://www.gurux.fi/gurux.dlms.ami4

You can also use docker if you are interested.

BR,
Mikko

fariqghani

3 years 1 month ago

I've downloaded the AMI 4…

I've downloaded the AMI 4 Image using docker. Try to run it after I editted the appsetting.json (edit the database setting), and got the following error:

2023-04-28 12:13:57 Unhandled exception. MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
2023-04-28 12:13:57 ---> System.ArgumentException: The host name or IP address is invalid.
2023-04-28 12:13:57 at MySql.Data.Common.StreamCreator.GetTcpStreamAsync(MySqlConnectionStringBuilder settings, CancellationToken cancellationToken, Boolean execAsync)
2023-04-28 12:13:57 at MySql.Data.Common.StreamCreator.GetStreamAsync(MySqlConnectionStringBuilder settings, CancellationToken cancellationToken, Boolean execAsync)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.NativeDriver.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.NativeDriver.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.Driver.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.Driver.CreateAsync(MySqlConnectionStringBuilder settings, Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.Driver.CreateAsync(MySqlConnectionStringBuilder settings, Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnectionAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.GetPooledConnectionAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.TryToGetDriverAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.GetConnectionAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlConnection.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlConnection.Open()
2023-04-28 12:13:57 at Gurux.Service.Orm.GXDbConnection..ctor(DbConnection[] connections, String tablePrefix)
2023-04-28 12:13:57 at Gurux.DLMS.AMI.Server.ServerSettings.ConnectToDb(WebApplicationBuilder builder, ILogger`1 logger) in /src/Gurux.DLMS.AMI/Server/ServerSettings.cs:line 640
2023-04-28 12:13:57 at Program.<Main>$(String[] args) in /src/Gurux.DLMS.AMI/Server/Program.cs:line 95
2023-04-28 12:13:57 at Program.<Main>(String[] args)

I've editted the following setting:
"Type": "MySql"
"Settings": "Server=localhost;Database=dlms;UID=root@localhost;Password="

please help.

Profile picture for user Kurumi

Kurumi

3 years 1 month ago

Hi, You don't have MySQL…

Hi,

You don't have MySQL running in your PC or there is a firewall that blocks the connection.

BR,
Mikko

fariqghani

3 years 1 month ago

I have xampp running at the…

I have xampp running at the moment.
I also have check the firewall, it allows docker to run through.

Profile picture for user Kurumi

Kurumi

3 years 1 month ago

Hi, You can't connect fo…

Hi,

You can't connect fo MySQL with root user from the different PC. Only local connections are allowed for the root user with MySQL.

You need to create a new user and access rights for the database for it.

BR,
Mikko

fariqghani

3 years 1 month ago

Hi Mikko, I'm trying to…

Hi Mikko,
I'm trying to connect from the same pc (mysql & docker are in the same pc), but still getting the error.

I've ditched the xampp. Now I'm using the official MySQL Workbench.

Can I post the picture?

fariqghani

3 years 1 month ago

Dear Mikko, I'm still stuck…

Dear Mikko,
I'm still stuck at database.
It still give me error server was not found.

Profile picture for user Kurumi

Kurumi

3 years 1 month ago

Hi Fariq, Because you are…

Hi Fariq,

Because you are using docker it's not in the same PC and for that reason you can't use root as a password. You need to create a new user.

BR,
Mikko

Profile picture for user tukur

tukur

3 years ago

Hi Fariq, You can run this…

Hi Fariq,

You can run this on your workbench to create a new user with absolute privileges.

create user 'myuser'@'%' identified by 'password';
grant all privileges on *.* to 'myuser'@'%' with grant option;
flush privileges;

When this is created, then run your docker image with the user and password you created.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin