{"id":422,"date":"2012-09-30T09:16:20","date_gmt":"2012-09-30T09:16:20","guid":{"rendered":"https:\/\/copyright.lboro.ac.uk\/middleware\/?p=422"},"modified":"2014-09-09T11:41:29","modified_gmt":"2014-09-09T10:41:29","slug":"lab-availability","status":"publish","type":"post","link":"https:\/\/blog.lboro.ac.uk\/middleware\/blog\/digital-signage\/lab-availability","title":{"rendered":"Lab Availability"},"content":{"rendered":"<p>As part of the development of a student web information portal at Loughborough University\u00a0a traffic light style widget, showing the usage of our computer labs, was posited. This would offer a number of advantages with students being able to chose the lab they would head towards by seeing those which were currently, or soon to be, booked and of the available ones which were busy.<\/p>\n<p><strong>Mash<\/strong><\/p>\n<p>The Active Directory (AD) was the first port of call for this. Each of our labs has their own organisational unit (OU), which contains all of the machines currently in the lab. The LDAP libraries of php could then be used to\u00a0scoop up the AD computer object for each machine. An AD extension attribute on each managed computer was assigned and would contain binary data. 0 would indicate that the machine was not logged into and 1 would mean the machine was busy. Attribute control is handled by LDAP Modify commands that are run as part of the log on and off processes of the PC&#8217;s. By counting the number of zeros we could tell how many of a labs machines were currently free.<\/p>\n<p><strong>More mash<\/strong><\/p>\n<div id=\"attachment_437\" style=\"width: 160px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/blog.lboro.ac.uk\/middleware2\/wp-content\/uploads\/sites\/2\/2014\/05\/first_go.png\" rel=\"lightbox[422]\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-437\" class=\"wp-image-437 size-thumbnail\" src=\"https:\/\/blog.lboro.ac.uk\/middleware2\/wp-content\/uploads\/sites\/2\/2014\/05\/first_go-150x150.png\" alt=\"first_go\" width=\"150\" height=\"150\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/05\/first_go-150x150.png 150w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/05\/first_go-144x144.png 144w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-437\" class=\"wp-caption-text\">First attempt at the traffic light system<\/p><\/div>\n<p>For those labs that are open access, the AD attribute control method offered all of the monitoring that was required. More work was required, however, on those labs that could be booked.<\/p>\n<p>Therefore the second stage, was to question the University&#8217;s central timetabling system to see the status of the labs themselves. For this a database view was created, showing the status of the bookable labs throughout the day. SQL queries could now be sent to the view and the current and future status of the lab interpreted.<\/p>\n<p><strong>Mash with gravy<\/strong><\/p>\n<p>The Library uses a separate booking system (WUBS) for its seminar rooms and CAD lab. As these are not controlled from the central timetabling system, more mashup was required to connect to its <a title=\"New frontend for Booking System\" href=\"https:\/\/blog.lboro.ac.uk\/middleware\/blog\/web-user-booking-system\/new-frontend-for-booking-system\">API<\/a>\u00a0and once again poll for the daily booking data. Once this was achieved, it was simply a case of converting the WUBS API data into the same format as the central timetable data and output it all. This data could then be taken and combined with HTML5, to produce a unified traffic light display of availability throughout the campus (See our <a title=\"Digital Signage\" href=\"https:\/\/blog.lboro.ac.uk\/middleware\/blog\/digital-signage\/digital-signage\">Digital Signage<\/a> blog for the details).<\/p>\n<div id=\"attachment_342\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.lboro.ac.uk\/middleware2\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796.png\" rel=\"lightbox[422]\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-342\" class=\"wp-image-342 size-large\" src=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796-1024x567.png\" alt=\"pcAvailability\" width=\"584\" height=\"323\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796-1024x567.png 1024w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796-300x166.png 300w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796-672x372.png 672w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796-1038x576.png 1038w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796-900x498.png 900w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2014\/02\/pcAvailability-e1401439726796.png 1121w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-342\" class=\"wp-caption-text\">Pi and Mash. Raspberry Pi powered HTML5 mashup<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>As part of the development of a student web information portal at Loughborough University\u00a0a traffic light style widget, showing the usage of our computer labs, was posited. This would offer a number of advantages with students being able to chose &hellip; <a href=\"https:\/\/blog.lboro.ac.uk\/middleware\/blog\/digital-signage\/lab-availability\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[4,5],"tags":[11,17,19,20,22,26],"class_list":["post-422","post","type-post","status-publish","format-standard","hentry","category-digital-signage","category-lab-availability","tag-api","tag-frontend","tag-jquery","tag-lab-usage","tag-mashup","tag-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts\/422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/comments?post=422"}],"version-history":[{"count":1,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts\/422\/revisions"}],"predecessor-version":[{"id":510,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts\/422\/revisions\/510"}],"wp:attachment":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/media?parent=422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/categories?post=422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/tags?post=422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}