#Coding4Fun – RaspberryPi LED Christmas Tree 🎄 sync with Microsoft Teams (2/N) Azure AD, 🦒 and Apps

Buy Me A Coffee

Hi !

Back in the Microsoft Lync days, we had access to an SDK that allowed us to interact with the Messaging client in a local mode. As of today, there is not similar SDK to interact with Microsoft Teams. So, if I want to know the status of an user in Microsoft Teams, we need to call the Microsoft Graph. And this is not as simple as 2 lines in Microsoft Lync SDK.

Note: I’m fully supporting the Microsoft Graph 👇👇👇

Bruno and Nilesh Graph

Using the Graph is super easy. I mean, once you understand the entities and elements, is easy to make queries to get Graph information. The tricky part is to get permissions to call the Graph.

Isacc describes the process very well in the [Configuring an Azure Active Directory Application] section of his blog (see references). There are 2 main steps here

  • Create and add an application to an Azure AD
  • Grant permissions to the new App

Avanade is not as big as Microsoft, however just try to get permissions to create an App into our Azure AD to lab and test, is a colossal task. Tons of internal approvals, security checks, etc. Is not as easy as use a local SDK. That’s a boomer.

We have a Virtual Innovation Center to present and lab ideas, and I have full control there. So, I’m using this environment for labs, while I’m figuring out the best way to trigger this in Avanade.

Again, I need to learn more about this. The latest version of Presence Light does not longer requires Admin Consent, so this is no longer an issue for folks that want to get Presence. It didn’t work for me so, I created the app, and is up and running !

Again, please read Isaac post. He really explains the full process for this.

Raspberry Pi Christmas

Happy coding!


El Bruno


#Coding4Fun – #RaspberryPi LED Christmas Tree 🎄 sync with #MicrosoftTeams (1/N) Why? Why not !

Buy Me A Coffee

Hi !

So I was preparing boxes with gadgets I have for our next house move, and I realized that I had a super cool Led based Christmas Tree, that can be used with a Raspberry Pi. The device can be programmed with Python, so I decided to go in my notes and I found something different to test the tree:

Sync the Tree Lights with my Microsoft Teams Status

Something like this !

After Build 2020, I have some notes from Scott Hanselman and Isaac Levin, which explains a way to start with this, please see references.

Note: Isaac Presence Light app does 90% of the work, kudos to him here!

So, I decided to start easy and create a simple Python Flask WebApp with the following end points

  • setcolor (color as parameter)
  • off
  • on
  • away
  • online
  • busy

Microsoft Teams supports much more states, but this ones are good enough for me to test the app.

The app is super simple, here goes the code

# Bruno Capuano
# simple webserver with flask
# change raspberry pi tree colours

from flask import Flask, request                                                
from tree import RGBXmasTree
from time import sleep
from colorzero import Color

def set_tree_color(new_color):
    global tree
    print(f'set color: {new_color}')
    tree.color = Color(new_color)
    return new_color

app = Flask(__name__)
tree = RGBXmasTree()

def set_color():
    # http://rpi8gb:8090/setcolor?color=red
    color = request.args.get("color")
    return set_tree_color(color)    

# Microsoft Team Status

def set_off():
    global tree
    return 'OK'

def set_on():
    global tree
    return 'OK'    

def teams_away():
    return set_tree_color('yellow')

def teams_online():
    return set_tree_color('green')

def teams_busy():
    return set_tree_color('red')

if __name__ == '__main__':
    # Run the server
    app.run(host='', port=8090)

And, time for settings and config in the Presence Light App (next post more details about this). My device name is RPI8GB, so you can understand the Custom API Uris.

Presence Light config for Raspberry Pi Christmas Tree

And it was running !

More details and a better experience in future posts.

Happy coding!


El Bruno


#RaspberryPi – New OS allows #MicrosoftTeams in the device ! And a simple but amazing config for the onboard LED

Buy Me A Coffee

Hi !

We have a new Raspberry Pi OS release – December 2020 (see references) and it adds tons of new features. The latest version upgrades Chromium, to a version that allow us to to: join teams calls !

2020-12-07 Teams on Raspberry Pi

I’m starting to think on have a custom Teams Kiosk just to join meetings, without using my computer. I’ll write more about this later.

Back to the new features, one of them is super interesting: Power LED

Quoting the original post

On the System tab, if you are running on Raspberry Pi with a single status LED (i.e. a Raspberry Pi Zero or the new Raspberry Pi 400), there is now an option to select whether the LED just shows that the power is on, or if it flickers off to show drive activity.
LED control in Raspberry Pi Configuration

