Apollon77 / node-mbus

Nodejs mbus module
MIT License
20 stars 15 forks source link

Where is the Unit value coming from? #64

Closed wmmihaa closed 3 years ago

wmmihaa commented 3 years ago

We're trying to make sense of the Unit field of the data record, which seem to lack consistency. Here are some examples:

I understand that reverse-engineering the field might never get fully accurate, but if feels like it's just a free text field. Having a look at the libmbus library, it looks like pretty structured, but perhaps the Unit value is derived from somewhere else?

Cheers

Apollon77 commented 3 years ago

All data come directly unfiltered from libmbus and the scale factors out of the data.

Apollon77 commented 3 years ago

The library internally uses the returned data objects from libmbus (you should get the same data with the xml/json output from libmbus cli tools

wmmihaa commented 3 years ago

Thank you... so for "Volume (m m^3)" "m" derives from the data and "m^3" from libmbus?

wmmihaa commented 3 years ago

For instance... why do I get "Energy (10 kWh)" and not "Energy (1e1 kWh)", while I get "External temperature (1e-2 deg C)" (double spaces) from an other meter?

BTW...I understand this is issue has nothing to do with node-mbus!