First, I bought a WiFi light bulb ($10). Then, I found some open source software that let me control the bulb & detect when my camera was active. I wrote a tiny command line utility that checked for the camera status every few seconds & told the light bulb to turn on or off based on the camera status.
It worked!