TRB245: Implementing 15s ON-delay (Hysteresis) for Digital Input

Hi everyone,

I am using a TRB245 to monitor a “Common Fault” (SSM) signal via a Digital Input. I have an Event Juggler rule that sends an SMS immediately when the input state changes.

The signal sometimes flickers for only 1 second. This triggers unnecessary SMS alerts.

I want to implement a 15-second ON-delay (hysteresis). The SMS should only be sent if the Digital Input remains active for at least 15 continuous seconds. If the signal drops before 15 seconds, no alert should be triggered.

I have looked for a “Duration” or “Hold time” setting within the Event Juggler conditions but couldn’t find a way to buffer the signal there. Is there a way to add this condition directly in the Event Juggler?

Firmware: TRB2_R_00.07.14.4

Thanks in advance for your support!

I haven’t received a response yet, so I’m bumping this thread.

Maybe I am overlooking something obvious, but it seems that the Event Juggler is more limited than the old I/O Juggler regarding simple delays/hysteresis for input signals.

Hi Marius,

Only way I could find to do this was by using scripts. Let me know if you want information on this.

I have requested Teltonika to put this in firmware but haven’t seen it as yet. We are moving to another brand of networking equipment due to buggy firmware and lack of product improvements from Teltonika.

Greetings,

You can enable the Prevent action execution option:

Then, in the action configuration, add a 15 second delay so the action is executed only if the state remains unchanged for 15 seconds:

However, these options are only available on newer firmware. Since the TRB245 is an EOL (End of Life) device, this functionality is not supported natively. In this case, you would need to implement a custom script. Please note that writing and troubleshooting custom scripts is outside the scope of our technical support.

You could add the script as an action in the event juggler:

One possible approach would be to create a loop that checks the pin state every second. If the state remains unchanged for 15 seconds, the script could then send an SMS using: gsmctl -S -s "+123456789 MESSAGE"

You can find more information about custom scripts here: User Scripts examples - Teltonika Networks Wiki

Best Regards,
Justinas

Hi Justinas,

Thank you very much for the clarification! It’s a bit a pity that the TRB245 doesn’t support the native “Prevent action execution” delay due to its EOL status, but I understand the hardware generations are moving forward.

I will follow your advice and implement a custom script to handle the 15-second hysteresis. However, I have one follow-up question regarding the SMS recipients:

In the WebUI, I have already maintained a “SMS Group” with several phone numbers. To avoid hardcoding every single number into the shell script (which would be a maintenance nightmare), is there a specific command to trigger an SMS to an existing group defined in the WebUI?

Would something like /usr/sbin/sms_group_send “MyGroupName” “Message” work on this firmware version, or do I need to parse the UCI config manually to get the numbers?

Thanks again for the great support!