Hello everyone,
I wanted to share my recent success in setting up MQTT to send energy consumption data from my E350 Landis & Gyr meter to my central OpenHAB setup. It’s been a bit of a journey, but I’m thrilled with how it all came together!
The Goal:
I have a smaller OpenHAB installation that captures OBIS codes from my energy meter using the SmartMeter binding. My aim was to send this data to my central Raspberry Pi 3 running OpenHAB, where I could visualize it in Grafana using InfluxDB. This would allow me to track my energy usage more effectively and create some nice graphs!
The Challenge:
Initially, I wasn’t sure if I needed to install the Mosquitto-clients package on my openHABianPi. After some research, I realized that setting up MQTT on both the master and client installations was key. I configured the MQTT binding on both systems and made sure they were on the same network.
The Solution:
Here’s a quick rundown of what worked for me:
- Installed MQTT Binding: Ensure both your master and client installations have the MQTT binding enabled.
- Configured Topics: I set up specific MQTT topics for the energy data to ensure it was routed correctly to my central hub.
- Testing: I used the MQTT.fx tool to test the connection and confirm that data was being sent and received without issues.
- Integration with InfluxDB: Once the data was flowing into OpenHAB, I configured the InfluxDB binding to store it for visualization in Grafana.
The Outcome:
It’s been running smoothly for a few days now, and I’m excited to see the graphs taking shape in Grafana. This setup not only gives me real-time insights into my energy consumption but also helps me identify patterns and areas for improvement.
Tips for Others:
- Start by testing your MQTT connection with a simple publisher-subscriber setup before integrating it with your energy data.
- Make sure your network settings allow MQTT traffic between your devices.
- Take advantage of OpenHAB’s built-in tools and bindings—they simplify the process significantly!
I’d love to hear if anyone else has tackled a similar project or has tips to share. Happy automating! ![]()
Best regards,
Manuel