Welcome to the 15th Raspberry Pi Tutorial! Just like the last few tutorials, this video is a quick demo and a quick walkthrough of the set up. Most of the information you'll need to set this up can be found on this page and on GitHub to which I'll be linking below so that I'm not repeating the same info in multiple places.
You can find the code and more detailed technical information in the following GitHub pages: https://aiim.easyprogramming.net/
Here's a quick demo of what the end product looks like:
So, what is AIIM?
AIIM is short for Am I In (a) Meeting? Due to COVID-19, the use of Zoom and Microsoft Teams has gone through the roof since a huge chunk of the work force is now working from home. If you live with multiple people in the house and you need them to know that you are in a meeting from far away, then maybe AIIM is a project you can do!
At this moment, this was only set up for Zoom and Microsoft Teams meetings running on Windows. I will try to expand this to detect meetings on Macs and Linux as well.
AIIM is pretty simple and there are two ways of implementing it. There's a "simple" way which just turns a GPIO pin on or off. You can use this method to turn on a simple LED, an LED Strip, or a whole appliance by using a relay or transistor. This is pretty much an implementation of the How to control an LED your browser tutorial.
The other way is called the "NeoPixel" method. If you saw my Audio Reactive LED Strip tutorial, then it'll look familiar. I thought I'd add something interesting to this project and add some addressable LEDs to the mix. It makes the project pop and because the lights are 5V, I don't need anything special, not even a resistor! I'm using WS2812b lights for this project.
Check out the section on GitHub called Simple vs NeoPixel for more information.
How does AIIM detect meetings?
AIIM is a simple Python script that runs on your local machine. Currently only supports Windows. You need to make sure you have Python 3 installed on your machine. For more information, check out the official Python docs here: https://docs.python.org/3/using/windows.html
The Python script checks your tasklist for Zoom and Microsoft Teams processes. Zoom uses CptHost.exe and Microsoft Teams uses Teams.exe. For Teams, we need to go a bit further and read the Window title. And because of this, detecting Teams meetings is unreliable. But Zoom meetings seem to work every time! Here's an example command that's run:
os.popen('tasklist /fo table /v /fi "imagename eq CptHost.exe" && tasklist /fo table /v /fi "imagename eq Teams.exe" /fi "windowtitle eq Meet*" /nh')
The above filters your tasklist by the process names and there's an extra filter for the Teams to filter by Window Title. The script then looks to see if these exist, if it does, it sends a REST request (GET call) to a Raspberry Pi hosted somewhere on your network.
The script is then run on the Task Scheduler every X minutes (you get to decide). Windows doesn't let you run any tasks less than 1 minute intervals, so that's the smallest possible interval which I think is fine. I think even 5 minutes is fine and that's my default. At most, your meeting announcement will be a few minutes delayed but it's all automated! You can run it and forget it.
If you want to help with detecting changes in other OS, feel free to contribute to the project. For more information on how this app detects meeting, check out the Detecting Meetings section of the GitHub repo.
You can find the Raspberry Pi files in the same repo. You can either clone that repo to your Pi and only use everything in the Raspberry Pi directory, OR you can just get the .zip distribution, unzip it, and install it where ever you need. It's normally located at https://github.com/naztronaut/AIIM/blob/master/RaspberryPi/pi_dist/led.zip but please check the repo for up to date info.
The Raspberry Pi runs a simple Flask application inside a virtual environment that takes some URL parameters and does some magic. If you're using the simple setup, then you don't have to do anything special, but if you want to use a NeoPixel setup, you should know that I'm using the adafruit-circuitpython-neopixel library to control the WS2812b lights. To install this on your, run this from your venv:
pip3 install adafruit-circuitpython-neopixel
If you are doing everything from your Pi and not a virtual environment, be sure to prepend with
sudo if you get a permissions issue.
Here's a quick diagram of the wiring:
The NeoPixel strip doesn't need anything special since it's a 5v line. If you're using the simple set up and need to connect a relay or transistor, be sure to check out some of my other LED tutorials where I cover them: Transistors in RGBW Control and Relay in Remote Control LED Strip.
Check out the Raspberry Pi Setup section in the repo for more information and step-by-step guide. I refer back to my previous tutorials a lot.
And be sure to watch the video where I quickly go through the setup of all the software and hardware!
In the future, I plan to improve this project and add some MQTT so that you can integrate with other systems such as Home Assistant, ESPHome, Etc.
Have questions about the tutorial? Ask below or open an issue on the GitHub repository, I welcome all questions and comments.
Remember to checkout the Resources section below for associated downloadable content, JSFiddle links, and other resources. Watch the video and follow along!