text: var Accessory = require('../').Accessory;
  var Service = require('../').Service;
  var Characteristic = require('../').Characteristic;
  var uuid = require('../').uuid;
  
  // here's a fake hardware device that we'll expose to HomeKit
  var MOTION_SENSOR = {
    motionDetected: false,
  
    getStatus: function() {
      //set the boolean here, this will be returned to the device
      MOTION_SENSOR.motionDetected = false;
    },
    identify: function() {
      console.log("Identify the motion sensor!");
    }
  }
  
  // Generate a consistent UUID for our Motion Sensor Accessory that will remain the same even when
  // restarting our server. We use the `uuid.generate` helper function to create a deterministic
  // UUID based on an arbitrary "namespace" and the word "motionsensor".
  var motionSensorUUID = uuid.generate('hap-nodejs:accessories:motionsensor');
  
  // This is the Accessory that we'll return to HAP-NodeJS that represents our fake motionSensor.
  var motionSensor = exports.accessory = new Accessory('Motion Sensor', motionSensorUUID);
  
  // Add properties for publishing (in case we're using Core.js and not BridgedCore.js)
  motionSensor.username = "1A:2B:3D:4D:2E:AF";
  motionSensor.pincode = "031-45-154";
  
  // set some basic properties (these values are arbitrary and setting them is optional)
  motionSensor
    .getService(Service.AccessoryInformation)
    .setCharacteristic(Characteristic.Manufacturer, "Oltica")
    .setCharacteristic(Characteristic.Model, "Rev-1")
    .setCharacteristic(Characteristic.SerialNumber, "A1S2NASF88EW");
  
  // listen for the "identify" event for this Accessory
  motionSensor.on('identify', function(paired, callback) {
    MOTION_SENSOR.identify();
    callback(); // success
  });
  
  motionSensor
    .addService(Service.MotionSensor, "Fake Motion Sensor") // services exposed to the user should have "names" like "Fake Motion Sensor" for us
    .getCharacteristic(Characteristic.MotionDetected)
    .on('get', function(callback) {
       MOTION_SENSOR.getStatus();
       callback(null, Boolean(MOTION_SENSOR.motionDetected));
  });
  