So in mqtt-persistence I have put:
topic=owntracks/mosquitto
message=%1$s, %3$s
How can I check if it’s working?
I don’t see an mqtt persist file in /var/lib/openhab2/persistence
(on OH1 it’s the same issue)
(the rrd4j folder is there with all the items in place)
MQTT Persistence just sends the states of your Items to MQTT Topics. It doesn’t actually save anything outside of what your Broker is configured to save. Consequently you will not see any mqtt folders in the persistence folder.
What exactly are you trying to achieve with MQTT persistence?
my problem is, that the geofencing data (owntracks) seems to be gone after a while.
I get the information from owntracks into OH (Mosquitto) and can display it in a google maps webview including the time stamp of the mqtt message from owntracks.
However, after a while this information is gone (e.g. time stamp: -) and my hope is to store for long term availability.
Is this idea nonsense?
If you have your information in openHAB, then you can use any of the available and suitable persistence solutions, like MySQL, RRD4J, etc. No need to use MQTT persistence in this case.
you are absolutely right.
So I am wondering why I need mqtt persistence anyway? does it have more features /better match to mqtt messages than e.g. mapdb?
However, it seems that mapdb does the job.
RRD4J is not a option because the mqtt messages are no numbers but strings, right?
Anyway - problem solved - Thanks again.
You don’t need MQTT persistence at all in this case. You are correct that rrd4j will not work if your Item’s are strings… MapDB only works if all you care about is the most recent value. If you want to save historic data you need to use db4o or an external db like MySQL or InfluxDB.