-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Belgium DSMR does not parse correctly #27
Comments
Interesting! Would be nice to also support the Belgian standard, looking forward to see what you come up with :-) |
I haven't looked in detail (bit busy atm), but if it is just the OBIS numbers and the associated formats that are different while the telegram format itself is the same, this might be a matter of defining some extra fields for them? Using a |
Yes, so far it really looks like just some extra OBIS codes and fiels. In belgium they have gas meters that are not temperature corrected, so they legally needed to use different OBIS codes it seems. |
My first attempt at fixing this for Belgium users is to define the OBIS codes. And get some help getting it validated. Before I try to understand how to correctly extend using your suggestion of namespaces in the code. |
@matthijskooijman we have a working field.h for belgium (confirmed by belgium user). I can share the fields.h (for belgium situation). I looked at your library, but I am wondering how best to integrate a second fields.h with an alternative for the OBIS parsing. I realize you are busy, but it would be great to update your library with the belgium dsmr specification fields. I attached the fields.h in the ZIP in this comment. |
Suggested a PR, added namespace for belgium in fields.h (see pull request #29 ) |
Let's keep this issue open until it is actually solved. I read a bit through the Belgian specification, still playing around with it a bit to figure out the best way to support this. It seems that almost all fields are identical, just that the belgian spec adds some fields, so I think we can support this without duplicating all fields. Anyway, what I really wanted to ask: @rvdbreemen, @pdemeyer, does either of you have some example telegrams for testing? I looked at the e-MUCS-H spec, but there are none. In #29 there is a |
I've looked closely at the belgian spec, and wrote a bit to put into the README later (added at the bottom of this command). As for implementing this, I'm just thinking out load here. Overall, it is just a matter of adding extra fields. Gas valueThe two different gas meter fields have different ids, so that would result in two different fields. However, you would probably want to refer to them under a single name. This could be be implemented by defining both fields with the same name in different namespaces (e.g. use But then you need to choose which one to use at compiletime, you cannot put both of them in the same struct if they have the same name. We could then decide to define them separately with different names (e.g. One alternative (not sure how to implement that yet, though) would be to allow specifying multiple Obis IDs to a single You could then still also offer two distinct fields (so you can choose at compile time) in case you want to parse one but not the other, or both and know which one was found. I just realized (looking at the DSMRloggerAPI code with DSMR-3 support) that the Limiter thresholdThis field was originally specified in DSMR3, then removed in DSMR4 and now re-added in e-MUCS. However, DSMR3 specified a unit of A, while eMUCS specifies a unit of kW. DSMR as it is now strictly checks the unit in the telegram and fails to parse when the unit is different from what was expected. Again, this could be solved by splitting it into two fields with the same ID. You then have to choose either one at compiletime, and cannot support DSMR3 and eMUCS with the same struct. Since this is a bit of a specific field, that might not be relevant, but it would be nicer to support this, but I'm not sure how yet. |
Oh, here's the README addition I mentioned above: Differences between Dutch and Belgian meterse-MUCS H spec v1.3, based on DSMR 5.0.2 P1, except:
Some of these changes (gas reading and mbus device ids) refer to the |
I also wonder about the updated "version information" field. AFAICS, the eMUCS H spec has no info at all about what valus that field should have (unlike DSMR, which specifies what version number should appear in that field). Anyone see any documentation or examples of this field? |
@matthijskooijman just added some examples in the voorbeelden.txt of telegrams, two meters. |
I read through your comments. And you are coming to most of the conclusions I came too. I made it work using a doubling of the field definitions and made a switch to implement and get some field testing going. Users of Willem's hardware from Belgium now used it twice. As you see in the code the difference are very limited. Yes, there is some specification difference as you point out. Like the protocol version ID is suddenly 5 digits instead of 2. Like Willem, I think it would be useful to enable the library to parse more dynamically. When setting up the parser you should able switching the MBUS devices around from default. And also the protocol version. To limit space usage you could opt for a compile time switch, but I think since the dfference are so very small a more dynamic approach would be better. |
On the comment to parse the fields to either However, for real-world implementations like Willem's DSMRlogger, you could say it complicates the situation where it is really not needed. So yes, it would be good to reflect the spec more correctly, but let's keep in mind too that the fields are used in real-world situations too. |
Thanks for the examples. Looking at the version number:
That probably means DSMR 5.0.2, e-MUCS H 1.3 Also, the limiter threshold is actually in kW, as documented:
And in DSMR-3, it is actually in A as well (from #22):
|
Yes, true, I think you are right. V5.0.2-1.3. That does make sense. So it differs from version to version... that's simple to cover, using different field specfications per protocol versions. |
Hello, here's a Belgian user trying to contribute :-) |
The parser gives an 'unknown field' error on this part of the data : 1-0:31.4.0(999*A) |
Here's an example of P1 output: |
Please forgive me my off topic question. @hemeleerse I started looking into the workings of my own Belgium meter yesterday and I'm wondering about the circuit you are using to read the P1 values. Are you willing to share your circuit? |
@erhapp this article will help you : https://opencircuit.be/Blog/Slimme-meter-uitlezer It’s based one the ESP-01 module with ESP8266 processor |
@erhapp or you could buy the DSMR logger print: https://opencircuit.be/Product/Slimme-meter-uitlezer-V4.5-Geassembleerd |
I've just tried the example "read.ino" on a teensy 2.0. |
Any update for Belgium? |
No progress on my part, I haven't found any time to work on this project yet... |
Thanks for your heads up! FYI: However it did not compile on Teensy 4.1: https://github.com/mrWheel/arduino-dsmr-be/issues/5 |
Hi Matthijs,
I have seen reports that belgium smartmeters do not parse correctly using the 5.0.2 dsmr parsing. This is due to the extention made by the Belgium netbeheerder.
The document for Belgium can be found here
I will be looking into making changes to the library to enable parsing of the DSMR of Belgium.
Robert
The text was updated successfully, but these errors were encountered: