I have a central raspberry pi 3 running OH2 with MQTT binding and Grafana/Influxdb installed which already receives MQTT messages from an ESP8266 with ESPeasy. I have a second smaller OH2 installation with an IR to USB interfaces and SmartMeter binding installed which receives the OBIS codes with my electric power consumption from an E350 Landis & Gyr energy meter.
I would like to send the measuring points from the energy meter via MQTT to my central OH2 so I can import them in my Influxdb and make some nice graphs. Do I need to install the mosquitto-clients package on my openhabianpi? How can I achieve this?
Thank you to pointing me in the right direction.
If you already receive MQTT payloads, why would you want to install another MQTT client on top?
Thank you for your answer. I have two OH2 installation. Only one is receiving MQTT payloads (Master). The second OH2 installation receives my energy consumption through a IR to USB interface using SmartMeter binding and is physically a different raspberry in the basement. It should only forward MQTT messages to my master OH2.
As previously advised to you on this subject, search this forum for “MQTT event bus”
You’l be more interested in more recent posts about MQTT binding v2
That’s what I already did but I’m flooded with hits and I don’t know exactly in which direction you’re pointing me. Sorry but I’m a beginner
If this is all you are after, why not just configure both instances of OH to write out to the same instance of InfluxDB? As long as you don’t have two Items with the same name across the two instances, you can probably use the same user/password/db settings for both instances of OH. If you do, just use a different db for each instance and you won’t have any overwrite issues.
You only really need MQTT EventBus if your central openHAB needs to do something with those Items beyond just saving the states to the database. For example, I have an instance of OH that’st about 100 miles away. It reports Items states and commands to my home OH instance and there I have some Rules that run based on those events as well as displaying the states of some of those Items on my sitemap. So for me, the EventBus is well worth the extra complexity (NOTE: I run this using the Python library in the link rossko57 supplied).
But based on your stated requirement, the MQTT Event Bus is way more complex than you need.
Thank you very much for your answer. This is a very good idea I didn’t think about it.
I’ll changed the influxdb listener from localhost:8086 to the ip of my openHAB Master instance so the listener on my openHAB Master not only listens on the localhost. What do I need on the openHAB slave instance? The binding perstistance can’t be configured to send it’s data to an external influxdb instead of localhost:8086. How do you achive this?
Thank you very much for your answer.
It’s right there in the configuration. The url parameter.
Sorry, shame on me…
Thank you all! I managed to have the graphs from my SmartMeter Landis & Gyr E350 now in Grafana!
Great and really cool! I’m very happy!
That’s great, now share you config and set-up for another user in the future.
Include both openHAB instances set-up, bindings, things, items and rules
Screen shots are great!
Or write a tutorial