2016-08-06

Projector statuses page

I just recently got v0.1.0 of our new projector statuses page working... mostly. Here's the rundown:
  • Extron boxes use this thing called "SSI", or "Server Side Includes", to generate the data I need. It's actually rather well-documented, despite it only being a couple pages worth of information. See the manual, starting about halfway down page 4-19.
  • A Bash/wget script takes all of that data, and dumps it into one big file.
  • A Perl script goes through and parses the data, and spits out JavaScript.
  • Client-side browser code constantly runs/reloads the JavaScript.

Now, you might be wondering why I didn't use "real" AJAX, or push from the server, or do it this way or that way. The answer is simple: I'm not that smart yet. I'd love to, and I welcome suggestions. I just wanted to make it work for now, and I'll figure out how to improve it later.




At a glance, this gives us the following information:
  • What projector it is
  • Whether that projector is on, off, or something else ("cooling down", "error", etc.)
  • How many hours are on each lamp. (Most professional-grade projectors have some sort of monitoring of "lamp hours", as a lifespan/life-remaining indicator.)
  • A colorful dot that summarized the status (green = on, red = off, other colors = other things).
It's still buggy right now. I need to tweak some code, as the page doesn't always display the statuses properly. But it's a step in the right direction, and I'm excited for what's next.
Edit: Most of the bugs have been sorted, and I think it's as good as it's going to get. (2016-10-15)

As is typical for me, the code is all on Github. See the notes file if you want a more in-depth look at how everything fits together.