Carpe Diem:24 July, 2024

Home Assistant, Smart Outlets, and Christmas Lights!

This post may contain affiliate links. Please see our disclaimer for more info.

This post is a little overdue, but it’ll prep you for the next holiday season!

I’m big into affordable components when configuring my smart home. Costs quickly add up once you realize how many different uses you have for smart equipment in your home. This past Christmas, I was on a quest to find an affordable yet reliable smart setup to control my Christmas lights inside the house and the exterior lights as well. After doing some research, and trying out a few outlets, I landed on the Broadlink SP3 Smart Outlets. They got the job done well and were affordable. I found them on sale on amazon for about $10/unit. I do have some other smart outlets that I’ve been testing that I’ll add to another post with my remarks.

Broadlink SP3 Initial Remarks

  • These are WiFi outlets – no additional hub is required if you’re in range of your router. As I’ve mentioned before, I’m not as big of a fan of WiFi devices. However, I’ve been quite pleased with these switch’s performance.
  • The outlets are rated for 15A which should be plenty ample for most indoor items and Christmas lights. You’ll want to avoid high power heaters or kitchen appliances that require up to 20 amps.
  • The Broadlink app is an okay attempt but not intuitive and a really more of a pain. Luckily, we’ll be using home assistant so the app is not needed once the device has been set up.
  • These do not report power usage in home assistant at the time of this writing. I figured this considering the price, so I’m not surprised.
  • Units are small enough sized that two can be plugged into both outlets on a wall outlet at the same time.
  • These outlets are rated for indoors only, though I had no issue using them covered while outside (temps were below freezing)
  • Pairs nicely with home assistant. Once things were setup (and I had the right IP & MAC addresses in), I had zero issues controlling the switches from HA.

Broadlink SP3 Installation and Setup

Since these are outlets, installing is literally plugging it into the wall outlet and plugging in whatever you want to be controllable by the switch. Setup was a little more painful, but not too bad once I got things going.

The steps to setup are:

  1. As mentioned, the Broadlink App is pretty horrible – poor English  & instructions
    • Auto config in the app didn’t work for me. This could be because I use special chars in my WiFi password (like everyone should)
    • Instead of auto config, I used AP mode. In order for this mode to work, the SSID of your 2.4 GHz WiFi needs to be visible. After pairing, you can set your SSID back to hidden if desired.
  2. Long press the blue button on the outlet  to enter AP mode. Once in AP mode, it will blink 4 times, pause, 4 blinks repeating.
  3. On your phone, connect to ‘broadlink prov’ WiFi network
  4. Once connected, add your 2.4 GHz network
  5. Not required but I recommend if your router has the functionality: Set your router to Assign IPs based on MAC addresses. This way you’ll have a static IP address for every smart switch that you add which makes the home Assistant setup a bit more robust (since it depends on IP address).
    • During setup, I spent a majority of my time troubleshooting why some switches worked and others didn’t. Turned out that I had the wrong IP & MAC addresses for the switches. I was setting up 6 at once so I got things a little mixed up…
    • The switches themselves do not list their MAC address on their label. I found them by looking up my DHCP tables on my router.
  6. Add to home assistant via configuration.yaml – see my code below and also HA docs
# configuration.yaml

  - platform: broadlink
    host: # IP address of outlet
    mac: '33:E3:35:B5:34:65' # MAC of outlet
    type: sp3 # model of outlet
    friendly_name: 'Front Xmas Lights' # Name you assign

Home Assistant Automation

I’ve include my automation code below. Logic is pretty straight forward – turn on at sunset and turn off close to midnight. I also had them turn on for a little in the morning to keep my wife and I company when we’re heading to work in the dark.

I recently started using node-red for all my automations. If you’re not familiar, node-red is a visual way to program automations – I highly recommend checking it out. I may make a post on it at some point, but there are plenty of resources already available in the meantime.

# automations.yaml

- id: xmas_on
  alias: Christmas lights on 
    - platform: sun  # Turn on 30 min before sunset
      event: sunset
      offset: -00:30:00
    - platform: time
      at: '05:30:00' # Turn on at 5:30 am before work to make the day more cheerful
    service: homeassistant.turn_on
      - group.Christmas_lights

- id: xmas_off
  alias: Christmas lights off
    - platform: time  # Turn off 30 min before midnight
      at: '23:30:00'
    - platform: sun  # Turn off at sunrise
      event: sunrise
    service: homeassistant.turn_off
      - group.Christmas_lights


  1. nicklenko Reply

    looks great! did something similar at my place, but used Insteon LampLincs. I had my tree adjust brightness levels depending on the time of the day (because a Christmas tree just doesn't look right without lights!)

Leave a Reply

Your email address will not be published.