Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short name referencing #50

Open
zenobik opened this issue Aug 11, 2021 · 5 comments
Open

Short name referencing #50

zenobik opened this issue Aug 11, 2021 · 5 comments
Assignees
Labels
sponsorship needed Issue is out of scope for our use cases. We need an org to sponsor the development

Comments

@zenobik
Copy link

zenobik commented Aug 11, 2021

Hello,
It would be nice to add "Short name referencing" association method.
I have PAFAL 16EC3rn/1 meter and when I try to associate with it I get error:

"ValueError("vaa-name in InitateResponse is not \x00\x07")".

I comented out this line and now I have error:

"AARE requests use of Short Name referencing which is not " "supported.".

Hope you will keep developing this great project ! 😄

@Krolken
Copy link
Contributor

Krolken commented Aug 11, 2021

Yeah. Short Name refs are something I didn't want to do unless I got paid to do it. It is mostly used in old meters. I don't know any new ones that are not using long name refs.
And you can't really reuse anything. It uses its own services for reading and writing etc. And I can't get hold of a meter for the lab either.

But are you sure it is uses DLMS? It could also be using IEC62056-21. Try our other lib out: https://github.com/pwitab/iec62056-21

@zenobik
Copy link
Author

zenobik commented Aug 12, 2021

I'm pretty sure that it's not 62056-21 because I know really good this protocol and I even wrote C library to communicate with older meters using this protocol.
Debug logs shows that meter answered for HDLC frame:

10:26:04,679 : DEBUG : HDLC state transitioned from NOT_CONNECTED to AWAITING_CONNECTION
10:26:04,680 : DEBUG : Sending: bytearray(b'~\xa0\x07\x03!\x93\x0f\x01~')
10:26:04,726 : DEBUG : Received HDLC data: b'~\xa0\x1e!\x03s\xc3z\x81\x80\x12\x05\x01\x80\x06\x01\x80\x07\x04\x00\x00\x00\x01\x08\x04\x00\x00\x00\x01S;~'
10:26:04,729 : DEBUG : Received frame: UnNumberedAcknowledgmentFrame(destination_address=HdlcAddress(logical_address=16, physical_address=None, address_type='client'), source_address=HdlcAddress(logical_address=1, physical_address=None, address_type='server'), payload=bytearray(b'\x81\x80\x12\x05\x01\x80\x06\x01\x80\x07\x04\x00\x00\x00\x01\x08\x04\x00\x00\x00\x01'), segmented=False, final=True)

But thanks for your fast reply! Maybe you are right that SN referencing is obsolete. I will try with other meters.

@Krolken
Copy link
Contributor

Krolken commented Aug 13, 2021

OK. Yeah if you are getting HDLC frames back it might not support the IEC62056-21. But some support both (or it is an internal setting) I did a quick google of the meter since I have not heard of it before and found this: https://github.com/yahbluez/pafalEC3/blob/master/cron_pafal.py which seems like someone using IEC62056-21 to read the meter.

@zenobik
Copy link
Author

zenobik commented Aug 13, 2021

This one supports both, but 62056-21 is on IR port and DLMS is on wired RS485 port. And of course I'm currently connected to RS485 wired port 😄
So I can read all the values with 62056-21 with IR but it's not as practical in use as the wired RS485 port.

@Krolken
Copy link
Contributor

Krolken commented Aug 16, 2021

Ah. So annoying 😭

Ill leave this issue open and mark it with sposorship needed in case someone else is wondering about SN refs.

@Krolken Krolken self-assigned this Aug 16, 2021
@Krolken Krolken added the sponsorship needed Issue is out of scope for our use cases. We need an org to sponsor the development label Aug 16, 2021
@svet-b svet-b mentioned this issue Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sponsorship needed Issue is out of scope for our use cases. We need an org to sponsor the development
Projects
None yet
Development

No branches or pull requests

2 participants