Skip to content

Use a Raspberry Pi, Python, and the webexteamssdk and API to build an IoT "status light" reflecting your real-time presence status in Webex Teams.

License

Notifications You must be signed in to change notification settings

matthewf01/Webex-Teams-Status-Box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webex-Teams-Status-Box

Uses a Raspberry Pi, Python, and the webexteamssdk and API to create an IoT "status light" reflecting your real-time presence status in Cisco Webex Teams.

In early 2020, nearly the entire world had to shift to working 100% from home due to coronavirus risks. I have a young child, My home has a very "open" design, and my office HAS NO DOOR. My family tip-toed over to my office asking "are you in a meeting?" throughout the day, not knowing if they were interrupting my workday.

As I've deployed Webex Teams for my company as our standard collaboration platform, and have already been making extensive use of the Teams API (via Powershell infact), I found a way to leverage my "status" to let my family know whether I'm interruptable or not using a real-world visual indicator that could be placed somewhere in plain view.

Finished project: Finished project

Test unit on a breadboard: Unit being tested on breadboard

This project uses the Webex Teams SDK Python library:

Hardware Setup Instructions

Parts you will need:

  • A Raspberry Pi with network connectivity
    • (I've tested and run this on a Pi 3B and a Pi Zero W; both have built-in wifi)
  • an SD card formatted with at least Raspbian Jessie
    • I recommend just using PiBakery to pre-configure your SD card image:
    • Set your wifi network configuration, set your password, set your hostname, enable VNC on first boot
  • 1x RGB LED
    • I'm using this big one from Adafruit because it's big, bright, and fun. Common anode, which I understand makes a difference in how its wired. Just wire as shown.
  • Resistors, 100 ohm and 150 ohm
  • A solderless breadboard, or a soldering iron, and some wire or jumpers

Wiring Guide

Reference this article on how to wire up your breadboard or solder together your components. The following GPIO pins are used:

  • GPIO 20: Green LED leg (leg #3 if using common anode LED)
  • GPIO 21: Red LED leg (leg #1 if using common anode LED)
  • GPIO 22: Blue LED leg (leg #4 if using common anode LED)
  • 5V for power (long leg of LED, leg #2 if using common anode LED)

A resistor should be run between each LED leg (except 5V) and the GPIO to protect the LED. Red gets a different value resistor, so check that guide.

Software Setup Instructions

Actually really easy for you! I've scripted out most of the setup process to bootstrap itself into place.

You will need 2 pieces of information to complete software setup:

  1. Your bot's access token from Webex:
  1. Your user's personId from Webex:

Run these command from your Raspberry Pi's terminal:

  • wget https://raw.githubusercontent.com/matthewf01/Webex-Teams-Status-Box/master/setup.sh
  • sh setup.sh

The setup.sh shell script I created is awesome and performs the following for you:

  • Prompts you for the access token and your personId
  • Stores these credentials in a local file called mycredentials.txt just in case you need them later.
  • Downloads the Python script (webexteams.py) and a service installation file
  • Injects your credentials into the service's unit file
  • Installs the script as a service which starts at boot
  • Installs the webexteamssdk module via pip
  • Reboots on completion

Testing

To test, from Terminal run: python /Home/pi/Documents/webexteams.py After a moment, you should see the status codes being returned from the Webex Teams API. CTRL+C to break and stop the test run.

Verify your LED is lighting up properly at this time. Double-check that the GPIO pins you've connected match the webexteams.py script.

Running the thing!

The Python script has been set via systemd service to run at startup.

Restart the Raspberry Pi and confirm the script has started automatically.

Enjoy your new Webex Teams Status light, and teach your family what the color-codes mean! Red = do not disturb me, and green = I'm working but you can come into the room. Blue means inactive (so I'm not working).

published

About

Use a Raspberry Pi, Python, and the webexteamssdk and API to build an IoT "status light" reflecting your real-time presence status in Webex Teams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published