A home assistant addon to translate mbus over TCP/IP to MQTT
I created this addon since I needed a good way to read the value of a power meter connected with M-bus and put the value in the home assistant energy dashboard
First of all, you need a M-bus TCP/IP gateway. I use a PiiGAB 900s, but you can find cheaper gateways online.
When that is done, you need to install the addon, copy the github link and put it in the repo tab under addon store.
After that just reload and install the addon :D
When installed, you will see a configuration tab, bellow is a explination what each setting is
mqtt_user: The name of your MQTT user, for home assistant that is for example your dashboard login
mqtt_pass: The password of said login
mqtt_host: IP address of the MQTT proker, for example home assistant (with mosquitto installed)
mqtt_topic: The first part of the topic, will be followed with the M-bus meter secondary address. For example mbusmeters/FFFFFFFFFFFFFFFF
mbus_address: The secondary address of the M-bus meter
mbus_gateway: The IP address of the M-bus gateway
mbus_gateway_port: The port to connect to of the M-bus gateway, OBS! Note that it must be a TCP port, NOT UDP
After this, copy the content of sensor.yaml to configuration.yaml of home assistant, change the name of the sensor and the mbus secondary address on all the places were it says FFFFFFFFFFFFFFFF. Restart home assistant and you're all set!
Anyone is more then welcome to contribute to the project, to contribute, please follow the following pattern:
- fork
- Write the code
- Test it locally
- Make a PR, please state the reason of the code, its function and how you tested it
Thank you! Please open an issue and state the problem and some notes so I can recreate the issue
I want to thank Daniel Glaser / the78mole for the inspiration to create this project, I was looking for a solution to use M-bus in HA and found this guide which helped me create this project
This is a very crude solution and I do not garantuee 24/7 uptime. Its a hobby project written in 1 hour and from the start only made for my own home