This is great ! Somehow, have the led blinking means that the device is working, and in some scenarios, for is great to look at my +10 devices and visually knows if they are all working fine.

Disclaimer: I know I need to get an extra RPi and create a dashboard with the status of the +10 devices. That’s the cool tech solution. However, stacked devices and led are simple and amazing.

Important: as of today, some of the new changes are not available in the x64 OS versions. They are adding new features to the x64 OS image, so it will include these changes later.

Happy coding!


El Bruno


#Teams – How to add your custom background (not official and at your own risk!)

Buy Me A Coffee

Hi !

If you are a Microsoft Teams user, you are probably happy. We are getting the amazing feature which allows us to change our background. The feature uses AI to detect our body and head, and change everything else by a custom background. So cool !

However, in the current release of the feature, you can only choose between a set of +15 backgrounds. I mean, some of them are very cool, but I want my own. I want to have something like this.

this is fine teams background

Again, this is not official, but still is fun to try. Let’s go with the steps.

  • 1st open a explorer and access to the path
 %AppData%\Microsoft\Teams\Backgrounds\Uploads folder

In my Windows 10 computer this is

  • In that location, paste your desired custom background. I haven’t tested formats and images, but a small (less than 1MB) JPG image seems to work fine.
  • Now it’s time to work in Microsoft Teams
  • Once you are in a meeting, access to the options, and then select [Show background effects]
teams meetings options
  • At this time, you will see your custom image / background and you can start to use it!

So, I’m guessing that the [upload your custom background] will be available soon. In the meantime, you got the hack!

Happy coding!


El Bruno

#MSTeams – #SnapChat lenses on Microsoft Teams ! (Why not? and #ToiletPaper as a bonus)

Buy Me A Coffee

Hi !

Let’s go with a fun off-topic for a Friday, and let’s use some SnapChat lenses in our camera feed in Microsoft Teams.

Disclaimer: This is not a very useful post, but in this Covid-19 days, you can get some fun with this in all the virtual meetings.

So, simple steps

  • Close Teams App
  • Download the SnapCamera lenses apps for Windows or Mac from https://snapcamera.snapchat.com/download/
  • Perform the installation wizard, 30 seconds later is done!
  • Open the App and select your favorite lens. An toiler paper hat !
  • Open Microsoft Teams and go to Settings
  • In the Devices section, you will see a new camera available: Snap Camera. Select this one.
  • And that’s it ! Now your camera in Teams will have a lot of amazing features.
  • Something like this !

You can change filter on the fly, in SnapCamera app, and it will be reflected on the camera feed. Also, you may need to close all apps before install SnapCamera, in order to allow the apps to detect the new camera. Normal Windows stuff.

Happy coding!


El Bruno


#RaspberryPi – Microsoft Teams in RPi 4? Mmm, not yet, but it’s an interesting learning journey to start the New Year 2020

Buy Me A Coffee


A couple of weeks ago, Microsoft released a preview version of Microsoft Teams for Linux (see references). Since that day, I was hoping to have a chance to play around with this version, mostly in a Raspberry Pi.

Those days I also had this conversation with my best half (who is a very smart person):

  • Why do you need to do this? You already have a very powerful MacBook, an amazing Dell laptop and a gaming PC. So, why do you need to install Microsoft Teams in a not so powerful device at home?
  • Because …

There is no logic answer for this, however I learned a lot in the process. Let me share, because it all start with the official download page for Microsoft Teams.

Microsoft Teams Versions

raspberry pi 4 download microsoft teams

Besides the official download page for Microsoft Teams, there is an interesting page which describes all the possible client scenarios for Desktop, Web, and Mobile. And for Desktop it includes, Windows, Linux and Mac: Get clients for Microsoft Teams (see references).

In the Linux section, we have the option to review the packages DEB and RPM repositories

This is also interesting, because browsing the repositories, you may find the Release and the Insiders versions.

Microsoft package repository with release and insider version of MS Teams

Raspberry Pi 4 64-bits kernel

The Raspberry Pi 4 has a 64 bits kernel, however the current Raspbian distro are not using the 64-bit kernel capabilities of the device. There is an entry on the RaspberryPi forums which explains how to enable the 64-bit kernel: Pi4 64-bit Raspbian kernel for testing – Focus on Pi4 (see references)

Add to config.txt


and Run

sudo rpi-update

And done, in a NON OFFICIAL or NON SUPPORTED way, my device is running on X64.

This process took some time, at least 10 minutes.

Note: I’m 99% sure that this is not supported. So, all of this is mostly a testing and learning experience.

Add AMD64 architecture to Raspberry Pi.

