Milesight WS202 LoRaWAN PIR and Light Sensor User Guide
- June 12, 2024
- Milesight
Table of Contents
Milesight WS202 LoRaWAN PIR and Light Sensor User Guide
Safety Precautions
Milesight will not shoulder responsibility for any losses or damages resulting fromnot followingthe 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 takeresponsibility for any damages which may result from inaccurate readings.
-
When installing the battery, please install it accurately, and do not install the reverseor
wrong model. -
Remove the battery if the device will not be used for a long time. Otherwise, the batterywill
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, and RoHS.
Copyright © 2011-2023 Milesight. All rights reserved
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 writtenauthorization from Xiamen Milesight IoT Co., Ltd.
For assistance, please contact
Milesight technical support:
Email:
iot.support@milesight.comSupport
portal: support.mileisght-iot.com
Tel: 86-592-5085280
Fbax: 86-592-5023065
Address: Building C09, Software ParkIII, Xiamen 361024,
Revision History
Date | Doc Version | Description |
---|---|---|
July 15, 2021 | V 1.0 | Initial version |
Sept. 10, 2021 |
V 1.1
| 1. Add Mile sight D2D feature;2. Support light collection
enabled/disabled;3. Delete low power alarm interval, device only uplinks
once when battery level is lower than 10%.
Jan. 16, 2023| V 1.2| 1. Add Single-Channel mode;2. Add Mile sight D2D
LoRa Uplink feature.3. Add reboot downlink command.
May 15, 2023| V 1.3| Add blocking stickers
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, WS202equips with a light sensor which can link PIR detection results to trigger scenes. WS202 canbewidely used in smart homes, smart offices, schools, warehouses, etc.
Sensor data are transmitted in real-time using the standard LoRa WAN® protocol. Lora WAN ®enables encrypted radio transmissions over long distances while consuming very little power. The user can get an alarm through Mile sight IoT Cloud or through the user’sown Application Server.
Features
- Built-in light sensor, combine PIR sensor to achieve triggers
- Up to 15 km communication range
- Easy configuration via NFC
- Standard Lora WAN ® support
- Compatible with Mile sight Iota Cloud
Hardware Introduction
Packing List
-
1 × WS202 Sensor
-
2 × Wall Mounting Kits
-
1 × 3M Tape
-
3 × Blocking Stickers
-
1× Quick Guide
If any of the above items is missing or damaged, please contact your sales representative.
Hardware Overview
PIR Area
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 FactoryDefault | 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 on the device. The indicator will light upingreenfor3seconds when the device turns on.
-
Download and install “Mile sight Toolbox” App from Google Play or App Store.
-
Enable NFC on the smartphone and open Mile sight Toolbox
-
Attach the smartphone with 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 requiredwhenconfiguring via 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 andbackto try again.
- WS202 can also be configured by Tool Box software via a dedicated NFC reader provided by Mile sight Iota, you can also configure it via TTL interface inside the device.
LoRa WAN Settings
Go to Device > Setting > LoRa WAN Settings of ToolBox App to configure join
type, App EUI, AppKey and other information. You can also keep all settings by
default.
Parameters | Description |
---|---|
Device EUI | Unique ID of the device which can also be found on the label. |
App EUI | Default App EUI is 24E124C0002A0001. |
Application Port | The port used for sending and receiving data. The default |
port is 85.
Join Type| OTAA and ABP modes are available.
LoRaWAN Version| V1.0.2, V1.0.3 are available.
Work Mode| It’s fixed as Class A.
Application Key| Appkey for OTAA mode, default is
5572404C696E6B4C6F52613230313823.
Device Address| DevAddr for ABP mode, default is the 5th to 12th digits of SN.
Network SessionKey| Nwkskey for ABP mode, default is
5572404C696E6B4C6F52613230313823.
Application Session Key| Appskey for ABP mode, default is
5572404C696E6B4C6F52613230313823.
RX2 Data Rate| RX2 data rate to receive downlinks or send D2D commands.
RX2 Frequency| RX2 frequency to receive downlinks or send D2D commands. Unit:
Hz
Channel Mode
| Select Standard-Channel mode or Single-Channel mode. When Single-Channel
mode is enabled, only one channel can be selected to send uplinks.
Pleaseenable Single-Channel mode if you connect device to DS7610.
Channel| Enable or disable the frequency to send uplinks.
If frequency is one of CN470/AU915/US915, enter the index of the channel that
you want to enable and make them separated by commas.Examples:1, 40: Enabling
Channel 1 and Channel 401-40: Enabling Channel 1 to Channel 401-40, 60:
Enabling Channel 1 to Channel 40 and Channel 60 All: Enabling all
channelsNull: Indicates that all channels are disabled
|
Spread Factor| If ADR is disabled, the device will send data via this spread
factor.
Confirmed Mode| If the device does not receive ACK packet from network server,
it will resenddata once.
Rejoin Mode| Reporting interval ≤ 30 mins: the device will send a specific
number of LinkCheckReq MAC packets to the network server with periodic or
threshold uplinks every time more than 25~35 mins passes to validate
connectivity; If there is no response, the device will re-join the
network.Reporting interval > 30 mins: the device will send a specific number
of Link Check Req MAC packets to the network server every reporting interval
to validate connectivity; If there is no response, the device will re-join the
network.
Set the number of packets sent| When join mode is enabled, set the number of
LinkCheckReq packets sent.Note: the actual sending number is Set the number of
packet sent + 1.
ADR Mode| Allow network server to adjust data rate of the device. This only
works with Standard Channel Mode.
Tx Power| Transmit power of device.
Note:
- Please contact sales representative for device EUI list if there are many units.
- Please contact sales representative if you need random App keys before purchase.
- Select OTAA mode if you use Mile sight IoT Cloud to manage devices.
- Only OTAA mode supports rejoin mode.
General Settings
Go to Device > Setting > General Settings of Tool Box App to
change the reporting interval, etc.
Parameters | Description |
---|---|
Reporting Interval | The interval of reporting PIR, light status and battery |
level to network server. Default: 30 mins, Range: 1 – 1080 minsNote: WS202
will also report “Occupied” status immediately when itdetects motions.
Idle TimeReporting/s| When the PIR sensor does not detect motion for a period
of Idle Time,device will report “Vacant” status. Default: 120 s
LED Indicator| Enable or disable the light indicating in chapter 2.4.Note: The
indicator of reset button is not allowed to disable.
IlluminanceCollection| Enable or disable illuminance collection. When this is
disabled, reportinginterval 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 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 senddataright away.
Milesight D2D Settings
Milesight D2D protocol is developed by Milesight and used for setting up transmissionamongMilesight devices without gateway. When the Milesight D2D setting is enabled, WS202 canworkas a Milesight D2D controller to send control commands to trigger Milesight D2D agent devices.
-
Configure RX2 datarate and RX2 frequency in LoRaWAN® settings, it is suggested tochangethe default value if there are many LoRaWAN® devices around.
-
Go to Device > Settings > D2D Settings to enable D2D function, and define an uniqueMilesight D2D key which is the same as Milesight D2D agent devices, then select the frequencyand spreading factor. (Default Milesight D2D Key: 5572404C696E6B4C6F52613230313823)
-
Enable one of WS202 status and configure a 2-byte hexadecimal command (This commandis pre-defined in Milesight D2D agent device). When WS202 detects this status, it will sendthecontrol command to corresponding Milesight D2D agent devices.
Note: If you enabled LoRa Uplink feature, LoRaWAN® uplink that contains the PIR statusandlight status will be sent to gateway after Milesight D2D control command is sent
Maintenance
Upgrade
- Download firmware from Mile sight website to your smartphone.
- Open Tool Box App and click “Browse” to import firmware and upgrade the device.
Backup
WS202 supports configuration backup for easy and quick device configuration in bulk. only for devices with the same model and Lo Ra WAN® frequency band
-
Go to Template page on the App and save current settings as a template. You can alsoedit
the template file. -
Select one template file that saved in the smartphone and click Write, then attach it to another device to write configuration.
Note: Slide the template item to the left to edit or delete the template.
Click the template toedit the configurations.
Reset to Factory Default
Please select one of the following methods to reset device:
Via Hardware: Hold on the reset button for more than 10s. After
reset complete, the indicator will blink in green twice, then device will
reboot.
Via ToolBox App: Go to Device > Maintenance to tap Reset, then attach
smartphone withNFCarea to device to complete reset.
For applications requiring detection angle control, such as work station, in
order to prevent
accidental detection of people around the station, please paste the blocking
stickers on the sensor along the bottom of the PIR lens for range shielding.
Each sticker can cover about a180°range. After paste the stickers along the
bottom of the lens and wrapping the sensor 360°, the detection area has
changed to 70° Horizontal, 60° Vertical.
Note: The detection area may be affected by manual pasting, potentially
introducing errors.
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 withscr ews on it, then install back the device.
Note:
- Adjust the installation direction according to detection area requirement.
- WS202 can be mounted on a wall or ceiling. It’s recommended to install at 1.5~2.5mfromthefloor.
- Ensure the detection area does not have moving objects like waving trees and fans.
- Ensure the detection area is not blocked by
Device Payload
All data are based on the following format (HEX), the Data field should follow little-endian:
Channel1 | 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 of 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 | |
0a (Software Version) | 01 14 => V1.14 | |
0b (Power On) | Device is on | |
0f (Device Type) | 00: Class A, 01: Class B, 02: Class C |
Example:
ff0bff ff0101 ff086538b2232131 ff090100 ff0a0101 ff0f00
Channel| Type| Value| Channel| Type| Value
ff| 0b(Power On)| ff (Reserved)| ff| 01(Protocol Version)| 01 (V1)
Channel| Type| Value| Channel| Type| Value
ff| 08(DeviceSN)| 6538b2232131| ff| 09(Hardware version)| 0100(V1.0)
Channel| Type| Value| Channel| Type| Value
ff| 0a (Softwareversion)| 0101 (V1.1)| ff| 0f (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/light status changes. Besides, when battery level is lower than
10%, it will uploadbattery packet once.
Channel | Type | Description |
---|---|---|
01 | 75 (Battery Level) | UINT8, Unit: % |
03 | 00 (PIR Status) | 01: Occupied00: Vacant |
04 | 00 (Light Status) | 01: Bright00: Dark |
Example:
Channel | Type | Value | Channel | Type | Value |
---|---|---|---|---|---|
01 | 75 (Battery) | 64 => 100% | 03 | 00 (PIR Status) | 01=> Occupied |
Channel | Type | Value | |||
04 | 00 (LightStatus) | 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 |
10 (Reboot) | ff (Reserved) |
Example:
-
Set reporting interval as 20 minutes
ff03b004Channel| Type| Value
ff| 03 (Set Reporting Interval)| b0 04 => 04 b0 = 1200s= 20 minutes -
Reboot the device
ff10ffChannel| Type| Value
ff| 10 (Reboot)| ff (Reserved)