Microsoft Teams Status

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

I created an IoTLink Addon for MS Teams. It uses @Egglestron’s approach (Tail + RegEx). If anyone is interested you can find it here: GitHub - ledhed-jgh/IoTLink-Addons: Addons for IoTLink

I prefer IoTLink because my automation stuff lives in an isolated VLAN and can’t communicate directly with my PC. I was already using it to shutdown my PC, so it made sense to create the Addon and use what was already there rather than create Scheduled Tasks or PowerShell services.

1 Like

Thanks for doing this. Does this addon constantly poll or check the log file and therefore consume cpu cycles that would impact overall pc performance?
thanks

Its fairly efficient from the small amount of testing I’ve done. The code I used to watch the log file comes from a code snippet called Tail .NET. Essentially it checks the size of the log file every 1 second and if the filesize has changed it only reads the changed data (rather than loading the entire log file which can be quite large). I expect it to consume similar resource as the PowerShell based solutions (which also tail the log file).

Gotcha, thanks