Multi-agent system theory for modelling a home automation system