OS: Debian 10.0 with java 11.0
openHAB version:Last, downloaded Satarday.
Hello all, following my migration from OH2 to OH3 I’m testing the persistance again using Mysql, it works with the below code without errors but it creates persistance not only to the configured item but also for all the other items! Am I doing something wrong??? Thanks.
jdbc.cfg
"
url=jdbc:mysql://192.168.1.51:3306/openhab?serverTimezone=Europe/Berlin
user=openhab
password=openhab
tableNamePrefix=Item
tableUseRealItemNames=false
tableIdDigitCount=0
"
items
"
String Sala_CPE_rec {channel=“mqtt:topic:MyMQTTBroker:TH_CPE_Pe:TH_CPE_Pe_rec” }
Switch Sala_CPE “Test Light []” {channel=“mqtt:topic:MyMQTTBroker:TH_CPE_Pe:TH_CPE_Pe_SW” }
Number Sala_CPE_TMP “Temperatura [%.1f°C]”
"
persistance
"
Strategies {
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
every5min : “0 0/5 * * * ?”
default = everyUpdate
}
Items {
Sala_CPE_TMP : strategy = every5min,restoreOnStartup
}
"
rules
"
rule “testrec”
when
Item Sala_CPE_rec received update
then
if (Sala_CPE_rec.state.toString.contains(“Slave,”)) {
var String[] buffer= Sala_CPE_rec.state.toString.split(",")
if (buffer.get(1).contains(“ON”)) postUpdate(Sala_CPE,ON)
else if (buffer.get(1).contains(“OFF”)) postUpdate(Sala_CPE,OFF)
Sala_CPE_TMP.postUpdate(Double.parseDouble(buffer.get(2)))
//getActions(“telegram”,“telegram:telegramBot:FS6”).sendTelegram(“Test”)
}
end
"