Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20241204094648-1.jpeg||height="544" width="544"]]
3
4
5
6
7
8
9
10 **Table of Contents:**
11
12 {{toc/}}
13
14
15
16
17
18 = 1. Introduction =
19
20 == 1.1 What is the LHT65N-VIB LoRaWAN Vibration Sensor? ==
21
22
23 The Dragino LHT65N-VIB (% style="color:blue" %)**LoRaWAN Vibration Sensor**(%%) is designed to (% style="color:blue" %)**detect and measure vibrations, shocks, and accelerations of an object**(%%). By analyzing the object's motion, the LHT65N-VIB can send meaningful data such as alarms, device runtime, vibration counts, and vibration strength to an IoT platform for further analysis.
24
25 It can be used in professional wireless sensor network applications, including (% style="color:blue" %)**equipment status monitoring, water leakage alarms, usage statistics, vibration intensity detection**(%%), and more.
26
27 The LHT65N-VIB (% style="color:blue" %)**supports a datalogging feature**(%%), allowing it to record data when there is no network coverage. Users can retrieve the sensor readings later, ensuring no data is missed.
28
29 The LHT65N-VIB enables users to send data over extremely long distances. It offers ultra-long-range spread spectrum communication and high interference immunity while minimizing current consumption.
30
31 The LHT65N-VIB has a(% style="color:blue" %)** built-in 2400mAh non-rechargeable battery**(%%), which can last up to (% class="mark" %)3 years*(%%).
32
33 The LHT65N-VIB is fully compatible with the LoRaWAN v1.0.3, Class A mode and can work with a standard LoRaWAN gateway.
34
35 (% class="mark" %)*The actual battery life depends on how frequently data is transmitted. Please refer to the battery analyzer chapter for more details.
36
37
38 == 1.2 Assembling the vibration probe ==
39
40
41 The LHT65N-VIB is sold with an external vibration sensor probe. The vibration sensor probe can be connected to the LHT65N-VIB using the USB Type-C connector. You can find the USB Type-C port on the LHT65N-VIB after removing the blue plastic cap.
42
43
44 [[image:lht65n-vib-probe.jpeg]]
45
46
47 == 1.2 Features ==
48
49
50 * LoRaWAN v1.0.3, Class A mode
51 * Frequency Bands: CN470, EU433, KR920, US915, EU868, AS923, AU915
52 * Detects object vibration status
53 * Detects vibration alarms
54 * 3-axis accelerometer for x, y, z axes
55 * Calculates device runtime
56 * Built-in 2400mAh battery for long-term use
57 * Built-in temperature and humidity sensor
58 * Tri-color LED to indicate working status
59 * Datalog feature (up to 3328 records)
60 * AT commands to change parameters
61 * Remote configuration of parameters via LoRaWAN downlink
62 * Firmware upgradeable via programming port
63
64 == 1.3 Specification ==
65
66
67 (% style="color:#037691" %)**Built-in Temperature Sensor:**
68
69 * Resolution: 0.01 °C
70 * Accuracy tolerance : Typ ±0.3 °C
71 * Long Term Drift: < 0.02 °C/yr
72 * Operating range: -40 ~~ 85 °C
73
74 (% style="color:#037691" %)**Built-in Humidity Sensor:**
75
76 * Resolution: 0.04 %RH
77 * Accuracy tolerance : Typ ±3 %RH
78 * Long Term Drift: < 0.25 RH/yr
79 * Operating range: 0 ~~ 96 %RH
80
81 (% style="color:#037691" %)**External Vibration Sensor:**
82
83 * Detecting object vibration status
84 * accelerator for x,y,z
85 * Small size for easy installation
86 * Acceleration: ±2g,±4g,±8g;±16g
87 * Frequency: 25 Hz, 50 Hz,100 Hz, 200 Hz, 400 Hz
88
89 = 2. Registering LHT65N-VIB with a LoRaWAN Network Server =
90
91
92 **The LHT65N-VIB can be registered with any LoRaWAN network server. In this documentation, we use The Things Stack as an example, but similar settings may apply to other LoRaWAN network servers.**
93
94
95 == 2.1 How does the LHT65N-VIB work? ==
96
97
98 (((
99 The LHT65N-VIB is configured in LoRaWAN Class A mode by default. Each LHT65N-VIB is shipped with a unique global registration key that supports OTAA (Over-The-Air-Activation). To use the LHT65N-VIB with a LoRaWAN network, you first need to register the device with the network using the provided registration keys for OTAA support.
100
101 The LHT65N-VIB's registration information can be found inside the device package.
102
103 [[image:image-20230426083319-1.png||_mstalt="431106" height="258" width="556"]]
104
105 The registration information includes the following:
106
107 * DevEUI
108 * AppEUI
109 * AppKey
110
111 Once registered, if the LHT65N-VIB is within the coverage area of the LoRaWAN network, it can automatically join the network. After successfully joining, the LHT65N-VIB will begin measuring environmental temperature and humidity and will start transmitting sensor data to the LoRaWAN network server. The default uplink transmission interval is 20 minutes.
112
113
114 )))
115
116 == 2.2 How to Activate LHT65N-VIB? ==
117
118
119 (((
120 (((
121 The LHT65N-VIB has two modes:
122 )))
123
124 * (((
125 (% style="color:blue" %)**Deep sleep mode**(%%): In this mode, the LHT65N-VIB doesn't perform any LoRaWAN activation. It is used for storage and shipping to conserve battery life.
126 )))
127
128 (((
129 * (% style="color:blue" %)**Working mode**(%%): In this mode, the LHT65N-VIB works as a LoRaWAN sensor, joining the LoRaWAN network and sending sensor data to the server. Between each sampling/TX/RX cycle, the LHT65N-VIB enters STOP mode (IDLE mode), where it consumes the same power as in deep sleep mode.
130 )))
131
132 The LHT65N-VIB is set in deep sleep mode by default. The **ACT** button on the front can be used to switch between different modes. See the image below:
133 )))
134
135 [[image:image-20230717144740-2.png||_mstalt="430794" height="391" width="267"]]
136
137 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
138 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Usage of the ACT button**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 226px;background-color:#4F81BD;color:white" %)**Action**
139 |(% style="background-color:#f2f2f2; width:167px" %)Pressing ACT between 1 - 3s|(% style="background-color:#f2f2f2; width:117px" %)Test uplink status|(% style="background-color:#f2f2f2; width:225px" %)(((
140 If LHT65N-VIB is already joined to the LoRaWAN network, it will send an uplink packet. If an external sensor is connected, the (% style="color:blue" %)**Blue LED** (%%)will blink once. If there is no external sensor, the (% style="color:red" %)**Red LED**(%%) will blink once.
141 )))
142 |(% style="background-color:#f2f2f2; width:167px" %)Pressing ACT for more than 3s|(% style="background-color:#f2f2f2; width:117px" %)Activate Device|(% style="background-color:#f2f2f2; width:225px" %)(((
143 The(% style="background-color:#f2f2f2; color:green" %)** Green LED**(%%) will blink quickly 5 times, indicating that the LHT65N-VIB is entering working mode and starting to join the LoRaWAN network. The (% style="background-color:#f2f2f2; color:green" %)**Green LED**(%%) will solid for 5 seconds after successfully joining the network.
144 )))
145 |(% style="background-color:#f2f2f2; width:167px" %)Fast press ACT 5 times.|(% style="background-color:#f2f2f2; width:117px" %)Deactivate Device|(% style="background-color:#f2f2f2; width:225px" %)The (% style="color:red" %)**Red LED**(%%) will remain solid for 5 seconds, indicating that the LHT65N-VIB is in Deep Sleep Mode.
146
147 {{info}}
148 We recommend that you activate the device using the ACT button after adding its registration information to the LoRaWAN network server. Otherwise, the device will continuously send join-request messages in an attempt to join a LoRaWAN network but will fail.
149 {{/info}}
150
151
152 == 2.3 Registering with The Things Stack ==
153
154
155 (% class="wikigeneratedid" %)
156 In this section we will guide you through on how to register the LHT65N-VIB with The Things Stack. If your area has **The Things Stack** community network coverage, you can use it without setting up your own network. If not, you can set up your own LoRaWAN network coverage by using our [[**LPS8N**>>https://www.dragino.com/products/lora-lorawan-gateway/item/200-lps8n.html]] LoRaWAN gateway.
157
158 (% class="wikigeneratedid" %)
159 The typical end-to-end network setup with LHT65N-VIB and LPS8v2 is shown below:
160
161 (% class="wikigeneratedid" %)
162 [[image:lht65n-vib-nw-diagram.jpg||height="363" width="1359"]]
163
164
165 === 2.3.1 Add LHT65N-VIB to The Things Stack ===
166
167
168 * From the LoRaWAN device repository
169 * Manually
170
171 ==== 2.3.1.1 Creating an application ====
172
173
174 Sign up for a free account with [[The Things Stack Sandbox>>url:https://eu1.cloud.thethings.network]] if you do not have one yet. Then, create an application as shown in the screenshots below.
175
176
177 ==== 2.3.1.2 Adding using the LoRaWAN device repository ====
178
179
180 You can refer to the screenshots below to register your LHT65N-VIB using The Things Stack's LoRaWAN device repository.
181
182 On The Things Stack console:
183
184 ~1. Click **Applications**.
185
186 2. Click <**your application**>. E.g. dragino-docs
187
188 3 Click **End devices**.
189
190 4. Click **+ Register end devic**e button.
191
192
193 [[image:lht65n-vib-1.png]]
194
195
196 On the Register end device page:
197
198 ~1. Click **Select the end device in the LoRaWAN Device Repository** option.
199
200 2. Select the following parameters:
201
202 * **End device brand**: Dragon Technology Co., Limited
203 * **Model**: LHT65 - Temperature and Humidity Sensor. //**The LHT65N-VIB Vibration Sensor uses the same template as the LHT65 - Temperature and Humidity Sensor.**//
204 * **Hardware Ver**: Unknown Ver.
205 * **Firmware Ver**: 1.9.1
206 * **Profile (Region)**: Select the region that matches your device. E.g.: EU_863_870
207
208 3. **Frequency plan**: Select the frequency plan that matches your device. E.g.: Europe 863-870 MHz (SF9 for RX2 - recommended).
209
210 [[image:lht65n-vib-9.png]]
211
212
213 4. **JoinEUI**: Enter the AppEUI of the device (see the registration information sticker) and Click the **Confirm** button.
214
215 5. **DevEUI**: Enter the DevEUI of the device (see the registration information sticker).
216
217 6. **AppKey**: Enter the AppKey of the device (see the registration information sticker).
218
219 7. **End device ID**: Enter a name for your end device to uniquely identify it within this application.
220
221 8. Click **View registered end device** option.
222
223 9. Click **Register end device** button.
224
225
226 [[image:lht65n-vib-2.png]]
227
228
229 You will be navigated to the **Device overview **page.
230
231
232 ==== 2.3.1.3 Adding manually ====
233
234
235 You can refer to the screenshots below to register your LHT65N-VIB using The Things Stack's manual option.
236
237
238 1-4: Same as in the section 3.2.2.2.
239
240 5. Select **Enter end device specifies manually** option.
241
242 6. **Frequency plan**: Select the frequency plan that matches your device. E.g.: Europe 863-870 MHz (SF9 for RX2 - recommended).
243
244 7. **LoRaWAN version**: LoRaWAN Specification 1.0.3
245
246 8. Regional Parameters version: You can't change it and it will select automatically.
247
248
249 [[image:lht65n-vib-3.png]]
250
251
252 9. Click on the **Show advanced activation, LoRaWAN class and cluster settings **to expand the section.
253
254 10. Select **Over the air activation (OTAA**) option.
255
256 ~11. Select **None (class A only)**.
257
258 12. **JoinEUI**: Enter the **AppEUI** of the device (see the registration information sticker) and Click the **Confirm** button.
259
260
261 [[image:lht65n-vib-4.png]]
262
263
264 13. **DevEUI**: Enter the DevEUI of the device (see the registration information sticker).
265
266 14. **AppKey**: Enter the AppKey of the device (see the registration information sticker).
267
268 15. **End device ID**: Enter a name for your end device to uniquely identify it within this application.
269
270 16. Click **View registered end device** option.
271
272 17. Click **Register end device** button.
273
274 [[image:lht65n-vib-5.png]]
275
276
277 You will be navigated to the **Device overview **page.
278
279
280 === 2.3.2 Activate the LHT65N-VIB by pressing and holding the ACT button for more than 5 seconds. ===
281
282 (((
283
284
285 Press and hold the **ACT** button for more than 5 seconds to activate the LHT65N-VIB. It will then join The Things Stack. Once successfully connected, the device will begin uplinking sensor data to The Things Stack, which can be viewed on the Live data panel.
286 )))
287
288 [[image:image-20241011171332-1.png||height="238" width="816"]]
289
290
291 === 2.3.3 Uplink Decoder in The Things Stack ===
292
293
294 When the uplink payload arrives in The Things Stack, it is displayed in HEX format, which is not easy to read. You can add the LHT65N-VIB decoder in The Things Stack for easier readability of each sensor readings.
295
296 The uplink decoder can be added to the** Payload Formatters** of your device in The Things Stack. Refer to the screenshot below.
297
298 ~1. Click **Uplink** tab.
299
300 2. **Formatter type:** Select Custom Javascript formatter.
301
302 3. **Formatter code**: Copy the uplink payload formatter code from our [[dragino-end-node-decoder GitHub repository>>https://github.com/dragino/dragino-end-node-decoder/blob/main/LHT65N-VIB/LHT65N-VIB_TTN_Decoder.txt]] and paste it here.
303
304 4. Finally, click on the **Save changes** button.
305
306 [[image:Screenshot 2024-12-03 at 17.34.15.png]]
307
308
309 == 2.4 Uplink Payload (FPort~=2) ==
310
311 (((
312
313
314 The uplink payload is a total of 11 bytes. Uplink packets use **FPort=2 **and, by default, are sent (% style="color:#4f81bd" %)**every 20 minutes.**
315 )))
316
317 (((
318 After each uplink, the (% style="color:blue" %)**BLUE LED**(%%) blinks once.
319
320 There are four different working modes, and the uplink payload format varies for each mode:
321
322 * **VIBMOD=1** : vibration count, work_min
323 * **VIBMOD=2** : TempC_SHT, Hum_SHT, vib_count
324 * **VIBMOD=3** : TempC_SHT, Hum_SHT, vib_min
325 * **VIBMOD=4** : X, Y, Z
326
327
328 )))
329
330 === 2.4.1 VIBMOD~=1 : Vibration Count, Run Time ===
331
332
333 VIBMOD=1 represent the battery voltage, working mode, alarm status, TDC, vibration count, and work_min. The uplink payload is shown below.
334
335 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:360px" %)
336 |=(% style="width: 80px;background-color:#4F81BD;color:white" %)(((
337 **Size(bytes)**
338 )))|=(% style="width: 40px;background-color:#4F81BD;color:white" %)(((
339 **2**
340 )))|=(% style="width: 80px;background-color:#4F81BD;color:white" %)(((
341 1
342 )))|=(% style="width: 80px;background-color:#4F81BD;color:white" %)(((
343 **4**
344 )))|=(% style="width: 80px;background-color:#4F81BD;color:white" %)(((
345 4
346 )))
347 |(% style="width:110px" %)(((
348 Value
349 )))|(% style="width:71px" %)(((
350 BAT
351 )))|(% style="width:99px" %)MOD
352 Alarm
353 TDC|(% style="width:132px" %)vib_count|(% style="width:54px" %)work_min
354
355 [[image:image-20241011175741-3.png||height="187" width="1023"]]
356
357
358 The following subsections describe each field:
359
360
361 ==== 2.4.1.1 BAT (Battery Voltage) ====
362
363
364 These two bytes represent the battery voltage. See the image below.
365
366 [[image:image-20241012091339-4.png||height="92" width="787"]]
367
368
369 Calculate the battery voltage for the LHT65N-VIB, if the BAT=0B F2.
370
371 Convert 0x0BF2 to decimal (3058) and then divide by 1000 to get the voltage.
372
373 * (% class="mark" style="color:#ff0000; font-family:Arial,sans-serif; font-size:10.5pt; font-style:normal; font-variant-alternates:normal; font-variant-east-asian:normal; font-variant-ligatures:normal; font-variant-numeric:normal; font-variant-position:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)0x0BF2 (hex) = 3058 (dec)
374 * (% class="mark" style="color:#ff0000; font-family:Arial,sans-serif; font-size:10.5pt; font-style:normal; font-variant-alternates:normal; font-variant-east-asian:normal; font-variant-ligatures:normal; font-variant-numeric:normal; font-variant-position:normal; font-weight:400; text-decoration:none; white-space:pre-wrap" %)3058/1000 = 3.058 V
375
376 ==== 2.4.1.2 MOD, Alarm, and TDC ====
377
378
379 This byte represent working mode, alarm status, and TCD. See the image below.
380
381 [[image:image-20241012092023-5.png||height="89" width="792"]]
382
383 [[image:image-20250320103348-1.png||height="77" width="785"]]
384
385 (% class="mark" %)bytes[2]=0x06=0000 0110
386
387 (% class="mark" %)**Current working mode:**
388
389 * (% class="mark" %)(bytes[2]>>2)&0x07
390 * (% class="mark" %)Shift two bits to right (0000 0110 -> 0000 0001)
391 * (% class="mark" %)Then bitwise AND with 0x07 (0000 0001 & 0000 0111 = 0000 0001 = **1**)
392
393 (% class="mark" %)**Current alarm status:**
394
395 * (% class="mark" %)(bytes[2] & 0x01)? "TRUE":"FALSE"
396 * (% class="mark" %)0000 0110 & 0000 0001 = 0000 0000 = 0 = **FALSE**
397
398 (% class="mark" %)**Is the current data triggered by TDC (data uploaded due to alarm)?**
399
400 * (% class="mark" %)(bytes[2] & 0x02)? "YES":"NO"
401 * (% class="mark" %)0000 0110 & 0000 0010 = 0000 0010 = 2 (NON-ZERO VALUE) = **YES**
402
403 ==== 2.4.1.3 vib_count ====
404
405
406 These 4 bytes (vib_count) represent the number of vibration events that has been recorded. See the image below.
407
408 [[image:image-20241012092938-6.png||height="102" width="770"]]
409
410 * (% class="mark" %)0x00000007=7
411
412 ==== 2.4.1.4 work_min ====
413
414
415 These 4 bytes (work_min) indicate the duration the current vibration sensor has been active since the latest trigger. See the image below.
416
417 [[image:image-20241012093112-7.png||height="68" width="775"]]
418
419 * (% class="mark" %)0x00000000=0
420
421 (% class="mark" %)0 means that the current vibration sensor is not triggered.
422
423
424 === 2.4.2 VIBMOD~=2 : Vibration Count,Temperature,Humidity ===
425
426
427 VIBMOD=2 represent the battery voltage, working mode, alarm status, TDC, vibration count, TempC_SHT, and Hum_SHT. The uplink payload is shown below.
428
429
430 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:380px" %)
431 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
432 **Size(bytes)**
433 )))|=(% style="width: 40px;background-color:#4F81BD;color:white" %)(((
434 **2**
435 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
436 1
437 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
438 **4**
439 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
440 2
441 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
442 2
443 )))
444 |(% style="width:110px" %)(((
445 Value
446 )))|(% style="width:71px" %)(((
447 BAT
448 )))|(% style="width:99px" %)MOD
449 Alarm
450 TDC|(% style="width:132px" %)vib_count|(% style="width:54px" %)TempC_SHT|(% style="width:54px" %)Hum_SHT
451
452 [[image:image-20241012093705-8.png||height="106" width="879"]]
453
454
455 ==== 2.4.2.1 BAT (Battery Voltage) ====
456
457
458 These two bytes represent the battery voltage. See the image below.
459
460 [[image:image-20241012094035-9.png||height="71" width="946"]]
461
462
463 Calculate the battery voltage for LHT65N-VIB.
464
465 * (% class="mark" %)0x0BC6/1000=3.014V
466
467 ==== 2.4.2.2 VIBMOD, Alarm and TDC ====
468
469
470 This byte represent working mode, alarm status, and TCD. See the image below.
471
472 [[image:image-20241012094131-10.png||height="126" width="934"]]
473
474 (% class="mark" %)bytes[2]=0x0A=0000 0101
475
476 (% class="mark" %)Current working mode=(bytes[2]>>2)&0x07=2
477
478 (% class="mark" %)Current alarm situation= (bytes[2] & 0x01)? "TRUE":"FALSE";=0=FALSE
479
480 (% class="mark" %)Whether the current data occurs is TDC (the data will be uploaded by the alarm)= (bytes[2] & 0x02)? "YES":"NO";=00000010 (non -zero value)=YES
481
482
483 ==== 2.4.2.3 vib_count ====
484
485
486 These 4 bytes represent the number of vibration events that has been recorded. See the image below.
487
488 [[image:image-20241012094340-11.png||height="92" width="954"]]
489
490 * (% class="mark" %)0x00000000=0
491
492 ==== 2.4.2.4 TempC_SHT ====
493
494
495 These 2 bytes represent the temperature measured by the built-in temperature & humidity sensor, SHT31.
496
497 [[image:image-20241012094549-12.png||height="64" width="941"]]
498
499 * (% class="mark" %)0x0B22/100=28.5 C
500
501 ==== 2.4.2.5 Hum_SHT ====
502
503
504 These 2 bytes represent the humidity measured by the built-in temperature & humidity sensor, SHT31.
505
506 [[image:image-20241012094803-13.png||height="76" width="950"]]
507
508 * (% class="mark" %)0x0212/10=53
509
510 === 2.4.3 VIBMOD~=3: Run Time,Temperature,Humidity ===
511
512
513 VIBMOD=3 represents the battery voltage, working mode, alarm status, TDC, TempC_SHT, Hum_SHT, and work_min. The uplink payload is shown below.
514
515 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:380px" %)
516 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
517 **Size(bytes)**
518 )))|=(% style="width: 40px;background-color:#4F81BD;color:white" %)(((
519 **2**
520 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
521 1
522 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
523 **2**
524 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
525 2
526 )))|=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
527 4
528 )))
529 |(% style="width:110px" %)(((
530 Value
531 )))|(% style="width:71px" %)(((
532 BAT
533 )))|(% style="width:99px" %)MOD
534 Alarm
535 TDC|(% style="width:132px" %)TempC_SHT|(% style="width:54px" %)Hum_SHT|(% style="width:54px" %)work_min
536
537 [[image:image-20241012094926-14.png||height="91" width="984"]]
538
539
540 ==== 2.4.3.1 BAT (Battery Voltage) ====
541
542
543 These 2 bytes represent the battery voltage.
544
545 [[image:image-20241012095155-15.png]]
546
547 * (% class="mark" %)0x0BC2/1000=3.01V
548
549 ==== 2.4.3.2 VIBMOD and Alarm and TDC ====
550
551
552 This byte represents the working mode, alarm status, and TDC.
553
554 [[image:image-20241012095322-16.png||height="101" width="1094"]]
555
556 (% class="mark" %)bytes[2]=0x0A=0000 1110
557
558 (% class="mark" %)Current working mode=(bytes[2]>>2)&0x07=3
559
560 (% class="mark" %)Current alarm situation= (bytes[2] & 0x01)? "TRUE":"FALSE";=0=FALSE
561
562 (% class="mark" %)Whether the current data occurs is TDC (the data will be uploaded by the alarm)= (bytes[2] & 0x02)? "YES":"NO";=00000010 (non -zero value)=YES
563
564
565 ==== 2.4.3.3 TempC_SHT ====
566
567
568 These 2 bytes represent the temperature measured by the built-in temperature & humidity sensor, SHT31.
569
570 [[image:image-20241012095445-17.png]]
571
572 * (% class="mark" %)0x0B21/100=28.49 C
573
574 ==== 2.4.3.4 Hum_SHT ====
575
576
577 These 2 bytes represent the humidity measured by the built-in temperature & humidity sensor, SHT31.
578
579 [[image:image-20241012095509-18.png]]
580
581 * (% class="mark" %)0x0213/10=53.1
582
583 ==== 2.4.3.5 work_min ====
584
585
586 These 4 bytes (work_min) indicate the duration the current vibration sensor has been active since the latest trigger. See the image below.
587
588 [[image:image-20241012095558-19.png||height="83" width="1029"]]
589
590 * (% class="mark" %)0x00000000=0
591
592 (% class="mark" %)0 means that the current vibration sensor is not triggered.
593
594
595 === 2.4.4 VIBMOD~=4 :Three-axis X-Y-Z vibration data(FPort~=7) ===
596
597
598 VIBMOD=4 represents the battery voltage and the accelerometer data. The uplink payload is shown below.
599
600 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:310px" %)
601 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
602 **Size(bytes)**
603 )))|=(% style="width: 50px; background-color: rgb(79, 129, 189); color: white;" %)(((
604 **2**
605 )))|=(% style="width: 50px; background-color: rgb(79, 129, 189); color: white;" %)(((
606 2
607 )))|=(% style="width: 50px; background-color: rgb(79, 129, 189); color: white;" %)(((
608 **2**
609 )))|=(% style="width: 50px; background-color: rgb(79, 129, 189); color: white;" %)(((
610 2
611 )))|=(% style="width: 50px; background-color: rgb(79, 129, 189); color: white;" %)(((
612 2
613 )))
614 |(% style="width:110px" %)(((
615 Value
616 )))|(% style="width:40px" %)(((
617 BAT
618 )))|(% style="width:50px" %)X|(% style="width:44px" %)Y|(% style="width:43px" %)Z|(% style="width:133px" %)......
619
620 [[image:image-20250321144440-1.png||height="73" width="876"]]
621
622
623 (% class="mark" %)The first two bytes represent the battery voltage, for example 0B 4E.
624
625 (% class="mark" %)The reset of the bytes represents the accelerometer data on axis X, Y, and Z. Each axis represent in 2 bytes.
626
627 (% class="mark" %)**X = 0x03F5/1000=1.013.**
628
629 (% class="mark" %)**Y=0xFFE9/1000=-0.023 In binary, it is represented as 1111 1111 1110 1001. The highest bit is 1, indicating a negative number in two's complement notation, and its value is -0.023.**
630
631 (% class="mark" %)**Z=0xFEB2/1000=-0.334 In binary, it is represented as 1111 1110 1011 0010. The highest bit is 1, indicating a negative number in two's complement notation, and its value is -0.334.**
632
633
634 == 2.5 Integrating with IoT platforms ==
635
636
637 The LHT65N-VIB sensor data can be integrated with other IoT platforms for better visualizing and analyzing the data. In this section, we will show you how to integrate sensor data from The Things Stack with some popular IoT platforms.
638
639
640 === 2.5.1 Integrate and show data on ThingsEye ===
641
642
643 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.
644
645 {{info}}
646 The integration will link The Things Stack application (with all the devices) with ThingsEye. You can select sensor data fields from each device when creating the ThingsEye dashboards.
647 {{/info}}
648
649
650 ==== 2.5.1.1 Configuring The Things Stack ====
651
652
653 We use The Things Stack Sandbox in this example:
654
655 * In **The Things Stack Sandbox**, go to the **Application **for the LHT65N-VIB you added.
656 * Select **MQTT** under **Integrations** in the left menu.
657 * 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.
658 * 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.
659
660 {{info}}
661 The username and  password (API key) you created here are required in the next section.
662 {{/info}}
663
664
665 [[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"]]
666
667
668 ==== 2.5.1.2 Configuring ThingsEye.io ====
669
670
671 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, and we will create an account for you.
672
673 * Login to your [[ThingsEye.io >>url:https://thingseye.io]]account.
674 * Under the **Integrations center**, click **Integrations**.
675 * Click the **Add integration** button (the button with the **+** symbol).
676
677 (% class="wikigeneratedid" %)
678 [[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"]]
679
680
681 On the **Add integration** window, configure the following:
682
683 **Basic settings:**
684
685 * Select **The Things Stack Community** from the **Integration type** list.
686 * Enter a suitable name for your integration in the **Name **text** **box or keep the default name.
687 * Ensure the following options are turned on.
688 ** Enable integration
689 ** Debug mode
690 ** Allow create devices or assets
691 * Click the **Next** button. you will be navigated to the **Uplink data converter** tab.
692
693 (% class="wikigeneratedid" %)
694 [[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"]]
695
696
697 **Uplink data converter:**
698
699 * Click the **Create new** button if it is not selected by default.
700 * Enter a suitable name for the uplink data converter in the **Name **text** **box or keep the default name.
701 * Click the **JavaScript** button.
702 * 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]].
703 * Click the **Next** button. You will be navigated to the **Downlink data converter **tab.
704
705 (% class="wikigeneratedid" %)
706 [[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"]]
707
708
709 **Downlink data converter (this is an optional step):**
710
711 * Click the **Create new** button if it is not selected by default.
712 * Enter a suitable name for the downlink data converter in the **Name **text** **box or keep the default name.
713 * Click the **JavaScript** button.
714 * 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]].
715 * Click the **Next** button. You will be navigated to the **Connection** tab.
716
717 (% class="wikigeneratedid" %)
718 [[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"]]
719
720
721 **Connection:**
722
723 * Choose **Region** from the **Host type**.
724 * 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/...).
725 * 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 **2.5.1.1 Configuring The Things Stack**).
726 * Click the **Check connection** button to test the connection. If the connection is successful, you will see the message saying **Connected**.
727
728 [[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"]]
729
730
731 * Click the **Add** button.
732
733 [[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"]]
734
735
736 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.
737
738 [[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"]]
739
740
741 ==== 2.5.1.3 Viewing integration details ====
742
743
744 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.
745
746 (% class="wikigeneratedid" %)
747 [[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"]]
748
749
750 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.
751
752 {{info}}
753 See also [[ThingsEye documentation>>url:https://wiki.thingseye.io/xwiki/bin/view/Main/]].
754 {{/info}}
755
756 * To view the **JSON payload** of a message, click on the **three dots (...)** in the Message column of the desired message.
757
758 [add JSON payload screen capture here]
759
760
761 ==== 2.5.1.4 Viewing events ====
762
763
764 The **Events **tab displays all the uplink messages from the LHT65N-VIB.
765
766 * Select **Debug **from the **Event type** dropdown.
767 * Select the** time frame** from the **time window**.
768
769 [[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"]]
770
771
772 * To view the **JSON payload** of a message, click on the **three dots (...)** in the **Message** column of the desired message.
773
774 [[image:lht65n-vib.png]]
775
776
777 ==== 2.5.1.5 Viewing Sensor data on a dashboard ====
778
779
780 You can create a dashboard with ThingsEye to visualize the sensor data coming from the LHT65N-VIB. The following image shows a dashboard created for the LHT65N-VIB. See **Creating a dashboard** in ThingsEye documentation for more information.
781
782
783 [[image:lht65n-vib-dashboard.png]]
784
785
786
787 ==== 2.5.1.6 Deleting an integration ====
788
789
790 If you want to delete an integration, click the **Delete integration** button on the Integrations page.
791
792
793 === 2.5.2 Integrate and show data on Datacake ===
794
795
796 (((
797 The **Datacake **IoT platform provides a user-friendly interface to display sensor data. With this integration, once you receive the sensor data in **The Things Stack** application, you can send it to **Datacake** for further processing.
798
799 * Ensure that LHT65N-VIB is properly connected to The Things Stack.
800
801 Now configure your The Things Stack application to forward data to Datacake by adding an integration with webhooks.
802
803 * In The Things Stack console, navigate to **Applications → <your application> → Integrations → Webhooks → + Add webhook.**
804
805 [[image:eu1.cloud.thethings.network_console_applications_dragino-docs_integrations_webhooks(Laptop with HiDPI screen).png]]
806
807 * In the **Choose webhook template** page, select **Datacake**.
808 )))
809
810
811 [[image:eu1.cloud.thethings.network_console_applications_dragino-docs_integrations_webhooks_add_template(Laptop with HiDPI screen).png]]
812
813 (((
814
815
816 In Datacake, go to **Account Settings**, then navigate to the **API Token** tab. Click the **Copy** button to copy the **API token**.
817
818 [[image:datacake-1.png]]
819
820
821 On the **Setup webhook for Datacake** page, enter the **Webhook ID** and paste the **Datacake API Token**. Then select the **Create Datacake webhook** button.
822
823 [[image:eu1.cloud.thethings.network_console_applications_dragino-docs_integrations_webhooks_add_template(Laptop with HiDPI screen) (2).png]]
824
825
826 )))
827
828 In the Datacake console ([[https:~~/~~/datacake.co/>>url:https://datacake.co/]]) , add LHT65N-VIB as follows.
829
830 ~1. On the left navigation, select **Devices**.
831
832 2. Click **+ Add Device** button.
833
834 [[image:datacake-7.png]]
835
836
837 ~1. On the **Add Device** window, select the connectivity type of your device, in this case select **LoRaWAN**.
838
839 2. Click **Next** button.
840
841 [[image:datacake-2.png]]
842
843
844 On the **Add LoRaWAN Device** window, under **Product**,
845
846 ~1. Select **New Product from template**.
847
848 2. Search for **lht65**
849
850 3. Select, **Dragino LHT65, LHT65N+ Temp & Hum **from the filtered list.
851
852 Click **Next** button.
853
854 [[image:datacake-3.png]]
855
856
857 On the **Add LoRaWAN Device** window, under **Network Server,**
858
859 ~1. Select **The Things Stack V3**.
860
861 Click **Next** button.
862
863 [[image:datacake-5.png]]
864
865
866 On the **Add LoRaWAN Device** window, under **Devices**,
867
868 ~1. Enter your LHT65N-VIB's **DevEUI** in the **DevEUI** field.
869
870 2. Assign a **name** for your device in the **Name** field.
871
872 Click **Next** button.
873
874 [[image:datacake-6.png]]
875
876
877 [will be continued... add more screenshots here]
878
879 [[image:image-20220523000825-10.png||_mstalt="450619"]]
880
881
882 == 2.8 LED Indicator ==
883
884
885 The LHT65N-VIB has a **tri-color LED** for easily indicating different stages.
886
887 When the user presses the ACT button, the LED will function according to the LED status linked to the ACT button.
888
889 In a normal working state:
890
891 * For each uplink, the **BLUE** or **RED** LED will blink once:
892 ** **BLUE LED**: Indicates an external sensor is connected.
893 ** **RED LED**: Indicates no external sensor is connected.
894 * For each successful downlink, the **PURPLE** **LED** will blink once.
895
896 == 2.9 Installation ==
897
898 This sections explains the assembling and installation instructions.
899
900 === 2.9.1 Attaching the vibration probe ===
901
902 The LHT65N-VIB is sold with an external vibration sensor probe. The vibration sensor probe can be connected to the LHT65N-VIB using its USB Type-C connector. You can find the USB Type-C port on the LHT65N-VIB after removing the blue plastic cap.
903
904 [[image:lht65n-vib-probe.jpeg]]
905
906
907 === 2.9.2 Installing on an object ===
908
909 The LHT65N should be installed vertically on objects, with the sensor parallel to the object's surface.
910
911 [[image:image-20220516231650-1.png||_mstalt="428597" height="436" width="428"]]
912
913
914 = 3. Configure the LHT65N-VIB via AT commands or LoRaWAN downlinks =
915
916
917 (((
918 You can configure the LHT65N-VIB via AT commands or LoRaWAN Downlinks.
919 )))
920
921 * (((
922 Configure via AT Commands: See the [[FAQ>>||anchor="H6.FAQ"]] for instructions on **How to connect to the LHT65N-VIB's UART interface**
923 )))
924
925 * (((
926 LoRaWAN downlink instructions for different platforms: Refer to the [[IoT LoRaWAN Server>>doc:Main.WebHome]]
927 )))
928
929 (((
930
931
932 There are two kinds of commands to configure the LHT65N-VIB:
933 )))
934
935 (((
936 (% style="color:#4f81bd" %)**1. General Commands**.
937 )))
938
939 (((
940 These commands are the same for all Dragino devices that support the DLWS-005 LoRaWAN Stack (Note~*~*). You can find these commands on the wiki: [[End Device Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]].
941
942 These commands can be used to configure:
943 )))
944
945 (((
946 * General system settings, such as uplink interval.
947 )))
948
949 (((
950 * LoRaWAN protocol and radio-related settings.
951 )))
952
953 (((
954
955
956 (% style="color:#4f81bd" %)**2. Commands design specially for the LHT65N**(%%)-VIB
957 )))
958
959 (((
960 These commands are only valid for the LHT65N-VIB and are listed below:
961 )))
962
963
964 == 3.1 Set Uplink Transmit Interval ==
965
966
967 **Feature**: Change the LHT65N-VIB's uplink transmission Interval.
968
969 (% style="color:#4f81bd" %)**AT command**
970
971 (% border="2" style="width:500px" %)
972 |(% style="width:142px" %)**Command**|(% style="width:356px" %)AT+TDC
973 |(% style="width:142px" %)**Parameters**|(% style="width:356px" %)**time** : time in milliseconds
974 |(% style="width:142px" %)**Get**|(% style="width:356px" %)AT+TDC=?
975 |(% style="width:142px" %)**Response**|(% style="width:356px" %)returns the current uplink interval
976 |(% style="width:142px" %)**Set**|(% style="width:356px" %)AT+TDC=<time>
977 |(% style="width:142px" %)**Response**|(% style="width:356px" %)<time> OK
978 |(% style="width:142px" %)**Example**|(% style="width:356px" %)AT+TDC=60000 ~/~/ Set uplink time interval to 60 seconds.
979
980 (% style="color:#4f81bd" %)**Downlink command**
981
982 (% border="2" style="width:500px" %)
983 |(% style="width:141px" %)**Prefix**|(% style="width:357px" %)0x01
984 |(% style="width:141px" %)**Parameters**|(% style="width:357px" %)**time** : time in seconds - 3 bytes in hexadecimal
985 |(% style="width:141px" %)**Payload format**|(% style="width:357px" %)<prefix><time>
986 |(% style="width:141px" %)**Example**|(% style="width:357px" %)(((
987 * 01**00001E ** ~/~/ Set uplink interval (TDC) to 30 seconds
988
989 * 01**00003C**  ~/~/ Set uplink interval (TDC) to 60 seconds
990 )))
991
992 == 3.2 Set Vibration Sensor Mode ==
993
994
995 **Feature**: Sets the Vibration Sensor Mode.
996
997 (% style="color:#4f81bd" %)**AT command**
998
999 (% style="color:red" %)**Note: In mode 1, mode 2, mode 3, the time unit is set in seconds, and in mode 4, the time unit is set in milliseconds.**
1000
1001
1002 (% border="2" style="width:500px" %)
1003 |(% style="width:143px" %)**Command**|(% style="width:355px" %)AT+VIBMOD
1004 |(% style="width:143px" %)**Parameters**|(% style="width:355px" %)(((
1005 **mode** : 1, 2, 3, 4
1006
1007 **alarm_time**: Sets the duration of continuous operation required to trigger the alarm (unit: seconds). (Set AlarmTimeout to 0 to disable the alarm.) - only applicable with mode 1, 2, 3
1008
1009 **stop_duration_time**: Specifies the interval after which the event is counted as a trigger. - only applicable with mode 1, 2, 3
1010
1011 **collection_interval **: Collection Interval (unit: seconds) - only applicable with mode 4.
1012
1013 **groups** : Number of groups - only applicable with mode 4
1014 )))
1015 |(% style="width:143px" %)**Set**|(% style="width:355px" %)(((
1016 for mode 1,2,3:
1017
1018 AT+VIBMOD=<mode><alarm_timeout><stop_duration_time>
1019
1020 for mode 4:
1021
1022 AT+VIBMOD=<mode><collection_interval><gropus>
1023 )))
1024 |(% style="width:143px" %)**Example**|(% style="width:355px" %)(((
1025 **AT+VIBMOD=1,60,10**
1026
1027 **MOD1** will display **vib_count** and **work_min** without temperature and humidity. If vibration for more than 60 seconds, an alarm message is generated.
1028
1029 If vibration stops for more than 10 seconds, **vib_count** increases by one, and **work_min** resets to zero.
1030
1031
1032 **AT+VIBMOD=4,1000,10**
1033
1034 MOD4 sets the collection interval to 1000 ms and collects 10 sets of data in total.
1035
1036
1037 )))
1038
1039 [[image:image-20250321145842-3.png]]
1040
1041
1042
1043 (% style="color:#4f81bd" %)**Downlink command**
1044
1045 (% border="2" style="width:500px" %)
1046 |(% style="width:137px" %)**Prefix**|(% style="width:361px" %)0x0A
1047 |(% style="width:137px" %)**Parameters**|(% style="width:361px" %)(((
1048 **mode** : 1, 2, 3, 4 [1 byte in hex]
1049
1050 **alarm_time**: Sets the duration of continuous operation required to trigger the alarm (unit: seconds). (Set AlarmTimeout to 0 to disable the alarm.) - only applicable with mode 1, 2, and 3 [2 byte in hex]
1051
1052 **stop_duration_time**: Specifies the interval after which the event is counted as a trigger. - only applicable with mode 1, 2, and 3 [2 bytes in hex]
1053
1054 **collection_interval **: Collection Interval (unit: seconds) - only applicable with mode 4. [2 bytes in hexadecimal]
1055
1056 **groups** : Number of groups - only applicable with mode 4. [2 bytes in hexadecimal]
1057 )))
1058 |(% style="width:137px" %)**Payload format**|(% style="width:361px" %)(((
1059 for mode 1, 2, 3:
1060
1061 <prefix><mode><alarm_time><stop_duration_time>
1062
1063
1064 for mode 4:
1065
1066 <prefix><mode><collection_interval><groups>
1067 )))
1068 |(% style="width:137px" %)**Example**|(% style="width:361px" %)(((
1069 * 0A01003C000A
1070
1071 **MOD1** will display **vib_count** and **work_min** without temperature and humidity. If vibration for more than 60 seconds, an alarm message is generated.
1072
1073 If vibration stops for more than 10 seconds, **vib_count** increases by one, and **work_min** resets to zero.
1074
1075 * 0A04271001
1076 * 0x2710=10000ms
1077
1078 **MOD4** sets the collection interval to 10 seconds and collects 1 sets of data in total.
1079
1080 (% style="color:red" %)**Note: If the setting acquisition time is too fast, the device will not be able to receive the next issuance command when quickly collecting.**
1081
1082 (% style="color:red" %)**Only USB TTL can be used to modify and set the device to send AT commands.
1083 It is recommended to set a set to collect no less than 10 seconds, that is, 0A04271001.**
1084 )))
1085
1086 == 3.3 Vibration sensitivity setting ==
1087
1088
1089 **Feature**: Allows adjustment of sensitivity settings for different usage scenarios.
1090
1091
1092 (% style="color:#4f81bd" %)**AT Command:**
1093
1094 (% border="2" style="width:500px" %)
1095 |(% style="width:134px" %)**Command**|(% style="width:364px" %)AT+VIBSET
1096 |(% style="width:134px" %)**Parameters**|(% style="width:364px" %)(((
1097 **acceleration** :
1098
1099 * 0: ±2g
1100 * 1: ±4g
1101 * 2: ±8g
1102 * 3: ±16g
1103
1104 **frequency** :
1105
1106 * 0:25Hz
1107 * 1:50Hz
1108 * 2:100Hz
1109 * 3:200Hz
1110 * 4:400Hz
1111
1112 **threshold** : interrupt threshold
1113
1114 **duration** : Interrupt detection duration in milliseconds
1115 )))
1116 |(% style="width:134px" %)**Set**|(% style="width:364px" %)AT+VIBSET=<acceleration><frequency><threshold><duration>
1117 |(% style="width:134px" %)**Response**|(% style="width:364px" %)OK
1118 |(% style="width:134px" %)**Example**|(% style="width:364px" %)(((
1119 **~ AT+VIBSET=0,4,10,12**
1120
1121 The acceleration is set to ±2g, and the frequency is 400 Hz. The threshold is set to 10 × 16 mg, meaning a change between 158 and 162 mg can be detected.
1122 )))
1123
1124 If you want to detect an event lasting at least 30 milliseconds, set the register to 30/2.5 = 12 counts. When the time difference between consecutive readings exceeds 12 duration LSBs, an interrupt will be triggered. See the figure below for specific values.
1125
1126
1127 The following screenshots are taken from data sheets of the internal sensors:
1128
1129 [[image:image-20241014154353-1.png||height="307" width="727"]]
1130
1131 [[image:image-20241014154413-2.png||height="509" width="715"]]
1132
1133
1134 (% style="color:#4f81bd" %)**Downlink Command**
1135
1136 (% border="2" style="width:500px" %)
1137 |(% style="width:156px" %)**Prefix**|(% style="width:342px" %)0x09
1138 |(% style="width:156px" %)**Parameters**|(% style="width:342px" %)(((
1139 **acceleration** : 2 bytes in hex
1140
1141 * 0: ±2g
1142 * 1: ±4g
1143 * 2: ±8g
1144 * 3: ±16g
1145
1146 **frequency** : 2 bytes in hex
1147
1148 * 0:25Hz
1149 * 1:50Hz
1150 * 2:100Hz
1151 * 3:200Hz
1152 * 4:400Hz
1153
1154 **threshold** : interrupt threshold - 2 bytes in hex
1155
1156 **duration** : Interrupt detection duration in milliseconds - 2 bytes in hex
1157 )))
1158 |(% style="width:156px" %)**Example**|(% style="width:342px" %)(((
1159 09**00040A0C**
1160
1161 The acceleration is set to ±2g, and the frequency is 400 Hz. The threshold is set to 10 × 16 mg, meaning a change between 158 and 162 mg can be detected.
1162 )))
1163
1164 == 3.4 Set Password ==
1165
1166
1167 **Feature**: Set device password, up to 9 digits
1168
1169 (% style="color:#4f81bd" %)**AT Command:**
1170
1171 (% border="2" style="width:500px" %)
1172 |(% style="width:152px" %)**Command**|(% style="width:346px" %)AT+PWORD
1173 |(% style="width:152px" %)**Parameters**|(% style="width:346px" %)**password** : any password
1174 |(% style="width:152px" %)**Get**|(% style="width:346px" %)AT+PWORD=?
1175 |(% style="width:152px" %)**Response**|(% style="width:346px" %)Returns the current password
1176 |(% style="width:152px" %)**Set**|(% style="width:346px" %)AT+PWORD=<password>
1177 |(% style="width:152px" %)**Response**|(% style="width:346px" %)OK
1178 |(% style="width:152px" %)**Example**|(% style="width:346px" %)(((
1179 * AT+PWORD=? ~/~/ show the current password, 123456 for example
1180 * AT+PWORD=999999. ~/~/ set the password to 999999
1181 )))
1182
1183 (% style="color:#4f81bd" %)**Downlink Command:**
1184
1185 There is no downlink command available for this feature.
1186
1187
1188 == 3.5 Quit AT Command ==
1189
1190
1191 **Feature**: Quit AT Command mode, so you need to input the password again before using AT Commands.
1192
1193 (% style="color:#4f81bd" %)**AT Command:**
1194
1195 (% border="2" style="width:500px" %)
1196 |(% style="width:156px" %)**Command**|(% style="width:342px" %)AT+DISAT
1197 |(% style="width:156px" %)**Parameters**|(% style="width:342px" %)none
1198 |(% style="width:156px" %)**Set**|(% style="width:342px" %)AT+DISAT
1199 |(% style="width:156px" %)**Response**|(% style="width:342px" %)OK
1200 |(% style="width:156px" %)**Example**|(% style="width:342px" %)AT+DISAT ~/~/ quit AT command mode
1201
1202 (% style="color:#4f81bd" %)**Downlink Command**
1203
1204 There is no downlink command available for this feature.
1205
1206
1207 == 3.6 Set to sleep mode ==
1208
1209
1210 **Feature**: Set device to sleep mode.
1211
1212 (% style="color:#4f81bd" %)**AT Command:**
1213
1214 (% border="2" style="width:500px" %)
1215 |(% style="width:154px" %)**Command**|(% style="width:344px" %)AT+SLEEP
1216 |(% style="width:154px" %)**Parameters**|(% style="width:344px" %)(((
1217 mode : mode
1218
1219 **0** :  Normal working mode - The device enters sleep mode and uses lower power when there are no LoRa messages.
1220
1221 **1** : Deep sleep mode -The device does not activate LoRa and is intended for storage or shipping.
1222 )))
1223 |(% style="width:154px" %)**Set**|(% style="width:344px" %)AT+SLEEP=<mode>
1224 |(% style="width:154px" %)**Response**|(% style="width:344px" %)OK
1225 |(% style="width:154px" %)**Example**|(% style="width:344px" %)(((
1226 * **AT+SLEEP=0 ~/~/ **set to normal working mode.
1227 * **AT+SLEEP=1 ~/~/ **set to Deep sleep mode.
1228 )))
1229
1230 (% style="color:#4f81bd" %)**Downlink Command**
1231
1232 There is no downlink command available for this feature.
1233
1234
1235 == 3.7 Set system time ==
1236
1237
1238 **Feature**: Set the system time.
1239
1240 (% style="color:#4f81bd" %)**AT Command:**
1241
1242 (% border="2" style="width:500px" %)
1243 |(% style="width:142px" %)**Command**|(% style="width:356px" %)AT+TIMESTAMP
1244 |(% style="width:142px" %)**Parameters**|(% style="width:356px" %)**time** : time in UNIX format. [[See here for format details.>>||anchor="H2.6.2UnixTimeStamp"]]
1245 |(% style="width:142px" %)**Set**|(% style="width:356px" %)AT+TIMESTAMP=<time>
1246 |(% style="width:142px" %)**Response**|(% style="width:356px" %)OK
1247 |(% style="width:142px" %)**Example**|(% style="width:356px" %)(((
1248 * AT+TIMESTAMP=1611104352 ~/~/ Set System time to 2021-01-20 00:59:12
1249 )))
1250
1251 (% style="color:#4f81bd" %)**Downlink Command:**
1252
1253 (% border="2" style="width:500px" %)
1254 |(% style="width:141px" %)**Prefix**|(% style="width:357px" %)0x30
1255 |(% style="width:141px" %)**Parameters**|(% style="width:357px" %)**time** : time in UNIX format. [[See here for format details.>>||anchor="H2.6.2UnixTimeStamp"]] - 5 bytes in hexadecimal
1256 |(% style="width:141px" %)**Example**|(% style="width:357px" %)(((
1257 * 30**6007806000**  ~/~/ Set System time to 2021-01-20 00:59:12
1258 )))
1259
1260 == 3.8 Set Time Sync Mode ==
1261
1262
1263 (((
1264 **Feature**: Enable/Disable system time synchronization via the LoRaWAN MAC Command (DeviceTimeReq). The LoRaWAN server must support the v1.0.3 protocol to respond to this command.
1265
1266 (% style="color:#4f81bd" %)**AT Command:**
1267
1268 (% border="2" style="width:500px" %)
1269 |(% style="width:157px" %)**Command**|(% style="width:341px" %)AT+SYNCMOD
1270 |(% style="width:157px" %)**Parameters**|(% style="width:341px" %)(((
1271 **time_sync_mode** : Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq)
1272
1273 **1** : enable (default)
1274
1275 **0** : disable
1276 )))
1277 |(% style="width:157px" %)**Set**|(% style="width:341px" %)AT+SYNCMOD=<time_sync_mode>
1278 |(% style="width:157px" %)**Example**|(% style="width:341px" %)(((
1279 * AT+SYNCMOD=0 ~/~/ Disable the time sync mode
1280 )))
1281 |(% style="width:157px" %)**Note**|(% style="width:341px" %)If you want to set a different time than the LoRaWAN server, you need to set this to 0.
1282
1283
1284 )))
1285
1286 (% style="color:#4f81bd" %)**Downlink Command:**
1287
1288 (% border="2" style="width:500px" %)
1289 |(% style="width:162px" %)**Prefix**|(% style="width:336px" %)0x28
1290 |(% style="width:162px" %)**Parameters**|(% style="width:336px" %)(((
1291 **time_sync_mode** : Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) - 1 byte in hexadecimal
1292
1293 **1** : enable (default)
1294
1295 **0** : disable
1296 )))
1297 |(% style="width:162px" %)**Example**|(% style="width:336px" %)(((
1298 * 28** 01**  ~/~/ Enable the time sync mode
1299 * 28 **00**  ~/~/ Disable the time sync mode
1300 )))
1301
1302 == 3.9 Set Time Sync Interval ==
1303
1304
1305 **Feature**: Define system time synchronization interval. The** **default value is 10 days.
1306
1307 (% style="color:#4f81bd" %)**AT Command:**
1308
1309 (% border="2" style="width:500px" %)
1310 |(% style="width:158px" %)**Command**|(% style="width:340px" %)AT+SYNCTDC
1311 |(% style="width:158px" %)**Parameters**|(% style="width:340px" %)**sync_interval** : synchronization interval
1312 |(% style="width:158px" %)**Set**|(% style="width:340px" %)AT+SYNCTDC=<sync_interval>
1313 |(% style="width:158px" %)**Response**|(% style="width:340px" %)
1314 |(% style="width:158px" %)**Example**|(% style="width:340px" %)(((
1315 * AT+SYNCTDC=10 ~/~/ Set synchronization interval to 10
1316 )))
1317
1318 (% style="color:#4f81bd" %)**Downlink Command:**
1319
1320 (% border="2" style="width:500px" %)
1321 |(% style="width:155px" %)**Prefix**|(% style="width:343px" %)0x29
1322 |(% style="width:155px" %)**Parameters**|(% style="width:343px" %)**sync_interval** : synchronization interval - 1 byte in hexadecimal
1323 |(% style="width:155px" %)**Example**|(% style="width:343px" %)(((
1324 * 29**0A**  ~/~/ Set synchronization interval to 10
1325 )))
1326
1327 == 3.10 Get data ==
1328
1329
1330 **Feature**: Get the current sensor data.
1331
1332 (% style="color:#4f81bd" %)**AT Command:**
1333
1334 (% border="2" style="width:500px" %)
1335 |(% style="width:157px" %)**Command**|(% style="width:341px" %)AT+GETSENSORVALUE
1336 |(% style="width:157px" %)**Parameters**|(% style="width:341px" %)(((
1337 **mode** : defines data retrieve and upload behavior
1338
1339 **0** : The serial port retrieves the current sensor reading.
1340
1341 **1** : The serial port retrieves the current sensor reading and uploads it.
1342 )))
1343 |(% style="width:157px" %)**Set**|(% style="width:341px" %)AT+GETSENSORVALUE=<mode>
1344 |(% style="width:157px" %)**Response**|(% style="width:341px" %)
1345 |(% style="width:157px" %)**Example**|(% style="width:341px" %)(((
1346 * **AT+GETSENSORVALUE=0**      ~/~/ The serial port retrieves the current sensor reading.
1347 * **AT+GETSENSORVALUE=1**      ~/~/ The serial port retrieves the current sensor reading and uploads it.
1348 )))
1349
1350 (% style="color:#4f81bd" %)**Downlink Command:**
1351
1352 There is no downlink command for this feature.
1353
1354
1355 == 3.11 Print data entries base on page ==
1356
1357
1358 **Feature**: Print sensor data from start page to stop page (max is 416 pages).
1359
1360 (% style="color:#4f81bd" %)**AT Command:**
1361
1362 (% border="2" style="width:500px" %)
1363 |(% style="width:148px" %)**Command**|(% style="width:349px" %)AT+PDTA
1364 |(% style="width:148px" %)**Parameters**|(% style="width:349px" %)(((
1365 **start** : start page number
1366
1367 **end** : end page number
1368 )))
1369 |(% style="width:148px" %)**Command format**|(% style="width:349px" %)AT+PDTA=<start>,<end>
1370 |(% style="width:148px" %)**Example**|(% style="width:349px" %)(((
1371 AT+PDTA=1,3 ~/~/ Prints sensor data from page 1 to 3
1372 )))
1373 |(% style="width:148px" %)**Example response**|(% style="width:349px" %)(((
1374 Stop Tx events when read sensor data
1375
1376 8031000 2024/10/12 08:26:16 1 2807 tdc:yes alarm:false event_count:0 work_min:0
1377
1378 8031010 2024/10/12 08:26:40 1 2804 tdc:no alarm:false event_count:0 work_min:0
1379
1380 8031020 1970/1/1 00:00:10 1 2806 tdc:yes alarm:false event_count:0 work_min:0
1381
1382 8031030 2024/10/12 08:28:18 1 2805 tdc:yes alarm:false event_count:0 work_min:0
1383
1384 8031040 2024/10/12 08:29:18 1 2804 tdc:yes alarm:false event_count:0 work_min:0
1385
1386 8031050 2024/10/12 08:30:18 1 2806 tdc:yes alarm:false event_count:1 work_min:0
1387
1388 8031060 2024/10/12 08:30:27 1 2806 tdc:no alarm:true event_count:2 work_min:0
1389
1390 8031070 2024/10/12 08:31:18 1 2806 tdc:yes alarm:false event_count:3 work_min:1
1391
1392 [Rx][16:33:25.888] 8031080 2024/10/12 08:32:18 1 2806 tdc:yes alarm:false event_count:3 work_min:1
1393
1394 8031090 2024/10/12 08:33:18 1 2807 tdc:yes alarm:false event_count:3 work_min:1
1395
1396 80310A0
1397
1398 80310B0
1399
1400 80310C0
1401
1402 80310D0
1403
1404 80310E0
1405
1406 80310F0
1407
1408 8031100
1409
1410 8031110
1411
1412 8031120
1413
1414 8031130
1415
1416 8031140
1417
1418 8031150
1419
1420 8031160
1421
1422 8031170
1423
1424 Start Tx events
1425
1426 OK
1427 )))
1428
1429 (% style="color:#4f81bd" %)**Downlink Command:**
1430
1431 There is no downlink command for this feature.
1432
1433
1434 == 3.12 Print last few data entries ==
1435
1436
1437 **Feature**: Print the last few data entries.
1438
1439 (% style="color:#4f81bd" %)**AT Command:**
1440
1441 (% border="2" style="width:500px" %)
1442 |(% style="width:147px" %)**Command**|(% style="width:351px" %)AT+PLDTA
1443 |(% style="width:147px" %)**Parameters**|(% style="width:351px" %)**num_entries** : number of data entries you want to print.
1444 |(% style="width:147px" %)**Command format**|(% style="width:351px" %)AT+PLDTA=<num_entries>
1445 |(% style="width:147px" %)**Example**|(% style="width:351px" %)AT+PLDTA=5 ~/~/ Print last 5 entries
1446 |(% style="width:147px" %)**Example output**|(% style="width:351px" %)(((
1447 Stop Tx events when read sensor data
1448
1449 0001 2024/10/12 08:33:18 1 2807 tdc:yes alarm:false event_count:3 work_min:1
1450
1451 0002 2024/10/12 08:34:50 1 2808 tdc:yes alarm:false event_count:3 work_min:1
1452
1453 0003 2024/10/12 08:35:50 1 2808 tdc:yes alarm:false event_count:3 work_min:1
1454
1455 0004 2024/10/12 08:36:50 1 2809 tdc:yes alarm:false event_count:3 work_min:1
1456
1457 0005 2024/10/12 08:37:50 1 2810 tdc:yes alarm:false event_count:3 work_min:1
1458 Start Tx and RTP events
1459 OK
1460 )))
1461
1462 (% style="color:#4f81bd" %)**Downlink Command:**
1463
1464 There is no downlink command for this feature.
1465
1466
1467 == 3.13 Clear Flash Record ==
1468
1469
1470 **Feature**: Clear the flash storage used by the data log feature.
1471
1472 (% style="color:#4f81bd" %)**AT Command:**
1473
1474 (% border="2" style="width:500px" %)
1475 |(% style="width:133px" %)**Command**|(% style="width:365px" %)AT+CLRDTA
1476 |(% style="width:133px" %)**Parameters**|(% style="width:365px" %)NO
1477 |(% style="width:133px" %)**Example**|(% style="width:365px" %)AT+CLRDTA ~/~/ Clear all stored sensor data in the flash.
1478
1479 (% style="color:#4f81bd" %)**Downlink Command:**
1480
1481 (% border="2" style="width:500px" %)
1482 |(% style="width:129px" %)**Prefix**|(% style="width:369px" %)0xA3
1483 |(% style="width:129px" %)**Parameters**|(% style="width:369px" %)01 - always use 01 (hex) with the prefix
1484 |(% style="width:129px" %)**Example**|(% style="width:369px" %)A3 **01  **~/~/ Clear all stored sensor data in the flash.
1485
1486 == 3.14 Auto Send None-ACK messages ==
1487
1488
1489 **Feature**: LHT65N-VIB will wait for an ACK for each uplink. If LHT65N-VIB doesn't receive an ACK from the network server, it will assume the message didn't reach the server and store it. LHT65N-VIB continues sending messages periodically as usual. Once LHT65N-VIB receives an ACK from the network server, it will assume the network is functioning properly and start sending the messages that haven't arrived.
1490
1491 (% style="color:#4f81bd" %)**AT Command**
1492
1493 The default factory setting is 0
1494
1495 (% border="2" style="width:500px" %)
1496 |(% style="width:135px" %)**Command**|(% style="width:363px" %)AT+PNACKMD
1497 |(% style="width:135px" %)**Parameters**|(% style="width:363px" %)always 1
1498 |(% style="width:135px" %)**Command format**|(% style="width:363px" %)AT+PNACKMD=1 ~/~/ Polls non-ACK message
1499 |(% style="width:135px" %)**Response**|(% style="width:363px" %)OK
1500
1501 (% style="color:#4f81bd" %)**Downlink Command**
1502
1503 Prefix: 0x34
1504
1505 (% border="2" style="width:500px" %)
1506 |(% style="width:135px" %)**Prefix**|(% style="width:363px" %)0x34
1507 |(% style="width:135px" %)**Parameters**|(% style="width:363px" %)01 in hexadecimal
1508 |(% style="width:135px" %)**Payload format**|(% style="width:363px" %)34**01 ~/~/ **Polls non-ACK message
1509
1510 = 4. Batteries =
1511
1512 == 4.1 Battery Type ==
1513
1514
1515 (((
1516 **The LHT65N-VIB is equipped with a 2400mAh Li-MnO2 (CR17505) battery.** The battery is non-rechargeable with a low discharge rate, designed for up to 8–10 years of use. This type of battery is commonly used in IoT devices for long-term operation, such as in water meters.
1517
1518 **The discharge curve is nonlinear, so the battery level cannot be simply represented as a percentage.** Below is the battery performance:
1519 )))
1520
1521 (((
1522 [[image:image-20220515075034-1.png||_mstalt="428961" height="208" width="644"]]
1523 )))
1524
1525 The minimum working voltage for the LHT65N-VIB is approximately 2.5V. When the battery voltage drops below 2.6V, it's time to replace the battery.
1526
1527
1528 == 4.2 Replacing Batteries ==
1529
1530
1531 The LHT65N-VIB has two screws on the back. Unscrew them to remove the battery cover and replace the battery inside. The sensor uses a standard CR17450 battery, and any brand should be suitable.
1532
1533 [[image:image-20220515075440-2.png||_mstalt="429546" height="338" width="272"]][[image:image-20220515075625-3.png||_mstalt="431574" height="193" width="257"]]
1534
1535
1536 == 4.3 Battery Life Analysis ==
1537
1538
1539 (((
1540 Dragino battery-powered products all operate in Low Power mode. You can refer to the guidelines from this link to calculate the estimated battery life: [[https:~~/~~/www.dropbox.com/scl/fo/kpnidyj98435yc2kzcuol/AGMEYy8T-ToxrjBxVKiBJMw?rlkey=clgoex1idnfka8845d6e9ajue&st=m513k45l&dl=0>>https://www.dropbox.com/scl/fo/kpnidyj98435yc2kzcuol/AGMEYy8T-ToxrjBxVKiBJMw?rlkey=clgoex1idnfka8845d6e9ajue&st=m513k45l&dl=0]]
1541 )))
1542
1543 (((
1544 A detailed test report for the LHT65N-VIB on different frequencies can be found here: [[https:~~/~~/www.dropbox.com/scl/fo/wnqaiyoq21kyzrmre6kzn/ABAgXYDr03OGSrM2ODFjUJA?rlkey=jed5yinvpdd0fiqww7x7cw201&st=rdtlz5ik&dl=0>>https://www.dropbox.com/scl/fo/wnqaiyoq21kyzrmre6kzn/ABAgXYDr03OGSrM2ODFjUJA?rlkey=jed5yinvpdd0fiqww7x7cw201&st=rdtlz5ik&dl=0]]
1545 )))
1546
1547
1548 = 5. FAQ =
1549
1550 == 5.1 How to connect to LHT65N-VIB via UART interface? ==
1551
1552
1553 The LHT65N-VIB has the UART interface in its Type-C. The UART Interface can be used for
1554
1555 * Send AT Commands, and get output from LHT65N-VIB
1556 * Upgrade firmwre of LHT65N-VIB.
1557
1558 The hardware connection is: **PC <~-~-> USB to TTL Adapter <~-~-> Jump wires <~-~-> Type-C Adapter <~-~-> LHT65N-VIB**
1559
1560
1561 === 5.1.1 Options for USB to TTL adapter ===
1562
1563
1564 * CP2101 USB TTL Adapter
1565 * CH340 USB TTL Adapter
1566 * FT232 USB TTL Adapter
1567
1568 === 5.1.2 Options for Type-C adapter ===
1569
1570
1571 [[image:image-20240122103221-3.png||_mstalt="425594" height="694" width="1039"]]
1572
1573
1574 **Connection:**
1575
1576 * (% style="background-color:yellow" %)**USB to TTL GND <~-~-> LHT65N GND**
1577 * (% style="background-color:yellow" %)**USB to TTL RXD <~-~-> LHT65N TXD**
1578 * (% style="background-color:yellow" %)**USB to TTL TXD <~-~-> LHT65N RXD**
1579
1580 (((
1581
1582
1583 === 5.1.3 Connection Example ===
1584
1585
1586 [[image:1655802313617-381.png||_mstalt="293917"]]
1587
1588
1589 [[image:image-20240122092100-1.jpeg||_mstalt="467389" height="466" width="643"]]
1590
1591
1592 == 5.2 How to use AT commands? ==
1593
1594
1595 First, connect the PC and LHT65N-VIB via USB TTL adapter as described in **FAQ 6.1.**
1596
1597 On the PC, you need to set serial tool (such as **[[PuTTY>>https://www.putty.org]] **or** [[SecureCRT>>https://www.vandyke.com/products/securecrt/]]**) baud rate to **9600** to access the serial console for LHT65N-VIB. The AT commands are disabled by default, and the user needs to enter the password (default: 123456) to activate them. The timeout for inputting AT commands is 5 minutes; after 5 minutes, the user will need to input the password again. The user can use the AT+DISAT command to disable AT commands before the timeout.
1598
1599 Input the password and ATZ to activate the LHT65N-VIB, as shown below:
1600 )))
1601
1602 [[image:image-20220530095701-4.png||_mstalt="430014"]]
1603
1604
1605 === 5.2.1 AT commands ===
1606
1607
1608 The AT command list is as below:
1609
1610 **AT+<CMD>?** : Help on <CMD>
1611
1612 **AT+<CMD>** : Run <CMD>
1613
1614 **AT+<CMD>=<value>** : Set the value
1615
1616 **AT+<CMD>=?** : Get the value
1617
1618 **AT+DEBUG :** Set more info output
1619
1620 **ATZ :** Triggers a reset of the MCU
1621
1622 **AT+FDR :** Reset Parameters to Factory Default, Keys Reserve
1623
1624 **AT+DEUI** : Get or Set the Device EUI
1625
1626 **AT+DADDR** : Get or Set the Device Address
1627
1628 **AT+APPKEY** : Get or Set the Application Key
1629
1630 **AT+NWKSKEY** : Get or Set the Network Session Key
1631
1632 **AT+APPSKEY** : Get or Set the Application Session Key
1633
1634 **AT+APPEUI** : Get or Set the Application EUI
1635
1636 **AT+ADR** : Get or Set the Adaptive Data Rate setting. (0: off, 1: on)
1637
1638 **AT+TXP** : Get or Set the Transmit Power (0-5, MAX:0, MIN:5, according to LoRaWAN Spec)
1639
1640 **AT+DR **: Get or Set the Data Rate. (0-7 corresponding to DR_X)
1641
1642 **AT+DCS** : Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing
1643
1644 **AT+PNM** : Get or Set the public network mode. (0: off, 1: on)
1645
1646 **AT+RX2FQ** : Get or Set the Rx2 window frequency
1647
1648 **AT+RX2DR** : Get or Set the Rx2 window data rate (0-7 corresponding to DR_X)
1649
1650 **AT+RX1DL** : Get or Set the delay between the end of the Tx and the Rx Window 1 in ms
1651
1652 **AT+RX2DL** : Get or Set the delay between the end of the Tx and the Rx Window 2 in ms
1653
1654 **AT+JN1DL** : Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms
1655
1656 **AT+JN2DL** : Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms
1657
1658 **AT+NJM** : Get or Set the Network Join Mode. (0: ABP, 1: OTAA)
1659
1660 **AT+NWKID** : Get or Set the Network ID
1661
1662 **AT+FCU** : Get or Set the Frame Counter Uplink
1663
1664 **AT+FCD** : Get or Set the Frame Counter Downlink
1665
1666 **AT+CLASS **: Get or Set the Device Class
1667
1668 **AT+JOIN **: Join network
1669
1670 **AT+NJS** : Get the join status
1671
1672 **AT+SENDB** : Send hexadecimal data along with the application port
1673
1674 **AT+SEND** : Send text data along with the application port
1675
1676 **AT+RECVB** : Print last received data in binary format (with hexadecimal values)
1677
1678 **AT+RECV** : Print last received data in raw format
1679
1680 **AT+VER** : Get current image version and Frequency Band
1681
1682 **AT+CFM** : Get or Set the confirmation mode (0-1)
1683
1684 **AT+SNR** : Get the SNR of the last received packet
1685
1686 **AT+RSSI** : Get the RSSI of the last received packet
1687
1688 **AT+TDC** : Get or set the application data transmission interval in ms
1689
1690 **AT+PORT** : Get or set the application port
1691
1692 **AT+DISAT** : Disable AT commands
1693
1694 **AT+PWORD** : Set password, max 9 digits
1695
1696 **AT+CHS** : Get or Set Frequency (Unit: Hz) for Single Channel Mode
1697
1698 **AT+CHE** : Get or Set eight channels mode,Only for US915,AU915,CN470
1699
1700 **AT+PDTA** : Print the sector data from start page to stop page
1701
1702 **AT+PLDTA **: Print the last few sets of data
1703
1704 **AT+CLRDTA **: Clear the storage, record position back to 1st
1705
1706 **AT+SLEEP** : Set sleep mode
1707
1708 **AT+BAT **: Get the current battery voltage in mV
1709
1710 **AT+CFG** : Print all configurations
1711
1712 **AT+WMOD** : Get or Set Work Mode
1713
1714 **AT+ARTEMP** : Get or set the internal Temperature sensor alarm range
1715
1716 **AT+CITEMP** : Get or set the internal Temperature sensor collection interval in min
1717
1718 **AT+SETCNT** : Set the count at present
1719
1720 **AT+RJTDC** : Get or set the ReJoin data transmission interval in min
1721
1722 **AT+RPL** : Get or set response level
1723
1724 **AT+TIMESTAMP** : Get or Set UNIX timestamp in second
1725
1726 **AT+LEAPSEC** : Get or Set Leap Second
1727
1728 **AT+SYNCMOD** : Get or Set time synchronization method
1729
1730 **AT+SYNCTDC** : Get or set time synchronization interval in day
1731
1732 **AT+PID** : Get or set the PID
1733
1734
1735 == 5.3 How to use Downlink commands? ==
1736
1737
1738 The following sections shows how to send downlinks to LHT65N-VIB from various LoRaWAN network servers.
1739
1740
1741 === (% style="color:blue" %)**5.3.1 The Things Stack**(%%) ===
1742
1743
1744 The following image shows how to send downlink commands (the payloads) from The Things Stack.
1745
1746
1747 [[image:eu1.cloud.thethings.network_console_applications_dragino-docs_devices_lt-22222-l_messaging_downlink(Laptop with HiDPI screen).png]]
1748
1749
1750 === (% style="color:blue" %)**5.3.2 Helium**(%%) ===
1751
1752
1753 The following image shows how to send downlink commands (the payloads) from Helium.
1754
1755 [[image:image-20220615092551-3.png||_mstalt="430794" height="423" width="835"]]
1756
1757
1758 === (% style="color:blue" %)**5.3.3 ChirpStack**(%%) ===
1759
1760
1761 The following image shows how to send downlink commands (the payloads) from ChripStack. (% style="color:blue" %)**The downlink window will not be displayed until the network is accessed.**
1762
1763 [[image:image-20220615094850-6.png||_mstalt="433082"]]
1764
1765
1766 [[image:image-20220615094904-7.png||_mstalt="433485" height="281" width="911"]]
1767
1768
1769 The following image shows how to send downlink commands (the payloads) from AWS-IOT.
1770
1771
1772 === (% style="color:blue" %)**5.3.4 AWS-IoT**(%%) ===
1773
1774
1775 [[image:image-20220615092939-4.png||_mstalt="434460" height="448" width="894"]]
1776
1777
1778 == 5.4 How to change the uplink interval? ==
1779
1780
1781 See the **Sub section 3.1**, **Set Transmit Interval Time**.
1782
1783
1784 == 5.5 How to upgrade the firmware? ==
1785
1786
1787 You can upgrade firmware of the LHT65N-VIB to:
1788
1789 * Change the frequency band/region.
1790 * Add new features.
1791 * Fix bugs.
1792
1793 The firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/scl/fo/ztlw35a9xbkomu71u31im/AMz-h4yQUzAm6A7EKnQh5bc/LoRaWAN%20End%20Node/LHT65N-VIB?dl=0&rlkey=ojjcsw927eaow01dgooldq3nu&subfolder_nav_tracking=1]]**
1794
1795 **Methods to Update Firmware:**
1796
1797 * **Recommanded method**: OTA (Over-the-Air) firmware update via wireless. For instructions, visit: [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]
1798 * **Alternative Method**: Update via UART TTL interface. For instructions, see: **[[Update Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**.
1799
1800 == 5.6 Why can't I see the datalog information? ==
1801
1802
1803 ~1. The time is not aligned, and the correct query command was not used.
1804
1805 2. Decoder error: the datalog data was not parsed, and the data was filtered out.
1806
1807
1808 == 5.7 How can I read sensor data without LoRaWAN? (for calibration purpose) ==
1809
1810
1811 Some clients may need to calibrate sensor values in a lab environment. In these cases, it’s more convenient to read the data without a LoRaWAN network. To do this, you can use a USB Type-C breakout board to access the UART pins while keeping the probe connected. See below for details. For the pinout, please refer to the FAQ on [[How to connect LHT65-N via UART interface>>https://www.dropbox.com/sh/una19zsni308dme/AACOKp6J2RF5TMlKWT5zU3RTa?dl=0]].
1812
1813 [[image:image-20240122092100-1.jpeg||_mstalt="467389" height="346" width="476"]]
1814
1815
1816 After the UART connection is established, run the commands below:
1817
1818 1.** AT+NJM=0      **~/~/ Set Device to ABP mode so it can work without joining the LoRaWAN network server.
1819
1820 2.** AT+GETSENSORVALUE=0      **~/~/ The serial port gets the reading from the current sensor.
1821
1822 **Example output:**
1823
1824 [[image:image-20240128093852-1.png||_mstalt="431912" height="235" width="552"]]
1825
1826
1827 = 6. Ordering Information =
1828
1829
1830 Part Number: (% style="color:#4f81bd" %)** LHT65N-VIB-XX**
1831
1832 (% style="color:#4f81bd" %)**XX **(%%): The default frequency band
1833
1834 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
1835 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
1836 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
1837 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
1838 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
1839 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**US915**(%%): LoRaWAN US915 band
1840 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
1841 * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
1842
1843 = 7. Packing Information =
1844
1845
1846 The package includes:
1847
1848 * LHT65N-VIB LoRaWAN Vibration Sensor x 1
1849 * External vibration probe x 1
1850
1851 = 8. Reference Materials =
1852
1853
1854 * [[Datasheet, photos, firmware>>https://www.dropbox.com/scl/fo/zfqrx88n90zofefkgug2k/AP6y5A4ZDnP3d1EUrWvRk8w?rlkey=z8qn3nx8dhjp8gy0rd7btd6it&st=sgy7v350&dl=0]]
1855
1856 = 9. FCC Warning =
1857
1858
1859 This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:
1860
1861 1. This device may not cause harmful interference.
1862 1. This device must accept any interference received, including interference that may cause undesired operation.
1863
1864 = 10. Use Cases =
1865
1866
1867 This section includes some example practical applications for the LHT65N-VIB.
1868
1869
1870 == 10.1 Install the LHT65N-VIB to monitor the usage of handwashing stations ==
1871
1872
1873 Device settings using AT command: AT+VIBMOD=1,120,5
1874
1875 This means that if the water faucet remains on, a vibration lasting more than 120 seconds will trigger an alarm. When the vibration stops for more than 5 seconds, the vibration count will increase by 1.
1876
1877 * The data begins to rise after 8 o'clock, indicating that the wash basin sensor is working normally.
1878 * During lunch time, from 12 noon to 1:30 PM, the data temporarily levels off but returns to normal operation after.
1879 * At 6 PM, after work hours, the data flattens out, with only a small amount recorded, caused by employees working overtime and using the wash basin.
1880
1881 [[image:image-20241101174220-2.png||height="349" width="560"]]
1882
1883
1884 * Number of wash basin alarms: 14 times
1885 * The rest period is concentrated around 12 o'clock, as people wash their hands during the lunch break.
1886 * The longer duration at 6 o'clock is due to someone needing to turn on the water to clean the toilet.
1887
1888 [[image:image-20241101175954-3.png||height="210" width="601"]]
1889
1890
1891 **Sink installation example:**
1892 Fix the probe to the water inlet pipe of the sink using a cable tie. Since the vibration in the middle is not as noticeable, and the water outlet on the right is larger than the one on the left, resulting in a larger vibration amplitude, the probe should be installed at the middle of the left water inlet pipe. This way, vibrations can be detected on both sides of the water pipe.
1893
1894 [[image:image-20241202160241-2.png]]
1895
1896
1897 The following figure illustrates this use case from the network point of view.
1898
1899
1900 [[image:usecase-1.jpg||height="267" width="1000"]]
1901
1902
1903 == 10.2 Install LHT65N-VIB on the toilet water pipe to detect the number of times it is used and the leakage status ==
1904
1905 **Toilet installation example:**
1906 Fix the probe to the water inlet pipe of the toilet with a wire tie. When the toilet is used, the pipes began to fill with water and vibrate, and the LHT65N-VIB will start detecting vibrations in the water pipe.
1907
1908 **Note:** LHT65N-VIB should not be immersed in water. If necessary, ensure it is waterproofed.
1909
1910 [[image:image-20250325101740-1.png||height="493" width="375"]][[image:image-20250325101809-2.png||height="497" width="530"]]
1911
1912
1913 Device settings using AT command: AT+VIBMOD=1,150,5
1914
1915 This means that if the vibration exceeds 150 seconds, an alarm message will be issued. When the vibration stops for more than 5 seconds, the number of vibrations will increase by 1.
1916 When the toilet vibrates for only 150 seconds each time it is flushed, any vibration exceeding 150 seconds would indicate an abnormal situation.
1917
1918 * The data starts to rise after 8 o'clock, indicating that the toilet sensor is working normally.
1919 * The data remains flat with no abnormalities during the lunch break from 12:00 PM to 1:30 PM.
1920 * The data stops rising at 6:00 PM when work is over.
1921
1922 [[image:image-20241101181711-4.png||height="330" width="562"]]
1923
1924
1925 According to the calculation results in the given example, we can know that after pressing the flush button of the toilet, its maximum water filling time is set to 150 seconds. This means that under normal operating conditions, the water tank of the toilet should complete the water filling process within 150 seconds.
1926
1927 In order to ensure the normal operation of the system and detect potential problems in time, I adjusted the device accordingly, and the specific parameters were configured as AT+VIBMOD=1,150,5. This configuration means that in mode 1, when continuous vibration is detected for 150 seconds or more, the system will automatically trigger the alarm mechanism; if the vibration stops and exceeds 5 seconds, the timer will be reset and a new round of monitoring will begin.
1928
1929 The main purpose of this setting is to monitor the operating status of the toilet water filling system. Once the device sends an alarm signal, it usually indicates that the toilet water filling system may have a fault or there is a risk of leakage. In this case, it is recommended to immediately conduct a detailed inspection and necessary maintenance work on the toilet to avoid further water waste or other problems that may arise. In this way, water use efficiency can be effectively improved, the environment can be protected, and unnecessary economic losses can be reduced.
1930
1931 [[image:image-20241101182128-5.png||height="257" width="574"]]
1932
1933
1934 The following figure illustrates this use case from the network point of view.
1935
1936
1937 [[image:usecase-2.jpg||height="267" width="1000"]]
1938
1939
1940 == 10.3 VIBMOD4: Detect vibration intensity ==
1941
1942
1943 Set AT+VIBMOD=4,1,10 to collect a set of XYZ vibration data every ten seconds.
1944
1945 By analyzing the data collected in the graph, we can observe that the vibration amplitude of the machine varies significantly under different working conditions. This monitoring method not only helps to determine in real time whether the machine is operating normally but also allows for the early detection of any abnormal changes in vibration frequency. This, in turn, helps to effectively prevent potential failures and ensures the safe and stable operation of the equipment.
1946
1947 [[image:image-20241104105122-1.png||height="559" width="695"]]
1948
1949
1950 == 10.4 Package Handling Monitoring ==
1951
1952
1953 Attach the LHT65N-VIB sensor to sensitive shipments (e.g., medical equipment, electronics, artwork) to detect excessive vibrations or improper handling during transport.
1954 The temperature and humidity readings can confirm whether the shipment stayed within safe environmental ranges.
1955
1956 **Benefit:**
1957
1958 * Identify mishandling during transport.
1959 * Ensure product quality upon arrival.
1960 * Provide proof for insurance or logistics partners
1961
1962 [[image:usecase-4.jpg||height="267" width="1000"]]
1963
1964
1965 == 10.5 Door and Gate Activity Monitoring ==
1966
1967 Install the sensor on warehouse doors, server room doors, or remote facility gates to detect unexpected openings (vibration when the door moves) and monitor ambient conditions inside critical areas.
1968
1969 **Benefit:**
1970
1971 * Detect unauthorised access attempts.
1972 * Log normal usage patterns.
1973 * Monitor temperature-sensitive rooms like server rooms or medicine storage.
1974
1975 [[image:usecase-5.jpg||height="267" width="1000"]]
1976
1977
1978
1979 == 10.6 Elevator and Escalator Monitoring ==
1980
1981
1982 Place a sensor on elevator motors or escalator machinery to detect irregular vibration patterns. Combine vibration events with temperature trends to predict mechanical issues early.
1983
1984 **Benefit:**
1985
1986 * Early warning of potential breakdowns.
1987 * Reduce maintenance costs.
1988 * Improve building safety.
1989
1990 [[image:usecase-6.jpg||height="267" width="1000"]]
1991
1992
1993 == 10.7 Remote Farm Equipment Status Check ==
1994
1995
1996 Install the sensor on stationary farm equipment (like irrigation pumps or grain dryers) located across large fields. Monitor when equipment vibrates (operating) and stop (idle) without needing a technician physically present.
1997
1998 **Benefit:**
1999
2000 * Remote confirmation of equipment operation.
2001 * Temperature and humidity data help optimize agricultural processes.
2002 * Save time and reduce manual checks.
2003
2004 [[image:usecase-7.jpg||height="267" width="1000"]]
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0