In this Chapter, we will explain to you how to use the emergency features.Using the emergency features, you can trigger events outside the SignageStudio. For example, from a web interface you can have these eventspromulgate throughout your signage screen. For instance, universities wouldintegrate their existing emergency system with the digital signage. Let'ssay, for example, there's a fire, and all the screens or the specifiedscreens could actually go ahead and display a particular message. This wouldprove invaluable, for example, to evacuate the building with an arrowdesignating where to go to get to the exit signs. In this Chapter, we willexplain how to configure and trigger these types of events.

Before we begin, let us summarize quickly what we will discuss. We will startby first creating a simple user underneath an enterprise account. This userwill have the privileges to trigger only this one type of event.

Next, we will show you how to configure the campaign with events. You canselect particular timers for specific events. We will also touch onJavaScript and how you can configure a web interface using JavaScript orJQuery. You can actually execute these events from web interface. This iscool, because for example, if you want to trigger these events from mobiledevices, you can do it. You do not necessarily have to be in front of acomputer to be able to trigger this emergency and alert event. Also, throughthe help of JavaScript, you'll be able to send events to a particularscreen, you'll be able to multicast from multiple screens, or you'll beable to send events to all your screens.

In addition, we'll touch on the topic of web services, where you canactually trigger not only an event within our system, but you can actuallysend the commands to our remote system, on through to our web interface orthrough HTTP call. Moreover, to summarize the capabilities of the emergencyfeature, you can initiate on your tablet or mobile device, using very simpleJavaScript commands, you can issue an emergency alert, and this event willpropagate through the internet. It will go to the selected screens and showthe selected time you configured. Now, if you have a private server, this isall accomplished within your infrastructure as well.

In addition, you can also call a web service. For example, if you have anexisting alerting system, this web service can notify the alerting system.Then the alerting system can turn on the siren or whatever that particularalerting system uses. Too, because we support programmatic triggering, youdon't necessarily have to trigger your software through a mobile device,you can actually have your existing alerting system do the triggering everytime a change occurs with the appropriate message.

Here we logged into an enterprise account. You can see we have an accountcalled "demo business". It has a single user called "demobus".This user has all the privileges like an admin account, and it can do anythingwithin the system.

However, we're also going to want to setup an account with very limitedprivileges, an account that actually only has one set of privileges, whichwill be to send stations commands. Before we do this, let's switch to"Privileges" then go to "Campaigns" and then make sure ourdefault privileges are also setup with campaign events.

To review, "demobus" has the privileges which can do everythingincluding the event system. Next we'll setup an account for a limiteduser. We are going to click on the plus sign, we'll call this user"alert", and we'll give it a password and click on "OK".

You can see this by default. This user has all the privileges. This isn'tactually what you want.

Therefore, we'll go back to "Privileges". We are going to setup newprivileges. We're going to call this "limited".In this case, we'reactually going to remove all the check-boxes. We do this, becausethisparticular user (or any user for that matter), that has limited privilegeswill not be able to do anything in this system.

However,if we go under "Stations", under "Advance..." we'regoing to give the limited privilege and set the ability to send commands. Keepin mind, this is the only thing the limited privilege set can do.

Next, switch back to our users and now switch our "alert" user to havelimited privileges and save.

The reason we want to have a user with such limited privileges is because inour particular case, in our demo, we're going to create a JavaScript appwhich is going to reside on the web, and anybody can view the user and seethe password. Of course, in an alerting system, this particular web page willbe within a web site that nobody can access.You can protect the page with auser and password, for example, and you can run this HTML page on your localdesktop, or you can run it on a private server. Therefore, we don'tnecessarily have to create a limited user, but in our case this is anotherlayer of security to create a user with very limited privileges. Again, we dothis, because all this user needs to do is send limited commands. However,it's up to you how you want to set it up. If you have a private serverwithin your local infrastructure, you don't necessarily need to follow thesame pattern. Therefore, this completes the user configuration. Now let uslaunch the studio as the admin, as a person with full privileges.

Next, we will create a new Campaign.This is our "Demo Campaign".

Here we only have a regular standard campaign (nothing special about it).

However, we're going to add two more timelines. Our second timeline,we'll call "Earthquake" and we'll do a full screen.The thirdtimeline, we'll call it "Fire" and do a full screen.

Consequently, we have our regular standard timeline that's going toplayback when everything is good and everything is calm. But in case of anemergency, we'll be able to switch into an "Earthquake" or into a"Fire" timeline.

Our first timeline has a very simple presentation with a food menu board andsome RSS.

Our second timeline actually has an emergency text and this will be our"Earthquake".

And then we have our "Fire" timeline which is a full screen message withan arrow.

Next, we'll select the "Demo Campaign" by clicking on it to uploadits properties and then we'll click on the Event's tab.

Remember, we've enabled the events module through privileges.This is whywe see this tab in our example. Click on the plus (+) sign to add a new event.

Here we will create the first event.You can give it any name. We will callthis the "fire" event, then select a timeline.In this case, we'regoing to select a particular timeline, our "Fire" timeline triggered bythis event.

We will add another event called "earthquake" and select the"Earthquake" timeline.

In addition, for the resume, we're going to setup a "Manuallyresume", meaning this time it will continue indefinitely until we resumeback to our normal playback.

With this configuration the timelines will stay like this forever until weswitch back to our normal "Timeline 1". Next, we're going to add onemore event and this will be our "normal" event;since it's going to goback to normal playback whenever we trigger this event. We will also select"Resume presentation" under Command. This will force your presentationback to your normal sequencer.

