Git Product home page Git Product logo

Comments (9)

Krolken avatar Krolken commented on June 17, 2024

You are correct. I never released a new version. Ops 😄
I'll look it over in the coming week.

Is it a hard requirement to set the baudrate? You should be able to read a meter anyway.

from iec62056-21.

Jonamaita avatar Jonamaita commented on June 17, 2024

Thank you for you response.

Yes a need set the baudrate!! But, to set baudrate i am using client.transport.switch_baudrate(9600) and it work.

I am try read EMH NXT4 meter.

Other different between the library and repository, is it in the constructor of DataSet class. In the library in pip, the constructor need address param.

from iec62056-21.

Krolken avatar Krolken commented on June 17, 2024

OK. So you are using RS485 on it?

from iec62056-21.

Jonamaita avatar Jonamaita commented on June 17, 2024

Yes, i am using RS485.

I read the meter successful with standard_readout method.

I am trying read with read_single_value, but, I have not succeeded yet.

from iec62056-21.

Krolken avatar Krolken commented on June 17, 2024

OK. The read_single_value is a bit more complicated on EMH since they are also including R5 and W5 (with password) in their commands.
I started digging in it a while ago (#8) but have not finished the work.

The handling depends a bit on how the meter is configured for security. And I am not sure that it is fully in line with IEC62056-21. It is according to VDEW 2.1 according to EMH but I have not gotten hold of a copy of that standard yet.

What data are you interested in reading?

from iec62056-21.

Jonamaita avatar Jonamaita commented on June 17, 2024

Oh ok !! I'm going to do some research and see if I can get something.

I am trying to read the value 1.8.0. When i use the standard_readout method, I don't get that address in the response.

I only get the fallowing addresses to group C=1:

  • 1.8.1
  • 1.8.1*0
  • 1.8.1*99
  • 1.8.1*98
  • 1.8.1*97
  • 1.8.1*96
  • 1.8.1*95
  • 1.8.1*94
  • 1.8.1*93
  • 1.8.1*92
  • 1.8.1*91
  • 1.8.1*90
  • 1.8.1*89

from iec62056-21.

Krolken avatar Krolken commented on June 17, 2024

OK. In EMH you need to use the R5 command to read 1.8.0

But usually you can do 1.8.0 == 1.8.1, So you might already have the data you need.
Check the values in the display if they correspond to the values in the readout.

The other values in the readout are previous billing period values.

Is that the full readout? You might have some billing period counters and timestamps too to be able to calculate the time of each value.

from iec62056-21.

Jonamaita avatar Jonamaita commented on June 17, 2024

Ok, i will going check the value in the display ( I'm a bit far from the EMH meter ).

Perfect, I was able to read the address 1-0:1.8.0 with the command R5, the following way:

from iec62056_21.client import Iec6205621Client
from iec62056_21 import messages

client = Iec6205621Client.with_serial_transport(port="/dev/ttyUSB1", device_address="8532129")
client.connect()
client.transport.switch_baudrate(9600)

req = messages.CommandMessage.for_single_read("1-0:1.8.0", 1)
req.command_type = "5"

pw_challange = client.access_programming_mode()
client.send_password("00000000")
print(client.transport.port.readline()) # Print ack
client.transport.send(req.to_bytes())

data = client.read_response()
print(data)

client.send_break()

Response of meter:

AnswerDataMessage(data_block=DataBlock(data_lines=[DataLine(data_sets=[DataSet(value='0000178.1', address='1-0:1.8.0', unit='kWh')])]))

The value of address 1-0:1.8.0 has the same value to address1.8.1, It's weird, because 1.8.1 corresponds to "Active energy import (+A) rate 1" according to the obis code of EMH meter NXT4.

It is not the full readout, i only posted the group C=1.

from iec62056-21.

Krolken avatar Krolken commented on June 17, 2024

I am not sure this was resolved but I am closing it since there has not been any activity for a while.
A note is that 1.8.0 can usually in most meter be seen as equal to 1.8.1

from iec62056-21.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.