I write python scripts to control my devices, and made a web page to trigger these scripts:
https://github.com/printfinn/smart-garage-rails.
I run this website on a Raspberry Pi in my home, it's been working fine for half a year.
It's written with Ruby on Rails, and one good thing it provides is that you don't need to worry about privacy, because it doesn't need to be connected to the Internet, only inside you home net.