Zoom On Air Sign

Posted on
Mon May 25, 2020 1:15 pm
Turribeach offline
Posts: 429
Joined: Feb 06, 2015
Location: London, UK

Zoom On Air Sign

So like many people I have been confined to my house doing remote working. My daily meetings have now all moved exclusively to Zoom. As my wife and daughter are also in the house they often come to my home office and interrupt those calls as they don't have any good ways of knowing if I am in a Zoom call or not. My computer is on a corner desk and the door is behind me so I don't see when they come in and they can't see my face to ask for a visual clue either. Looking at my screens is not a reliable indictor either as a lot of the times I am presenting something or I am watching a presentation so Zoom might not be in the foreground.

I thought I can automate something around this. Having researched whether I could programatically check if I am in a Zoom call I found that this was possible via a custom Zoom Marketplace App hooking into the Zoom API but my employer would never allow me to run such App in my Zoom account. I looked on the web and found a very reliable way of checking if Zoom is on a call using lsof and checking for UDP traffic on the Zoom process. Here is the bash script I wrote:

Code: Select all
#!/bin/bash
current_state=`/usr/sbin/lsof -i 4UDP | grep zoom.us | wc -l`
if [[ "$current_state" -eq "0" ]]; then
    printf "false"
else
    printf "true"
fi


I then bought a LED Neon On Air light on eBay:

s-l1600.jpg
s-l1600.jpg (183.78 KiB) Viewed 4648 times


And I used a Fibaro Relay Switch to control it. I run the Bash script every 2 seconds with an Indigo Schedule triggering an Action Group (probably a bit too frequent but doesn't seem to impact CPU), update a variable with the script output which then triggers the change on the LED sign. Now my wife and daughter can clearly see when I am in Zoom call :mrgreen:

Posted on
Mon May 25, 2020 4:47 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Zoom On Air Sign

I love this – thanks for sharing!

Image

Posted on
Wed May 27, 2020 6:51 am
ChiefMonk offline
Posts: 26
Joined: Nov 28, 2014

Re: Zoom On Air Sign

Very cool and Very 2020!

Posted on
Thu May 28, 2020 7:05 am
bjones offline
Posts: 21
Joined: Oct 22, 2017

Re: Zoom On Air Sign

Very cool. I implemented this to run every 2 seconds but can't seem to get a true value out of it when I join a call -- wondering if there's some recommended config at my router to be able to listen?

Edit: Does this only detect zoom sessions on the computer running indigo? Seems to work great locally.

Posted on
Fri May 29, 2020 6:27 pm
Turribeach offline
Posts: 429
Joined: Feb 06, 2015
Location: London, UK

Re: Zoom On Air Sign

bjones wrote:
Very cool. I implemented this to run every 2 seconds but can't seem to get a true value out of it when I join a call -- wondering if there's some recommended config at my router to be able to listen?

Edit: Does this only detect zoom sessions on the computer running indigo? Seems to work great locally.


My example assumes that you are running Zoom on the same computer where you are running your Indigo Server, which is my setup. If you run Zoom on another Mac than where the Indigo Server is running then you could use Indigo RESTful API to update the value of a variable in your Indigo Server and take it from there. If you run Zoom on Windows 10 you can use this Powershell command:

Code: Select all
(Get-NetUDPEndpoint -OwningProcess (Get-Process -Name Zoom).Id -ErrorAction SilentlyContinue | measure).count

Posted on
Mon Dec 28, 2020 8:06 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Zoom On Air Sign

This is genius

Posted on
Wed Jan 27, 2021 2:21 pm
Guest offline

Re: Zoom On Air Sign

I have a similar need that would ideally trigger 3 lights. 1. hosting a zoom session. 2. Camera on or not muted. 3. microphone on or not muted.
We run Zoom for our church service. The zoom session is up during the practice time and preparation for the service. It would be nice to have a visual indication that, "people can see you" and "people can hear you"

Any thoughts on doing this?
I am in the early stage of my search and you were my first stop.
Thanks for sharing

Posted on
Tue May 18, 2021 1:07 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Zoom On Air Sign

I finally got around to refining this to support both Zoom and Teams calls and to turn the wall lights outside my office to red when I am on a video call.

IMG_1634.jpeg
IMG_1634.jpeg (499.02 KiB) Viewed 3375 times


The script is pretty crude, but sets a series of variables for a zoom call, teams call or a video call and a virtual device takes care of the lights and the colour adjustment

Code: Select all
#!/bin/bash


LOGFILE="${HOME}/Library/Application Support/Microsoft/Teams/logs.txt"
indigo_user="username"
indigo_pass="password"
while true
do
video_call=false
last_event=$(tail -r "${LOGFILE}" | grep -oh "eventData: s::;m::1;a::[0-9]" | head -n1)
if [[ "${last_event}" =~ 1$ ]]
then
  echo "☎️ In a Teams call"
  curl -u "${indigo_user}":"${indigo_pass}" --digest -X PUT -d value=true http://192.168.1.151:8176/variables/teamscall
  video_call=true
  echo "Teams call in progress"
else
curl -u "${indigo_user}":"${indigo_pass}" --digest -X PUT -d value=false http://192.168.1.151:8176/variables/teamscall
echo "No teams call in progress"
fi
zoom_call=$(lsof -i 4UDP | grep zoom | wc -l)
echo $zoom_call
if (( $zoom_call < 1 ))
then
  curl -u "${indigo_user}":"${indigo_pass}" --digest -X PUT -d value=false http://192.168.1.151:8176/variables/zoomcall
  echo "No Zoom call in progress"
else
curl -u "${indigo_user}":"${indigo_pass}" --digest -X PUT -d value=true http://192.168.1.151:8176/variables/zoomcall
video_call=true
echo "Zoom call in progress"
fi
echo "Sleeping"
sleep 5
done


Still need to figure out how to run this elegantly on my work Mac without admin rights, and to check if I am on the home network. I have rather left myself open to jokes about the red lights now of course.

Neil

Posted on
Tue May 18, 2021 5:07 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Zoom On Air Sign

Your office building looks bigger than my house!

Awesome setup though, very cool!


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Mon May 24, 2021 7:27 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Zoom On Air Sign

Awesome

Posted on
Mon Jun 21, 2021 10:09 am
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Zoom On Air Sign

So as part of my 2021.1 upgrade, I decided to update my script to use an API key rather than the digest user name/password combo to give it a little test and it all works perfectly.

Fast forward to today and I am working in the "real office" and now of course this works remotely too as I never did get around to checking which network I am on, so the family get an indication when I am on a call regardless so pretty cool.

So we can confirm it works a treat !

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest