home automation code for a bigger project