image-20240109094306-3.png

Table of Contents:

1. Introduction

1.1 What is WL03A-LB/LS LoRaWAN None-Position Rope Type Water Leak Controller

The Dragino WL03A-LB/LS is a LoRaWAN None-Position Rope Type Water Leak Controller. User can lay the WL03A-LB/LS + Water Leak Cable on the ground to detect water leakage. The water leak cable is sensitivity, when there is water over the leak cable. WL03A-LB/LS will indicates a water leak event and uplink to IoT server via LoRaWAN network.

The WL03A-LB/LS will send periodically data every 2 hours as well as for each water leak event. It also counts the water leak times and calculate last water leak duration.

WL03A-LB/LS supports BLE configure and wireless OTA update which make user easy to use.

WL03A-LB/LS is powered by 8500mAh Li-SOCI2 battery or solar powered + li-on battery, it is designed for long term use up to 5 years.

Each WL03A-LB/LS is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on.

image-20230606092025-1.png

1.2 ​Features

  • LoRaWAN 1.0.3 Class A
  • Ultra-low power consumption
  • Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
  • Water Leak detect
  • Support Bluetooth v5.1 and LoRaWAN remote configure
  • Support wireless OTA update firmware
  • Uplink on periodically
  • Downlink to change configure
  • 8500mAh Li/SOCl2 Battery (WL03A-LB)
  • Solar panel + 3000mAh Li-on battery (WL03A-LS)

1.3 Specification

Common DC Characteristics:

  • Supply Voltage: Built-in Battery , 2.5v ~ 3.6v
  • Operating Temperature: -40 ~ 85°C

LoRa Spec:

  • Frequency Range,  Band 1 (HF): 862 ~ 1020 Mhz
  • Max +22 dBm constant RF output vs.
  • RX sensitivity: down to -139 dBm.
  • Excellent blocking immunity

Battery:

  • Li/SOCI2 un-chargeable battery
  • Capacity: 8500mAh
  • Self-Discharge: <1% / Year @ 25°C
  • Max continuously current: 130mA
  • Max boost current: 2A, 1 second

Power Consumption

  • Sleep Mode: 5uA @ 3.3v
  • LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm

1.4  ​Applications

  • Smart Buildings & Home Automation
  • Smart Cities
  • Smart Factory

1.5 Sleep mode and working mode

Deep Sleep Mode: Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life.

Working Mode: In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode.

1.6 Button & LEDs

image-20240103160425-4.png

Behavior on ACTFunctionAction
Pressing ACT between 1s < time < 3sSend an uplink

If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, blue led will blink once.
Meanwhile, BLE module will be active and user can connect via BLE to configure device.

Pressing ACT for more than 3sActive Device

Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to JOIN LoRaWAN network.
Green led will solidly turn on for 5 seconds after joined in network.
Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network.

Fast press ACT 5 times.Deactivate DeviceRed led will solid on for 5 seconds. Means device is in Deep Sleep Mode.

1.7 BLE connection

WL03A-LB/LS support BLE remote configure.

BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:

  • Press button to send an uplink
  • Press button to active device.
  • Device Power on or reset.

If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.

1.8 Pin Definitions

image-20230613144156-1.png

1.9 Mechanical

1.9.1 for LB version

image-20240109095455-4.png

1.9.2 for LS version

image-20231231203439-3.png

1.10  Installation

image-20230522111349-3.png

image-20230522112514-4.png

2. Configure WL03A-LB/LS to connect to LoRaWAN network

2.1 How it works

The WL03A-LB/LS is configured as LoRaWAN OTAA Class A mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the WL03A-LB/LS. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 2 hours.

2.2 ​Quick guide to connect to LoRaWAN server (OTAA)

Following is an example for how to join the TTN v3 LoRaWAN Network. Below is the network structure; we use the LPS8v2  as a LoRaWAN gateway in this example. 

The LPS8v2 is already set to connected to TTN network , so what we need to now is configure the TTN server.

image-20230606092116-2.png

Step 1: Create a device in TTN with the OTAA keys from WL03A-LB/LS.

Each WL03A-LB/LS is shipped with a sticker with the default device EUI as below:

