Syntax for Adding Multiple Readers

5 posts / 0 new
Last post
abu3bdullah
Syntax for Adding Multiple Readers

Can you help how can I modify the appsettings.json file to handle the current situation:

Media: Serial over Ethernet
Each group of meters is connected to one Serial (RS485) Port that is mapped to one IP Address & Port.

Required one DLSM.AMI "Reader" for each IP/Port, with only 1 thread so that one meter is read at a time for each IP/Port.

I tried the following, but not working:

"Reader": {
"Disabled": "False",
"Id": "603C1F03-6EDE-4F4F-B108-3451383F0B01",
"Name": "IP2Reader",
"Threads": 1,
"TaskWaitTime": 60
},

"Reader": {
"Disabled": "False",
"Id": "603C1F03-6EDE-4F4F-B108-3451383F0B02",
"Name": "IP1Reader",
"Threads": 1,
"TaskWaitTime": 60
},

Kurumi
Kurumi's picture

Hi,

I believe that the reason is the device is not mapped to the reader. When you try to read the meter first available reader tries to read it and this causes the problem. UI doesn't support this at the moment, but we can add support it the next week and release a new version at the beginning of November.

Is this the problem?

This should work if you have only one thread.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

Kurumi
Kurumi's picture

Hi,

This functionality is added to the new version. Get the latest versions from the Gurux.DLMS.AMI and GXDLMSDirector.

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

abu3bdullah

Assigning attributes to different readers in DLMS.AMI UI is OK.

But, how to add multiple readers through the JSON file? When added as described above before, I have error: "Unhandled exception. System.FormatException: A duplicate key 'Reader:Disabled' was found."

Kurumi
Kurumi's picture

Hi,

There is only one reader per instance, but you can define how many threads there are in one reader settings Threads in appsettings.json.

Read the instructions here if you want to use multiple readers.
https://www.gurux.fi/node/17172

Get the latest version from Gurux.DLMS.AMI. Database type was earlier set to empty, but now database disabled is set True.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi