Telegram not working after OH restart

Hi, have several rules to trigger alarm via telegram.
all working fine until i restart OH.
after restart the following lines appear in the log

2022-06-28 16:24:20.688 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'alarm.rules', using it anyway:
The field Tmp_alarmRules.telegramAction refers to the missing type Object
The field Tmp_alarmRules.telegramAction refers to the missing type Object
The field Tmp_alarmRules.telegramAction refers to the missing type Object
The field Tmp_alarmRules.telegramAction refers to the missing type Object
The field Tmp_alarmRules.telegramAction refers to the missing type Object

here one of the rules

val telegramAction = getActions("telegram","telegram:telegramBot:Telegram_Bot")
rule "Alarm Drainagepumpe"
when
    Item Alarm_Drainage changed to ON
then
	{telegramAction.sendTelegram("Drainage Pumpe ausgefallen !!!!")
	Echo_Kueche_links_TTS.sendCommand('Achtung Achtung Achtung die Drainage Pumpe ist ausgefallen !')
	Echo_Kueche_rechts_TTS.sendCommand('Achtung Achtung Achtung die Drainage Pumpe ist ausgefallen !')
	Echo_Show_Schlafzimmer_TTS.sendCommand('Achtung Achtung Achtung die Drainage Pumpe ist ausgefallen !')}
end

if I open the files and just add a space and save it telgram starts to work !
looks like the rule fires before telegram is ready.
any suggestion how to fix this ?
thanks
Thomas

Hello Thomas
I had the same problem. Somehow it does not work after a restart that the “global variables” are created. Somehow Telegram does not cooperate. Therefore create all action variables in the “Rule”. Since then it always works after the restart.

Tobi

ok, thanks can you send me one example please ?

thanks
Thomas

here you go →

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.