图片-20230426084152-1.png

You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:

Register the device

1654935135620-998.png

Add APP EUI and DEV EUI

图片-20220611161308-4.png

Add APP EUI in the application

图片-20220611161308-5.png

Add APP KEY

图片-20220611161308-6.png

Step 2: Activate on WL03A-LB/LS

Press the button for 5 seconds to activate the WL03A-LB/LS.

Green led will fast blink 5 times, device will enter OTA mode for 3 seconds. And then start to JOIN LoRaWAN network. Green led will solidly turn on for 5 seconds after joined in network.

After join success, it will start to upload messages to TTN and you can see the messages in the panel.

2.3 ​Uplink Payload

2.3.1 Device Status, FPORT=5

Include device configure status. Once WL03A-LB/LS Joined the network, it will uplink this message to the server. After that, WL03A-LB/LS will uplink Device Status every 12 hours.

Users can also use the downlink command(0x26 01) to ask WL03A-LB/LS to resend this uplink. This uplink payload also includes the DeviceTimeReq to get time.

The Payload format is as below.

Device Status (FPORT=5)
Size (bytes)12112
ValueSensor ModelFirmware VersionFrequency BandSub-bandBAT

Example parse in TTNv3

image-20230609173750-1.png

Sensor Model: For WL03A-LB/LS, this value is 0x1D

Firmware Version: 0x0100, Means: v1.0.0 version

Frequency Band:

0x01: EU868

0x02: US915

0x03: IN865

0x04: AU915

0x05: KZ865

0x06: RU864

0x07: AS923

0x08: AS923-1

0x09: AS923-2

0x0a: AS923-3

0x0b: CN470

0x0c: EU433

0x0d: KR920

0x0e: MA869

Sub-Band:

AU915 and US915:value 0x00 ~ 0x08

CN470: value 0x0B ~ 0x0C

Other Bands: Always 0x00

Battery Info:

Check the battery voltage.

Ex1: 0x0B45 = 2885mV

Ex2: 0x0B49 = 2889mV

2.3.2  Sensor Configuration, FPORT=4

WL03A-LB/LS will only send this command after getting the downlink command (0x26 02) from the server.

 Size(bytes)31121
ValueTDC (unit: sec)DisalarmKeep statusKeep time (unit: sec)Leak alarm time

Example parse in TTNv3

image-20230609174124-4.png

  • TDC: (default: 0x001C20)

Uplink interval for the Leak/No leak Event, default value is 0x001C20 which is 7200 seconds = 2 hours.

  • Disalarm: (default: 0)

 If Disalarm = 1, WL03A-LB/LS will only send uplink at every TDC periodically. This is normally use for pulse meter application, in this application, there are many Leak/No leak event, and platform only care about the total number of pulse.

 If Disalarm = 0, WL03A-LB/LS will send uplink at every TDC periodically and send data on each Leak/No leak event. This is useful for the application user need to monitor the Leak/No leak event in real-time.

 Note: When Disalarm=0, a high frequently Leak/No leak event will cause lots of uplink and drain battery very fast. 

  • Keep Status & Keep Time

Shows the configure value of Alarm Base on Timeout Feature

  • Leak alarm time

Regularly update a confirm uplink when water leaks, default value is 0x0A which is 10 minutes. 

2.3.3  Real-Time Open/Close Status, Uplink FPORT=2

WL03A-LB/LS will send this uplink after Device Status once join the LoRaWAN network successfully. And WL03A-LB/LS will:

1. periodically send this uplink every 2 hours, this interval can be changed.

2. There is an Leak/No leak event. 

Uplink Payload totals 11 bytes.

Real-Time Open/Close Status, FPORT=2
Size(bytes)1334
ValueStatus & AlarmTotal leak events

Last leak
duration (unit: sec)

Unix TimeStamp

Status & Alarm:

Size(bit)[bit5:bit4]bit3bit2bit1bit0
ValueReserve

Count mod

TDC flag 0:No;1:Yes

Alarm 0: No Alarm;1: Alarm

Status 0: No leak, 1: leak

Example parse in TTNv3

image-20230613133957-1.png

  • Count mod:Default=0

0 : Uplink total leak times since factory

