Keeping Tabs On An Undergraduate Projects Lab’s Door Status

Over at the University of Wisconsin’s Undergraduate Projects Lab (UPL) there’s been a way to check whether this room is open for general use by CS undergraduates and others practically for most of the decades that it has existed. Most recently [Andrew Moses] gave improving on the then latest, machine vision-based iteration a shot. Starting off with a historical retrospective, the 1990s version saw a $15 camera combined with a Mac IIcx running a video grabber, an FTP server and an HP workstation that’d try to fetch the latest FTP image.

As the accuracy of this system means the difference between standing all forlorn in front of a closed UPL door and happily waddling into the room to work on some projects, it’s obvious that any new system had to be as robust as possible. The machine vision based version that got installed previously seemed fancy: it used a Logitech C920 webcam, a YOLOv7 MV model to count humanoids and a tie into Discord to report the results. The problem here was that this would sometimes count items like chairs as people, and there was the slight issue that people in the room didn’t equate an open door, as the room may be used for a meeting.

Thus the solution was changed to keeping track of whether the door was open, using a sensor on the two doors into the room. Sadly, the captive-portal-and-login-based WiFi made the straightforward approach with a reed sensor, a magnet and an ESP32 too much of a liability. Instead the sensor would have to communicate with a device in the room that’d be easier to be updated, ergo a Zigbee-using door sensor, Raspberry Pi with Zigbee dongle and Home Assistant (HA) was used.

One last wrinkle was the need to use a Cloudflare-based tunnel add-on to expose the HA API from the outside, but now at long last the UPL door status can be checked with absolute certainty that it is correct. Probably.

Featured image: The machine vision-based room occupancy system at UoW’s UPL. (Credit: UPL, University of Wisconsin)

17 thoughts on “Keeping Tabs On An Undergraduate Projects Lab’s Door Status

  1. I’m a little confused, wouldn’t a booking system be a lot more simple and just as effective? If they really wanted Discord integration I’m sure a bot could scrape that and list the times that the room is booked out.

    1. I had that impression.
      It seems to me like a very complex solution for a simple job.
      There is a story of a toothpaste factory that implemented a $2 million solution where an AI system used a highly accurate scale to check whether the boxes were filled with the tube and then remove the empty ones from the lines. A few years later, the directors discovered that the system never worked and that it was in stock, but the product continued to be checked. The employees then explained that the very expensive system was very defective and that it was replaced by a powerful fan that simply blew the empty box. out of line.

      1. Fans are great. They are used with pistachio’s to blow away twigs, dirt and empty shells. They are used with cocoa after they cracked the shells, to blow off the shells. So simple, so effective.

      2. I actually proposed that fan solution for verifying whether a bottle of vitamins had been stuffed into a carton. No, we’d rather use a $20,000+ in-motion weight check system that takes up 3-4 linear feet of space, calibration, certification, and regular maintenance rather than a variable speed squirrel cage blower, probably with a bespoke nozzle, that would require only about 8-10 inches of working space.

        I’m not really too sure about the veracity of the exact story above, though it’s certainly a good one. I’ve heard so many variants in so many places, it’s probably an aggregation/compilation/generalization by now. But, if it is true, a common off the shelf, industry proven piece of equipment could have instantly knocked three zeroes off of their price tag.

        I may yet order up the two digits worth of (Amazon grade) parts to do a proof of concept. Then I can tell my own version of the story. :-)

      3. It wasn’t even a AI system. It was just a scale station that pressed the emergency shutdown of the line when empty box was measured. Management was happy, since the system stopped letting empty tubes though, until they found out someone just put a fan before the scaling part, since they got pissed very fast to the loud alarms that stopped the line for everyone.

      1. If they’re just screwing around while learning stuff then that’s fair enough, but from the article it did sound like they were quite concerned with the actual application to me. Maybe they could have a booking system, and an AI model to forecast room occupancy from month to month…

  2. For some reason the very first paragraph made me immediately think of the coffee pot webcam.

    [googles]
    Ahh, yes the Trojan Room coffee pot circa 1993.

    1. You would assume that, that’s why I love lights with sensors. My entire house is filled with them to turn on and off the lights accordingly. There’s a good reason for it. I never turn off lights.

    2. Hi, this is the creator project. There are some times where the lab is open to student members but not to the wider public — the lights wouldn’t necessarily indicate if that were the happening. Because of the door system, there’s an easy way to broadcast “is the room open to the public” rather than just “are there people”

  3. Just put a phone line in and if it rings pick it up and hang it up. That way the caller knows the lab is populated.

    “Open to the public” puzzles me. Why would it be open to the public and why would it NOT be open to the public?

    It’s extremely difficult to care about this. What if I want to get busy with my lady, my ladyboy, or my Schnauzer in the lab?

    Just put in a Sybex lock for god’s sake. They’re easily defeatable but send the message “Go away”.

    Not only not a hack, just not good. I’d be embarrassed to be involved. Someone’s not looking at this from a systems point of view. Are you now phishing for critical comments HackADay?

  4. Maybe this is what Maya was trying to say¹: they replaced a not-working image AI model with Zigbee sensors on the doors and HomeAssistant. While doing that they had to fix some network related security access situations. A fun project.

    With Zigbee and HA already in place, add a red lamp with an “occupied” switch to actively set meetings to cover all bases.

    ¹) Sorry Maya, but usually your long-form story-telling works really great. It’s just in this case the original blog post already has the perfect long winded format.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.