Raspberry 3 with openhabian and OH stable 2.4.
I get constantly the following error:
Error during the execution of rule 'Periodically check Presence': java.lang.String cannot be cast to java.sql.Timestamp
And my rule looks like this
rule "Periodically check Presence"
when
Time cron "40 */4 * * * ?" or
Item G_Mobiles changed
then
if(Presence.state == ON) {
if(!Abus_Motion.changedSince(now.minusMinutes(30),"jdbc") && Loc_Home_DNA.state == OFF && Loc_Home_NCO.state == OFF){
if(G_Mobiles.state == 0 && !G_Mobiles.changedSince(now.minusMinutes(70),"jdbc")) {
Presence.sendCommand(OFF)
if(Abus_Status.state == "Unset") {
logInfo("Presence.rules", "Nobody at home anymore!? / Abus NOT active!")
if(Abus_OverR.state == OFF){
sendTelegram("OH_TeleBot", "Niemand mehr zuhause!?\nAlarmanlage NICHT aktiv.\nLetzte Bewegung: " + Abus_Motion.state.format("%1$td.%1$tm. - %1$tH:%1$tM"))
}
else {
sendTelegram("OH_TeleBot", "Niemand mehr zuhause!?\nAlarmanlage NICHT aktiv.\nAbus_OverR: " + Abus_OverR.state)
}
}
}
}
}
else {
if(Abus_Mode.state == OFF && !Abus_Motion.changedSince(now.minusMinutes(15),"jdbc")) {
if(Abus_OverR.state == OFF) {
if(!G_Mobiles.changedSince(now.minusMinutes(60),"jdbc")) {
if(G_Windows.members.filter(s | s.state == "ON").size > 0) {
// set open windows to override / bypass
if (Abus_Balkon.state == "ON") {
Abus_BLK_OM.sendCommand(ON)
}
if (Abus_Oberlicht.state == "ON") {
Abus_OBL_OM.sendCommand(ON)
}
}
createTimer(now.plusSeconds(5)) [
Abus_Mode.sendCommand(ON)
logInfo("presence.rules", "Active Bypasses: " + Abus_BYPASS.state)
]
}
}
else {
if(G_HmCmng.state == OFF && !Abus_Mode.changedSince(now.minusMinutes(30),"jdbc") && Abus_OverR.state != ON && !Abus_Motion.changedSince(now.minusMinutes(60),"jdbc") && G_Mobiles.state == 0 && !G_Mobiles.changedSince(now.minusMinutes(60),"jdbc")) { // klappt dies?, dann auch oben bei der langen liste !enzio_WLAN....
logInfo("presence.rules", "No Motion since " + Abus_Motion.state.format("%1$td.%1$tm. - %1$tH:%1$tM") + " but Abus not active!")
sendTelegram("OH_TeleBot", "Keine Bewegung seit " + Abus_Motion.state.format("%1$td.%1$tm. - %1$tH:%1$tM") + " aber Abus nicht aktiv!")
}
}
}
}
end
I don’t have any idea, what might be wrong.
Maybe i don’t see the obvious any more?
Any suggestion is greatly appreciated.