Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.
/ THFHA-V1.0a Public archive

THFHA is a lightweight C# app for monitoring Microsoft Teams for Status and activity updates, which can then be communicated through several APIs such as MQTT, WLED, Philips Hue, Home Assistant and our companion App, Hatcher

License

Notifications You must be signed in to change notification settings

jimmyeao/THFHA-V1.0a

Repository files navigation

Teams Helper - BETA1!

This project started out as way to get Microsoft Teams status and activity updates into home assistant, it has since grown to provide standalone connection to Philips Hue lights, WLED lights, out own hatcher project and MQTT.

Originally, all updates were parsed from the logs that Teams creates, today we only get status updates from the logs, all other activity comes from the new Teams local API (Thanks Microsoft!)

I am hoping Microsoft add status updates to the local api as well, as constantly reading a log file is not very efficient.

The whole thing is written in C# and is pretty lightweight.

Features:

  • Light state (Hue, WLED and Hatcher) are restored to their original state on exit, stop or if the module is disabled
  • Minimises to system tray to keep your task bar clutter free
  • Can run independently of Home Assistant
  • Publish updates to MQTT
  • Change the color of WLED / Hue devices dependant on Status/Activity

First Run:

On first run, nothing is configured, but it will start monitoring the Teams logs in the background, so your Status icon may be different, depending on your current Teams status

First step is to go to Teams, open settings, privacy, scroll to Third Party API and click manage API:

image

Enable the API and copy the key.

In THFHA go to File – Settings and paste in your key (It is automatically saved): image

Also note the two options at the bottom:

Run at Startup does NOT make the app launch when you start windows, rather it starts controlling lights/mqtt etc when the app is run.

Run minimised does exactly what it says, an it will appear in your system tray.

Home Assistant

To configure Home Assistant, you can either double click the Home Assistant entry in the available modules list, or you can access its settings page from File > Settings:

Enter the URL to your home assistant instance (Including the port it it is not 443)

e.g

http://homeassistant.local:8123

or if you are using ssl:

https://homeassistant.local

you will need a long lived access token from Home assistant (See here)

Paste it into the box as shown:

image

Click Test, if all is OK you will see "Homeassistant is connected" in the status bar. If you get an error, please check the url, port, scheme (http or https) and token.

You should now be able to enable this either by right clicking:

image

Or in the settings:

image

Once enabled, (And the app is started)

You should see new sensors created in Home assistant with the prefix THFHA:

image

These should be pretty self explanatory

Activity = generally "Not in a Meeting" or "In a Meeting"

Blurred – indicate whether or not your back ground is blurred

Camera – On/Off state of Camera

Hand – whether or not you have your hand raised in a meeting

Microphone – mute state

Recording – whether or not the call is being recorded

Status – Available/Busy/DND/Be Right Back/Away/Offline etc.

Philips Hue

image

Enter the ip of your hue bridge and click Link

image

you will be prompted to push the link button on your hub – please do so before proceeding to click ok!

image

Once linked, your available hue lights will appear in the list. Choose the one you wish to control (Currently, only one light may be selected)

image

Once again, right click in the module list to enable Hue control.

MQTT

Double click MQTT to open its settings:

image

Note, you don't need to specify the port for mqtt unless you are using something other than the default (untested)

If you have a username and password, enter these

MQTT Topic is the prefix that the topic will start with.

Click Test:

image

If you receive an error, please double check your settings.

This will now be publishing to MQTT under the main topic of HomeAssistant, and should create the sensors for you based on your MQTT Topic: (Mine here was ryzen, ignore the ryzen_lastboot, that is from a different integration!) image

You can now enable MQTT by right clicking it in the module list.

WLED

WLED relies on mDns for discovery, it is usually enabled by default on most home routers, but some prosumer equipment (Unifi etc) may need mDns enabling.

image

Click discover to have the program discover your devices, please wait until the status bar shows "Stopped Discovering Lights"

Select your WLED light from the list: image

Once again, right click to enable in the modules list

Hatcher

image

We built a device based on a Raspberry Pi zero and a circular LED display – see

https://github.com/jimmyeao/Hatch_Companion

it is possible to control this from THFHA. Simply enter the IP of your Pi and click test:

image

If all is well, you will now be able to control this device from THFHA

About

THFHA is a lightweight C# app for monitoring Microsoft Teams for Status and activity updates, which can then be communicated through several APIs such as MQTT, WLED, Philips Hue, Home Assistant and our companion App, Hatcher

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages