Asynchronous event notifications.

8 posts / 0 new
Last post
Mithun Tiruvedula
Asynchronous event notifications.

Hi Mikko,

I am trying to listen to event notifications obises such as 0.0-64.96.20.16.255 (Strong DC magnetic field event), 0.0.94.91.18.255 (Event Status Word 1), asynchronously on change of the value/occurrence of the event.

The push notification scripts have been configured in the meter and I can see the notifications in GXDirector, Example logs:
Notifications listen started on Tcp port 4059.
6/8/2021 12:32:25 PM
00 01 00 01 00 10 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 00 10 02 00 00 07

I'm trying to set up a similar listener in Java and tried following the code in https://github.com/Gurux/gurux.dlms.java/tree/master/gurux.dlms.push.lis... .

The simplified code is as follows:

GXDLMSPushListener SNServer = new GXDLMSPushListener(portNumber);
media.addListener(SNServer); // media already connected during init

And in the onReceived method of GXDLMSPushListener SNServer, I print the notification hex string.

The problem is that I am not getting any notifications in the java code. Is this the right way? Am I doing something wrong?

Thank you so much Mikko, and my apologies for so many questions!! :)

Kurumi
Kurumi's picture

Hi,

This is not a push message. It's AARE message and it's part of handshaking. Read push object and check what is the target address? Is your meter sending push objects to one specific IP address? You need to listen to that address.

BR,
Mikko

BR,
Mikko

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

Mithun Tiruvedula

Hi Mikko,

Yes, the meter is sending the notifications to the target address which is my PC public ipv6 address. The meter says it is sending, but I do not know how to receive it.
How do I listen to notifications on my PC using the Java module?

Thanks!

Regards,
Mithun
Leanovate Info-Solutions
Bangalore, India

Kurumi
Kurumi's picture

Hi,

Read push object and check what is the target address. Java or C# application that is listening to that port.

BR,
Mikko

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

Mithun Tiruvedula

Hi Mikko,

The target address is my PC's publicly reachable IPv6 address.
Which Java or C# application should be running? The GXDirector?
Can you help me with a Java snippet to listen to the port for the push notification?

Thanks!

Regards,
Mithun
Leanovate Info-Solutions
Bangalore, India

Kurumi
Kurumi's picture

Hi,

Start Push listener example using that port that is defined in Push object destination. Destination can be anything, so make sure that TCP/IP address and port number are correct.

BR,
Mikko

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

Mithun Tiruvedula

Hi Mikko,

Where do I set the port number in push setup in GXDirector?
PFA screenshot of my push setup

Image: 

Regards,
Mithun
Leanovate Info-Solutions
Bangalore, India

Kurumi
Kurumi's picture

Hi Mithun,

It's usually after TPC/IP port. In your case it's not there, so you need to check it from the meter documentation. It might be that the meter is using port 4059.

BR,
Mikko

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