Back to Microsoft Teams. After checking the available versions, I realized that AMD64 is the only supported architecture in Linux. The Raspberry Pi uses an ARM CPU, which uses the ARM instruction set. That is a different instruction set than that used by i386 and x86-64/amd64. So, there is no way to install an AMD64 package on a Raspberry Pi 4

However, I found an interesting command: dpkg –add-architecture

And I started to read about the command (some links in references).

dpkg –add-architecture is meant for CPUs that support multiple instruction sets. I think it was mainly introduced for x86-64 (i.e. 64bit) CPUs, which also support i386 (i.e. 32bit) instructions. This allows you to install packages compiled for i386 on a system that otherwise uses x86-64 packages.

So, even if it won’t work, I tried to add AMD64 in my RPi 4 with the following command:

#sudo dpkg --add-architecture {architecture name} && sudo apt-get update
sudo dpkg --add-architecture amd64 && sudo apt-get update
raspberry pi 4 lscpu

So, after this, I have the AMD64 architecture instructions installed. They are not going to work, but I can install an AMD64 package now.

Installing Teams

If you are running your Raspberry Pi with a desktop interface, just double clicking on the file: teams_1.2.00.32451_amd64.deb. This will start the installation. And, of course, it will fail!

raspberry pi 4 install microsoft teams.png

So, it was time to read and learn, and I found an alternative and amazing tool to install DEB files: GDebi (see references)

Gdebi is a tiny little app that helps you install deb files more effectively by handling dependencies. Learn how to use Gdebi and make it the default application for installing deb packages.

It’s very easy to install, just 2 commands

sudo apt-get install gdebi-core
sudo apt-get install gdebi

Note: It should work with the 2nd command, however, I needed to add the core option 1st.

raspberry pi 4 open gdebi.png

Now I got GDebi, and I can open the package with the tool, and I got a dependency problem with the libasound2 library.

raspberry pi 4 gdebi error on dependencies libasound2

Even so, I can start the installation with the command

sudo gdebi teams_1.2.00.32451_amd64.deb

and, the app won’t work, but I’ll see the shortcut access in the [Sound & Video] folder

Again, the app won’t launch, but in the personal side, I spend some good time here learning a lot about Linux, processor architectures and more. So, I’m 100% cool now!

Happy coding and Happy New Year!

Greetings @ Burlington

El Bruno


My Posts

My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device

#Labs – Microsoft Teams available on #linux, and this is the right way to install it

Buy Me A Coffee

Update: This post was written on 2019 Dec, so there was a lot of changes since them. Apologies if the links or screenshots are not like the ones you may find today


I’ve using Microsoft Teams in Windows 10 and MacOS and the experience is amazing. When I was trying to work only in my Raspberry Pi 4, having a native app was something I missed a lot. I mean, Microsoft Team web version is fine, however the desktop experience is much better.

And now, Microsoft announced that there is a Linux version of Microsoft Team, so I’m trying to manage my schedule during the next couple of days to test this in Raspbian in my Raspberry Pi 4.

We can download the native Linux packages in .deb and .rpm formats from https://teams.microsoft.com/downloads#allDevicesSection. Very cool to see all the available options

And I’m looking forward to check authentication, integrated services and more!

Happy coding!

Greetings @ Toronto

El Bruno  


My posts on El Bruno

#Office – Live subtitles in Microsoft Teams, oh yeah! Another great #AI live sample.

Hi !

I usually use the live subtitle demo feature in PowerPoint to showcase how amazing is the current state of AI, and how we can use it in our daily lives. And now, after the official announcement of Microsoft, we can also use the live subtitle feature in Microsoft Teams.

As you can expect the way to use it is very easy, just enable the Live Subtitles feature and Microsoft Teams will automatically start to

  • Listen to every audio conversation
  • Convert the audio to text
  • Present the live as a subtitle in the MS Teams windows

In the official announcement there is a nice animation on this

We may expect to have also maybe some extra features like language translations and more. That will be also so cool!

Happy coding!

Greetings @ Toronto

El Bruno


My posts

#Microsoft – There were more than #Surface Laptop on Microsoft event 2 days ago: #MSTeams and #3D

Hi !

A couple of days ago, Microsoft hosted an event were they revealed a new device for the Surface family: Surface Laptop. It has everything you may expect from a Surface device: great presentation, amazing hardware features and a couple of “buts”. In example, the lack of color options in the top level hardware models and the lack of USB-C ports. Besides all of this, in less than 2 minutes you get everything you need to know about this.


In the 90 minutes of the event there were other interesting topics besides Windows 10 S and the Surface Laptop. I think this additional topics shows the new Microsoft path  and that’s why it’s important to give them a couple of words.

