Comments (20)
I was hoping we'd get something from DZG like saying "we fixed it for all devices with serial >= 0x3000000", but who knows ...
from libsml.
Or, even better, can we compare an SML message from an old meter with a message from a new meter
(e.g., this one: https://github.com/devZer0/libsml-testing/blob/master/DZG_DVS-7420.2V.G2_mtr2.bin),
and decide about the workaround automatically based on the difference?
Perhaps on the serial numbers?
@jmberg What do you think?
from libsml.
Hm, that's annoying, but I did tell them about it, so it I guess it's reasonable they'd fix it. Just annoying they decided to fix it in this way, rather than encoding them in some other way that'd be compatible. Though perhaps that'd not even be permitted, I don't know.
I don't remember really this thing really well, and I cannot look right now, maybe later.
For now here's a file from my meter: https://johannes.sipsolutions.net/files/record.bin
Maybe somebody can figure out some versioning identifier or something.
from libsml.
@jmberg sml_server
can not read the file you posted. (Empty output.) Can you please post another dump as well?
Once it works, can you put your file here: https://github.com/devZer0/libsml-testing/
such that people can test with it? Or give me permission to put your file into that collection?
from libsml.
Hm, sorry, not sure what was wrong with it. I updated the link with a new file, you have my permission to put it into the collection.
from libsml.
However - you probably want me to capture one that actually exhibits the bug ... that will have to wait for tomorrow, when the sun is back :-)
from libsml.
Hm, no, wait, we need a positive value with 327W < value < 368W or so? I can try that ...
Right. Update the link again. sha1sum of the file should be caffcfa373e50c916d3303a8c9d1d17e964dfa9e.
According to my (working) version, that contains the data
"1-0:96.50.1*1": "DZG",
"1-0:96.1.0*255": "0a 01 44 5a 47 00 02 82 22 5e ",
"1-0:1.8.0*255": 5430157.7,
"1-0:2.8.0*255": 26244572.6,
"1-0:16.7.0*255": 356.24
and indeed the 356.24 is (erroneously) encoded as 8b 28
from libsml.
This file works with the latest version of sml_server
.
Regarding putting it on https://github.com/devZer0/libsml-testing/
could you please tell me the model number,
such that the file name looks something like the following:
DZG_DVS-74?????_jmberg.bin
from libsml.
As a comment, I would put:
Value for 16.7.0 was 356.24 but the message wrongly encodes it as -299.12.
from libsml.
Sounds as if we should either:
- remove the old workaround
- add a "clean" mode
- hide the old workaround between a "quirks" mode
from libsml.
The workaround should be active for @jmberg's meter and inactive for my meter ;-)
I provided a message from a newer DZG meter that does not have the problem and encodes the numbers correctly: devZer0/libsml-testing#15
(In other words, this meter does not have the problem that jmberg's meter has.)
Somebody who understands SML could compare the nicely formatted output of smldump.pl
[1] to see if there is a meaningful difference that can be used to activate the workaround for meters that are like the one @jmberg has.
Alternatively, libsml
could have a list of serial numbers (or ranges) for which to activate the workaround.
[1] https://github.com/hn/smldump
from libsml.
Agree with the comment.
The meter is marked as just "DVS7412.2" on the box. There's a production year "2018" and serial # "42082910" (and "1 DZG00 4208 2910") marked on it.
from libsml.
from libsml.
Sounds as if we should either:
* remove the old workaround * add a "clean" mode * hide the old workaround between a "quirks" mode
Personally, I will not really (need to) care, since I'm running my own infrastructure.
But others might be updating their installation, so it's a strange to them perhaps? Might need to at least advertise this change widely so people are aware?
from libsml.
Alternatively,
libsml
could have a list of serial numbers (or ranges) for which to activate the workaround.
I suspect that's the only possibility.
FWIW, I reached out to the company last night referring to this issue - last time in 2018 after all they did respond, even if they never told me they fixed it :-)
from libsml.
Agree with the comment.
The meter is marked as just "DVS7412.2" on the box. There's a production year "2018" and serial # "42082910" (and "1 DZG00 4208 2910") marked on it.
Can I put the picture also in the testing repo as file?
devZer0/libsml-testing#16
Then I will add pictures of my meters as well.
Might be nice in case some people want to dig deeper.
from libsml.
I guess I have no objection to making this public, already is here.
from libsml.
So, in terms of implementation, the if statement
Line 194 in d656822
needs an additional comparison with the serial # "42082910" (for jmberg).
Perhaps this should be implemented in a flexible way to have a list of serial numbers, just in case there are other users with the same problem.
from libsml.
They just told me this morning they fixed firmware versions 1.2 and 1.3, I asked again if there's a way to get the firmware version from the serial number.
from libsml.
Got a very quick response: with firmware version 1.2 and 1.3, the serial number starts with a 6: "1 DZG 00 6.."
That's clearly when expressed in decimal, @dbeyer's had a serial number encoded as "0a 01 44 5a 47 00 03 9e 20 53".
So this would put the cut-off at "0a 01 44 5a 47 00 03 93 87 00", i.e. we can just add
if (... && (memcmp(serial, "\x0a\x01\x44\x5a\x47\x00\x03\x93\x87\x00", 10) < 0))
from libsml.
Related Issues (20)
- Unsigned current Power Value HOT 9
- timeout HOT 6
- libsml crc enhancements ? HOT 10
- Add support for efr SGM-C4 meter
- sml_server does not decode testfile from eBZ DD3 2R06 HOT 2
- SML-Errors with Holley DTZ541 HOT 2
- hexdump() compatibility issue with newest Arduino / ESP8266 libraries HOT 8
- libsml debian package still points to dailab repo HOT 3
- Cannot Build on Raspberry Debian 11 with gcc version 10.2.1 HOT 2
- sml_server does not decode data from device DZMeteringGmbH_WS_7412.1 (negative values) HOT 15
- sml_server not part of libsml1 debian package HOT 7
- Odd readings from DWSB20.2TH: Display shows power -195W, vzlogger reports 460W HOT 15
- List of projects using libsml HOT 3
- How to use libsml in ESPhome? HOT 3
- deprecate / replace `sml_transport` API
- support arduino?
- DZG - libsml: error: unrecognized sequence HOT 8
- More Examples HOT 6
- Compile Error on Alpine: no member named '__jmpbuf' HOT 13
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 libsml.