Microsoft Teams Status

This is much better than running as a service or the Azure solutions for me. With the service if my computer sleeps the service seems to hang and requires a restart. For the Azure service (though VERY good too) I only want to monitor my laptop and not all my devices. The “In a Call” status I tend to do a lot of automations with and if I am doing the Teams call on my phone I don’t want those automations to occur as I am most likely not home. :slight_smile:

Yep, same for me. Just keep in mind if your computer is awake but locked, the scheduled task is still running - so getting on teams on your phone will change status and your PC will relay that to Home Assistant. You may be able to somehow set the task to be killed on PC logoff or lock, or just sleep your PC in those cases.

Yes but it doesn’t register “In a Call.” This is where my automations are derived from.

1 Like

I just pushed RTC-Call-Monitor to Github and may be an alternate solution.

I end up using multiple conference services during my work day, and rather than have an integration for each service, I wrote an application that monitors the UDP packet rate along with network block matching to detect a call for most of the popular web conference providers.

2 Likes

This looks great, I’ll try it later :slight_smile:

ReadMe mentions modifying appsettings.config do you mean appsettings.json?

Can this just be run from windows scheduler to get it to start at boot?

Regards
Simon

Follow his instructions here: Microsoft Teams Status - Feature Requests - Home Assistant Community (home-assistant.io)

There was a mistake in the readme. The correct file is appsettings.json. I’ll be adding support to install the app as a windows service in the next day or so.

That sounds good, I’ll propbly hold off until then to try it then.

Thanks
Simon

I am very interested in this also. You may want to spin off another conversation thread. Also interested in your code that updates HA.

1 Like

New thread here: RTC Call Monitor - Add active voice/video call status to Home Assistant

I’ve been using this for about a month and it works well, but I am getting an issue where my status is not going back to ‘Not in a call’ when I close out a call. I have to kill Teams and reopen it to get things synced again. Has anyone run into this?

“access denied”

RTC Call Monitor - Add active voice/video call status to HA - Share your Projects! - Home Assistant Community (home-assistant.io)

working now, thanks.

So I tried this with dcnoren suggestions on my own computer and it is working. Next i tried it on my work computer and no luck. The biggest problem seems to be Constrained Language mode, after I was able to bypass execution policy. I found that using powershell v2 will get around the constrained language mode, as it didn’t exist in v2. But other functions such as get-content -tail wont work as tail was implemented in v3. I didn’t go through all of the command not found exceptions but there seem to be a few.

Anyone get this working in a super restricted environment? No admin rights, can’t run exe, and constrained language mode…

I have a (mostly) working script that runs under AutoHotKey that can pull the status from the log file and send it to a HA webhook. This works without any elevated permissions and can be run by AHK portable (nothing to install).

ajobbins/AHK-Teams-Presence (github.com)

Key limitation is that I haven’t got it getting the status on initial script load (as it’s just tailing the log). Can work around by toggling the status initially, but welcome someone with better coding skills than I working out how to get the last status on initial load.

I am moving jobs and won’t be using Teams much longer but hopefully this is useful for those like me who can’t get access to the Graph API and who don’t have local admin permissions.

4 Likes

does any of the solutions here work on a mac?

1 Like

I’m now using a Mac and have moved to using the HA Companion app which can create sensors to show when your mic and camera in use. The only issue is that there is a big with M1 Macs where the camera is currently always showing as on, but the mic sensor works fine

1 Like

yes i immediately found out about the mac app. i have been using HA for 3 years and did not even know the mac app was launched for a whole year now. this is amazing! the possibilities are endless: i can raise my desk, set the mood lighting etc when i unlock my macbook

1 Like

This is awesome. I just hooked my LED “On a Call” sign (LED Matrix "On a Call" Message Sign) to my Teams activity sensor!

1 Like