I’m returning to Openhab after a 2-year hiatus - I didn’t use another platform in the interim, I simply went without while renovating my new property. It’s now time to set up Openhab and my z-wave environment once more, and I’m having a bit of trouble with MQTT.
In my old system I used MQTT persistence. Every single item was get/set on the broker. I had no items that came into openhab via the broker (i.e. Wifi items), and I don’t remember that I had any 3rd party software feed off the broker; it was just regular z-wave items and the like. I can’t currently remember what use I actually made of the traffic on the broker, so my first question is: what use is MQTT persistence to an Openhab system that already knows all items directly?
My second question is, if there’s some kind of positive answer to the first, how the hell do I set this up under Openhab 2.5.0? I have the MQTT binding up and running successfully, but the instructions for the MQTT persistence are from 1.x, and reference the 1.x MQTT binding configuration - documentation unavailable on the main Openhab site. The MQTT broker Thing is set up via the PaperUI and I’ve been defining my (non-MQTT) items via .items files, so how do I configure the persistence, and how do I ensure that all of my z-wave items, for example, are get/set from the broker? Does this need the “mqtt=” string manually entered into every single item record, or is there a passive way that every item on the bus is copied to the broker?
It may be that MQTT persistence has no benefit for me and I abandon the idea, though I will use MQTT for the likes of Owntracks. It’s interesting that there’s currently a hole in the documentation (that for 1.x MQTT-persistence does not align with that of the 2.x MQTT binding), though perhaps the hole is in my understanding only.
Is this a discussion worth having, or am I barking up the wrong tree here?
Hardware: Raspberry Pi 4, 4Gb RAM
OS: Buster latest
Java Runtime Environment: openjdk version “1.8.0_222”
This shows that there was an eventbus method of achieving this - and that I not going mad. Udo, the documentation that you linked is the one that I’ve been looking at and concluded that there’s a missing piece. For example, the eventbus is no longer mentioned.
I truly don’t remember my original use case, but I’ve noticed that the answer most often offered to similar questions is “there’s probably a more appropriate persistance solution to your needs”. Probably true, but it begs the question: what is the use case for mqtt-persistence?