1:  Uplink total leak times since last FPORT=2 uplink. 

  • TDC flag

When the flag is 1, it means sending packets at normal time intervals.

Otherwise, it is a packet sent at non-TDC time. 

  • Alarm

See Alarm Base on Timeout

  • Status

This bit is 1 when the leak sensor is leak and 0 when it is no leak. 

  • Total leak events

Total pulse/counting base on leak.

Range (3 Bytes) : 0x000000 ~ 0xFFFFFF . Max: 16777215

  • Last leak duration

Leak sensor last leak duration.

Unit: sec.

image-20230701102155-1.png

2.3.4  Historical Water Leak/No leak Event, FPORT=3

WL03A-LB/LS stores sensor values and users can retrieve these history values via the downlink command.

The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time leak/no leak status.

Real-Time Open/Close Status, FPORT=3
Size(bytes)1334
ValueStatus & AlarmTotal leak events

Last leak
duration (unit: sec)

Unix TimeStamp

Status & Alarm:

Size(bit)bit7bit6[bit5:bit4]bit3bit2bit1bit0
ValueReservePoll Message FlagReserve

Count mod

TDC flag 0:No;1:Yes

Alarm 0: No Alarm;1: Alarm

Status 0: No leak, 1: leak
  • Each data entry is 11 bytes and has the same structure as Real-Time open/close status, to save airtime and battery, WL03A-LB/LS will send max bytes according to the current DR and Frequency bands.

For example, in the US915 band, the max payload for different DR is:

1. DR0: max is 11 bytes so one entry of data

2. DR1: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)

3. DR2: total payload includes 11 entries of data

4. DR3: total payload includes 22 entries of data.

If WL03A-LB/LS doesn't have any data in the polling time. It will uplink 11 bytes of 0

image-20230626112117-1.png

Access via serial port:

image-20230626112140-2.png

Downlink:

0x31 64 99 01 10 64 99 01 4C 05

Uplink:

44 00 00 04 00 00 00 64 99 01 1C 41 00 00 05 00 00 00 64 99 01 23 40 00 00 05 00 00 08 64 99 01 2B 4B 00 00 06 00 00 08 64 99 01 42 48 00 00 00 00 00 12 64 99 01 4A

Parsed Value:

[COUNTMOD,TDC_FLAG,ALARM, WATER_LEAK_STATUS, WATER_LEAK_TIMES, LAST_WATER_LEAK_DURATION, TIME]

[SUM,YES,FALSE,NO LEAK,4,0,2023-06-26 03:08:12],

[SUM,NO,FALSE,LEAK       ,5,0,2023-06-26 03:08:19],

[SUM,NO,FALSE,NO LEAK,5,8,2023-06-26 03:08:27],

[PART,NO,TRUE,LEAK       ,6,8,2023-06-26 03:08:50],

[PART,NO,FALSE,NO LEAK,0,18,2023-06-26 03:08:58],

 

2.4 Payload Decoder file

In TTN, user can add a custom payload so it shows friendly reading

In the page Applications --> Payload Formats --> Custom --> decoder to add the decoder from: dragino-end-node-decoder/WL03A-LB at main · dragino/dragino-end-node-decoder (github.com)

2.5 Datalog Feature

Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, WL03A-LB/LS will store the reading for future retrieving purposes.

Note:After the device is reset, in cumulative counting mode, the last stored leak count value will be read as the initial value.

2.5.1  Unix TimeStamp

WL03A-LB/LS use Unix TimeStamp format based on

image-20220609113256-8.png

Users can get this time from the link:  https://www.epochconverter.com/ :

Below is the converter example

image-20220609113256-9.png

So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan -- 29 Friday 03:03:25

2.5.2  Set Device Time

There are two ways to set the device's time:

1.  Through LoRaWAN MAC Command (Default settings)

Users need to set SYNCMOD=1 to enable sync time via the MAC command.

Once WL03A-LB/LS Joined the LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to WL03A-LB/LS. If WL03A-LB/LS fails to get the time from the server, WL03A-LB/LS will use the internal time and wait for the next time request [via Device Status (FPORT=5)].

Note: LoRaWAN Server needs to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature.

