Because it's about time people stopped barging into your room when you're on Zoom
Prerequistes: A MacOS computer with up to date OS.
First, set up the monitoring agent, which will send MQTT messages when your computer turns the camera on and off.
-
If you don't already have it, install Homebrew.
-
If you don't already have Mosquitto, use Homebrew to install it:
brew install mosquitto
-
Check out this repo
git clone [email protected]:triblondon/on-air-lights.git cd on-air-lights
-
Make a copy of
config-dist.sh
calledconfig.sh
:cp config-dist.sh config.sh
-
Open the new
config.sh
file in your favourite text editor and fill in the required values, eg:mqtt_server=foo.cloudmqtt.com mqtt_port=12345 mqtt_user=jane mqtt_password=password mqtt_topic=on-air-sign
-
Run the script
monitor/on-air-monitor.sh
Now, set up the hardware:
-
Make or acquire an ON-AIR light. This could be a neon-y sign like mine or just any old light that turns on when you send power to it.
-
Install the ESPHome CLI
-
Plug an ESP8266 or ESP32 microcontroller into a spare USB port on your computer. I used the tiny ESP-01S paired with the purpose-made relay module which can often be purchased together (eg. Amazon).
-
Make a copy of
secrets-dist.yaml
calledsecrets.yaml
:cd esphome cp secrets-dist.yamls secrets.yaml
-
Open the new
secrets.yaml
file in your favourite text editor and fill in the required values, eg:wifi_ssid: "Foo" wifi_password: "password" mqtt_server: "foo.cloudmqtt.com" mqtt_port: 12345 mqtt_username: "jane" mqtt_password: "password"
-
Install the ESPHome configuration onto the microcontroller:
esphome run esphome/on-air-light.yaml
-
Unplug the microcontroller from the computer and connect it to a relay that is controlling your ON AIR light. Connect the relay to GPIO0 (which is the correct pin for the ESP-01S Relay module)
Great! Now when your computer turns the camera on, your sign will light up.