Trigger event on reboot. **solved**
Moderator: Mattk
Trigger event on reboot. **solved**
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.
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.
Re: Trigger event on reboot
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!
Any help would be appreciated. If [mbsystem-uptime.0:0] >60 isn't right, please let me know.
Thanks!
Re: Trigger event on reboot
Try [mbsystem-uptime] > 60
Re: Trigger event on reboot
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
[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
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
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.
One thing I was noticing was > 60 (seconds) failed at times? Changed to > 120 (seconds) and no further issues.
Re: Trigger event on reboot
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
Raise: [mbsystem-uptime] > 120
Clear: 0
But it doesn't work.
Thanks
Re: Trigger event on reboot
Now it works! with:
Raise: ([mbsystem-uptime.0:0] > 60)
Clear: 0
I don't understand what I was doing wrong
Thanks!
Raise: ([mbsystem-uptime.0:0] > 60)
Clear: 0
I don't understand what I was doing wrong
Thanks!
Re: Trigger event on reboot
So you have included the (outside brackets), yes that might do it.
Re: Trigger event on reboot
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
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!!
I left it like this.
[mbsystem-uptime.0:0] >120
Thanks!!