2.  Manually Set Time

Users need to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten by the time set by the server.

2.6 ​Show Data in DataCake IoT Server

 

Datacake IoT platform provides a human-friendly interface to show the sensor data, once we have sensor data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:

Step 2: Configure WL03A-LB/LS in Datacake.

image-20221102092921-1.png

image-20221102092921-2.png

image-20221102092921-3.png

image-20221102092921-4.png

image-20221102092921-5.png

image-20221102092921-6.png

image-20221102092921-7.png

image-20221102092921-8.png

image-20221102092921-9.png

1667352851343-365.png

2.7 Frequency Plans

The WL03A-LB/LS uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country.

http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/

3. Configure WL03A-LB/LS

3.1 Configure Methods

WL03A-LB/LS supports below configure method:

3.2 General Commands

These commands are to configure:

  • General system settings like: uplink interval.
  • LoRaWAN protocol & radio related command.

They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:

http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/

3.3 Commands special design for WL03A-LB/LS

These commands only valid for WL03A-LB/LS, as below:

3.3.1 Set Transmit Interval Time

Feature: Change LoRaWAN End Node Transmit Interval.

AT Command: AT+TDC

Command ExampleFunctionResponse
AT+TDC=?Show current transmit Interval

30000
OK
the interval is 30000ms = 30s

AT+TDC=60000Set Transmit Interval

OK
Set transmit interval to 60000ms = 60 seconds

Downlink Command: 0x01

Format: Command Code (0x01) followed by 3 bytes time value.

If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.

  • Example 1: Downlink Payload: 0100001E       //  Set Transmit Interval (TDC) = 30 seconds
  • Example 2: Downlink Payload: 0100003C       //  Set Transmit Interval (TDC) = 60 seconds

3.3.2 Set Power Output Duration

Control the output duration 5V . Before each sampling, device will

1. first enable the power output to external sensor,

2. keep it on as per duration, read sensor value and construct uplink payload

3. final, close the power output.

AT Command: AT+5VT

Command ExampleFunctionResponse
AT+5VT=?Show 5V open time.0 (default)
OK
AT+5VT=1000Close after a delay of 1000 milliseconds.OK

Downlink Command: 0x07

Format: Command Code (0x07) followed by 2 bytes.

The first and second bytes are the time to turn on.

  • Example 1: Downlink Payload: 070000     --->   AT+5VT=0
  • Example 2: Downlink Payload: 0701F4      --->  AT+5VT=500

3.3.3 Enable / Disable Alarm

Feature: Enable/Disable Alarm for open/close event. Default value 0.

AT Command:

Command ExampleFunctionResponse
AT+DISALARM=1End node will only send packet in TDC time.OK
AT+DISALARM=0End node will send packet in TDC time or status change for water leak sensorOK

Downlink Command:

0xA7 01     // Same As AT+DISALARM=1

0xA7 00     // Same As AT+DISALARM=0

3.3.4 Set system time

Feature: Set system time, Unix format. See here for format detail.

AT Command:

Command ExampleFunctionResponse
AT+TIMESTAMP=1611104352Set System time to 2021-01-20 00:59:12OK

Downlink Command:

0x306007806000      // Set timestamp to 0x(6007806000),Same as AT+TIMESTAMP=1611104352

3.3.5 Set Time Sync Mode

Feature: Enable/Disable Sync system time via LoRaWAN MAC Command (DeviceTimeReq), LoRaWAN server must support v1.0.3 protocol to reply to this command.

SYNCMOD is set to 1 by default. If user wants to set a different time from the LoRaWAN server, the user needs to set this to 0.

AT Command:

Command ExampleFunctionResponse
AT+SYNCMOD=1Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) The default is zero time zone.OK
AT+SYNCMOD=1,8Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to East eight time zone.OK
AT+SYNCMOD=1,-12Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to West Twelve Time Zone.OK

Downlink Command:

0x28 01           // Same As AT+SYNCMOD=1

0x28 01 08      // Same As AT+SYNCMOD=1,8

0x28 01 F4      // Same As AT+SYNCMOD=1,-12

0x28 00           // Same As AT+SYNCMOD=0

