That's a broad topic for a headline, and one that could fill a book. It dates back much further than people think.
Thanks to today's modern technology and graphics, we don't need to write that book. It's all laid out before us in a nice infographic that shows the highlights of what you need to know about how we arrived at things like Harmony, Nest, Philips Hue and more.
The concept of home automation has been around for a long time but the technology just wasn't there. Many science-fiction writers included it in stories, Ray Bradbury famously among them.
As for the remote control, you'll really need to set your time machine to "way back" mode - think about the famous electrical genius Nikola Tesla, who first created one to control a toy boat. That was in 1898, in the days he was competing with Edison to figure these things out.
There were many more advances after that, but things moved slowly. Technology had to catch up to ideas and the phrase Smart Home finally came around in 1984, ironically enough (the year, not the book).
It all leads us to today, and a world where I can tell Amazon Echo to turn off my light and it will do so...usually. I didn't say things were perfect.