Metamodeling of Smart Environments: from design to implementation. (August 2017)