[HN Gopher] Automatically Light Up a Sign When Your Webcam Is in...
___________________________________________________________________
Automatically Light Up a Sign When Your Webcam Is in Use
Author : marbu
Score : 107 points
Date : 2021-08-27 11:26 UTC (11 hours ago)
(HTM) web link (fedoramagazine.org)
(TXT) w3m dump (fedoramagazine.org)
| rcarmo wrote:
| I would suggest Zigbee LED strips. Cheap, can be made as
| unobtrusive as needed, etc.
| nyir wrote:
| 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?
| KMnO4 wrote:
| 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.
| InitialLastName wrote:
| 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.
| nemetroid wrote:
| To me, asking the operating system's video abstraction layer
| seems cleaner than asking the device's binary blob.
| nixpulvis wrote:
| But will less confidence.
| digitalsushi wrote:
| 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.
| nixpulvis wrote:
| _All_ external observables of my software running devices
| really should have a way to be observed programmatically.
| vernie wrote:
| Is there a macOS equivalent of this query?
| aksss wrote:
| 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.
| jrockway wrote:
| 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.
| jhenkens wrote:
| 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.
| asdff wrote:
| Faster low tech solution: put a sticky note that says "in zoom
| meeting" on the back of your laptop screen or something.
| jaywalk wrote:
| Where's the fun in that?
| robbles wrote:
| Is there a similar way of detecting the web cam in use on macOS?
| wvaughan wrote:
| I was able to make something similar using Home Assistant to
| get the webcam status on the mac -
| https://willvaughan.design/making-an-on-air-light-for-my-hom...
| isatty wrote:
| Here you go: https://stty.io/2020/07/31/lamp-control-based-on-
| video-confe...
|
| I've been using this for ~1 and it's been more reliable than I
| expected - no maintenance required even with the update to Big
| Sur.
|
| To save you a click:
|
| log show --predicate 'subsystem == "com.apple.VDCAssistant" &&
| \ eventMessage CONTAINS[c] "kCameraStream"' --last 1m --no-
| debug --no-pager \ --style compact | tail -n +2)
|
| #or log stream ... # streaming is better to generate events
| stevenbedrick wrote:
| 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...
|
| https://objective-see.com/products/oversight.html
| hammock wrote:
| My MacBook has a built-in green LED right next to the camera
| that turns on when the camera is on.
| giglamesh wrote:
| 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.
| e40 wrote:
| There has to be, as Micro Snitch tells me when it is.
|
| EDIT: on my iMac M1 the built-in camera and mic are not
| detectable by MS. So, maybe not...
|
| EDIT2: https://obdev.at/products/microsnitch/releasenotes.html
|
| It's a bug in Big Sur, so hopefully it will be fixed and MS
| will work again.
| monkeydust wrote:
| This is great, but all the fancy tech signage in the world won't
| stop by 2 year old trying to barge in at the worst time possible.
| mleo wrote:
| 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.
| stragies wrote:
| 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.
___________________________________________________________________
(page generated 2021-08-27 23:01 UTC)