NightHawk

NightHawk

The NightHawk is a versatile LoRaWan occupancy sensor, developed to easily measure occupancy for various smart building use cases.

The wall mountable sensor has a wide range (up to 30m) and a viewing angle of 100° to allow detection in spaces with smaller to large dimensions.

The Nighthawk senses:

          Movement (PIR)
          Temperature (°C)
          Humidity (%)
          Light (lux)

Smart Building Use Case

Smart buildings are only as smart as the data they produce and how that data is used to enhance and optimize the different aspects of its daily operation. Many different use cases can be implemented but the challange remains: which sensors do we use?

Xirdec, an OAC brand, has therefor developped the Nighthawk multisensor. This sensor is specifically designed to support smart use cases around

        Optimal Space Usage
        Meeting room occupancy
        Meeting room/ workplace environment optimization

This battery powered device is easy to install, without any intrusive action (no cabling!) and with its performant radio communication technology, powered by LoraWan, dataflow is optimal.

Operation

  1. Movement is detected,
  2. The presence status is set to 1
  3. A message* is sent instantly
  4. A timer is set to check for a status change every two minutes.
  5. As long as there is movement detected during the next two minutes, the    status will remain the same so no message will be sent.
  6. Every 5 minutes, a check is performed to see if the presence status has changed. If not, an update message will be sent after that 5 minute period.
  7. When there was no movement detected anymore during the 2 minute period, the occupancy status will be set to 0 again and a message will be sent.
  8. Again, a check will be performed every 5 minutes to see if the status has changed. If not, an update message will be sent.
  9. If after a period of no movement, a new movement is detected, the cycle starts over.

Payload Decoding Example

//Registration-mode: OTA (Over The Air)
//DevEUI: (example) 0004A30B001B1545
//Networkkey: (example)01020304050607080910111213141516
//In cloudgate Lora-Applicatie nummer: (example)1122334455667788
//Payload RAW output:
//RAW message:(example)
//11230303100003200101

var str = msg.payload.toString('hex');
var rec = (str.substring(0,1));
var temps = (str.substring(1,2) == "0" ? "-" : "");
var temp = (temps + str.substring(2,6)/100);
var hum = (str.substring(6,9));
var lux = (str.substring(9,17)/100);
var pir = (str.substring(17,18));
var res= (str.substring(18,19));
var bat= (str.substring(19,20));
msg.payload = str;
msg.rec = rec; //=> recordtype
msg.ambientTemp = temp; //=> °C
msg.humidity = hum; //=> %
msg.light = lux; //=> lux
msg.pir = pir; (0=false, 1=true)
msg.res = res; // => RESERVED
msg.bat = bat; //=> NOK (0) or OK (1)
var data = msg;
msg = {"payload":JSON.stringify(data),"topic":data.topic};
return msg;

Battery Information

To retrieve the battery level from the sensor, a network server needs to use the DevStatusReq to receive the status in a DevStatusAns command.

This is designed in compliance to the LoRaWAN specification:

BATTERY= 0 
The end-device is connected to an external power source. (not possible with the NightHawk)

BATTERY= 1...254
The battery level, 1 being at minimum and 254 being at maximum

BATTERY= 255
The end-device was not able to measure the battery level

When the battery level is too low to transmit, the sensor will shut down and the led behind the PIR lens will blink three times. The sensor will keep doing this until the battery is dead.