00:05
In this groov Workshop, I’ll show you how to use the powerful Events feature, to log
00:09
and receive notifications by Exception. Details on email setup are covered in another groov
00:15
Workshop. In this video we’re going to use a fictional Brewery as an example to dive
00:20
deeper into: Event CONFIGURATION, our powerful Event_Status page which lets you access live
00:28
Event status and logs of all past events and more on Messages for use in emails, texts,
00:35
and your downloadable log. I have already set up this simple page showing my beer stock.
00:41
 I created this page using the built-in simulator tags in groov. This slider gadget, command
00:48
button, and trend are all connected to the same int 32 tag. If I move my slider up to
00:54
the max value of 99, here in groov View, you can see the change in beer stock reflected
00:59
over here on my trend. If I click on the “ship all beer” button that will reset my value
01:04
to zero. But let’s say I want to know when my beer stock exceeds or drops below a certain
01:09
threshold without having to constantly monitor this page - how can I do that? That’s where
01:15
Events come in handy. I’ll switch over to groov build by clicking on the gear icon and
01:21
I’ll show you how to set up an event of your own. To set up an event, go to Configure>
01:27
events. here at the top, click create new event. Now let’s add a new event that lets
01:34
me know when my beer stock gets too low or too high. The first thing to do is give the
01:39
event a name.  I’ll call it “beer stock problem”.  Next is where we set up the
01:46
Event conditions.  I need to select a tag  - I’ll choose that simulated int32 tag
01:52
that my slider and trend are connected to. There are several conditions options to choose
01:59
from.   Since I want to know when my beer stock goes outside of a certain acceptable
02:04
range, I’ll select Outside Range. Notice how I now have several more fields to configure.
02:12
First, for my Upper Limit, I want to know if I have Greater Than than 90 beers, because
02:17
that means I’m running low on storage space and it’s time to make more room. Now, for
02:22
my lower Limit,  I want to know when I have 12 beers or less, so I’ll set my lower limit
02:28
to 12 and the comparison to less than or equal to. Hysteresis is a handy option that will
02:36
let me de-activate this event at a different number than that triggering limit. In this
02:42
example, let’s say we’re not happy unless I have at least an extra six pack over than
02:47
lower limit of 12. So my “all okay” limit is 18 beers. In that I case I would need to
02:53
set a lower hysteresis offset to 6 since 12 + 6 = 18. Debounce is a great feature too.
03:02
You will want to use debounce if you have a noisy or jittery value. I my case, I don’t
03:08
need to know if someone takes out a bunch of beer and then puts it right back in so
03:12
I’ll set a debounce time of 5 seconds.  Then I’ll click “Add New Condition.” For
03:18
more complex events, I can continue to add more conditions and set it to have the event
03:23
be active when any or all of those conditions are true.  That’s pretty awesome and you
03:30
can see how easy it is to have some very sophisticated events. Down here near the bottom of the page
03:37
is where you set up optional email notifications. I can select if I want this event message
03:44
to be sent to All Users with email addresses, or just a selected few. Be sure to check out
03:51
our groov Workshop on Email & Text Message setup. By default, all events are logged and
03:58
optionally emailed with the appropriate BEGIN or END message. But if you want to customize
04:05
your message to include more information, for example, the current value of tags that
04:10
are relevant, or even a link to the relevant groov page, here’s where you can include
04:15
those. For example, I might want my BEGIN message to say: “Panic! Beer stock problem!
04:23
then include the current stock. I can click here to select from a list of condition tags.
04:29
I’ll include the tag this event is watching, it’s the only one... so this list is short.
04:34
But remember I could include multiple conditions, where this list would include all the tags
04:39
this event is watching. I may include ANY tag configured in this project, or add this
04:46
handy timestamp. For my “Event End Message” Let’s say: keep calm and groov on, then
04:54
again list that level. of course that same tag is the condition but it also shows up
05:00
here in the project tags where I can select any variable, including the one that was the
05:05
trigger.  ok I’ll add some subject lines here for my emails like out of range and all
05:12
OK. Now that I’m done with all these Event settings, I’ll scroll up here to the top
05:19
click “Create Event” then we’re returned to the Event List. And here is that event
05:25
we just created.  By default, the event is enabled. But we can disable those we’re
05:31
not using. edit or delete any event. Up here at top, click close. You’ll see this bell
05:39
icon in both groov view and groov build. Click on the bell to get to this Events_Status page,
05:47
which shows me the “current status” of all my events. To cause my current status
05:52
to change, I’ll go to this other tab and switch from groov Build to View. I’ll take
06:00
advantage here of groov’s ability to scale seamlessly. Okay, now my slider’s up above
06:08
my lower threshold of 12 and below the upper 90. To test out my debounce I’ll quickly
06:16
drop my stock and bring it back up again before that 5-second limit.  That event still shows
06:22
“inactive.” But if I bring my stock all the way down to 0 - If I’m patient and wait
06:30
long enough for the event to trigger, we’ll see the dot turn blue and it show: “Active.”
06:38
I’ll bring my stock back up, into the hysteresis range of 12 - 18 and see it still shows active.
06:46
But when I take it up here above 18, it goes inactive. Finally, I’ll slide up here in
06:55
the “too high” range, that’ll also trigger this event. And here come all my text messages
07:04
on my smartphone. We’ll look at those in more detail here shortly. Also check out the
07:09
groov Workshop on Email setup. So that’s how to set up an event.  But
07:15
what if I missed an event because I wasn’t looking at this status page, or missed the
07:19
email notification? That’s where the logs come in. Clicking on “message logs” gives
07:26
me an historical view of all my events since they were set up, or cleared. And it shows
07:32
both the Begin and End, with a timestamp. But let’s say I just want to see the events
07:38
with the word “problem” in their name, I can use Filters, type in “problem” here
07:43
for the name, and now I’m only looking at those events. I can filter even more, based
07:50
on the message itself. Perhaps I just want to see just those back to normal messages
07:56
with the world “calm” in them.I  can even sort by a time. Notice how groov automatically
08:02
gives me helpful clues about my filter here in the real-time window.One more option to
08:09
check out here on the left: Log Controls. If you have appropriate user privileges, you’re
08:16
given this option to “Clear Logs,” but I don’t want to do that just yet. Notice
08:21
I can also “Download Logs.” When I click here, my Event logs are downloaded to my local
08:27
hard drive. Since it’s just a text file, you can open it in your favorite text viewer,
08:34
or even import it into your favorite spreadsheet software! In the meantime since I’ve configured
08:40
an event to go to both my email and text message on my mobile phone let’s have a closer look
08:46
at those messages. If I’ve configured an event to go to my email or text it’s because
08:52
I want to know right away, and presumably act on this information immediately, so why
08:57
not include a link to the relevant groov page? In this case, my beer stock page is the first
09:05
one I built, so it has a #1 as the last part of this URL.  I’ll just copy that address
09:13
and paste in here in my “Begin” message. Now I’ll scroll back up here to the top,
09:19
update my event and try it out! Back here in groov View, I’ll move my slider around
09:27
a bit to trigger an email. Now if I’m NOT looking at groov and I receive one of these
09:34
notification messages, I can quickly get back to groov from my phone or computer with a
09:40
modern browser, just by clicking on the link then see what’s happening live. groov’s
09:47
got me covered wherever I go! Thanks for watching.
Up next
Autoplay