Status-Bot/en

Aus LaborWiki
Wechseln zu: Navigation, Suche

Labor status

Legend

  • StatusON.png das LABOR is open
  • StatusNONE.png The status bot receives no data at the moment and therefore does not know whether the Labor is open or closed. Pick up your phone and call us to find out.
  • StatusOFF.png das LABOR is closed

Statistics

Daily and weekly usage graphs:

http://das-labor.org/activity_daily.png

http://das-labor.org/activity_weekly.png


Motivation

It seemed inconvenient to have to call the Labor every time you want to find out if it is open so you can enter, and if, given the case you could enter, you have to hang out there all alone. The information "Labor open | Labor closed" should be transmitted in some other way.


Services

HTTP

For this purpose the Bot display the current status as http://www.das-labor.org/status.png. This icon is also visible at www.das-labor.org and may also be used on third party websites, to indicate the current Labor status.


XMPP

Further, the Labor's status is brought to your knowledge via Jabber. Simply add "status !AT- das-labor -dot! org" to your roster. The contact's status indicates the Labor's: free for chat: open, extended away/NA = closed, dnd = no data available.


How does it work?

The bot consists of client and server, communicating via XMPP.


Server

On the system where our website is hosted also runs the server-part of the status bot. It listens to status !AT- das-labor -dot! org for the clients status information. Depending on that information it writes a matching status icon to the document-root of www.das-labor.org and sets the status of the Jabber contact. It validates, that the client's status messages originate from an authorized account. There is at least no trivial way around this authentication method, thanks to the design of the Extensible Messaging and Presence Protocol. The server expects the client to send a message in a pre-defined period of time and sets the status to NONE (icon yellow, xmpp dnd), if the time is up.


Client

The client run on roulette, a host inside the labor. It sends ping packets in an fixed interval (60s atm) to a wireless access point. This access point is online, if the Labor's main power switch is turned on, which is a relatively sure sign for somebody being around. Depending on the ping result, the client sends a Jabber message containing the current status to the server.