Speaking of sequencer, now that we have setup our three events, let's go toour "Sequences" and make sure you take out the "Earthquake" andthe "Fire" timelines. Since under normal playback, you actually do notwant to play these timeline. You want to play these timelines in case of anevent or an emergency.

As a side note, you should know the names of the events could really be anystring. For our purposes, we simply picked "fire" and"earthquake" which were identical to our timelines.But as you can seefor "normal", I picked a different string which does not really match"Timeline 1".

To clarify, these events can be anything you want.We will show you later howto associate these strings with an actual trigger of the event. Next,we'll add one more event. For our last event, what we would like to do incase of a fire, and only in case of a fire, is to call the fire department.Therfore, under the "Select Command" we choose "Post url" and thenwe can paste here whatever we like.

To continue, we will paste a url(in this case we just put"mydomain.com/?call911"). Of course, you'll have to go and developyour own script which does whatever you want. If you have an existingalerting system, it can receive API calls.You can use your web servers toconnect through the API of the alert system and turn on sirens and whateveryour alerting system supports. Nevertheless, by using event system, in case ofa fire, you are going to trigger two events, these two events right here, the"fire" and the "fire".

As a result, it's going to change the timeline into "Fire" and atthe same time our "Post url" calls 911 or whatever it is you choose todo. And you can keep on adding as many events as you want. When you trigger aparticular string, all of the matched events will execute.

We've done everything we needed. As for the studio configuration as youcan see, our player is running.

Next, let's go and use the JavaScript or the browser side to actuallycontrol the presentation or control the events using JavaScript. In ourexample, we will open our editor. Right here at the editor you can see we havesome JavaScript, really simple, nothing fancy.

For that reason, we can basically see we have three buttons right here,button 1, and 2 and three. Button 1 is "fire", button 2 is"earthquake", button 3 is our "resume".

You can download the source code from our website through this:"http://www.signage.me/alertsample.js". The most important part of thepage is the include script. This is actually the source code of thelibrary.You just need to make sure to include the library so you can actuallytake advantage of the remote commands or the remote events.

Now that we have defined our three buttons, we have three functions and eachfunction will simply send a command.You can see right here that we have aserver address.

In addition, if you're not using your private server, you are using ourcloud, you will just put "galaxy.signage.me", which is our cloudsolution (regardless whether it is enterprise or free). Then you'llactually use the username. Remember we created a very limited user withusername of "alert" and we gave it a password of "123123", andthis user only has send command privileges. Therefore, you'll simply putthe username and the password, and you'll actually need to put last --theevent.

To proceed, the first button will be the "fire" then the"earthquake" which is, again, just a string we picked in thestudio.The "normal" will go back to normal playback.

One more thing you must pay attention to is the fourth argument, which in ourcase is "-1" (negative one).

Negative one (-1) means broadcast or in words, send this command, send thisevent "fire" to every single station, to every single screen in mynetwork. Now, this is not necessarily a bad thing, because if you have setup acampaign, and that campaign is not listening for events or even if it islistening for events, but it's not listening for specifically a string orthe "fire" event, nothing is going to happen. Therefore, this particularstation, running that specific campaign, is not going to get affected.

Consequently, -1 is not necessarily a bad thing, it doesn't mean you'reactually going to destroy a whole network if you're sending a broadcast.Inmost cases, you're only going to set specific stations with an event systemand the -1 will affect only those stations which are running specificcampaigns that we have configured with events, that are listening to the"fire" string. However, sometimes you may actually like to targetspecific stations. In our example, if we go back to the "Campaign",you'll notice we put an arrow right under the "FIRE" sign, meaning,people are going to walk to a specific direction, for the EXIT.

Obviously, if you have many screens configured and scattered around yourbuilding, you'll have arrows in different directions and may give messages,maybe in some arrows you'd like them to take the stairs and in some areasyou'd like them to take the fire escape. Then perhaps, you'll need toconfigure each station a little differently. What you can do is targetspecific stations. Instead of putting -1, you could actually put a stationID. You can get the Station ID by going to the "Stations" area in theSignage Studio.

The station ID is a unique identifier of that particular screen or thatparticular station that is running right now. Therefore, the ID for thisparticular station is "43" and so we will target station "43" forthe "fire".

In case of a fire, we're not going to target the entire network; we areonly going to target station "43". What you can do for example, is copyand paste this line and target specific machines. You can see in case of afire, I would like to go and target a specific machine string, particularcomputers, or signage players.

But if there is, for example, an earthquake, let's say we want to targetall the players, you can go -1 (which is everyone).

At this point, we're looking at the player.You can see our player'sworking fine and everything is working normally.

At this instant, we'll bring over the player, the HTML page. This couldbe inside a mobile device or an iPad or anywhere you want; could be withinthe intranet or internet, it's completely up to you.

We will click on the "Fire" button and you'll notice as soon as Iclicked on "Fire", the presentation changed into "Fire".This willcontinue indefinitely, because that's the way we set it up in the Signagestudio.

Now, if we switch back to "Resume", again we see normal playback, but ifwe switch into "Earthquake", the presentation changes.

We sincerely hope we don't have fire and earthquake at the same time, butif we do, we are prepared; go back to "Resume". Thus you can see thefeature is very simple to use. It gives you a nice way to switch betweendifferent timelines.

As a quick last note, if you do not want to run this to JavaScript and youactually want to run this through a backend like PHP or C Sharp, that issimple.Look at our source code and you can simply convert the ".js" to".php", to backend. It's uncomplicated and more secure.You candefinitely do it. Remember, when we configured this, anytime we have switchedinto fire by pressing the "Fire" button we would post a url to thesecond event, therefor the pull to your url is working as well.

Copyrights MediaSignage© Inc