Page 1 of 1
Trigger event on reboot. **solved**
Posted: Sun Sep 26, 2021 11:39 am
by admin
I was asked by one of the users to add a function that allows triggering a service each time the Meteobridge reboots. After thinking a bit about this reasonable request I realized, that this can already be done. Example below sends an email 60 seconds after reboot of the Meteobridge.
Meteobridge variable "mbsystem-uptime" reports uptime in seconds. Once this is above 60 the alarm trigger is raised and the action started. As the alarm trigger gets never cleared (clear condition always evaluates to zero) no second invocation of the alarm is done.

- Bildschirmfoto 2021-09-26 um 11.36.17.png (23.8 KiB) Viewed 4084 times
Re: Trigger event on reboot
Posted: Mon Aug 18, 2025 12:57 am
by Mauricio
Hi, I'm trying this template but it doesn't return anything when I perform the test after a reboot.
Any help would be appreciated. If [mbsystem-uptime.0:0] >60 isn't right, please let me know.
Thanks!
Re: Trigger event on reboot
Posted: Mon Aug 18, 2025 2:52 am
by Mattk
Try [mbsystem-uptime] > 60
Re: Trigger event on reboot
Posted: Mon Aug 18, 2025 12:54 pm
by Mauricio
Hi, It definitely doesn't work either way, even after submitting a "test" email. I tested it on an MR3020 and an RPi 3b+.
Re: Trigger event on reboot
Posted: Mon Aug 18, 2025 1:30 pm
by Mattk
[mbsystem-uptime] > 60 definitely works on a MBPro but is not immediate (takes a couple of minutes) as it appears the trigger is being checked at a non immediate interval? I couldn't get the original to work.
Re: Trigger event on reboot
Posted: Mon Aug 18, 2025 2:02 pm
by Mauricio
It is possible to build another alternative to add a function that allows triggering a service each time the Meteobridge reboots?
Re: Trigger event on reboot
Posted: Tue Aug 19, 2025 4:24 am
by Mattk
Have tested this further and is working fine on a MBPro, Nano & NanoSD.
One thing I was noticing was > 60 (seconds) failed at times? Changed to > 120 (seconds) and no further issues.
Re: Trigger event on reboot
Posted: Tue Aug 19, 2025 1:17 pm
by Mauricio
Hi, I'm testing it with an MR3020 v3 and an RPi 3B+ configured this way.
Raise: [mbsystem-uptime] > 120
Clear: 0
But it doesn't work.
Thanks
Re: Trigger event on reboot
Posted: Wed Aug 20, 2025 1:22 am
by Mauricio
Now it works! with:
Raise: ([mbsystem-uptime.0:0] > 60)
Clear: 0
I don't understand what I was doing wrong
Thanks!
Re: Trigger event on reboot
Posted: Wed Aug 20, 2025 2:54 am
by Mattk
So you have included the (outside brackets), yes that might do it.
Re: Trigger event on reboot
Posted: Mon Aug 25, 2025 8:10 am
by admin
Operation of user-defined events is blocked for a while until main sensor date (wind, rain, outdoor temp is there. You can read in System - Logging if Meteobridge is still waiting for sensor data. This might delay doing the event trigger a bit. However, the round brackets should not have any impact here.
Re: Trigger event on reboot
Posted: Sat Aug 30, 2025 1:04 am
by Mauricio
Hi, without the brackets, it works correctly. If you set the value to 60 seconds, it sends two alerts; if you set the value to 120 seconds: it sends only one alert.
I left it like this.
[mbsystem-uptime.0:0] >120
Thanks!!