Sending a Telegram Message from within a createTimer Interrupt

Running Openhabian on pi 4
openHAB 3.2.0.M4

I am monitoring temperature reports from my zigbee devices to watch for devices that stop reporting temperature in a period of time, which would then send a Telegram Chat notification (possibly the device battery is dead or the device is offline)

I am wondering how my code is causing Telegram to generate the following exception error …

2022-06-03 14:13:12.172 [WARN ] [jsr223.jython.Battery Check         ] - Device report timeout for LaundryRoom_Temperature
2022-06-03 14:13:12.280 [INFO ] [223.jython.Device Temperature Report] - Restarting timer for LaundryRoom_Temperature
2022-06-03 14:13:12.282 [WARN ] [gram.internal.action.TelegramActions] - Exception occured whilst sending
2022-06-03 14:13:12.284 [WARN ] [gram.internal.action.TelegramActions] - Exception occured whilst sending interrupted
2022-06-03 14:13:12.286 [INFO ] [jsr223.jython.Notifications         ] - Sent an Normal telegram: LaundryRoom_Temperature: No response in 1 minutes

The code is essentially:

tempReportTimers = {}
REPORT_TIMEOUT = 1 * 60 # seconds

@rule("Device Temperature Report", description="Monitors devices that stop reporting temperature changes, assume they are dead and report")
@when("Member of Temperature_Group changed")
def rTemperatureReport(event):
    global tempReportTimers

    device = event.itemName

    if(device in tempReportTimers): # Has this device reported previously? i.e. a timer already exists
        if (tempReportTimers[device] is not None):
  "Restarting timer for " + str(device))
    else:"Initializing 1st timer for " + str(device))

    tempReportTimers[device] = ScriptExecution.createTimer(, lambda: deviceWarning(device))

def deviceWarning(device):

    log.warn("Device report timeout for " + str(device))
    sendNotification(str(device) + ": No response in " + str(REPORT_TIMEOUT/60) + " minutes")

SendNotification is a wrapper for the Telegram that results in a telegramAction.sendTelegram(msg)

Question: Is there an issue with calling telegramAction.sendTelegram(msg) from within the Timer Interrupt function?

Code seems to work fine if I remove the SendNotification. I am purposely setting the REPORT_TIMEOUT to 60 seconds while I am testing … I plan to normally have it in the 30-60 minute timeframe. The short timer might be problematic too since you can see in the log a Temp report from the device comes milliseconds after the timer expires (shouldn’t be an issue, but might be)

Any ideas?