Digital Twin as a Key Component in Smart Environments