For meetings I now have 3 effects.
1. At 1 minute to meeting start the meeting subject is announced on Sonos speakers to awake me from focus. This uses Node to query my Office365 calendar.
2. Two Pi Zeros with LED hats light up during Zoom meetings. This uses the Zoom APIs to receive webhook events that are published to MQTT. The PIs listen to MQTT and adjust the light colors.
3. I have a color changing Pac-Man Ghost light behind me that turns off during video meetings. In this case, my home automation system listens to MQTT events and turns the plug off and on.
Extra. I used the Node/Office365 calendar querying to light up PI LEDs for wife’s meetings and kid’s meetings. I didn’t feel like trying to deal with another company’s Teams API or school’s Zoom settings. The kids meetings were also announced over Sonos in the area of home they were working. It worked well enough we didn’t have to look after them every time class started.
The top answer on SO that I found (https://unix.stackexchange.com/a/344463/91434) also uses this way of determining whether the device is being used - is that really the best way, or is there anything to actually query the device? E.g. my webcam has a light already that is only active when images are being captured(?), shouldn't it be possible to query that bit of information directly?
In the Star Trek sense, anything is possible; if the people making the device had desired to expose the state of the LED to software, it would be very easy for us end users (including people writing a little shell script). But there's no reason to expect that just because the LED is active, they made it easy to sample its state.
It's a closed system, like a restaurant kitchen. Determining whether the chef is wearing a hat by examining the plates coming out may be possible with enough plates and time, but the answer sufficiently becomes 'no' for practical purposes.
I would be worried if there was a way to query the webcam LED. Ideally you want it controlled by the hardware: if power is going to the camera, power the light.
If it’s accessible via software, there’s the possibility that it can be controlled with software as well.
Presumably there's a command that drives the common control point.
If there's a pin (or more likely, a USB control transfer controlling a pin) that controls the power state of the webcam (and thus the LED), you need to track the state of the pin anyway.
Rather the opposite. Unless you're trying to figure out if the device is capturing video and sending it somewhere else - but even then, a device behaving like that wouldn't be honest about it's status anyway.
It's a real shame, that USB-Hub manufacturers do not in general implement the Per-Port-Power-Control part of the spec. That would be so useful to controlling 5V/12V powered devices. With QC3.0 to barrel-jack-12V adapters a USB-HUB with PPPC(and QC3) would be a godsend.
I switched over to using a camcorder with a power switch and electric lens cover. It sits on small tripod behind my monitors, has far better color correction/white balance controls than most webcams out there that I’m aware of. But it makes it quite evident when it’s in use vs not, as the physical lens cover is electronically tied to its power status (automatically shuts when off) and the device is not present to the OS at all when device is powered off. So far zero problems with using it and OBS when flipping its power state back and forth multiple times in a day. Teams/Windows handles the presence/absence gracefully and quickly. It’s also nice to have an IR remote for it, though I rarely use it. I think the only thing to watch out for in this set up - that is potentially inherently worse than a webcam - is latency of video signal. You get what you pay for in cameras, so a cheap camcorder outputting over hdmi may introduce unbearable latency in video signal.
I use a DSLR with a lens cap on it when not in calls. I also enjoy the light sensitivity; ISO 6400 looks fine in Zoom meetings, and it means I can sit here in total darkness which I enjoy.
Seems so much effort was spent on the lighting of a sign. Put it on a smart switch with a spare USB power adapter - I'm sure the author has a dozen - and control it via rest, MQTT, HomeAssistant, anything.
Pros: Not physically tied to PC.
Cons: Another wifi device, unless you've already got a z-wave/zigbee stack setup you can piggyback on.
Take a look at the code for Objective-See’s “OverSight” utility; it is a good example of how to detect AV events system-wide. It’s also a really great app…
Their FAQ gives a sketch of how they detect AV events on Mac OS:
Q: Why does it take OverSight, a few seconds to display the webcam/mic usage notification?
A: There is not easy way to determine what process is using the webcam or mic, when either is activated. Worse, there is no direct indication that a new process is accessing an existing a webcam session. Thus OverSight has to perform various tests and has to poll the system (only when the camera/mic is active) in order to determine what process(es) is/are accessing the device. This takes a few seconds...mahalo for your patience!
It's able to detect camera and microphone activation/deactivation and logs it to stdout.
Currently figuring out how to detect when a new peripheral is connected.
Thank you! I couldn't originally figure this out for my "on air" script, so my workaround was to query the existance of the `zoom.us` process every second.
I had the same thought and then read the article. Turns out this is about telling other people in a shared space - such as a work from home situation - that you are in a meeting.
Which would not work for me as I generally keep the camera off to save bandwidth and the last remaining shreds of my sanity.
2. Two Pi Zeros with LED hats light up during Zoom meetings. This uses the Zoom APIs to receive webhook events that are published to MQTT. The PIs listen to MQTT and adjust the light colors.
3. I have a color changing Pac-Man Ghost light behind me that turns off during video meetings. In this case, my home automation system listens to MQTT events and turns the plug off and on.
Extra. I used the Node/Office365 calendar querying to light up PI LEDs for wife’s meetings and kid’s meetings. I didn’t feel like trying to deal with another company’s Teams API or school’s Zoom settings. The kids meetings were also announced over Sonos in the area of home they were working. It worked well enough we didn’t have to look after them every time class started.