2N Automation: Wake on LAN

We recently set up our 2N IP Vario to wake up our computers when we scan our key fobs to enter the office. This means that our employee’s computers are switched on and ready to go before they even arrive at their desk.

We did this by writing a web app which uses the ‘Wake on LAN’ protocol, this was then added to 2N’s automation feature. ‘Wake On LAN’ is an existing protocol supported by many desktop computers.

Once a user scans their key fob on the IP Vario it then sends a HTTP request to our web app that includes the id of the key fob. The app then finds which user has scanned into the building by looking up the id of the key fob which was used and finds the associated user. With the username, the app then looks up the mac address for that user’s computer which calls Wake On LAN to broadcast a magic packet across the network. If the PC has power but is not turned on the computer will then boot.

Here is an example of the config we set up in our IP Vario’s automation:

<automation><row><name>Event.CardEntered</name><value>Card=valid;</value></row><row><name>Action.SendHttpRequest</name><value>Event=1; Uri=http://webapp.provu.co.uk?Id=$(1.Card)</value></row></automation>