Learn how to set up Home Assistant and see some of my favorite modules.
Step 1: Install hass.io
Step 2: Set up remote access
Many smart plugs come with their own apps so they can work right out of the box, which is great for most people. But for those reading this, we're not most people, are we? :)
Thankfully, somone has developed open source firmware called Tasmoto that you can flash onto select devices an control using your Home Assistant.
With lights, there are a couple ways to go. You could get something like the Phillips Hue, that already has built in BLE, or you could get a light socket adapter like the Sonoff __ that works with any regular light. The benefit of the latter is that it's a one-time purchase. Hue bulbs are $ each, while the Sonoff is $10-$15 plus the cost of regular bulbs, $1-2 each. Though, Hue bulbs are dimmable and multi-color.