DRAGINO DRA LWL02 User guide

www.dragino.com
LoRaWAN Water Leak Sensor User Manual 1 / 25
LWL02 – LoRaWAN Door Sensor User Manual
Document Version: 1.2
Image Version: v1.3
Version
Description
Date
1.0
Release
2021-May-16
1.1
Fix payload description error
2021-Jun-3
1.2
Add More Battery Description
2021-Jul-1
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 2 / 25
1. Introduction .............................................................................................................................. 4
1.1 What is LWL02 LoRaWAN Door Sensor ...................................................................................... 4
1.2 Features ...................................................................................................................................... 5
1.3 Applications ................................................................................................................................ 5
1.4 Dimension ................................................................................................................................... 5
1.5 Firmware Change log ................................................................................................................. 5
2. Power ON LWL02 ...................................................................................................................... 6
3. How to install LWL02................................................................................................................. 6
4. Operation Mode ....................................................................................................................... 7
4.1 How it works? ............................................................................................................................. 7
4.2 Example to join LoRaWAN network ............................................................................................ 7
4.3 Uplink Payload .......................................................................................................................... 12
4.4 Downlink Payload ..................................................................................................................... 13
4.5 Integrate with Datacake ........................................................................................................... 16
4.6 Alarm Base on Timeout ............................................................................................................ 19
4.7 LEDs .......................................................................................................................................... 20
5. Battery & How to replace ........................................................................................................ 21
5.1 Battery Type and replace .......................................................................................................... 21
5.2 Power Consumption Analyze .................................................................................................... 21
6. Use AT Command .................................................................................................................... 23
6.1 Access AT Command ................................................................................................................. 23
7. FAQ ......................................................................................................................................... 24
7.1 How to upgrade the image? ..................................................................................................... 24
7.2 How to change the LoRa Frequency Bands/Region? ................................................................ 24
7.3 Can I disable uplink for each event to save battery life? .......................................................... 24
8. Order Info ............................................................................................................................... 25
9. Packing Info ............................................................................................................................ 25
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 3 / 25
10. Support .............................................................................................................................. 25
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 4 / 25
1. Introduction
1.1 What is LWL02 LoRaWAN Door Sensor
The Dragino LWL02 is a LoRaWAN Water Sensor. When there is water between the two metal probes, LWL02 indicates a water leak event and uplink to IoT server via LoRaWAN network.
LWL02 is powered by 2 x AAA batteries and target for long time use, these two batteries can provide about 16,000 ~ 70,000 uplink packets, which result in 2 ~ 10 years battery life. After battery running out, user can easily open the enclosure and replace with 2 common AAA batteries.
The LWL02 will send periodically data every day as well as for each water leak event. It also counts the water leak times and calculate last water leak duration. User can also disable the uplink for each water leak event, instead, device can count each event and uplink periodically.
Each LWL02 is pre-load with a set of unique keys for LoRaWAN registration, register these keys to LoRaWAN server and it will auto connect after power on.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 5 / 25
1.2 Features
LoRaWAN Class A v1.0.3 Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864 SX1262 LoRa Core Water Leak detect 2 x AAA LR03 Batteries AT Commands to change parameters Uplink on periodically and open/close action Remote configure parameters via LoRa Downlink Firmware upgradable via program port
1.3 Applications
Smart Buildings & Home Automation Logistics and Supply Chain Management Smart Metering Smart Agriculture Smart Cities Smart Factory
1.4 Dimension
1.5 Firmware Change log
LWL02 use the same firmware as LDS01.
LWL02 Image files – Download link
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 6 / 25
2. Power ON LWL02
When receive the LWL02, please open the enclosure and add 2 x AAA batteries to power it. The
LED will blink when device is powered.
3. How to install LWL02
When install the LWL02 on wall. Please install as below so the water leak probe will be soak in water for water detect purpose. The LWL02 main body is not water proof. Please don’t let water go inside the LWL02 main body.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 7 / 25
4. Operation Mode
4.1 How it works?
The LWL02 is configured as LoRaWAN OTAA Class A mode by default. It has OTAA keys to join network. To connect a local LoRaWAN network, user just need to input the OTAA keys in the network server and power on the LWL02. It will auto join the network via OTAA.
In case user can’t set the OTAA keys in the network server and has to use the existing keys from server. User can use AT Command to set the keys in the devices.
4.2 Example to join LoRaWAN network
Here shows an example for how to join the TTN V3 Network. Below is the network structure, we use LG308 as LoRaWAN gateway here.
The LWL02 has water leak detect probe as above. When there is water between these two detect probe, they will be short and generate the water leak event. and send the status to LoRaWAN server. The LWL02 will uplink two type of messages to the server.
A keep-alive message which send once per day. An emergency event message when detect a water leak. (Alarm event can be disabled) A periodically update at every 10 minutes when in water leak. A message when switch from water leak to none water leak. (Alarm event can be disabled)
The LG308 is already set to connect to TTN V3 network . What we need to now is only configure the TTN V3: Step 1: Create a device in TTN V3 with the OTAA keys from LWL02. Each LWL02 is shipped with a sticker with unique device EUI:
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 8 / 25
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 9 / 25
User can enter this key in their LoRaWAN Server portal. Below is TTN V3 screen shot: Add APP EUI in the application.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 10 / 25
LWL02 and LWL01 use the same payload structure. So choose LWL01 as the model here.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 11 / 25
You can also choose to create the device manually.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 12 / 25
Add APP KEY and DEV EUI
Step 2: Power on LWL02 and it will auto join to the TTN V3 network. After join success, it will start to upload message to TTN V3 and user can see in the panel.
4.3 Uplink Payload
Uplink Payload total 9 bytes.
Size(bytes)
2 1 3
3
value
Status&BAT
MOD Always:0x02
Total water leak events
Last water leak duration (unit: min)
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 13 / 25
Example:
Example Payload Decoder in TTN V3:
http://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LDS01/Payload/
4.4 Downlink Payload
Downlink Control Type
Type Code
Downlink payload size(bytes)
TDC (Transmit Time Interval—Keep Alive Interval)
0x01
4
RESET
0x04
2
Set confirmed mode
0x05
2
Clear Counting
0xA6
2
Enable/Disable Alarm
0xA7
2
Control ADR/DR
0xA8
3
Set Alarm Timeout
0xA9
4
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 14 / 25
Example Downlink payload setting in TTN V3:
Type Code 0x01
If the payload=0100003C, means to control the LWL02’s Keep Alive interval to 0x00003C=60(S)
Type Code 0x04
If payload = 0x04FF, it will reset the LWL02.
Type Code 0x05
0x05 00: Set uplink to LoRaWAN unconfirmed mode 0x05 01: Set uplink to LoRaWAN confirmed mode
Type Code 0xA6
Example: 0xA601: Clear Counting For LWL02: reset both count number and time.
Type Code 0xA7
0xA7 01 : Equal to AT+DISALARM=1 0xA7 00 : Equal to AT+DISALARM=0
Type Code 0xA8
Format: 0xA8 aa bb aa: 1: Enable ADR; 0: Disable ADR (Same as AT+CADR command) bb: set DR (Same as AT+CDATARATE ,only valid after ADR=0) Example: 0x A8 00 02 : Set ADR=0 and DR=1
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 15 / 25
Type Code 0xA9
See Alarm Base Timeout for detail.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 16 / 25
4.5 Integrate with Datacake
Datacake provides a human friendly interface to show the sensor data, once we have data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:
Step 1: Be sure that your device is programmed and properly connected to the network at this time. Step 2: To configure the Application to forward data to Datacake you will need to add integration. To add the Datacake integration, perform the following steps:
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 17 / 25
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 18 / 25
Step 3: Create an account or log in Datacake. Step 4: Search LWL02 and add DevEUI.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 19 / 25
4.6 Alarm Base on Timeout
LWL02 can monitor the timeout for a status change, this feature can be used to monitor some event such as open fridge too long etc.
User configure this feature by using:
AT Command to configure:
AT+TTRIG=1,30 When status change from close to open, and device keep in open
status for more than 30 seconds. LWL02 will send an uplink packet, the Alarm bit (the lowest bit of 10th byte of payload) on this uplink packet is set to 1.
AT+TTIG=0,0 Default Value, disable timeout Alarm.
Downlink Command to configure:
Command: 0xA9 aa bb cc A9: Command Type Code aa: status to be monitor bb cc: timeout.
If user send 0xA9 01 00 1E: equal to AT+TTRIG=1,30 Or 0xA9 00 00 00: Equal to AT+TTRIG=0,0. Disable timeout Alarm.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 20 / 25
4.7 LEDs
Action
LED behavior
Power On
GREEN on 1s, RED on 1s, BLUE on 1s
Joined successful
GRENN LED on 5s
Send an uplink message
GREEN LED blinks once
Got a downlink message
BLUE LED blinks once
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 21 / 25
5. Battery & How to replace
5.1 Battery Type and replace
LWL02 is equipped with 2 x AAA LR03 batteries. If the batteries running low(see 2.1v in the platform). User can buy generic AAA battery and replace it. Note:
1) The LWL02 doesn’t have any screw, use can use nail to open it by the middle.
2) Make sure the direction is correct when install the AAA batteries.
Important Notice: Make sure use new AAA LR03 battery and the battery doesn’t have broken surface.
Example of AAA LR03 batter:
5.2 Power Consumption Analyze
Dragino battery powered product are all runs in Low Power mode. We have an update battery calculator which base on the measurement of the real device. User can use this calculator to check the battery life and calculate the battery life if want to use different transmit interval.
Instruction to use as below:
Step 1: Downlink the up-to-date DRAGINO_Battery_Life_Prediction_Table.xlsx from:
https://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/Battery_Analyze/
Step 2: Open it and choose
Product Model Uplink Interval Working Mode
And the Life expectation in difference case will be shown on the right.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 22 / 25
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 23 / 25
6. Use AT Command
6.1 Access AT Command
LWL02 supports AT Command set. User can use a USB to TTL adapter to configure LWL02 via use AT command, as below.
USB to TTL <- -> LWL02 RX <- -> TX TX <- -> RX GND <- -> GND
In PC, User needs to set serial tool(such as putty, SecureCRT) baud rate to 115200 to access to access serial console of LWL02. Below is the output for reference: The AT Access password is 123456.
Each AT Command need to add an ENTER at the end before send.
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 24 / 25
When entering the first command, the RED LED will on and user can now input AT Commands. After input all needed AT Commands, please input AT+CLPM=1 to set the device to work in Low Power mode and RED LED will be off.
More detail AT Command manual can be found at AT Command Manual
7. FAQ
7.1 How to upgrade the image?
User can upgrade the firmware of LWL02 for bug fix, new features, or change working region. The upgrade instruction is here:
http://wiki.dragino.com/index.php?title=Firmware_Upgrade_Instruction
7.2 How to change the LoRa Frequency Bands/Region?
If user has for example US915 frequency and want to change it to AS923 frequency. User can follow the introduction for how to upgrade image. When download the images, choose the required image file for download.
7.3 Can I disable uplink for each event to save battery life?
Yes, User can use below method to disable this:
via AT Command:
AT+DISALARM=1, End node will only send packet in TDC time. AT+DISALARM=0, End node will send packet in TDC time or status change for door sensor.
via LoRaWAN downlink Command:
0xA701 : Equal to AT+DISALARM=1 0xA700 : Equal to AT+DISALARM=0
www.dragino.com
LoRaWAN Water Leak Sensor User Manual 25 / 25
8. Order Info
Part Number: LWL02-XXX
XXX:
EU433: frequency bands EU433 EU868: frequency bands EU868 KR920: frequency bands KR920 CN470: frequency bands CN470 AS923: frequency bands AS923 AU915: frequency bands AU915 US915: frequency bands US915 IN865: frequency bands IN865 CN779: frequency bands CN779
9. Packing Info
Package Includes:
LWL02 x 1
Dimension and weight:
Device Size: 69.2 x 29.2 x 14.8 mm
10. Support
Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different
timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule.
Provide as much information as possible regarding your enquiry (product models, accurately
describe your problem and steps to replicate it etc) and send a mail to
support@dragino.com
Loading...