Not sure if this is of interest to anyone else, but while I’ve been working from home I’ve set up an RGB light outside my office door to notify my Wife and Children that I’m on a video call and don’t want to be disturbed.
Initially this was set purely manually by me flicking an OpenHAB switch which triggered a rule to send the correct commands to my light.
It’s a simple powershell script (I use Windows at work), which polls a list of applications every 30 seconds to detect whether a video call is in progress, and then updates a bunch of OpenHAB switches, grouped with an “Any One” aggregation to toggle the light state automatically.
What does it detect to determine a call is taking place? Zoom, lync, teams?
So I looked through the example json, and see teams in there, it looks for a process name…so I seem that I have 9 teams.exe processes, how do you determine which one is when a call is active?
I have something that I manually trigger (customisable keyboard buttons help here).
It counts how many UDP endpoints are open for a given application. If they are above a certain threshold (usually 0), then a video call is in progress.
Currently it will detect Zoom, Slack, Teams and GoToMeeting calls.
No, you’re not being thick, there is an error in the documentation.
You actually need to run
(Get-NetUDPEndpoint -OwningProcess (Get-Process Teams -EA 0).Id -EA 0|Measure-Object).count
In my tests, while Teams is running, but not in a call, it maintains 2 open UDP connections, but as soon as you start a call this jumps to ~10 connections.