OnAir Light: ON/OFF IF ListOfChromeTabs CONTAINS meet.google.com (Chrome)

Macro to check for open instances of Google Meet in Chrome, and if so, turn on an "On Air" light.
If there is not a Chrome tab containing "meet.google.com" as an URL, then the light is turned off.
I am using a Hue Play bar positioned within the door frame to my office.

Trigger:

  • Google Chrome -> 'is running' -> Repeat every 5 seconds
    (So far does not seem to take up much CPU processing)
    Screen Shot 2021-04-18 at 11.46.02 AM

Actions:

  • Checks Chrome for all URLs being used - saves results as Variable ListOfChromeTabs

  • If ListOfChromeTabs contains "meet.google.com", then executes a powershell script to turn ON light. If not, then executes a powershell script to turn OFF light

Just replace your Philips Hue API values where noted - <HUB IP ADDRESS> | <HUB USERNAME> | <HUE LIGHT ID> - if you need assistance with obtaining these values, the Philips Hue API "Getting Started" Guide will be able to help.

ON:
curl --request PUT --data '{"on":true, "sat":254, "bri":254,"hue":65280}' http://<HUB IP ADDRESS>/api/<HUB USERNAME>/lights/<HUE LIGHT ID>/state

OFF:
curl --request PUT --data '{"on":false, "sat":254, "bri":254,"hue":65280}' http://<HUB IP ADDRESS>/api/<HUB USERNAME>/lights/<HUE LIGHT ID>/state


Hope this helps trying to make work at home a little easier on everyone.

OnAir Light - ON:OFF IF ListOfChromeTabs CONTAINS meet.google.com (Chrome).kmmacros (4.9 KB)

Disclaimer: this is my first post - so forgive any formatting issues.

2 Likes

Hey @Warioish,

Welcome to the forum!   :smile:

-Chris

1 Like

Thanks!