Last modified by Karry Zhuang on 2025/07/22 14:12

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