smeterd icon indicating copy to clipboard operation
smeterd copied to clipboard

S34U18 support

Open sandnabba opened this issue 2 years ago • 0 comments

Hi!

So now I finally have a draft with the S34U18 support. :)

The main issue was that it seems like you are using 2 "tariffs" ( low (1), high (2) ), while my meter is just reporting the "total" (0) value. (In Sweden it seems like most operators are moving towards hourly-prices). I was actually reading the IEC standard, and it was much clearer on the tariffs:

B : C.D.E * F
E – tariff rate 1...8, or 0 for total readings. 

https://www.satec-global.com/sites/default/files/EM720-IEC-62056-21.pdf

And the P1 companion standard is actually mentioning that "support for up to sixteen tariffs should be included" (7. Data objects).

So I've been refactoring the keys['kwh'] a bit, making it easier to overview and extend. But this is of course also a breaking change. If this would not be acceptable, we could still keep the old keys (marked with a "deprecated" comment).

Another thought is if we should rename low/high to t1/t2 or similar, but that could also be done if someone is actually using more then these tariffs.

Another issue was that my amps are actually reported as a float. I see that it looks like an int in the P1 companion standard, but using an int feels a bit rough to me. Does your meter really report this as an int?

And just tell me if you want the old kwh keys re-added!

// Emil

fixes #30

sandnabba avatar Jan 21 '23 21:01 sandnabba