I am trying to figure out if it is possible to use persistence with a script/rule to process bulk historic data and add it to the DB.
I have set up the connection fine for MQTT -> OH2 -> MySQL and on all real-time data it works great, the problem I have is my ESP has a schedule on it and turns the modem off for 7 hours, but it still logs and stores the sensor data and once it turns on the modem it takes that data in a JSON format ( {"date time " : “value”, "date time " : “value”} etc. ) and sends it to the broker.
My next step is to take these values and store them in the table but I am unsure of the possibility of doing this with OH or if I should just write a PHP Sub service to perform it independently of OH.
Has anyone tackled this?