Skip to content

Shell script to get MBus data and publish to MQTT-Broker

Notifications You must be signed in to change notification settings

kptkip/MBus2MQTT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

MBUS2MQTT

This Software is used to fetch your MBUS-Data from a heat counter of your heating system and provide it via MQTT to any SmartHome-System (IoBroker, Home Assistant, FHEM, etc.).

Hardware

I use a MBus-Hat for my Raspberry Pi 3B: https://www.hwhardsoft.de/deutsch/projekte/m-bus-rpi-hat/ (No Affiliate-Link )

1723992566 meterbus-mbus-raspberry-pi

Prerequisites:

UART(0) Configuration

(While using a USB-MBUS Adapter this step is obsolete!)

  sudo raspi-config
  goto '3 Interfacing Options'
  goto 'I6 Serial Port'
  'Would you like a login shell to be accessible over serial?' --> NO
  'Would you like the serial port hardware to be enabled?' --> YES
  Finish raspi-config
  sudo echo "dtoverlay=disable-bt" | sudo tee -a /boot/config.txt
  sudo systemctl disable hciuart
  reboot

Installation of libmbus (C++)

 sudo apt install git libtool autoconf cmake build-essential
 sudo apt-get install -y cmake
 sudo git clone https://github.com/rscada/libmbus.git
 cd libmbus
 sudo ./build.sh
 sudo make install
 cd bin
 sudo ln -s /usr/local/lib/libmbus.so.0 /usr/lib/libmbus.so.0

Mosquitto Client

  sudo apt-get install mosquitto-clients

libxml2-utils

  sudo apt-get installlibxml2-utils

Disclaimer

This repository contains files for demonstration purposes only. Use the files on your own risk. I am not responsible for any damage!

License

Script: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

About

Shell script to get MBus data and publish to MQTT-Broker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages