malkstar / ms_teams_websockets

Expose your Teams client's local websockets API data as Home Assistant sensors.
MIT License
17 stars 3 forks source link
home-assistant teams websockets

hacs_badge

Teams Websockets integration

This integration exposes your Teams client's local websockets API data as Home Assistant sensors.

All sensors offered by the API are available.

Buttons are also offered to provide access to actions which are available using the API.

Installation

Either:

A) Add the custom repository in HACS, install it, then use the usual add integration functionality.

B) Copy the custom_components/ms_teams_websockets into your HA custom_components folder.

Setup

Follow this guide to enable the API on the client machine. Use this token when setting up the integration.

How?

Teams v1.6+ has a websocket API that can be used for third parties to connect to Teams and get information about and manage calls. It’s first used in the Stream Deck Plugin.

Credits

I used the information from this page. Unfortunately I am unsure of the author to give proper credit.

Why?

There are many ways to achieve this already, but they require running scripts or services locally and then pushing over MQTT. Other solutions using the Graph API which requires administration approval.

Because this integration runs centrally, it is OS and privilege agnostic.

Powershell script which watches log files to push over MQTT

Windows service which consumes websocket API and pushes over MQTT

Cloud API based direct HA intergation