is there a method how to store the current readings with original timestamps instead of with the current date & time?
My use case is that some data are gathered off-line and sent to network cca each 30 minutes with original timestamps of the readings (there is unknown number of readings, varying between tens to thousands, theoretically). The external device will probably publish the data to mqtt broker (mosquitto). In fact, these are pulse counting sensors for reading water, electricity and gas flow.
I would like to
- store the data in db without compression over time;
- use openHAB to chart the data
- use openHAB to show the cumulative value in sitemap.
So far, I have not found how to send any data to openHAB so that it stores them with some user defined timestamp. Is that even possible?
Some thoughts of mine on how to workaround the limitation (if it exists):
process the data independently from openHAB, i.e. to have an own script subscribed to mosquitto broker, which would split the batched data to separate messages (timestamp, reading value) and store them to database directly (say, MySQL);
set openHAB persistance for the sensors, but never ever send openHAB any update re. the readings; as a result, it should read last known value from the db;
For this to work, openHAB would have to check the db in intervals to update the values shown in sitemap. Is this possible?
If not, well, I could have yet another external script messaging openHAB regularly and forget about persistence in openHAB completely. But then, the whole process becomes more complex and error prone.
Any other idea?