wmbusmeters / wmbusmeters

Read the wired or wireless mbus protocol to acquire utility meter readings.
GNU General Public License v3.0
945 stars 224 forks source link

Generic driver to support also unknown wmbus devices #524

Closed rcliebig closed 1 year ago

rcliebig commented 2 years ago

Hi, is there a way to transform telegrams for unknown devices without a specific driver? Eg i would like to see something generic eg: {"type":"gas", "id":"123456", "value_1":8736,12, "unit_1":"m3", "value_2":3,021, "unit_2": "V", ... } ?

Thanks for your nice piece of software.

weetmuts commented 2 years ago

I am slowly moving towards a smarter decoding of telegrams, but it is not as easy as one might think.....

The current plan is to make it really easy to analyze the content of the telegram, using "wmbusmeters --analyze ..." or the online version wmbusmeters.org and then it should be really simple to construct a new driver. Perhaps invoking a set of known patterns for water meters, heat meters etc. I.e. a generic water driver, that is then extended with the particularities of the new meter.

I am not interested in decoding the telegram partially and then pass it on to some proprietary system for further decoding. This would defeat one of the purposes of this free software, which is to collect the knowledge of the meters themselves.

Despite the mbus protocol being pretty amazing, there still a lot of bits and numbers that must be understood before you know what a certain value really means. Sure it is cubic meters, but is it yesterdays reading, a month ago reading etc...what does the bits in the error flags really mean? Sure 0 means it is probably ok, but what does bit 3 mean when it is set? etc etc

rcliebig commented 2 years ago

Thank you for your insights about the general future of the wmbusmeters tool. Though i think providing a way to extract data (eg via json transformation) of the telegrams that are not vendor specific a nice addon. I came to this idea as i stumbled upon the iobroker library to analyze the packets i am sending from my own developed sensor One can try it out here without any installation: https://npm.runkit.com/iobroker.wireless-mbus

Your tool is closing the bridge from vendor devices to my smart home system :-) Thanks for all your efforts!

weetmuts commented 2 years ago

Thanks! Are you sending wmbus packets from your sensor? Have you tried "wmbusmeters --analyze ..." or the online service of the same: https://wmbusmeters.org

It should be really easy for you to add a driver for your sensor. Look at this one for example: https://github.com/weetmuts/wmbusmeters/blob/master/src/driver_ultrimis.cc

BIBOLV commented 1 year ago

Closing due to inactivity. Please reopen if you want to continue to work on topic.