Smart Home Integration Success: M-Bus and Modbus

Hello fellow smart home enthusiasts! :star2: I wanted to share my recent success in integrating my home’s power M-Bus meter into Home Assistant (HA). After some research and experimentation, I found a reliable solution that I’d like to walk you through, in case you’re tackling a similar project.The Challenge I’ve always been curious about monitoring my energy consumption in real-time, but integrating an M-Bus meter into HA seemed a bit daunting at first. I came across two potential methods and decided to explore both.Method 1: M-Bus Slave to M-Bus Master with Modbus Converter This approach caught my attention because of HA’s built-in Modbus module. I wondered, could this work seamlessly with the Utility Meter integration? After some digging, I discovered that yes, the Modbus module does integrate well with the Utility Meter module. The Modbus service appears as an entity in HA, just like any other, making it easy to monitor and control. This was a pleasant surprise, as I initially thought Modbus might be too industrial for home use!Method 2: Raspberry Pi M-Bus Cards While this method seemed promising, I found it challenging to implement. Most solutions I stumbled upon were either incomplete or lacked proper documentation for HA integration. It was clear that Method 1 was the more straightforward path for me.The Solution I settled on Method 1, using an M-Bus slave connected to an M-Bus master with an integrated Modbus converter. Here’s a quick rundown of how I set it up:1. Hardware Setup - I purchased an M-Bus slave compatible with my existing meter. - Connected it to an M-Bus master that also featured a Modbus converter.2. Home Assistant Configuration - I installed the Modbus integration in HA. - Configured the Utility Meter module to read data from the Modbus service.3. Testing and Verification - After setting everything up, I monitored the data flow to ensure everything was working as expected.The Outcome The integration was a success! I now have real-time energy consumption data right in my HA dashboard. It’s incredibly satisfying to see all the pieces come together and function smoothly.Tips for Others - Start with Method 1 if you’re looking for simplicity and reliability.- Ensure your M-Bus master supports Modbus for seamless integration.- Take the time to thoroughly test each component before fully committing to the setup.Final Thoughts This project was a great learning experience and has added significant value to my smart home setup. If you’re considering integrating your M-Bus meter, I highly recommend exploring the Modbus route—it’s user-friendly and effective.Looking forward to hearing about your smart home projects and successes! :rocket: