Refactored homeautomation core - separated implementation between protocol and setup plant