Milesight WS202 LoRaWAN PIR/Motion and Light Level Sensor User Guide
- June 5, 2024
- Milesight
Table of Contents
WS202 LoRaWAN PIR/Motion and Light Level Sensor
User Guide
Safety Precautions
Milesight will not shoulder responsibility for any losses or damages resulting from not following the instructions of this operating guide.
- The device must not be modified in any way.
- Do not expose the PIR lens to direct sunlight.
- Do not paint or clean the PIR lens, or it will affect the detection of the device.
- Do not place the device where the temperature is below/above the operating range.
- Do not place the device close to objects with naked flames, heat source (oven or sunlight), cold source, liquid, and extreme temperature changes.
- The device is not intended to be used as a reference sensor, and Milesight will not take responsibility for any damages which may result from inaccurate readings.
- When installing the battery, please install it accurately, and do not install the reverse or wrong model.
- Remove the battery if the device will not be used for a long time. Otherwise, the battery will leak and damage the device.
- The device must never be subjected to shocks or impacts.
Declaration of Conformity
WS202 conforms with the essential requirements and other relevant provisions of the CE, FCC,
All information in this guide is protected by copyright law. Whereby, no organization or individual shall copy or reproduce the whole or part of this user guide by any means without written authorization from Xiamen Milesight IoT Co., Ltd.
For assistance, please contact
Milesight technical support:
Email: iot.support@milesight.com
Tel: 86-592-5085280
Fax: 86-592-5023065
Address: Building C09, Software Park III,
Xiamen 361024, China
Revision History
Date | Doc Version | Description |
---|---|---|
July 15, 2021 | V 1.0 | Initial version |
Sept. 10, 2021 | V 1.1 | 1. Add LoRa D2D feature; |
2. Support light collection enabled/disabled;
3. Delete low power alarm interval, the device only uplinks once when the
battery level is lower than 10%.
Product Introduction
Overview
WS202 is a PIR sensor based on passive infrared technology to detect a motion
or occupancy.
WS202 can detect whether there is a movement within the range of 6-8 m.
Besides, WS202 equips with a light sensor that can link PIR detection results
to trigger scenes. WS202 can be widely used in smart homes, smart offices,
schools, warehouses, etc.
Sensor data are transmitted in real-time using the standard LoRaWAN® protocol. LoRaWAN® enables encrypted radio transmissions over long distances while consuming very little power. The user can get an alarm through Milesight IoT Cloud or through the user’s own Application Server.
Features
- Built-in light sensor, combine PIR sensor to achieve triggers
- Up to 15 km communication range
- Easy configuration via NFC
- Standard LoRaWAN® support
- Compatible with Milesight IoT Cloud
Hardware Introduction
Packing List
If any of the above items is missing or damaged, please contact your sales representative.
Hardware Overview
Dimensions (mm)
LED Patterns
Function | Action | LED Indicator |
---|---|---|
PIR Detection | PIR is triggered (network unregistered) | Red, blink once |
PIR is triggered (network registered) | Green, blink once | |
Network Status | Send join network requests | Red, blinks once |
Joined the network successfully | Green, blinks twice | |
Reboot | Press and hold the reset button for more than 3s | Slowly blinks |
Reset to Factory Default | Press and hold the reset button for more than 10s |
Quickly blinks
Operation Guide
NFC Configuration
WS202 can be configured via an NFC-enabled smartphone.
-
Pull out the battery insulating sheet to power the device. The indicator will light up in green for 3 seconds when the device turns on.
-
Download and install the “Milesight ToolBox” App from Google Play or App Store.
-
Enable NFC on the smartphone and open Milesight ToolBox.
-
Attach the smartphone with an NFC area to the device to read device information.
-
Basic information and settings of the device will be shown on ToolBox if it’s recognized successfully. You can read and configure the device by tapping the Read/Write device on the App. In order to protect the security of the device, password validation is required when configuring a new smartphone. The default password is 123456.
Note:
- Check the location of the smartphone NFC area and it’s recommended to take off the phone case.
- If the smartphone fails to read/write configurations via NFC, move the phone away and back to try again.
- WS202 can also be configured by ToolBox software via a dedicated NFC reader provided by Milesight IoT, you can also configure it via the TTL interface inside the device.
LoRaWAN Settings
LoRaWAN settings are used for configuring the transmission parameters in the LoRaWAN® network.
Basic LoRaWAN Settings:
Go to Device - > Setting -> LoRaWAN Settings of ToolBox App to configure join type, App EUI, App Key, and other information. You can also keep all settings by default.
Parameters | Description |
---|---|
Device EUI | The unique ID of the device can also be found on the label. |
App EUI | Default App EUI is 24E124C0002A0001. |
Application Port | The port is used for sending and receiving data. The default |
port is 85.
Join Type| OTAA and ABP modes are available.
Application Key| Appkey for OTAA mode, default is
5572404C696E6B4C6F52613230313823.
Device Address| Devendra for ABP mode, the default is the 5th to 12th digits
of SN.
Network Session Key| Nwkskey for ABP mode, default is
5572404C696E6B4C6F52613230313823.
Application Session Key| Appskey for ABP mode, default is
5572404C696E6B4C6F52613230313823.
Spread Factor| If ADR is disabled, the device will send data via this spread
factor.
Confirmed Mode| If the device does not receive an ACK packet from a network
server, it will resend
data 3 times at most.
Rejoin Mode| Reporting interval ≤ 30 mins: the device will send specific
mounts of LoRaMAC
packets to check connection status every 30 mins; If no reply after specific
packets are being sent, the device will re-join.
Reporting interval > 30 mins: the device will send specific mounts of LoRaMAC
packets to check connection status at every reporting interval; If no reply
after specific packets are being sent, the device will re-join.
ADR Mode| Allow the network server to adjust the data rate of the device.
Tx Power| Transmit power of the device.
Note:
- Please contact the sales representative for the device EUI list if there are many units.
- Please contact the sales representative if you need random App keys before purchase.
- Select OTAA mode if you use Milesight IoT Cloud to manage devices.
- Only OTAA mode supports rejoin mode.
LoRaWAN Frequency Settings:
Go to Setting- >LoRaWAN Settings of ToolBox App to select the supported
frequency and select channels to send uplinks. Make sure the channels match
the LoRaWAN® gateway.
If the device frequency is one of CN470/AU915/US915, you can enter the index of the channel that you want to enable in the input box, making them separated by commas.
Examples:
1, 40: Enabling Channel 1 and Channel 40
1-40: Enabling Channel 1 to Channel 40
1-40, 60: Enabling Channel 1 to Channel 40 and Channel 60
All: Enabling all channels
Null: Indicates that all channels are disabled
Note:
For the -868M model, the default frequency is EU868;
For the -915M model, the default frequency is AU915.
General Settings
Go to Device->Setting->General Settings of ToolBox App to change the reporting interval, etc.
Parameters | Description |
---|---|
Reporting Interval | The interval of reporting PIR, light status, and battery |
level to a network
server. Default: 30 mins, Range: 1 – 1080 mins
Note: WS202 will also report the “triggered” status of the PIR sensor
immediately
when it detects motions.
Idle Time| When the PIR sensor does not detect motion for a period of Idle
Time,
Reporting/s| the device will report a “not triggered” status. Default: 120 s
LED Indicator| Enable or disable the light indicated in chapter 2.4.
Note: The indicator of the reset button is not allowed to be disabled.
Illuminance
Collection| Enable or disable illuminance collection. When this is disabled,
reporting the interval will be changed to 1080 mins automatically.
Change Password| Change the password for ToolBox App to write this device.
Threshold Settings
When illuminance collection is enabled, users can define the Bright or Dark state via detection data of the light sensor in threshold settings. Besides, when the PIR sensor is triggered and light status meets the threshold, WS202 will send alarms immediately. Otherwise, it will not send data right away.
LoRa D2D Settings
Lora D2D protocol is developed by Milesight and used for setting up transmission among Milesight devices without a gateway. When the LoRa D2D setting is enabled, WS202 can work as a LoRa D2D controller to send control commands to trigger LoRa D2D agent devices.
-
Enable the LoRa D2D feature.
-
Define a unique LoRa D2D key that is the same as LoRa D2D agent devices, then select the frequency and spreading factor. (Default LoRa D2D Key: 572404C696E6B4C6F5 2613230313823)
-
Enable one of WS202 status and configure a 2-byte hexadecimal command (This command is pre-defined in LoRa D2D agent device). When WS202 detects this status, it will send the control command to corresponding LoRa D2D agent devices.
Note: When this feature is enabled, the device will not send data to the LoRaWAN® network server if WS202 PIR or light status changes.
Maintenance
Upgrade
- Download firmware from the Milesight website to your smartphone.
- Open ToolBox App and click “Browse” to import firmware and upgrade the device.
Note:
- Operation on ToolBox is not supported during the upgrade.
- Only the Android version of ToolBox supports the upgrade feature.
Backup
WS202 supports configuration backup for easy and quick device configuration in
bulk. Backup is allowed only for devices with the same model and LoRa
frequency band.
- Go to the “Template” page on the App and save current settings as a template. You can also edit the template file.
- Select one template file that is saved in the smartphone and click “Write”, then attach it to another device to write the configuration.
Note: Slide the template item to the left to edit or delete the template. Click the template to edit the configurations.
Reset to Factory Default
Please select one of the following methods to reset the device:
Via Hardware: Hold on to the reset button for more than 10s. After the
reset is complete, the indicator will blink in green twice, then the device
will reboot.
Via ToolBox App: Go to Device -> Maintenance to tap “Reset”, then attach
a smartphone with an NFC area to the device to complete the reset.
Installation
3M Tapes Fix:
Paste 3M tape to the back of the device, then tear the other side and place it on a flat surface.
Screw Fix:
Remove the back cover of the device, screw the wall plugs into the wall, and fix the cover with screws on it, then install back the device.
Note:
- Adjust the installation direction according to detection area requirements.
- WS202 can be mounted on a wall or ceiling. It’s recommended to install at 1.5~2.5m from the floor.
- Ensure the detection area does not have moving objects like waving trees and fans.
- Ensure the detection area is not blocked by curtains or barriers.
Device Payload
All data are based on the following format (HEX):
Channell | Type1 | Data1 | Channel2 | Type2 | Data2 | Channel 3 | … |
---|---|---|---|---|---|---|---|
1 Byte | 1 Byte | N Bytes | 1 Byte | 1 Byte | M Bytes | 1 Byte | … |
For decoder examples, you can find them at https://github.com/Milesight- IoT/SensorDecoders.
Basic Information
WS202 reports basic information about the device whenever it joins the network.
Channel | Type | Description |
---|---|---|
ff | 01 (Protocol Version) | 01=> V1 |
08 (Device SN) | 12 digits | |
09 (Hardware Version) | 01 40 => V1.4 | |
Oa (Software Version) | 01 14 => V1.14 | |
Ob (Power On) | Device is on | |
Of (Device Type) | 00: Class A, 01: Class B, 02: Class C |
Example:
ffObff ff0101 ff086538b2232131 ff090100 ff0a0101 ff0f00
Channel| Type| Value| Channel| Type| Value
ff| Ob
(Power On)| ff (Reserved)| ff| 01
(Protocol Version)| 01 (V1)
Channel| Type| Value| Channel| Type| Value
ff| 08(Device
SN)| 6538b22321
31| ff| 09
(Hardware version)| 0100
(V1.0)
Channel| Type| Value| Channel| Type| Value
ff| Oa
(Software
version)| 0101 (V1.1)| ff| Of
(Device Type)| 00
(Class A)
Sensor Data
WS202 reports sensor data and battery level according to reporting interval (30 mins by default) or when PIR or light status changes. Besides, when the battery level is lower than 10%, it will upload the battery package once.
Channel | Type | Description |
---|---|---|
01 | 75 (Battery Level) | UINT8, Unit: % |
03 | 00 (PIR Status) | 1: PIR is triggered |
00: PIR is not triggered
04| 00 (Light Status)| 01: Bright
00: Dark
Example:
17564030001040000
Channel| Type| Value| Channel| Type| Value
1| 75 (Battery)| 64 => 100%| 3| 00 (PIR
Status)| 01=> PIR is
triggered
Channel| Type| Value| | |
4| 00 (Light
Status)| 01=> Bright| | |
Downlink Commands
WS202 supports downlink commands to configure the device. The application port is 85 by default.
Channel | Type | Description |
---|---|---|
ff | 03 (Set Reporting Interval) | 2 Bytes, unit: s |
Example: Set reporting interval as 20 minutes.
Channel | Type | Value |
---|---|---|
ff | 03 (Set Reporting Interval) | 2 Bytes, unit: sb0 04 => 04 b0 = 1200s |
= 20 minutes