M-Bus Software – libmbus (Linux)

libmbus

Informatie (ENG)

libmbus is an open source library for the M-bus (Meter-Bus) protocol.

The Meter-Bus is a standard for reading out meter data from electricity meters, heat meters, gas meters, etc. The M-bus standard deals with both the electrical signals on the M-Bus, and the protocol and data format used in transmissions on the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle the communication with M-Bus devices.


Installeren op de Raspberry Pi

Middels de volgende commando’s kan libmbus gedownload en geïnstalleerd worden:

Hieronder een instructie voor de oudere Raspberry Pi OS (libmbus v0.8.0 werkt niet op v3 met Jessie):


Gebruik van libmbus

Zoeken naar apparaten:

mbus-serial-scan /dev/ttyUSB0 (your usb number might be different)

Informatie van apparaat tonen:

mbus-serial-request-data /dev/ttyUSB0 <device number>

Voorbeeld XML dump

Bronnen:
domotiga.nl
sites.google.com


Problems

Problem

mbus-serial-scan

mbus-serial-scan: error while loading shared libraries: libmbus.so.0: cannot open shared object file: No such file or directory

Search the file: sudo find / | grep libmbus.so.0

/usr/local/lib/libmbus.so.0

export PATH=$PATH:/usr/local/lib

echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/local/lib

Still same error, to be continued on github.

On another Ubuntu machine with libmbus installed from prebuilt binay it’s located in /usr/lib/libmbus.so.0

Solution

Make a soft link between current position and expected position:

sudo ln -s /usr/local/lib/libmbus.so.0 /usr/lib/libmbus.so.0

bron: http://bends.se/?page=anteckningar/automation/m-bus/libmbus


Download libmbus @ github.com

libmbus-master (DL @ 2017-10-12)

libmbus-0.2.tar

libmbus-0.3.tar

libmbus-0.5.tar

libmbus-0.4.tar

libmbus-0.6.1.tar

libmbus-0.7.0.tar

libmbus-0.6.tar

libmbus-0.8.0.tar

libmbus-api libmbus-0.9.0.tar