Approach to Organizing the Functioning of Smart Elements in the Multi-Agent “Smart House” System