added threshold to sensor, added name to gateway