Command is not performed in rule

Hi all,

I hope you can help me as I don’t understand what’s happening. I have a simple rule to test the Telegram Action, which is working fine:

rule "Telegram Test"
when
   Item Test_Switch changed 
then    
   sendTelegram("Bot1","Test successful")    
end

Now I want to combine it with the Fritz Box TR064 binding.

rule "Incomming call"
when
// fboxRinging is a switch item which switches to ON if call is detected
   Item fboxRinging changed from OFF to ON 
then
   sendTelegram("Bot1","Test successful") 
   val incCallResolved = fboxIncomingCallResolved.state as StringListType
   val callerName = incCallResolved.getValue(1)
   sendTelegram("Bot1", callerName.state.toString + " is calling.")    
end

In the log files I can see, that the caller name is successfully resolved, but none of the telegram messages are send. And I don’t get it why…

Thank you for your help

Add a LogInfo statement before sendTelegram to check if the change of fboxRinging is detected in your rule.

You created the callerName as avariable in the file, hence it is not an item. Refer to it wihout the .state.toString.

Thank you both, there was a typo for fboxRinging in the items file. Therefore the rule was never executed. (I was irritated by the fact, that the binding resolved the caller name anyway). And after that I needed to remove the state.toString to get the syntax right.