Using Deterministic Theatre for Energy Management in Smart Environments