Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would be cool to detect Zoom call status #6

Closed
geekpete opened this issue Apr 13, 2023 · 8 comments
Closed

Would be cool to detect Zoom call status #6

geekpete opened this issue Apr 13, 2023 · 8 comments

Comments

@geekpete
Copy link

Is your feature request related to a problem? Please describe.
Detect if the agent host is on a zoom call

Describe the solution you'd like

Using something like xdotool you can detect if a zoom meeting is current or not,etc.

xdotool search --class zoom
xdotool search --class zoom getwindowname 92274836

or some simple example:

#!/bin/bash

while true; do
  # search --sync waits for the window to show up.
  #if xdotool search --sync --name "Zoom Meeting ID:" > /dev/null; then
  if xdotool search --sync --name "Zoom Meeting" > /dev/null; then
    echo "In zoom :)"
  else
    echo "No zoom"
  fi
  sleep 1
done

Things you might use this status for:

  • turn on the "On Air" light outside your home office door to let people know you're on a call
  • dim/set lights a certain way for calls
  • mute noisy things in your environment to avoid distractions in Zoom calls
@joshuar
Copy link
Owner

joshuar commented Apr 13, 2023

Hey @geekpete thanks for trying out go-hass-agent. Yeah, I've been mulling how I can get a better application name which might help ease making automations in Home Assistant when certain apps have focus or are running.

In my primary use-case, with playing games on Steam, I just have to match on steam_app_* in the Active App sensor. I made a template binary sensor "Playing Games" which is true when the Active App matches the former. But I could imagine it would be nicer and more useful to have a human-friendly application name.

Does the "Active App" sensor work for you at the moment and what does it report when you have a Zoom window focused (likely need to look at the sensor state history in Home Assistant)?

@fhp
Copy link

fhp commented Sep 23, 2023

Another way to solve this would be to allow custom scripts to be added to this tool.
These scripts then report their output as a certain sensor, using some refresh interval.

This is how https://github.com/LAB02-Research/HASS.Agent works, and this seems very powerful. Especially with the Linux command-line ecosystem.

@joshuar
Copy link
Owner

joshuar commented Sep 28, 2023

Hey @fhp I like that idea! I'll mull over how to implement it. Look out for this feature in an upcoming release ;)

@joshuar
Copy link
Owner

joshuar commented Nov 28, 2023

Hey @fhp, script sensors can now be created with release 5.2.0. See the docs for how to configure them.

This may also meet your feature request @geekpete?

I am still thinking about how I can get the application name/title as a native sensor and there does seem to be some development in the major desktops towards exposing this in an easier way.

@fhp
Copy link

fhp commented Nov 28, 2023

Awesome, thanks for your work. I surely will take a look!

@joshuar
Copy link
Owner

joshuar commented Dec 14, 2023

I'm going to close this issue out on the assumption that the script sensor feature can fulfil the original request. If it is missing functionality, or there is a bug in using the script sensor functionality, please open an issue to report. Thanks for trying out go-hass-agent!

@joshuar joshuar closed this as completed Dec 14, 2023
@fhp
Copy link

fhp commented May 9, 2024

Finally got around to setting this up on my laptop, and the scripts work great!

Added the webcam script from #71 and a variant of that script to detect if my laptop is docked (by checking if lsusb | grep Dock returns anything).

So now I know if I'm in a call, and if my laptop is in my office, and using the screen_locked property, if I am near my laptop 😀 That's a good start for a lot of automations.

@joshuar
Copy link
Owner

joshuar commented May 10, 2024

Awesome! I'm so glad the agent is useful for you @fhp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants