Sync your Webex Status with WLED for visual notifications in your home office

Picture of Chris Beye

Chris Beye

Systems Architect @ Cisco Systems

Table of Contents

Introduction

Imagine this: you’re in the middle of a very serious Webex meeting, nodding along to something incredibly important, when suddenly, the door flies open, and someone bursts in, completely oblivious. 

Now, you’re distracted, the people on the call are awkwardly staring at your screen.

Sound familiar ⁉️
What if, instead, your room had an unmistakable signal: “Do Not Disturb!” Enter the world of programmable LEDs, where you can make your availability as visible as a stoplight!

In this post, I’ll show you how I sync my Webex status with some LEDs using an ESP8266, WLED, and a couple of 5m strips of WS2811 LEDs surrounding my room. 

The end result? When I’m available, the room glows green. In a meeting? Orange. And if I’m on a call? It turns red. It’s like a personal assistant but with more flair (and less small talk). 😂

Why Show Your Webex Status with LEDs?

You’ve probably experienced it—you’re deep into a critical conversation, only to have someone unintentionally walk in. Using visual cues like LEDs to display your Webex availability is a simple yet powerful way to reduce interruptions and keep your meetings on track in your home office.

Here’s why it works:

  • Instantly visible: Bright, glowing LEDs are hard to miss. They’re a more subtle “Do Not Disturb” sign without having to print anything out
  • Real-time feedback: The colors change automatically with your Webex status, no manual flipping of signs
  • Fun factor: Honestly, who doesn’t love adding a little smart home automation to their home office? 
My Setup

For this project, I used the following gear:

  • ESP8266:
    This tiny microcontroller is the brain of the operation. I flashed it with WLED firmware to make controlling the lights super easy
  • 12V power supply:
    I used a 12V supply to power the LED strips because 5V simply wouldn’t cut it for two long strips
  • DC/DC 12V to 5V converter 
    This converter is used to power the ESP8266. The ESP8266 works with 5V.
  • 2x 5m WS2811 LED strips:
    These addressable RGB strips are perfect for this task. Since they run on 12V, I could avoid any voltage drop issues that usually occur with long strips.

Why WLED?

You might be wondering, “Why WLED?” when there are plenty of other ways to control LED strips out there. The simple answer: WLED is extremely versatile and easy to use, making it the perfect solution for a project like syncing your Webex status to LED colors.

Here’s why WLED is a great fit:

  • User-Friendly Interface: Once WLED is flashed onto an ESP8266 or ESP32, you get a beautiful web-based interface that allows you to control the LEDs directly from your browser or phone. No complicated setups, no steep learning curve.

  • Customizable Effects: WLED offers over 100+ lighting effects, from simple solid colors to dynamic patterns. While we’re sticking with solid status colors for this project, you could get creative and sync different Webex statuses to different animations, like pulsing for meetings or a rainbow pattern for when you’re available.

  • Smart Home Integrations: WLED easily integrates with other smart home systems like Home Assistant, IO broker, or Alexa. You can take your visual notifications to the next level by incorporating voice control or automating more complex routines.

  • Open Source and Extensible: Since WLED is open source, it’s constantly evolving thanks to the community. It’s well-documented and highly customizable, which is perfect for tinkering or expanding your project. Plus, there’s a huge community to turn to for help if needed.

  • Low-Cost Hardware: Using an ESP8266 or ESP32, which are dirt cheap, you get a highly customizable and powerful controller for your LEDs at a fraction of the cost of commercial smart lighting systems. Paired with a standard 12V LED strip, it’s both affordable and scalable.

  • Wi-Fi Controlled: One of the coolest features is that you can control the LEDs remotely over Wi-Fi, which means you can change colors or effects without needing direct access to the controller. In our case, this makes syncing to Webex seamless—your availability is automatically reflected in the room’s lighting.

Do you want to know more about it? Here you go: https://kno.wled.ge/

Why 12V LED strips?
When you’re running 5 meters (or in my case, two 5m strips), the power demand gets pretty high. A 12V setup ensures that the brightness remains consistent from the start to the end of the strip, while a 5V strip would suffer from voltage drop halfway through, resulting in dim, sad-looking LEDs. So, 12V makes sure your lights stay nice and bright, even over a long distance.

During my research, I found an awesome page that I can highly recommend to you:
https://quinled.info/the-ultimate-led-strip-power-injection-guide/ 

The code

Let’s dive into the fun part—syncing Webex with WLED! The code is broken down into three main sections: checking your Webex status, controlling the WLED device, and integrating both into a loop.

1. Checking Webex Status:

I use the Webex API to check my availability. This part of the script grabs my current status—whether I am available, in a meeting, or on a call.

				
					def get_webex_status():
    headers = {
        'Authorization': f'Bearer {WEBEX_ACCESS_TOKEN}',
        'Content-Type': 'application/json'
    }

    try:
        response = requests.get(WEBEX_STATUS_URL, headers=headers)
        response.raise_for_status()
        data = response.json()
        return data.get('status', 'inactive')  # Default to inactive if no status is found
    except requests.exceptions.RequestException as e:
        print(f"Error fetching Webex status: {e}")
        return 'inactive'

				
			

2. Controlling WLED:

Next, I communicate with the WLED device to change its color based on my Webex status. Green for available, red for a call, and orange for a meeting.

				
					def change_wled_color(color):
    wled_url = f"http://{WLED_IP_ADDRESS}/json/state"
    payload = {
        "on": True,
        "seg": [{
            "col": [color]
        }]
    }

    try:
        response = requests.post(wled_url, json=payload)
        response.raise_for_status()
        print(f"WLED color changed to {color}")
    except requests.exceptions.RequestException as e:
        print(f"Error changing WLED color: {e}")

				
			

3. Putting It All Together:

The script combines both parts and runs in a loop, first checking if the WLED is on before it checks the Webex status. If WLED is off, it doesn’t bother to fetch the status.

				
					def main():
    while True:
        if get_wled_status():  # Check if WLED is on
            status = get_webex_status()
            print(f"Current Webex status: {status}")

            color = STATUS_COLORS.get(status, [128, 128, 128])  # Default to grey if unknown
            change_wled_color(color)
        else:
            print("WLED is off, skipping Webex status check.")

        time.sleep(60)

				
			

Every 60 seconds, the script checks the WLED’s power status, and if it’s on, it checks the Webex status and changes the LED color accordingly. If the WLED is off, the status check is skipped, saving unnecessary API calls.

				
					import requests
import time

# Webex and WLED configurations
WEBEX_ACCESS_TOKEN = 'ABCDEFG'
WLED_IP_ADDRESS = '1.1.1.1'
WEBEX_STATUS_URL = 'https://webexapis.com/v1/people/me'
STATUS_COLORS = {
    'active': [255, 165, 0],  # Green for available
    'call': [255, 0, 0],    # Red for on call
    'meeting': [0, 255, 200],  # Orange for in a meeting
    'inactive': [128, 128, 128]  # Grey for away
}

def get_webex_status():
    headers = {
        'Authorization': f'Bearer {WEBEX_ACCESS_TOKEN}',
        'Content-Type': 'application/json'
    }

    try:
        response = requests.get(WEBEX_STATUS_URL, headers=headers)
        response.raise_for_status()
        data = response.json()
        # Check the status of Webex.
        return data.get('status', 'inactive')
    except requests.exceptions.RequestException as e:
        print(f"Error fetching Webex status: {e}")
        return 'inactive'

def get_wled_status():
    wled_url = f"http://{WLED_IP_ADDRESS}/json/state"
    try:
        response = requests.get(wled_url)
        response.raise_for_status()
        data = response.json()
        return data['on']  # Returns True if WLED is on, False if off
    except requests.exceptions.RequestException as e:
        print(f"Error checking WLED status: {e}")
        return False  # Assume WLED is off in case of error

def change_wled_color(color):
    wled_url = f"http://{WLED_IP_ADDRESS}/json/state"
    payload = {
        "on": True,
        "seg": [{
            "col": [color]
        }]
    }

    try:
        response = requests.post(wled_url, json=payload)
        response.raise_for_status()
        print(f"WLED color changed to {color}")
    except requests.exceptions.RequestException as e:
        print(f"Error changing WLED color: {e}")

def main():
    while True:
        # Check if WLED is turned on
        if get_wled_status():
            # Get current Webex status
            status = get_webex_status()
            print(f"Current Webex status: {status}")

            # Get corresponding color
            color = STATUS_COLORS.get(status, [128, 128, 128])  # Default to grey if status is unknown

            # Change WLED color
            change_wled_color(color)
        else:
            print("WLED is off, skipping Webex status check.")

        # Wait before checking again
        time.sleep(15)

if __name__ == "__main__":
    main()
				
			
Summary

And there you have it—a fully automated LED system that syncs with your Webex availability.

No more unexpected interruptions during meetings! The combination of an ESP8266, WLED, and some well-placed LED strips turns your home office into an uninterrupted meeting space, all while adding a bit of flair to your space.

Now, when someone walks into your room, they’ll know exactly whether it’s safe to ask you about dinner plans, or if they should retreat quietly before you hit the mute button.

So go ahead, give it a try! Your meetings (and your focus)

References