Skip to content

Gurux/Gurux.DLMS.AMI4

Repository files navigation

See An Gurux for an overview.

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

Gurux.DLMS.AMI is a part of Gurux Device Framework. For more info check out Gurux.

General information

Purpose of Gurux.DLMS.AMI component is given FAST and SIMPLE Advanced Metering Infrastructure for DLMS meters.

Starting with Gurux.AMI

Gurux.DLMS.AMI is supporting docker.

Pull the Docker image: docker pull guruxorg/guruxdlmsamiserver

Generate HTTPS Certificates

A container is using HTTPS connection and for that reason, the HTTPS certificate must be generated. A certificate is generated by running the following commands:

dotnet dev-certs https -ep %USERPROFILE%.aspnet\https\Gurux.DLMS.AMI.Server.pfx -p YOUR_CREDENTIAL_PASSWORD

dotnet dev-certs https --trust

In the preceding code, replace YOUR_CREDENTIAL_PASSWORD with the password.

How to Use this Image

Pull the Docker image: docker pull gurux/guruxdlmsamiserver

Database settings

Gurux.DLMS.AMI is supporting several different databases and databases can be anywhere. For that reason database is not included in the docker image. Database settings are given as docker parameters described below.

DBType tells what database is used. DBAddress tells database settings. By default, we are using an in-memory SQLite database. It is for testing purposes. You don't need to install any database, just start the app.

At the moment Gurux.AMI supports the following databases:

Update USER_ID, DATABASE_PASSWORD, DATABASE_SERVER and DATABASE_NAME with the correct database settings.

Note! Connection strings might vary for the used database version.

Examples for database settings:

Run a container using Microsoft database:

docker run --rm -it -e "Database:Type=MSSQL" -e "Database:Settings=Server=DATABASE_SERVER;Database=DATABASE_NAME;User ID=USER_ID;Password=DATABASE_PASSWORD" -p 8000:80 -p 8001:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=8001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_Kestrel__Certificates__Default__Password="YOUR_CREDENTIAL_PASSWORD" -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/Gurux.DLMS.AMI.Server.pfx -v %USERPROFILE%.aspnet\https:/https/ guruxorg/guruxdlmsamiserver:latest

Run a container using MariaDB or MySQL database:

docker run --rm -it -e "Database:Type=MySQL" -e "Database:Settings=Server=HOST;Database=DATABASE_SERVER;UID=USER_ID;Password=DATABASE_PASSWORD" -p 8000:80 -p 8001:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=8001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_Kestrel__Certificates__Default__Password="YOUR_CREDENTIAL_PASSWORD" -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/Gurux.DLMS.AMI.Server.pfx -v %USERPROFILE%.aspnet\https:/https/ guruxorg/guruxdlmsamiserver:latest

Run a container using Oracle database:

docker run --rm -it -e "Database:Type=Oracle" -e "Database:Settings=User Id=USER_ID;Password=DATABASE_PASSWORD;Data Source=DATABASE_SERVER" -p 8000:80 -p 8001:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=8001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_Kestrel__Certificates__Default__Password="YOUR_CREDENTIAL_PASSWORD" -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/Gurux.DLMS.AMI.Server.pfx -v %USERPROFILE%.aspnet\https:/https/ guruxorg/guruxdlmsamiserver:latest

Run a container using SQLite in-memory database:

docker run --rm -it -e "Database:Type=SQLite" -e "Database:Settings=Filename=:memory:" -p 8000:80 -p 8001:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=8001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_Kestrel__Certificates__Default__Password="YOUR_CREDENTIAL_PASSWORD" -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/Gurux.DLMS.AMI.Server.pfx -v %USERPROFILE%.aspnet\https:/https/ guruxorg/guruxdlmsamiserver:latest

Support

For more information, go Gurux.DLMS.AMI.

You can ask questions in Gurux forum.