In example, Megan Saunders had a small participation on the event. In case you don’t know her, here is her title: Megan Saunders is the Windows 3D Initiative General Manager for Microsoft.

Her presentation was mainly focused on some of the new Windows 10 features: 3D, Mixed Reality and Education. As you can imagine, all the demos were based on the new Windows 10 products, and it was mainly important to remark that everything starts with Microsoft Teams! (I’ll get here later).

In a couple of minutes we can see this demo:

  • Start creating a 3D model using Paint 3D
  • Then let’s add some animation to the model using Microsoft PowerPoint
  • Share the works using Microsoft Teams

The final result is amazing and it was also a nice introduction for a new cool Windows 10 feature: View Mixed Reality. May be the best way to explain this is something like Augmented Reality ++. I’m looking forward to see the samples included on Windows 10 SDK related to this to see how far we ca go with this platform.

At the end of the presentation the staff used on of the new Mixed Reality devices (not Hololens) as part of a cool demo where we saw a cool implementation of the Solar System where the user makes a 3D navigation using an XBoxOne controller. Of course, at the end, a Hololens demo close this section.

The next 12 minutes are this part of the event:

And it was very interesting to see how Microsoft Teams was mentioned a couple of times during the event. They even presented a specific version of Microsoft Teams focused on education.

Now the teachers can set up a dashboard for their students. This dashboards will with include access to activities, tests, and lesson materials. Students will be able to use this artifacts and use MS Teams, post comments, participate on discussions, and more.

The next 10 minutes are the main focus of this new MS Teams for Education features:

I may forgot to mention the new Minecraft Education and other news. However I think only Mixed Reality and MS Teams for Education are a very good example of the way that Microsoft is shaping this new set of tools. 😀

Greetings @ Toronto

El Bruno


#Microsoft – Lo que (tal vez) no viste en la presentación de #Surface Laptop, #MSTeams y #3D


Hola !

Hace un par de días Microsoft presentó un nuevo device para la familia Surface: Surface Laptop. Como todos los productos Surface, es posee un acabado genial, unas prestaciones muy buenas y también podemos encontrarle algunos “peros”. Por ejemplo, el no poder seleccionar colores en la “gama alta” o no tener puertos USB-C.

Al margen de estos detalles, el producto parece seguir la línea Surface y solo se necesitan un par de minutos para comprenderlo.


Pues bien, en los 90 minutos de presentación también se tocaron un par de temas interesantes que han sido eclipsados por Windows 10 S y Surface Laptop. Personalmente creo que muestran el camino por el que va Microsoft y es necesario darles un repaso.

Por ejemplo, Megan Saunders tuvo una participación pequeña pero importante. Si no la conoces, la mejor forma de presentar a Megan es con su título: Megan Saunders is the Windows 3D Initiative General Manager for Microsoft.

Durante su presentación se tocaron las bases de la nueva versión de Windows 10: 3D, Mixed Reality and Education. Por supuesto las demos fueron alrededor de los nuevos productos de Windows 10, sin embargo todo comienza con Microsoft Teams! (este es un detalle importante,  que comentaré luego).

En pocos minutos pudimos ver una demo muy interesante

  • Crear un modelo con Paint 3D
  • Animar el modelo con Microsoft PowerPoint
  • Compartir y colaborar con MS Teams

El resultado es realmente impresionante, y dió pie a la siguiente feature que veremos en Windows 10: View Mixed Reality. Podemos pensar en esta feature como Augmented Reality ++, y la verdad es que, estoy ansioso por ver que ejemplos tenemos en el SDK de Windows 10 para ver las capacidades del mismo.

Al final de la presentación, pudimos ver uno de los nuevos Mixed Reality devices (que no son Hololens) como parte de una demo donde podemos ver el sistema solar y controlarlo con un mando de XBox One. Obviamente al final la demo se cierra con un ejemplo con Hololens.

Los siguientes 12 minutos son los que se centran en estos temas:

Lo siguiente interesante a comentar es la mención de Microsoft Teams en varias partes de la presentación. Y, en este caso, dándole importancia especial para el entorno de la educación.

Ahora los profesores tienen algunas funcionalidades especiales en Microsoft Teams para crear Dashboards para los alumnos con actividades, materiales de estudio, exámenes, etc. Y los alumnos, pues pueden utilizar MS Teams de la manera tradicional. Aquí podemos ver los 10 minutos donde se habla de Microsoft Teams


En el camino me queda comentar lo nuevo de Minecraft Education y otro par de novedades. Creo que solo el hecho de ver como se enfoca en entornos educativos, el modelo de Mixed Reality y MS Teams es una buena muestra del camino que está tomando Microsoft.

Saludos @ Toronto

El Bruno