Building a IoT-based Automation Block