About 8 years ago, I worked for a hosting company that had it's data center inside an old manufacturing building. Inside closets and under drop floors, we would find odd things like, construction helmets, projector parts and these industrial light towers. I asked my boss "What is this thing used for?" as I held out the light tower. Her reply was, "I haven't a clue. We've never used it, I think it came with the building? Someone plugged it in once and couldn't get it to work, it's probably broken." So I took it back to my desk and figured it out. I took it apart and found part numbers, googled around a bit and finally found the PDF for the ARD2200 control board. I opened puTTY, sent a serial command, and lights turned on!! From there I had to figure out how to programatically control these lights. I first setup a python bot that would connect to my team's internal IRC channel. When you sent a command to the bot, it would flash, usually done when someone closed a ticket. I added sound effects later, which annoyed pretty much everyone around me. After two years, I changed jobs, but they wanted me to take those lights with me!
The script connects to an MQTT broker and listens. If it finds a "key word", it runs a function that you have defined. That function can be, "lock the windows workstation" or "send some text over serial". If you have this script running on a Raspberry Pi, you can have it listen for the key word "open" which triggers a GPIO pin to activate a relay switch, or servo or motor which then opens a door.
To send these key words to the Topic on the MQTT broker, I have included an HTML page with some buttons that trigger javascript which connects over WebSockets. You don't have to host the page on a web server, you can just open it locally and as long as you can connect to the internet, it should work just fine.
Check out the GitHub repo for more details.
Comments
Please log in or sign up to comment.