Passive RFID tag with sensing and reasoning capabilities for building automation