Comments (5)
Or maybe it's easier to parse response from read_standard_readout function and find data ?
from iec62056-21.
I use different strategies depending on how much the data costs. If cost and bandwidth isn't a problem I just do standard readout since I don't have to change much afterwards. Lots of MNOs also charge you in incremental steps for each session. So if you pay at least for 1 kB for every session you might as well read all of it.
If I am able I adjust the standard readout (can be done usually by the manufacturers software), I try to do that to get the data I need.
And if I just only need the one data or data not available in standard readout I do single read.
Seems like you are using the LP-1 with Wifi? So I would just read the standard readout.
But if you have time please try out the single read to find if it works properly on the device. I am trying to find a better API to use the different password mechnisms, but it seems very device specific sometimes so it might be better handles elsewhere.
from iec62056-21.
im using LP-1 with Ethernet. How should i parse standard readout to get single data (1.8.0?) what kind of type is AnswerDataMessage ?
from iec62056-21.
Simplest thing would be to use the data property of AnswerDataMessage
. The data structure of AnswerDataMessage consists if DataBlock that consists of DataLines that consists of DataSets. It is just to conform to the standard and make it easy to parse the data coming from the meter, but the interesting is the list of DataSets that actually hold the data.
data_list: List[DataSet] = answer_data_msg.data
Data sets consists of address, value and unit. See
iec62056-21/iec62056_21/messages.py
Line 43 in 09d9acf
So if you only need one element search the list for it and if you think you need more values you can for example create a mapping using dict with the address as key and then just look up by address.
from iec62056-21.
Closing this since it seems done. If there is anything else just open it again.
from iec62056-21.
Related Issues (20)
- switch baudrate HOT 3
- rest() from Iec6205621Client HOT 4
- ISk5MT174 - TimeoutError: Read in SerialTransport timed out HOT 3
- connecting via GSM HOT 11
- ZMD energy meter HOT 4
- Update Pypi HOT 9
- support protocol mode = 2 in AckOptionSelectMessage HOT 2
- Move to attrs classes for messages
- Request support for HAN-NVE (a.k.a. Norwegian RJ45 HAN-port standard) interface over M-Bus HOT 1
- Implementing protocol to my client file. HOT 5
- Issue " connection being refused after dockerize and running mininet " HOT 4
- Socket Timeout HOT 3
- read 1.8.0
- Problem with client.read_value
- readout of landis + gyr120AP HOT 1
- trying to readout EMH - LZQJ-XC but cant build up connection HOT 9
- Not able to enter programming mode on EMH meter - serial transport
- EMH meter is only responding with ACK on read. HOT 1
- Not able to send address in init request over serial transport
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iec62056-21.