Hi All,
I have recently added some new items to my setup to give smartmeter readings via MQTT.
I modified the file /etc/openhab/persistence/jdbc.persist
Here is a snipped version of my file:
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
// if no strategy is specified for an item entry below, the default list will be used
// s m h d m w
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
every2Minutes : "0 0/2 * 1/1 * ? *"
every5Minutes : "0 0/5 * 1/1 * ? *"
every10Minutes : "0 0/10 * 1/1 * ? *"
default = everyChange
}
Items {
SS_Smartmeter_Actual* : strategy = every2Minutes,everyHour
* : strategy = restoreOnStartup
}
In OH, I have multiple items with similar names e.g.:
SS_Smartmeter_Actual_Consumed_L1
SS_Smartmeter_Actual_Consumed_L2
SS_Smartmeter_Actual_Consumed_L3
SS_Smartmeter_Actual_Volts_L1
SS_Smartmeter_Actual_Volts_L2
SS_Smartmeter_Actual_Volts_L3
Normally, the wildcard means that all the above should be persisted, but for some reason this is not the case.
e.g. I have volts L1 & L2 but not 3 in my mariaDB.
I enabled debug logging for org.openhab.persistence.jdbc and I have this:
2024-10-13 21:31:41.285 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SS_Smartmeter_Actual_Consumed_L3' changed from 1.78 A to 1.79 A
2024-10-13 21:31:42.848 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::query: item is SS_Smartmeter_Actual_Volts_L3
2024-10-13 21:31:42.849 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::query: unable to find table for item with name: 'SS_Smartmeter_Actual_Volts_L3', no data in database.
I have never manually created a table for persistence… why is it not doing it automatically?
Maybe this will sort itself out if I leave it long enough? or restart something?
Any suggestions are welcome!
Thanks
Will