Hi all,
i go mad with this binding…
presence detection is working fine, but i cannot get it running with call identification or reaction to an incoming call… I think my rules have some problems, although should be the same like her in some former examples…
andy idea ?
items:
Switch fbKlingel “Telefon klingel [%s]” {fritzboxtr064=“callmonitor_ringing” }
Call fbAnruf “Anruf von [%1$s]” {fritzboxtr064=“callmonitor_ringing” }
Call fbAnrufName “Anruf von [%1$s]” {fritzboxtr064=“callmonitor_ringing:resolveName” }
String fbLastNumber “Letzter Anrufer: [%s]” (gfritzbox)
String fbLastName “Letzter Anrufer: [%s]” (gfritzbox)
rule:
import org.openhab.library.tel.types.CallType
import org.openhab.core.library.types.CallType
import org.openhab.core.persistence.CallType
import org.openhab.model.script.actions.CallType
rule “Eingehender Anruf”
when
Item fbKlingel changed from OFF to ON
then
// Daten des CallType auslesen
val call = fbAnruf.state as StringListType
// Die Variablen anlegen und mit der Nummer bzw. Namen des Anrufers füllen
val LastCallNumber = call.getValue(1)
val LastCallName2 = fbAnrufName.state as StringListType
// Die eigene Rufnummer aus der Variable entfernen
val LastCallName = LastCallName2.getValue(1)
// Prüfen ob der Anrufer unbekannt ist
if(LastCallName.startsWith(“Name not found for”))
{
// Den Namen mit Unbekannt füllen
LastCallName = “Unbekannt”
}
// Die Daten in die Items eintragen
postUpdate(fbLastNumber, LastCallNumber)
postUpdate(fbLastName, LastCallName)
logInfo(“RuleLastCall”, “Der Anruf von " + LastCallNumber + " (” + LastCallName + “)” + " wurde als Letzter Anrufer gespeichert.")
sendBroadcastNotification(“Eingehender Anruf von”, LastCallName)
sendTelegram(“bot1”,“Eingehender Anruf von”, LastCallName)
end
hope anyone finds the errors i have for sure in… its not working…
Oliver