3.3.6 Alarm Base on Timeout

WL03A-LB/LS can monitor the timeout for a status change, this feature can be used to monitor some events such as door opening too long etc.

User configure this feature by using:

AT Command to configure:

  • AT+TTRIG=1,30   --> When status change from no leak to leak, and device keep in leak status for more than 30 seconds. WL03A-LB/LS will send an uplink packet, the Alarm bit (the second bit of 1st byte of payload) on this uplink packet is set to 1.
  • AT+TTRIG=0,30   --> When status change from leak to no leak, and device keep in no leak status for more than 30 seconds. WL03A-LB/LS will send an uplink packet, the Alarm bit (the second bit of 1st byte of payload) on this uplink packet is set to 1.
  • AT+TTRIG=0,0     -->  Default Value, disable timeout Alarm.

Downlink Command to configure:

Command: 0xA9 aa bb cc

A9: Command Type Code

aa: status to be monitored

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.

3.3.7 The working mode of the total water leakage event

AT Command to configure:

  • AT+COUNTMOD=0 --> Default Value, Total leak events since factory.
  • AT+COUNTMOD=1 --> Total leak events since last TDC uplink.

Downlink Command to configure:

Command: 0x0B aa

0B: Command Type Code

aa: mod

If user send 0x0B 01: equal to AT+COUNTMOD=1

Or

0x0B 00: Equal to AT+COUNTMOD=0

3.3.8 Regularly update a confirm uplink when water leaks

AT Command to configure:

  • AT+LEAKALARM=10 --> Default Value, A periodically update at every 10 minutes when in water leak.
  • AT+LEAKALARM=0   --> Disable a periodically update when in water leak.

Downlink Command to configure:

Command: 0x0C aa

0C: Command Type Code

aa: uplink interval

If user send 0x0C 0A: equal to AT+LEAKALARM=10

Or

0x0C 00: Equal to AT+LEAKALARM=0.

3.3.9 Delay time for state changes to take effectEdit

AT Command to configure:

  • AT+DETEDELAY=50 --> Default Value, Set state change, valid signal is 50ms.
  • AT+DETEDELAY=0   --> Disable valid signal detection..

Downlink Command to configure:

Command: 0x0D aa bb

0D: Command Type Code

aa bb: timeout

If user send 0x0D 00 32: equal to AT+DETEDELAY=50

Or

0x0D 00 00: Equal to AT+DETEDELAY=0.

3.3.10 Clear the leak count and the duration of the last leak

AT Command:

Command ExampleFunctionResponse
AT+CLRCclear the leak count and the duration of the last leak.OK

Downlink Payload:  0xA6 01

The sensor will clear the leak count and the duration of the last leak.

3.3.11 Set the count value of the number of leaks

AT Command:

Command ExampleFunctionResponse
AT+SETCNT=100Set the leak count value to 100OK

Downlink Payload:  

0xA5 00 00 64    //Set the leak count value to 100

4. Battery & Power Consumption

WL03A-LB use ER26500 + SPC1520 battery pack and WL03A-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace.

Battery Info & Power Consumption Analyze .

5. OTA Firmware update

User can change firmware WL03A-LB/LS to:

  • Change Frequency band/ region.
  • Update with new features.
  • Fix bugs. 

Firmware and changelog can be downloaded from : Firmware download link

Methods to Update Firmware:

6. FAQ

7. Order Info

Notice: WL03A-LB/LS includes a one meter water leak cable, If user want to extend the lenght, please choose Water Leak Cable DR-WLN-XX.

Water Leak Controller Part Number: WL03A-LB-XX or WL03A-LS-XX

XX

  • 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

Water Leak Cable Part Number: DR-WLN-XX

XX:

  • 1M : 1 meter water leak cable
  • 5M : 5 meters water leak cable
  • 10M: 10 meters water leak cable

8. ​Packing Info

Package Includes:

  • WL03A-LB or WL03A-LS x 1
  • 1 x 1m water lead cable
  • 1 x termination end

Dimension and weight:

  • Device Size: cm
  • Device Weight: g
  • Package Size / pcs : cm
  • Weight / pcs : g

9. 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.cc.
Tags:
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0