Version 100.2 by Mengting Qiu on 2025/07/02 17:38

Show last authors
1 [[image:image-20250207150946-1.jpeg||data-xwiki-image-style-alignment="center" height="553" width="553"]]
2
3
4
5
6
7
8
9
10 **Table of Contents:**
11
12 {{toc/}}
13
14
15
16
17
18
19
20
21
22 = 1. Introduction =
23
24 == 1.1 What is the LWL02 LoRaWAN Water Leak Sensor ==
25
26
27 The Dragino LWL02 is a (% style="color:#4f81bd" %)**LoRaWAN Water Leak Sensor**(%%) equipped with two external metal probes. When water is detected between the two metal probes, the LWL02 identifies a water leak and sends an uplink to the registered LoRaWAN network server.
28
29 The LWL02 is powered by (% style="color:#4f81bd" %)**2 x AAA batteries**(%%) and is designed for long-term use. These two batteries can support approximately 16,000 to 70,000 uplink packets, resulting in a battery life of 2 to 10 years. Once the batteries are depleted, users can easily open the enclosure and replace them with standard AAA batteries.
30
31 The LWL02 sends data periodically every day and also for each water leak event. It records the number of water leak occurrences and calculates the duration of the most recent leak. Users can disable uplinks for each individual water leak event if desired. In this case, the device will count each event and send the data periodically.
32
33 Each LWL02 comes preloaded with a unique set of key/EUIs for LoRaWAN registration. By registering these keys to the LoRaWAN network server, the device will automatically connect upon powering on.
34
35
36
37 == 1.2 Features ==
38
39
40 * **LoRaWAN Class A v1.0.3**
41 * **Frequency Bands:** CN470, EU433, KR920, US915, EU868, AS923, AU915, IN865, RU864
42 * **SX1262 LoRa Core**
43 * **Water Leak Detection**
44 * **2 x AAA LR03 Batteries**
45 * **AT Commands** to change parameters
46 * **Periodic Uplink** and uplink triggered by open/close actions
47 * **Remote Configuration** of parameters via LoRa Downlink
48 * **Firmware Upgradable** via programming port
49
50 == 1.3 Storage & Operation Temperature ==
51
52
53 -10 ~~ 50 °C  or -40 ~~ 60 °C (depending on the battery type; see [[FAQ>>||anchor="H7.6Whyiseedifferentworkingtemperatureforthedevice3F"]])
54
55
56 == 1.4 Applications ==
57
58
59 * Smart Buildings & Home Automation
60 * Logistics and Supply Chain Management
61 * Smart Metering
62 * Smart Agriculture
63 * Smart Cities
64 * Smart Factory
65
66 == 1.5 Dimensions ==
67
68 === 1.5.1 LWL02 terminal node size ===
69
70 [[image:image-20220608143952-2.png]]
71
72
73 [[image:1654670405145-346.png]]
74
75 === 1.5.2 Water leakage detection probe size ===
76
77 * Old version probe
78
79 [[image:1751435918793-943.png||height="303" width="389"]]
80
81 * New version probe
82
83 [[image:1751448024530-653.png]]
84
85
86 == 1.6 Firmware Change log ==
87
88
89 (((
90 The LWL02 uses the same firmware as the LDS01:  [[https:~~/~~/www.dropbox.com/sh/6ls5i0zsvujvbc8/AABe3V5aQXdy7zSxEdEA3DHOa?dl=0>>https://www.dropbox.com/sh/6ls5i0zsvujvbc8/AABe3V5aQXdy7zSxEdEA3DHOa?dl=0]]
91 )))
92
93 == 1.7 Hardware Variant (Since LDWS v2.4 PCB) ==
94
95
96 Starting from the LDWS v2.4 motherboard, we made adjustments to the button and LED light of LWL02, and the corresponding adjustments were also made to the shell at the same time.
97
98
99
100 === 1.7.1 How to identify the old and new versions ===
101
102
103 Check the **external enclosure** for these differences:
104
105 ~1. RESET Button Hole
106
107 * New Version: Larger hole (Corresponding to the position of the RESET button on the motherboard).
108 * Old Version: Smaller hole (The original position of the LED).
109
110 2. LED
111
112 * New Version: Thinner circular area below RESET hole (for LED light transmission).
113 * Old Version: The small hole directly above the shell (Corresponding to the position of the LED on the motherboard).
114
115 3. Arrow Marking
116
117 * New Version: Edge-embossed arrow shape.
118 * Old Version: Fully recessed arrow shape.
119
120 (% style="color:blue" %)**Actual appearance comparison picture:**
121
122 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/image-20250507161458-4.jpeg?width=665&height=456&rev=1.1||alt="image-20250507161458-4.jpeg"]]
123
124
125 === 1.7.2 RESET button & LED Display ===
126
127
128 **1. RESET button**
129
130 Restart the device through the physical reset button.
131
132 It is suitable for rapid restart when the equipment malfunctions (such as communication failure, sensor unresponsiveness).
133
134 * For old version, the RESET button was located inside the device enclosure, requiring the housing to be opened for access.
135 * For new version, the RESET button is located in a small hole in the device's case and can simply be pressed with a thin pin without opening the case.
136
137 Example:
138
139 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/image-20250507172832-6.png?width=274&height=372&rev=1.1||alt="image-20250507172832-6.png"]]
140
141
142 **2. LED display**
143
144 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:463px" %)
145 |=(% style="width: 186px;background-color:#4F81BD;color:white" %)**Action**|=(% style="width: 277px;background-color:#4F81BD;color:white" %)**LED behavior**
146 |(% style="width:184px" %)Power On|(% style="width:275px" %)(% style="color:green" %)**GREEN LED on for 1s, **(% style="color:red" %)**RED LED on for 1s,**(%%)** (% style="color:blue" %)BLUE LED on for 1s(%%)**
147 |(% style="width:184px" %)Joined successfully|(% style="width:275px" %)(% style="color:green" %)**GREEN LED **(%%)on for 5s
148 |(% style="width:184px" %)Send an uplink message|(% style="width:275px" %)(% style="color:green" %)**GREEN LED**(%%) blinks once
149 |(% style="width:184px" %)Receive a downlink message|(% style="width:275px" %)(% style="color:blue" %)**BLUE LED**(%%) blinks once
150
151 = 2. Power on LWL02 =
152
153
154 When you receive the LWL02, open the enclosure and insert 2 AAA batteries to power it on. The [[LED>>||anchor="H4.7LEDs"]] will blink when the device is powered.
155
156
157 = 3. How to Install LWL02 =
158
159
160 **Fixing with screws:**
161
162 * Detach the bottom lid of the enclosure. You will notice two holes on the bottom lid for inserting screws. First, attach the bottom lid to the surface using screws. Then snap the top part of the enclosure onto the bottom. You will hear a clicking sound once they are securely fitted together.
163
164 [[image:image-20231222114059-1.jpeg||height="412" width="624"]]
165
166
167 **Fixing with double-sided adhesive pads:**
168
169 * A double-sided adhesive pad is included with the LWL02. First remove the protective backing of one side only. Then affix it on the bottom of the sensor enclosure. Once the tape is in place, remove the remaining protective backing and secure the enclosure to the surface.
170
171 [[image:image-20231222114211-2.jpeg||height="409" width="613"]]
172
173
174 (((
175 When installing the LWL02 on a wall, please follow the instructions as shown in the image below to ensure the water leak probe is submerged in water for detection purposes. The LWL02 main body is not waterproof, so please avoid allowing water to enter the main body.
176
177
178 )))
179
180 [[image:image-20220608144447-4.png]]
181
182
183 = 4. Operation Mode =
184
185 == 4.1 How It works? ==
186
187
188 (((
189 The LWL02 is configured as a LoRaWAN Class A device by default. It contains a DevEUI, AppEUI, and AppKey, which allow it to join a LoRaWAN network using OTAA (Over-The-Air Activation). To connect the LWL02 to a LoRaWAN network, you need to configure these keys and identifiers with the LoRaWAN network server first, and then [[power on>>||anchor="H2.PowerONLWL02"]] the LWL02. The device will automatically join the network using OTAA. This device information can be found in your package, printed on a sticker.
190
191
192 [[image:image-20230426084834-1.png||height="239" width="515"]]
193
194
195 )))
196
197 (((
198 If you cannot set the device registration information, such as the DevEUI, AppEUI, and AppKey, in the network server, you must use the information generated by the network server, which differs from the information already stored on the device. In this case, you can use [[AT Command>>||anchor="H6.UseATCommand"]] to write the new information to the device.
199 )))
200
201
202 == 4.2 Example to joining a LoRaWAN network ==
203
204
205
206 The following figure shows how the LWL02 connects to [[The Things Stack>>url:https://eu1.cloud.thethings.network/]]. The LWL02 sends messages (uplinks) to The Things Stack via a LoRaWAN gateway (e.g., Dragino LPS8N) and can also receive messages (downlinks) from The Things Stack. The Things Stack can be integrated with ThingsEye, allowing it to forward uplinks to ThingsEye. ThingsEye is an IoT platform used for visualizing and analyzing sensor data. You can also send downlinks from ThingsEye (via The Things Stack) to the LWL02.
207
208
209
210 [[image:lwl02-tts.jpg]]
211
212
213 (((
214 The LWL02 has a water leak detection probe, as shown above. When water is present between the two probes, they will short-circuit and generate a water leak event, sending the status to the LoRaWAN server. The LWL02 uplinks the following types of messages to the server:
215
216 * A keep-alive message, sent once per day.
217 * An emergency event message when a water leak is detected ([[this alarm event can be disabled>>||anchor="H7.3CanIdisableuplinkforeacheventtosavebatterylife3F"]]).
218 * A periodic update every 10 minutes while in a water leak state.
219 * A message when switching from a water leak state to no water leak ([[this alarm event can be disabled>>||anchor="H7.3CanIdisableuplinkforeacheventtosavebatterylife3F"]]).
220
221 === 4.2.1 Setting up ===
222
223 * Sign up for a free account with [[The Things Stack Sandbox>>url:https://eu1.cloud.thethings.network]] if you do not have one yet.
224 * Log in to your **The Things Stack** account.
225 * Create an **application** with The Things Stack if you do not have one yet.
226 ** On the left navigation, click **Applications**.
227 ** Then click **+ Add Application** button.
228
229 [[image:lwl02-4.png]]
230
231 * On the **Create Application **page, configure the following:
232 ** **Application ID**: Provide a unique identification for your application within The Things Stack.
233 ** **Application name**: (optional) Provide a descriptive name.
234 ** **Description**: (optional) Provide a description.
235 * Click on **Create application **button.
236 )))
237
238
239 [[image:lwl02-5.png]]
240
241
242 * Go to the newly created application and click on the **End devices** in the left menu.
243 * On the End devices page, click on **+ Register end device**.
244
245 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/lds02-step-5.png?rev=1.1||alt="lds02-step-5.png"]]
246
247
248 * Two registration options are available:
249 ** Using the LoRaWAN Device Repositoty
250 ** Manual registration
251
252 === 4.2.2 Using the LoRaWAN Device Repository ===
253
254 * On the **Register end device** page:
255 ** Select the option **Select the end device in the LoRaWAN Device Repository **under **Input method**.
256 ** Select the **End device brand**, **Model**, **Hardware version**, **Firmware version**, and **Profile (Region)** from the respective dropdown lists.
257 *** **End device brand**: Dragino Technology Co., Limited
258 *** **Model**: LWL02 - Water Leak Sensor
259 *** **Hardware ver**: Unknown
260 *** **Firmware ver**: 1.6
261 *** **Profile (Region)**: Select the region that matches your device.
262 ** Select the **Frequency plan** that matches your device from the **Frequency plan** dropdown list.
263 ** Enter the **AppEUI** in the **JoinEUI** field and click the **Confirm** button. If The Things Stack accepts the JoinEUI you provided, it will display the message 'This end device can be registered on the network.
264
265 [[image:lwl02-1.png]]
266
267
268
269
270 * In the **DevEUI** field, enter the **DevEUI**.
271 * In the **AppKey** field, enter the **AppKey.**
272 * In the **End device ID** field, enter a unique name for your LWL02 within this application.
273 * Under **After registration**, select the **View registered end device** option.
274 * Click **Register end device** button.
275
276 [[image:lwl02-2.png]]
277
278
279
280 * You will be navigated to the Device overview page.
281
282 [[image:lwl02-3.png]]
283
284
285 * Click on the Live Data tab and then **Power on** the LWL02. It will first join The Things Stack network server. You can confirm this by looking for the Join-request and Join-accept messages. After successfully joining the network, the LWL02 will start sending uplink messages to The Things Stack, and you can see them in the **Live Data** panel.
286
287 [[image:1654681465260-713.png]]
288
289
290 == 4.3 Uplink Payload ==
291
292
293 The uplink payload is a total of 10 bytes.
294
295 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
296 |(% style="background-color:#4f81bd; color:white; width:60px" %)**Size(bytes)**|(% style="background-color:#4f81bd; color:white; width:80px" %)**2**|(% style="background-color:#4f81bd; color:white; width:100px" %)**1**|(% style="background-color:#4f81bd; color:white; width:100px" %)**3**|(% style="background-color:#4f81bd; color:white; width:110px" %)**3**|(% style="background-color:#4f81bd; color:white; width:60px" %)**1**
297 |value|(% style="width:92px" %)Status & BAT|(% style="width:150px" %)(((
298 MOD Always:0x02
299 )))|(% style="width:126px" %)Total_water_leak_events|(% style="width:140px" %)(((
300 Last  water leak duration (unit:min)
301 )))|(% style="width:153px" %)(((
302 Alarm status
303 )))
304
305 === 4.3.1 Battery Info ===
306
307 Check the battery voltage:
308
309 Example 1: 0x0B88&3FFF = 2952mV
310
311 Example 2: 0xD152&3FFF = 4434mV
312
313
314 === 4.3.2 Status ===
315
316 Check the door state:
317
318 **Example**:
319
320 If the payload is: **0B**:  (0000 1011&0100 0000== 0), **DOOR_OPEN_STATUS** is 0(**CLOSE**)
321
322 If the payload is: **D1**: (1101 0001&0100 0000== 1), **DOOR_OPEN_STATUS** is 1(**OPEN**)
323
324
325 === 4.3.3 MOD ===
326
327 Check the working mode (MOD):
328
329 **Example:**
330
331 If the payload is: 02, the MOD is 2.
332
333
334 === 4.3.4 Total_water_leak_events ===
335
336 Get the total number of door open events:
337
338 **Example**:
339
340 If payload is: **00 00 93, **the total is 147 events.
341
342 If payload is: **00 00 00, **the total is 0 events.
343
344
345 === 4.3.5 Last  water leak duration (unit: min) ===
346
347 Get the last door open duration:
348
349 **Example:**
350
351 If the payload is: **00 00 25, **the last door open duration is 37 minutes.
352
353 If payload is: **00 00 01,** the last door open duration is 1 minute.
354
355
356 === 4.3.6 Alarm ===
357
358 Get alarm status.
359
360 **Example:**
361
362 If the payload is: 01:  (0001 & 0001== 1), the alarm status is 1
363
364 If the payload is: 00:  (0000 & 0001== 0), the alarm status is 0
365
366
367
368 **Example:**
369
370 [[image:1654672186477-234.png]]
371
372
373 (((
374 The **payload decoder** for The Things Stack can be downloaded from:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder/tree/main/LWL02]]
375 )))
376
377
378 == 4.4 Downlink Payload ==
379
380
381 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:505px" %)
382 |=(% style="width: 182px;background-color:#4F81BD;color:white" %)**Downlink Control Type**|=(% style="width: 96px;background-color:#4F81BD;color:white" %)**Type Code**|=(% style="width: 227px;background-color:#4F81BD;color:white" %)**Downlink payload size(bytes)**
383 |(% style="width:180px" %)TDC (Transmit Time Interval—Keep Alive Interval)|(% style="width:80px" %)0x01|(% style="width:150px" %)4
384 |(% style="width:180px" %)RESET|(% style="width:80px" %)0x04|(% style="width:224px" %)2
385 |(% style="width:180px" %)[[Set confirmed mode>>||anchor="HTypeCode0x05"]]|(% style="width:80px" %)0x05|(% style="width:150px" %)2
386 |(% style="width:180px" %)[[Clear Counting>>||anchor="HTypeCode0xA6"]]|(% style="width:80px" %)0xA6|(% style="width:150px" %)2
387 |(% style="width:180px" %)[[Enable/Disable Alarm>>||anchor="HTypeCode0xA7"]]|(% style="width:80px" %)0xA7|(% style="width:150px" %)2
388 |(% style="width:180px" %)[[Control ADR/DR>>||anchor="HTypeCode0xA8"]]|(% style="width:80px" %)0xA8|(% style="width:150px" %)3
389 |(% style="width:180px" %)[[Set Alarm Timeout>>||anchor="HTypeCode0xA9"]]|(% style="width:80px" %)0xA9|(% style="width:150px" %)4
390
391 The following image illustrates how to send a downlink payload from The Things Stack.
392
393 [[image:1654673412319-976.png]]
394
395
396 === (% style="color:#037691" %)**Type Code 0x01**(%%) ===
397
398 For example, if the payload is **0100003C**, the LWL02's Keep Alive interval is set to **0x00003C (60 seconds)**.
399
400
401 === (% style="color:#037691" %)**Type Code 0x04**(%%) ===
402
403 For example, if the payload is **0x04FF**, it **resets** the LWL02.
404
405
406 === (% style="color:#037691" %)**Type Code 0x05**(%%) ===
407
408 * The payload **0x05 00** sets the uplink to LoRaWAN **unconfirmed** mode.
409 * The payload **0x05 01** sets the uplink to LoRaWAN **confirmed** mode
410
411 === (% style="color:#037691" %)**Type Code 0xA6**(%%) ===
412
413 The payload **0xA601** is used to "**clear the counting**." For the LWL02, it resets both the count numbers and the time.
414
415
416 === (% style="color:#037691" %)**Type Code 0xA7**(%%) ===
417
418 * The payload **0xA7 01** is equivalent to **AT+DISALARM=1**.
419 * The payload **0xA7 00** is Equivalent to **AT+DISALARM=0**.
420
421 === (% style="color:#037691" %)**Type Code 0xA8**(%%) ===
422
423 **Downlink Payload Format**: 0xA8 AA BB
424
425 * **0xA8**: Type code
426 * **AA**:
427 ** **1**: Enable ADR
428 ** **0**: Disable ADR (same as the **AT+CADR** command)
429 * **BB**: Set DR (same as **AT+CDATARATE**; only valid after ADR = 0)
430
431 **Example**: 0xA8 00 02: Set ADR = 0 and DR = 2
432
433
434 === (% style="color:#037691" %)**Type Code 0xA9**(%%) ===
435
436 For more information, see [[Alarm Base Timeout>>||anchor="H4.6AlarmBaseonTimeout"]].
437
438
439 == 4.5 Integrate with IoT Platforms ==
440
441
442 The Things Stack can be integrated with many IoT platforms, including ThingsEye and Datacake, for visualizing and analyzing data coming from the LWL02. Most of these IoT platforms also support sending downlinks to the LWL02.
443
444
445 === 4.5.1 Integrate with ThingsEye ===
446
447
448 The Things Stack application supports integration with ThingsEye.io. Once integrated, ThingsEye.io acts as an MQTT client for The Things Stack MQTT broker, allowing it to subscribe to upstream traffic and publish downlink traffic.
449
450
451 ==== 4.5.1.1 Configuring The Things Stack ====
452
453
454 We use The Things Stack Sandbox in this example:
455
456 * In **The Things Stack Sandbox**, go to the **Application **for the LWL02 you added.
457 * Select **MQTT** under **Integrations** in the left menu.
458 * In the **Connection information **section, under **Connection credentials**, The Things Stack displays an auto-generated **username**. You can use it or provide a new one.
459 * Click the **Generate new API key** button to generate a password. You can view it by clicking on the **visibility toggle/eye** icon. The API key works as the password.
460
461 {{info}}
462 The username and  password (API key) you created here are required in the next section.
463 {{/info}}
464
465 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/tts-mqtt-integration.png?rev=1.1||alt="tts-mqtt-integration.png"]]
466
467
468 ==== 4.5.1.2 Configuring ThingsEye.io ====
469
470
471 The ThingsEye.io IoT platform is not open for self-registration at the moment. If you are interested in testing the platform, please send your project information to [[admin@thingseye.io>>mailto:admin@thingseye.io]], and we will create an account for you.
472
473 * Login to your [[ThingsEye.io >>url:https://thingseye.io]]account.
474 * Under the **Integrations center**, click **Integrations**.
475 * Click the **Add integration** button (the button with the **+** symbol)
476
477 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-1.png?rev=1.2||alt="thingseye-io-step-1.png" height="804" width="1287"]]
478
479
480 On the **Add integration** window, configure the following:
481
482 **Basic settings:**
483
484 * Select **The Things Stack Community** from the **Integration type** list.
485 * Enter a suitable name for your integration in the **Name **text** **box or keep the default name.
486 * Ensure the following options are turned on.
487 ** Enable integration
488 ** Debug mode
489 ** Allow creating devices or assets
490 * Click the **Next** button. you will be navigated to the **Uplink data converter** tab.
491
492 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-2.png?rev=1.1||alt="thingseye-io-step-2.png" height="825" width="1321"]]
493
494
495 **Uplink data converter:**
496
497 * Click the **Create new** button if it is not selected by default.
498 * Enter a suitable name for the uplink data converter in the **Name **text** **box or keep the default name.
499 * Click the **JavaScript** button.
500 * Paste the uplink decoder function into the text area (first, delete the default code). The demo uplink decoder function can be found [[here>>url:https://raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Uplink_Converter.js]].
501 * Click the **Next** button. You will be navigated to the **Downlink data converter **tab.
502
503 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-3.png?rev=1.1||alt="thingseye-io-step-3.png" height="841" width="1346"]]
504
505
506 **Downlink data converter (this is an optional step):**
507
508 * Click the **Create new** button if it is not selected by default.
509 * Enter a suitable name for the downlink data converter in the **Name **text** **box or keep the default name.
510 * Click the **JavaScript** button.
511 * Paste the downlink decoder function into the text area (first, delete the default code). The demo downlink decoder function can be found [[here>>url:https://raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Downlink_Converter.js]].
512 * Click the **Next** button. You will be navigated to the **Connection** tab.
513
514 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-4.png?rev=1.1||alt="thingseye-io-step-4.png" height="841" width="1346"]]
515
516
517 **Connection:**
518
519 * Choose **Region** from the **Host type**.
520 * Enter the **cluster** of your **The Things Stack** in the **Region** textbox. You can find the cluster in the url (e.g., https:~/~/**eu1**.cloud.thethings.network/...).
521 * Enter the **Username** and **Password** of the MQTT integration in the **Credentials** section. The **username **and **password **can be found on the MQTT integration page of your The Things Stack account (see **4.5.1.1 Configuring The Things Stack**).
522 * Click the **Check connection** button to test the connection. If the connection is successful, you will see the message saying **Connected**.
523
524 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/message-1.png?rev=1.1||alt="message-1.png"]]
525
526
527
528 * Click the **Add** button.
529
530 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-5.png?rev=1.1||alt="thingseye-io-step-5.png" height="842" width="1348"]]
531
532
533 Your integration has been added to the** Integrations** list and will be displayed on the **Integrations** page. Check whether the status is shown as **Active**. If not, review your configuration settings and correct any errors.
534
535
536 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye.io_integrationsCenter_integrations.png?rev=1.2||alt="thingseye.io_integrationsCenter_integrations.png" height="928" width="1352"]]
537
538
539 ==== 4.5.1.3 Viewing integration details ====
540
541 Click on your integration from the list. The **Integration details** window will appear with the **Details **tab selected. The **Details **tab shows all the settings you have provided for this integration.
542
543
544 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/integration-details.png?rev=1.1||alt="integration-details.png" height="928" width="1352"]]
545
546
547 If you want to edit the settings you have provided, click on the **Toggle edit mode** button. Once you have done click on the **Apply changes **button.
548
549 {{info}}
550 See also [[ThingsEye documentation>>url:https://wiki.thingseye.io/xwiki/bin/view/Main/]].
551 {{/info}}
552
553
554 ==== 4.5.1.4 Viewing events ====
555
556 The **Events **tab displays all the uplink messages from the LWL02.
557
558 * Select **Debug **from the **Event type** dropdown.
559 * Select the** time frame** from the **time window**.
560
561 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-events.png?rev=1.1||alt="thingseye-events.png" height="931" width="1357"]]
562
563
564 * To view the **JSON payload** of a message, click on the **three dots (...)** in the **Message** column of the desired message.
565
566 [image coming soon]
567
568
569 ==== 4.5.1.5 Deleting an integration ====
570
571
572 If you want to delete an integration, click the **Delete integration** button on the Integrations page.
573
574
575 ==== 4.5.1.6 Viewing sensor data on a dashboard ====
576
577
578 You can create a dashboard with ThingsEye to visualize the sensor data coming from the LWL02. The following image shows a dashboard created for the LWL02. See **Creating a dashboard** in ThingsEye documentation for more information.
579
580 [[image:Screenshot 2025-01-28 at 20.40.24.png||height="710" width="1344"]]
581
582
583 == 4.5.2 Integrate with Datacake ==
584
585
586 Datacake is a multi-purpose, low-code IoT platform that allows you to integrate sensor data for visualization and analysis. With The Things Stack, you can easily create an integration with Datacake to forward your sensor data to the Datacake IoT platform.
587
588
589 === 4.5.2.1 Prerequisites ===
590
591
592 * The LWL02 device is joined to The Things Stack.
593 * Uplinks from the LWL02 device are being received by The Things Stack.
594 * A Datacake account (a free account is sufficient for this example).
595
596 === 4.5.2.2 Procedure ===
597
598
599 * In the Datacake workspace, on the left navigation, click **Account Settings**.
600 * Then click **API Token**.
601 * In the **API Token** tab, click the **Copy** button to copy the API token. You will need this API token when creating a webhook with The Things Stack.
602
603 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/datacake-1.png?rev=1.1||alt="datacake-1.png" height="847" width="1356"]]
604
605
606
607 To configure the Application to forward data to Datacake you will need to add integration. To add the Datacake integration, perform the following steps:
608
609 * In The Things Stack console, on the left navigation,
610 ** First select your **application** (**Applications -> <your application>**)
611 ** Then select **Integrations -> Webhooks**
612 * On the **Webhooks** page, click + **Add Webhook** button.
613
614 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/tts-webhook-1.png?rev=1.1||alt="tts-webhook-1.png" height="844" width="1351"]]
615
616
617 * On the **Choose webhook template** page, select **Datacake**.
618
619 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/tts-webhook-2.png?rev=1.1||alt="tts-webhook-2.png" height="847" width="1356"]]
620
621
622 * On the Setup webhook for Datacake page,
623 ** **Webhook ID**: provide an unique identifier for this webhook
624 ** **Token**: Paste the **Datacake API Token** when you copied from the Datacake **Account Settings**.
625 * Click on the **Create Datacake webhook** button.
626
627 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/tts-webhook-3.png?rev=1.1||alt="tts-webhook-3.png" height="846" width="1354"]]
628
629
630 Now the Webhook is created and displayed on the **Webhooks** page.
631
632
633 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/tts-webhook-4.png?rev=1.1||alt="tts-webhook-4.png" height="835" width="1337"]]
634
635
636 * In the Datacake workspace, on the left navigation, click **Devices**.
637 * On the Devices page, click **+Add Device**.
638
639 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/datacake-2.png?rev=1.1||alt="datacake-2.png" height="841" width="1346"]]
640
641
642 * On the **Add Device** window, click **LoRaWAN** option.
643 * Click on the **Next** button.
644
645 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/datacake-3.png?rev=1.1||alt="datacake-3.png" height="848" width="1358"]]
646
647
648 * On the **Add LoRaWAN Device** window, **STEP 1**, click on **New Product from template** option.
649 * Under **Device Template**, search **lwl02**. Then click on **Dragino LWL02 Water leakage** option.
650 * Click on the **Next** button.
651
652 [[image:lwl02-dk-1.png||height="841" width="1346"]]
653
654
655 * On the **Add LoRaWAN Device** window, **STEP 2**, under **Network Server**, click on **The Things Stack V3** option.
656 * Click on the **Next** button.
657
658 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/datacake-5.png?rev=1.1||alt="datacake-5.png" height="847" width="1356"]]
659
660
661 * On the **Add LoRaWAN Device** window, **STEP 3**, under **Add Devices**, click **Manual** tab.
662 * In the **DEVEUI** textbox, enter your LWL02's 8 bytes **DevEUI**.
663 * In the **NAME** textbox, enter a suitable name to identify your LWL02.
664 * Click on the **Next** button.
665
666 [[image:lwl02-dk-2.png||height="848" width="1358"]]
667
668
669 * On the **Add LoRaWAN Device** window, **STEP 4**, select **Individual device plans** tab.
670 * Click **Free** option.
671 * Click on the **Add 1 Device** button.
672
673 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/WebHome/datacake-7.png?rev=1.1||alt="datacake-7.png" height="843" width="1350"]]
674
675
676
677
678 * The device is now added to the Datacake workspace and is ready to receive uplinks from the LWL02 via The Things Stack.
679 * In the **DEVICE** column, click **lwl02**.
680
681 [[image:lwl02-dk-3.png||height="846" width="1354"]]
682
683
684 You can see the **pre-built dashboard** from our template, displaying the LWL02's sensor data on various **widgets**.
685
686
687 [[image:lwl02-dk-4.png||height="845" width="1353"]]
688
689
690
691
692 == 4.6 Alarm Based on Timeout ==
693
694
695 (((
696 The LWL02 can monitor the timeout for a status change. This feature can be used to monitor events, such as the duration of water leakage, and more.
697
698 (% style="color:red" %)**(This command is specifically applicable to LDS02. For the LWL02, this command can only enable the alarm, but the alarm time is fixed at 10 minutes)**
699 )))
700
701 (((
702 You can configure this feature using the following:
703 )))
704
705 (((
706
707 )))
708
709 (((
710 **AT Command Configuration:**
711
712 * (% style="color:red" %)**AT+TTRIG=1,30**(%%) ~-~-> When the status changes from "**close**" to "**open**," the LWL02 remains in the "**open**" status for more than 30 seconds. Then it will send an uplink packet. The alarm bit (the lowest bit of the 10th byte of the payload) in this uplink packet is set to 1.
713 * (% style="color:red" %)**AT+TTRIG=0,0**(%%) ~-~-> Default value, disables the timeout alarm.
714
715
716 )))
717
718 (((
719 **Downlink Command Configuration:**
720
721 **Command**: 0xA9 AA BB CC
722
723 * **0xA9**: Type Code
724 * **AA**: Status to be monitored
725 * **BB CC**: Timeout
726
727 If you send **0xA9 01 00 1E**, it is equivalent to **AT+TTRIG=1,30**.
728
729 Or, if you send** 0xA9 00 00 00**, it is equivalent to **AT+TTRIG=0,0** (disables the timeout alarm).
730 )))
731
732 (((
733
734 )))
735
736 = 5. Battery =
737
738
739 The LWL02 is equipped with 2 AAA LR03 batteries.
740
741
742 == 5.1 Replacing Batteries ==
743
744
745 (((
746 The LWL02 is equipped with 2 x AAA LR03 batteries. If the batteries are running low (showing 2.1V on the platform), the user can buy generic AAA batteries and replace them.
747
748 **Note:**
749
750 1. The LWL02 doesn’t have any screws; you can use a nail to open it from the middle.
751 1. Make sure the direction is correct when installing the AAA batteries.
752
753 **Important Note: **Ensure you use new AAA LR03 batteries, and that the battery surfaces are not damaged.
754
755
756 Example of AAA LR03 battery:
757 )))
758
759 [[image:1654675278044-307.png]]
760
761
762 == 5.2 Power Consumption Analysis ==
763
764
765 (((
766 Dragino battery-powered products all run in Low Power mode. You can refer to the guidelines from this [[**link**>>url:https://www.dragino.com/downloads/downloads/LoRa_End_Node/Battery_Analyze/DRAGINO_Battery_Life_Guide.pdf]] to estimate battery life.
767
768
769 )))
770
771 = 6. Use AT Commands =
772
773 == 6.1 Access AT Commands ==
774
775
776 The LWL02 supports an AT command set. You can use a USB to TTL adapter to configure the LWL02 via AT commands, as shown below.
777
778 [[image:image-20221226104917-1.png||height="557" width="850"]]
779
780
781 (((
782 On the PC, the user needs to set the **serial tool** (such as [[PuTTY>>url:https://www.chiark.greenend.org.uk/~~sgtatham/putty/latest.html]] or SecureCRT) baud rate to **115200** to access the serial console of the LWL02. Below is the output for reference:
783 )))
784
785 (((
786 The AT command access password is (% style="color:red" %)**123456**.
787 )))
788
789 [[image:1654675618022-630.png]]
790
791
792 (((
793 Each AT command needs to have an **ENTER** key pressed at the end before sending.
794
795 When entering the first command, the **RED LED** will turn on, and the user can now input AT commands. After entering all the required AT commands, input **AT+CLPM=1** to set the device to Low Power mode, and the **RED LED** will turn off.
796
797 More details can be found in the [[AT Command Manual>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LDS01/]].
798 )))
799
800 (((
801 [[url:http://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LDS01/]]
802 )))
803
804
805 = 7. FAQ =
806
807 == 7.1 How to upgrade the image? ==
808
809
810 You can upgrade the LWL02 for bug fixes, new features, or to change the working region. The upgrade instructions are here: [[LDS02/LWL02 Update method>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS02%20-%20LoRaWAN%20Door%20Sensor%20User%20Manual/#H7.1Howtoupgradetheimage3F]].
811
812
813 == 7.2 How to change the LoRa Frequency Bands/Region? ==
814
815
816 If you have the US915 frequency and want to change it to the AS923 frequency, you can follow the instructions for upgrading the image in [[how to upgrade image>>||anchor="H7.1Howtoupgradetheimage3F"]] section. When downloading the image, select the required file.
817
818
819 == 7.3 Can I disable uplinks for each event to save battery life? ==
820
821
822 Yes, you can use one of the method below:
823
824 **Via AT Command**:
825
826 **AT+DISALARM=1** : The end node will only send packets during the TDC time.
827
828 **AT+DISALARM=0** : The end node will send packets either during the TDC time or when there is a status change in the door sensor.
829
830
831 **Via LoRaWAN downlink Command**:
832
833 **0xA701** : Equivalent to AT+DISALARM=1
834
835 **0xA700** : Equivalent to AT+DISALARM=0
836
837
838 == 7.4 How can I change the Subband for LWL02? ==
839
840
841 **Before v1.6 firmware:**
842 LWL02 operates in Subband 2 by default in the AU915/US915 band. If the LoRaWAN server operates on another subband, LWL02 may have trouble joining the server. In this case, the user can use the AT command to change the subband. See the AT Command chapter for hardware connection details. Below are the steps to change the subband:
843
844 1. Press the reset button.
845 1. Send the password **123456**.
846 1. Send the command: **AT+CFREQBANDMASK=0006** (use 0001 for Subband 1, 0002 for Subband 2, etc.).
847 1. Press the reset button to restart and switch to the new subband.
848
849 Example output:
850
851 (% class="mark small" %)[3369]DRAGINO LWL01 Device
852 [3370]Frequency Band: US915 v1.5
853 [3373]OTAA
854 [3374]DevEui= 7896785455246354
855 [3377]class type A
856 [3379]freq mode intra(%%)
857 (% class="mark mark small small" %)[3381]**scan chn mask 0x0002   ~-~-> use subband 2**
858
859 (% class="mark small" %)LM502:~~# [10793]txDone
860 123456       ~-~-> ENTER PASSWORD
861 Correct Password
862
863 (% class="mark small" %)[105115]rxTimeOut
864 **AT+CFREQBANDMASK=0001   ~-~-> Change to Subband1**
865 OK
866
867 (% class="mark small" %)[3371]DRAGINO LWL01 Device
868 [3373]Frequency Band: US915 v1.5
869 [3376]OTAA
870 [3377]DevEui= 7896785455246354
871 [3380]class type A
872 [3382]freq mode intra
873 [3384]**scan chn mask 0x0001  ~-~-> reboot and works on Subband1 now**
874
875
876 **Since firmware v1.6:**
877
878 LWL02 works with the channel mask 0x0000, which covers all subbands. Therefore, there is no need to use AT commands to change the subband, and it will work for every subband.
879
880
881 == 7.5 My sensor worked for Helium AU915 before, but now it doesn't work. Why? ==
882
883
884 This is a sub-band issue. See chapter 7.4. Helium changed the sub-band for AU915 from subband 2 to subband 6, which caused the sensor to stop working.
885
886
887 == 7.6 Why do I see different working temperatures for the device? ==
888
889
890 The working temperature range of the device depends on the battery the user chooses.
891
892 * A standard AAA battery can support a working range of -10°C to 50°C.
893 * A special AAA battery can support a working range of -40°C to 60°C. For example, [[Energizer L92>>url:https://data.energizer.com/pdfs/l92.pdf]][[url:https://data.energizer.com/pdfs/l92.pdf]]
894
895 = 8. Ordering Information =
896
897
898 **Part Number: (% style="color:blue" %)LWL02-XXX(%%)**
899
900 (% style="color:blue" %)**XXX:**
901
902 * (% style="color:red" %)**EU433**(%%): frequency  bands EU433
903 * (% style="color:red" %)**EU868**(%%): frequency  bands EU868
904 * (% style="color:red" %)**KR920**(%%): frequency  bands KR920
905 * (% style="color:red" %)**CN470**(%%): frequency bands CN470
906 * (% style="color:red" %)**AS923**(%%): frequency  bands AS923
907 * (% style="color:red" %)**AU915**(%%): frequency bands AU915
908 * (% style="color:red" %)**US915**(%%): frequency bands  US915
909 * (% style="color:red" %)**IN865**(%%):  frequency bands  IN865
910
911 = 9. Packaging Information =
912
913
914 **Package Includes**:
915
916 * LWL02 x 1
917
918 = 10. Support =
919
920
921 * Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different time zones, we cannot offer live support. However, your questions will be answered as soon as possible during the aforementioned hours.
922 * Please provide as much information as possible regarding your inquiry (e.g., product models, a detailed description of the problem, and steps to replicate it), and send an email to  [[support@dragino.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]].