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

readout of landis + gyr120AP #33

Open
pfy opened this issue Jan 5, 2023 · 1 comment
Open

readout of landis + gyr120AP #33

pfy opened this issue Jan 5, 2023 · 1 comment

Comments

@pfy
Copy link

pfy commented Jan 5, 2023

I tried to read the landis + gyr ZM120 and had some issues (on osx)
With the code in the repository, no readout is possible. The read timouts.
But if i remove the code to switch the baud rate, by commenting out self.transport.switch_baudrate(self.switchover_baudrate), everything works as expected.

should i prepare a pr with a flag for the client or transport to disable the baud rate switch ?

attached transcript without the actual data of my readings

INFO:iec62056_21.client:Staring init sequence
INFO:iec62056_21.client:Sending request message: RequestMessage(device_address='')
DEBUG:iec62056_21.transports:Sent b'/?!\r\n' over transport: SerialTransport
DEBUG:iec62056_21.client:Resting for 0.25 seconds
DEBUG:iec62056_21.transports:Received b'/LGZ4\\2ZMD120APt.G03\r\n' over transport: SerialTransport
INFO:iec62056_21.client:Received identification message: IdentificationMessage(identification='2ZMD120APt.G03', manufacturer='LGZ', switchover_baudrate_char='4')
INFO:iec62056_21.client:Sending AckOptionsSelect message: AckOptionSelectMessage(baud_char='4', mode_char='0')
DEBUG:iec62056_21.transports:Sent b'\x06040\r\n' over transport: SerialTransport
DEBUG:iec62056_21.client:Resting for 0.25 seconds
INFO:iec62056_21.client:Reading standard readout from device.
@Krolken
Copy link
Contributor

Krolken commented Jan 9, 2023

OK. So the meter does not follow the baud rate it proposes?

A better solution would be to create a subclass of the serial transport where you make the switch_baudrate a no-op.

I rather not add more flags and options as it has been a wish for a long time to rewrite this library and bring it up to standard with our other communication libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants