I am using smart home devices for quite a while now with Apple's Homekit. As devices that are certified for Homekit are more expensive than others you might want to look for devices that can be Homekit-enabled with Homebridge, a lightweight server that runs on a Raspberry Pi.
Setting up such a machine can be quite challenging due to the various tutorials you have to run through that never give you the whole view of what you have to do to set it up from the scratch.
I put together a document that shows every single step to successfully get this working. I host it on Github to let you contribute if you find any errors or have improvements.
Here you go:
https://github.com/zeromancer1972/homebridge_pi/blob/master/homebridge_pi.md