I’m using the Telegram binding for over a year now, but I’m still having a issue with 1 rule. Sometimes it works, sometimes it doesn’t. Mostly not.
val telegramAction = getActions("telegram","telegram:telegramBot:Telegram_Bot")
rule "Send Wasmachine / Droger is finished notification"
when
//Item Droger_Status changed to 3 or
Item Wasmachine_Status changed to 3 or
Item Vaatwasser_Status changed to 3
then
var name = transform("MAP", "witgoed.map", triggeringItem.name)
var status = transform("MAP", "witgoed.map", triggeringItem.state.toString)
logInfo("Wasmachine / droger klaar", "De " + name + " is " + status + ".")
var String message = "De " + name + " is " + status + "."
logInfo("Wasmachine / droger klaar", message)
telegramAction.sendTelegram(message)
end
When it doesn’t work this results in:
2021-01-31 14:10:58.137 [vent.ItemStateChangedEvent] - Wasmachine_Status changed from 2 to 3
==> /var/log/openhab2/openhab.log <==
2021-01-31 14:10:58.138 [INFO ] [del.script.Wasmachine / droger klaar] - De wasmachine is klaar.
2021-01-31 14:10:58.139 [INFO ] [del.script.Wasmachine / droger klaar] - De wasmachine is klaar.
2021-01-31 14:10:58.139 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Send Wasmachine / Droger is finished notification': actions cannot be null
This proofs that the string is created as it should, but somehow Telegram cannot send it?
Telegram-actions is NOT installed
binding-telegram - 2.5.12 is installed
Who can help me?