Busy Light with ESP8266 mini D1 and Home Assistant

· 3 min read
Busy Light with ESP8266 mini D1 and Home Assistant
Photo by Samuel Regan-Asante / Unsplash

Working at home is nice, having the chance to have my own room for that is ever more lucky. But still I'm working at home and family just walk in whenever they want and it's sometime not the best moments :)

I found this useful 3D printed case for this project :

Corona BusyLight by SailorCM
This is a busy light indicator - it can be used to indicate, that there is already someone or too many people inside a shop, room or something else. The bottom-part has been designed to hold an ESP32 or ESP8266, connected to a neopixel-ring, placed above the lightguide-part. source for esp32/esp8266 can be used from:https://www.hackster.io/benedikt-hubschen/office-busylight-1a8e30

I already had on ESP8266 mini D1 available so I needed to buy this 12Led ring, I found it on amazon here :

Adafruit - Anneau avec 12 LED RDVB Néopixel : Amazon.fr: Commerce, Industrie et Science
Adafruit - Anneau avec 12 LED RDVB Néopixel : Amazon.fr: Commerce, Industrie et Science

If you need some ESP board; you can find the one I used here :

D1 ESP8266 Mini Board,5 Pièces D1 ESP8266 Mini Node-MCU Lua avec ESP8266-12F Module WLAN CH-340G Compatible avec Arduino : Amazon.fr: Informatique
D1 ESP8266 Mini Board,5 Pièces D1 ESP8266 Mini Node-MCU Lua avec ESP8266-12F Module WLAN CH-340G Compatible avec Arduino : Amazon.fr: Informatique

The wiring is simple and very easy to realise :

Now everything is solder, you need to use ESPHome to send this config to the ESP

esphome:
  name: busylight
  friendly_name: BusyLight

esp32:
  board: az-delivery-devkit-v4
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api: xxx

ota: xxx

# Enable Web server.
web_server:
  port: 80

wifi:
  networks:
      ssid: !secret wifi_ESP
      password: !secret wifi_password
      hidden: false
  manual_ip:
    static_ip: ${value_static_ip}
    gateway: !secret manual_ip_gateway
    subnet: !secret manual_ip_subnet
    dns1: !secret manual_ip_dns1

light:
  - platform: neopixelbus
    type: GRB
    pin: GPIO13
    variant: 800KBPS
    num_leds: 36
    id: light1
    name: "NeoPixel Light"

When you have tested everything, you can assemble and glue (I glued the led to the white part

In Home Assistant it looks like this :

You can now make all kind of automation with Home Assistant, one of my automation is with a motion detector :

If someone comes between 09am and 5pm during the week day, it switch to red light ^^

My 3 yo kid now have to understand RED, don't come, GREEN, you can come :)