Wiki source code of LHT65N-VIB LoRaWAN Vibration Sensor Manual
Last modified by Karry Zhuang on 2025/03/25 14:54
Show last authors
author | version | line-number | content |
---|---|---|---|
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 | ==== 3.2.2.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 | ==== 3.2.2.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 | ==== 3.2.2.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 | (% border="2" style="width:500px" %) | ||
1000 | |(% style="width:143px" %)**Command**|(% style="width:355px" %)AT+VIBMOD | ||
1001 | |(% style="width:143px" %)**Parameters**|(% style="width:355px" %)((( | ||
1002 | **mode** : 1, 2, 3, 4 | ||
1003 | |||
1004 | **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 | ||
1005 | |||
1006 | **stop_duration_time**: Specifies the interval after which the event is counted as a trigger. - only applicable with mode 1, 2, 3 | ||
1007 | |||
1008 | **collection_interval **: Collection Interval (unit: seconds) - only applicable with mode 4. | ||
1009 | |||
1010 | **groups** : Number of groups - only applicable with mode 4 | ||
1011 | ))) | ||
1012 | |(% style="width:143px" %)**Set**|(% style="width:355px" %)((( | ||
1013 | for mode 1,2,3: | ||
1014 | |||
1015 | AT+VIBMOD=<mode><alarm_timeout><stop_duration_time> | ||
1016 | |||
1017 | for mode 4: | ||
1018 | |||
1019 | AT+VIBMOD=<mode><collection_interval><gropus> | ||
1020 | ))) | ||
1021 | |(% style="width:143px" %)**Example**|(% style="width:355px" %)((( | ||
1022 | **AT+VIBMOD=1,60,10** | ||
1023 | |||
1024 | **MOD1** will display **vib_count** and **work_min** without temperature and humidity. If vibration stops for more than 60 seconds, an alarm message is generated. | ||
1025 | |||
1026 | If vibration stops for more than 10 seconds, **vib_count** increases by one, and **work_min** resets to zero. | ||
1027 | |||
1028 | |||
1029 | **AT+VIBMOD=4,1,10** | ||
1030 | |||
1031 | MOD4 sets the collection interval to 10 seconds and collects 1 sets of data in total. | ||
1032 | |||
1033 | You can also set it to collect ten sets of data per second, AT+VIBMOD=4,10,1 | ||
1034 | ))) | ||
1035 | |||
1036 | [[image:image-20250321145711-2.png]] | ||
1037 | |||
1038 | [[image:image-20250321145842-3.png]] | ||
1039 | |||
1040 | |||
1041 | (% style="color:#4f81bd" %)**Downlink command** | ||
1042 | |||
1043 | (% border="2" style="width:500px" %) | ||
1044 | |(% style="width:137px" %)**Prefix**|(% style="width:361px" %)0x0A | ||
1045 | |(% style="width:137px" %)**Parameters**|(% style="width:361px" %)((( | ||
1046 | **mode** : 1, 2, 3, 4 [1 byte in hex] | ||
1047 | |||
1048 | **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] | ||
1049 | |||
1050 | **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] | ||
1051 | |||
1052 | **collection_interval **: Collection Interval (unit: seconds) - only applicable with mode 4. [2 bytes in hexadecimal] | ||
1053 | |||
1054 | **groups** : Number of groups - only applicable with mode 4. [2 bytes in hexadecimal] | ||
1055 | ))) | ||
1056 | |(% style="width:137px" %)**Payload format**|(% style="width:361px" %)((( | ||
1057 | for mode 1, 2, 3: | ||
1058 | |||
1059 | <prefix><mode><alarm_time><stop_duration_time> | ||
1060 | |||
1061 | |||
1062 | for mode 4: | ||
1063 | |||
1064 | <prefix><mode><collection_interval><groups> | ||
1065 | ))) | ||
1066 | |(% style="width:137px" %)**Example**|(% style="width:361px" %)((( | ||
1067 | * 0A01003C000A | ||
1068 | |||
1069 | **MOD1** will display **vib_count** and **work_min** without temperature and humidity. If vibration stops for more than 60 seconds, an alarm message is generated. | ||
1070 | |||
1071 | If vibration stops for more than 10 seconds, **vib_count** increases by one, and **work_min** resets to zero. | ||
1072 | |||
1073 | * 0A0400010A | ||
1074 | |||
1075 | **MOD4** sets the collection interval to 10 seconds and collects 1 sets of data in total. | ||
1076 | ))) | ||
1077 | |||
1078 | == 3.3 Vibration sensitivity setting == | ||
1079 | |||
1080 | |||
1081 | **Feature**: Allows adjustment of sensitivity settings for different usage scenarios. | ||
1082 | |||
1083 | |||
1084 | (% style="color:#4f81bd" %)**AT Command:** | ||
1085 | |||
1086 | (% border="2" style="width:500px" %) | ||
1087 | |(% style="width:134px" %)**Command**|(% style="width:364px" %)AT+VIBSET | ||
1088 | |(% style="width:134px" %)**Parameters**|(% style="width:364px" %)((( | ||
1089 | **acceleration** : | ||
1090 | |||
1091 | * 0: ±2g | ||
1092 | * 1: ±4g | ||
1093 | * 2: ±8g | ||
1094 | * 3: ±16g | ||
1095 | |||
1096 | **frequency** : | ||
1097 | |||
1098 | * 0:25Hz | ||
1099 | * 1:50Hz | ||
1100 | * 2:100Hz | ||
1101 | * 3:200Hz | ||
1102 | * 4:400Hz | ||
1103 | |||
1104 | **threshold** : interrupt threshold | ||
1105 | |||
1106 | **duration** : Interrupt detection duration in milliseconds | ||
1107 | ))) | ||
1108 | |(% style="width:134px" %)**Set**|(% style="width:364px" %)AT+VIBSET=<acceleration><frequency><threshold><duration> | ||
1109 | |(% style="width:134px" %)**Response**|(% style="width:364px" %)OK | ||
1110 | |(% style="width:134px" %)**Example**|(% style="width:364px" %)((( | ||
1111 | **~ AT+VIBSET=0,4,10,12** | ||
1112 | |||
1113 | 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. | ||
1114 | ))) | ||
1115 | |||
1116 | 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. | ||
1117 | |||
1118 | |||
1119 | The following screenshots are taken from data sheets of the internal sensors: | ||
1120 | |||
1121 | [[image:image-20241014154353-1.png||height="307" width="727"]] | ||
1122 | |||
1123 | [[image:image-20241014154413-2.png||height="509" width="715"]] | ||
1124 | |||
1125 | |||
1126 | (% style="color:#4f81bd" %)**Downlink Command** | ||
1127 | |||
1128 | (% border="2" style="width:500px" %) | ||
1129 | |(% style="width:156px" %)**Prefix**|(% style="width:342px" %)0x09 | ||
1130 | |(% style="width:156px" %)**Parameters**|(% style="width:342px" %)((( | ||
1131 | **acceleration** : 2 bytes in hex | ||
1132 | |||
1133 | * 0: ±2g | ||
1134 | * 1: ±4g | ||
1135 | * 2: ±8g | ||
1136 | * 3: ±16g | ||
1137 | |||
1138 | **frequency** : 2 bytes in hex | ||
1139 | |||
1140 | * 0:25Hz | ||
1141 | * 1:50Hz | ||
1142 | * 2:100Hz | ||
1143 | * 3:200Hz | ||
1144 | * 4:400Hz | ||
1145 | |||
1146 | **threshold** : interrupt threshold - 2 bytes in hex | ||
1147 | |||
1148 | **duration** : Interrupt detection duration in milliseconds - 2 bytes in hex | ||
1149 | ))) | ||
1150 | |(% style="width:156px" %)**Example**|(% style="width:342px" %)((( | ||
1151 | 09**00040A0C** | ||
1152 | |||
1153 | 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. | ||
1154 | ))) | ||
1155 | |||
1156 | == 3.4 Set Password == | ||
1157 | |||
1158 | |||
1159 | **Feature**: Set device password, up to 9 digits | ||
1160 | |||
1161 | (% style="color:#4f81bd" %)**AT Command:** | ||
1162 | |||
1163 | (% border="2" style="width:500px" %) | ||
1164 | |(% style="width:152px" %)**Command**|(% style="width:346px" %)AT+PWORD | ||
1165 | |(% style="width:152px" %)**Parameters**|(% style="width:346px" %)**password** : any password | ||
1166 | |(% style="width:152px" %)**Get**|(% style="width:346px" %)AT+PWORD=? | ||
1167 | |(% style="width:152px" %)**Response**|(% style="width:346px" %)Returns the current password | ||
1168 | |(% style="width:152px" %)**Set**|(% style="width:346px" %)AT+PWORD=<password> | ||
1169 | |(% style="width:152px" %)**Response**|(% style="width:346px" %)OK | ||
1170 | |(% style="width:152px" %)**Example**|(% style="width:346px" %)((( | ||
1171 | * AT+PWORD=? ~/~/ show the current password, 123456 for example | ||
1172 | * AT+PWORD=999999. ~/~/ set the password to 999999 | ||
1173 | ))) | ||
1174 | |||
1175 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1176 | |||
1177 | There is no downlink command available for this feature. | ||
1178 | |||
1179 | |||
1180 | == 3.5 Quit AT Command == | ||
1181 | |||
1182 | |||
1183 | **Feature**: Quit AT Command mode, so you need to input the password again before using AT Commands. | ||
1184 | |||
1185 | (% style="color:#4f81bd" %)**AT Command:** | ||
1186 | |||
1187 | (% border="2" style="width:500px" %) | ||
1188 | |(% style="width:156px" %)**Command**|(% style="width:342px" %)AT+DISAT | ||
1189 | |(% style="width:156px" %)**Parameters**|(% style="width:342px" %)none | ||
1190 | |(% style="width:156px" %)**Set**|(% style="width:342px" %)AT+DISAT | ||
1191 | |(% style="width:156px" %)**Response**|(% style="width:342px" %)OK | ||
1192 | |(% style="width:156px" %)**Example**|(% style="width:342px" %)AT+DISAT ~/~/ quit AT command mode | ||
1193 | |||
1194 | (% style="color:#4f81bd" %)**Downlink Command** | ||
1195 | |||
1196 | There is no downlink command available for this feature. | ||
1197 | |||
1198 | |||
1199 | == 3.6 Set to sleep mode == | ||
1200 | |||
1201 | |||
1202 | **Feature**: Set device to sleep mode. | ||
1203 | |||
1204 | (% style="color:#4f81bd" %)**AT Command:** | ||
1205 | |||
1206 | (% border="2" style="width:500px" %) | ||
1207 | |(% style="width:154px" %)**Command**|(% style="width:344px" %)AT+SLEEP | ||
1208 | |(% style="width:154px" %)**Parameters**|(% style="width:344px" %)((( | ||
1209 | mode : mode | ||
1210 | |||
1211 | **0** : Normal working mode - The device enters sleep mode and uses lower power when there are no LoRa messages. | ||
1212 | |||
1213 | **1** : Deep sleep mode -The device does not activate LoRa and is intended for storage or shipping. | ||
1214 | ))) | ||
1215 | |(% style="width:154px" %)**Set**|(% style="width:344px" %)AT+SLEEP=<mode> | ||
1216 | |(% style="width:154px" %)**Response**|(% style="width:344px" %)OK | ||
1217 | |(% style="width:154px" %)**Example**|(% style="width:344px" %)((( | ||
1218 | * **AT+SLEEP=0 ~/~/ **set to normal working mode. | ||
1219 | * **AT+SLEEP=1 ~/~/ **set to Deep sleep mode. | ||
1220 | ))) | ||
1221 | |||
1222 | (% style="color:#4f81bd" %)**Downlink Command** | ||
1223 | |||
1224 | There is no downlink command available for this feature. | ||
1225 | |||
1226 | |||
1227 | == 3.7 Set system time == | ||
1228 | |||
1229 | |||
1230 | **Feature**: Set the system time. | ||
1231 | |||
1232 | (% style="color:#4f81bd" %)**AT Command:** | ||
1233 | |||
1234 | (% border="2" style="width:500px" %) | ||
1235 | |(% style="width:142px" %)**Command**|(% style="width:356px" %)AT+TIMESTAMP | ||
1236 | |(% style="width:142px" %)**Parameters**|(% style="width:356px" %)**time** : time in UNIX format. [[See here for format details.>>||anchor="H2.6.2UnixTimeStamp"]] | ||
1237 | |(% style="width:142px" %)**Set**|(% style="width:356px" %)AT+TIMESTAMP=<time> | ||
1238 | |(% style="width:142px" %)**Response**|(% style="width:356px" %)OK | ||
1239 | |(% style="width:142px" %)**Example**|(% style="width:356px" %)((( | ||
1240 | * AT+TIMESTAMP=1611104352 ~/~/ Set System time to 2021-01-20 00:59:12 | ||
1241 | ))) | ||
1242 | |||
1243 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1244 | |||
1245 | (% border="2" style="width:500px" %) | ||
1246 | |(% style="width:141px" %)**Prefix**|(% style="width:357px" %)0x30 | ||
1247 | |(% 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 | ||
1248 | |(% style="width:141px" %)**Example**|(% style="width:357px" %)((( | ||
1249 | * 30**6007806000** ~/~/ Set System time to 2021-01-20 00:59:12 | ||
1250 | ))) | ||
1251 | |||
1252 | == 3.8 Set Time Sync Mode == | ||
1253 | |||
1254 | |||
1255 | ((( | ||
1256 | **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. | ||
1257 | |||
1258 | (% style="color:#4f81bd" %)**AT Command:** | ||
1259 | |||
1260 | (% border="2" style="width:500px" %) | ||
1261 | |(% style="width:157px" %)**Command**|(% style="width:341px" %)AT+SYNCMOD | ||
1262 | |(% style="width:157px" %)**Parameters**|(% style="width:341px" %)((( | ||
1263 | **time_sync_mode** : Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) | ||
1264 | |||
1265 | **1** : enable (default) | ||
1266 | |||
1267 | **0** : disable | ||
1268 | ))) | ||
1269 | |(% style="width:157px" %)**Set**|(% style="width:341px" %)AT+SYNCMOD=<time_sync_mode> | ||
1270 | |(% style="width:157px" %)**Example**|(% style="width:341px" %)((( | ||
1271 | * AT+SYNCMOD=0 ~/~/ Disable the time sync mode | ||
1272 | ))) | ||
1273 | |(% 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. | ||
1274 | |||
1275 | |||
1276 | ))) | ||
1277 | |||
1278 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1279 | |||
1280 | (% border="2" style="width:500px" %) | ||
1281 | |(% style="width:162px" %)**Prefix**|(% style="width:336px" %)0x28 | ||
1282 | |(% style="width:162px" %)**Parameters**|(% style="width:336px" %)((( | ||
1283 | **time_sync_mode** : Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) - 1 byte in hexadecimal | ||
1284 | |||
1285 | **1** : enable (default) | ||
1286 | |||
1287 | **0** : disable | ||
1288 | ))) | ||
1289 | |(% style="width:162px" %)**Example**|(% style="width:336px" %)((( | ||
1290 | * 28** 01** ~/~/ Enable the time sync mode | ||
1291 | * 28 **00** ~/~/ Disable the time sync mode | ||
1292 | ))) | ||
1293 | |||
1294 | == 3.9 Set Time Sync Interval == | ||
1295 | |||
1296 | |||
1297 | **Feature**: Define system time synchronization interval. The** **default value is 10 days. | ||
1298 | |||
1299 | (% style="color:#4f81bd" %)**AT Command:** | ||
1300 | |||
1301 | (% border="2" style="width:500px" %) | ||
1302 | |(% style="width:158px" %)**Command**|(% style="width:340px" %)AT+SYNCTDC | ||
1303 | |(% style="width:158px" %)**Parameters**|(% style="width:340px" %)**sync_interval** : synchronization interval | ||
1304 | |(% style="width:158px" %)**Set**|(% style="width:340px" %)AT+SYNCTDC=<sync_interval> | ||
1305 | |(% style="width:158px" %)**Response**|(% style="width:340px" %) | ||
1306 | |(% style="width:158px" %)**Example**|(% style="width:340px" %)((( | ||
1307 | * AT+SYNCTDC=10 ~/~/ Set synchronization interval to 10 | ||
1308 | ))) | ||
1309 | |||
1310 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1311 | |||
1312 | (% border="2" style="width:500px" %) | ||
1313 | |(% style="width:155px" %)**Prefix**|(% style="width:343px" %)0x29 | ||
1314 | |(% style="width:155px" %)**Parameters**|(% style="width:343px" %)**sync_interval** : synchronization interval - 1 byte in hexadecimal | ||
1315 | |(% style="width:155px" %)**Example**|(% style="width:343px" %)((( | ||
1316 | * 29**0A** ~/~/ Set synchronization interval to 10 | ||
1317 | ))) | ||
1318 | |||
1319 | == 3.10 Get data == | ||
1320 | |||
1321 | |||
1322 | **Feature**: Get the current sensor data. | ||
1323 | |||
1324 | (% style="color:#4f81bd" %)**AT Command:** | ||
1325 | |||
1326 | (% border="2" style="width:500px" %) | ||
1327 | |(% style="width:157px" %)**Command**|(% style="width:341px" %)AT+GETSENSORVALUE | ||
1328 | |(% style="width:157px" %)**Parameters**|(% style="width:341px" %)((( | ||
1329 | **mode** : defines data retrieve and upload behavior | ||
1330 | |||
1331 | **0** : The serial port retrieves the current sensor reading. | ||
1332 | |||
1333 | **1** : The serial port retrieves the current sensor reading and uploads it. | ||
1334 | ))) | ||
1335 | |(% style="width:157px" %)**Set**|(% style="width:341px" %)AT+GETSENSORVALUE=<mode> | ||
1336 | |(% style="width:157px" %)**Response**|(% style="width:341px" %) | ||
1337 | |(% style="width:157px" %)**Example**|(% style="width:341px" %)((( | ||
1338 | * **AT+GETSENSORVALUE=0** ~/~/ The serial port retrieves the current sensor reading. | ||
1339 | * **AT+GETSENSORVALUE=1** ~/~/ The serial port retrieves the current sensor reading and uploads it. | ||
1340 | ))) | ||
1341 | |||
1342 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1343 | |||
1344 | There is no downlink command for this feature. | ||
1345 | |||
1346 | |||
1347 | == 3.11 Print data entries base on page == | ||
1348 | |||
1349 | |||
1350 | **Feature**: Print sensor data from start page to stop page (max is 416 pages). | ||
1351 | |||
1352 | (% style="color:#4f81bd" %)**AT Command:** | ||
1353 | |||
1354 | (% border="2" style="width:500px" %) | ||
1355 | |(% style="width:148px" %)**Command**|(% style="width:349px" %)AT+PDTA | ||
1356 | |(% style="width:148px" %)**Parameters**|(% style="width:349px" %)((( | ||
1357 | **start** : start page number | ||
1358 | |||
1359 | **end** : end page number | ||
1360 | ))) | ||
1361 | |(% style="width:148px" %)**Command format**|(% style="width:349px" %)AT+PDTA=<start>,<end> | ||
1362 | |(% style="width:148px" %)**Example**|(% style="width:349px" %)((( | ||
1363 | AT+PDTA=1,3 ~/~/ Prints sensor data from page 1 to 3 | ||
1364 | ))) | ||
1365 | |(% style="width:148px" %)**Example response**|(% style="width:349px" %)((( | ||
1366 | Stop Tx events when read sensor data | ||
1367 | |||
1368 | 8031000 2024/10/12 08:26:16 1 2807 tdc:yes alarm:false event_count:0 work_min:0 | ||
1369 | |||
1370 | 8031010 2024/10/12 08:26:40 1 2804 tdc:no alarm:false event_count:0 work_min:0 | ||
1371 | |||
1372 | 8031020 1970/1/1 00:00:10 1 2806 tdc:yes alarm:false event_count:0 work_min:0 | ||
1373 | |||
1374 | 8031030 2024/10/12 08:28:18 1 2805 tdc:yes alarm:false event_count:0 work_min:0 | ||
1375 | |||
1376 | 8031040 2024/10/12 08:29:18 1 2804 tdc:yes alarm:false event_count:0 work_min:0 | ||
1377 | |||
1378 | 8031050 2024/10/12 08:30:18 1 2806 tdc:yes alarm:false event_count:1 work_min:0 | ||
1379 | |||
1380 | 8031060 2024/10/12 08:30:27 1 2806 tdc:no alarm:true event_count:2 work_min:0 | ||
1381 | |||
1382 | 8031070 2024/10/12 08:31:18 1 2806 tdc:yes alarm:false event_count:3 work_min:1 | ||
1383 | |||
1384 | [Rx][16:33:25.888] 8031080 2024/10/12 08:32:18 1 2806 tdc:yes alarm:false event_count:3 work_min:1 | ||
1385 | |||
1386 | 8031090 2024/10/12 08:33:18 1 2807 tdc:yes alarm:false event_count:3 work_min:1 | ||
1387 | |||
1388 | 80310A0 | ||
1389 | |||
1390 | 80310B0 | ||
1391 | |||
1392 | 80310C0 | ||
1393 | |||
1394 | 80310D0 | ||
1395 | |||
1396 | 80310E0 | ||
1397 | |||
1398 | 80310F0 | ||
1399 | |||
1400 | 8031100 | ||
1401 | |||
1402 | 8031110 | ||
1403 | |||
1404 | 8031120 | ||
1405 | |||
1406 | 8031130 | ||
1407 | |||
1408 | 8031140 | ||
1409 | |||
1410 | 8031150 | ||
1411 | |||
1412 | 8031160 | ||
1413 | |||
1414 | 8031170 | ||
1415 | |||
1416 | Start Tx events | ||
1417 | |||
1418 | OK | ||
1419 | ))) | ||
1420 | |||
1421 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1422 | |||
1423 | There is no downlink command for this feature. | ||
1424 | |||
1425 | |||
1426 | == 3.12 Print last few data entries == | ||
1427 | |||
1428 | |||
1429 | **Feature**: Print the last few data entries. | ||
1430 | |||
1431 | (% style="color:#4f81bd" %)**AT Command:** | ||
1432 | |||
1433 | (% border="2" style="width:500px" %) | ||
1434 | |(% style="width:147px" %)**Command**|(% style="width:351px" %)AT+PLDTA | ||
1435 | |(% style="width:147px" %)**Parameters**|(% style="width:351px" %)**num_entries** : number of data entries you want to print. | ||
1436 | |(% style="width:147px" %)**Command format**|(% style="width:351px" %)AT+PLDTA=<num_entries> | ||
1437 | |(% style="width:147px" %)**Example**|(% style="width:351px" %)AT+PLDTA=5 ~/~/ Print last 5 entries | ||
1438 | |(% style="width:147px" %)**Example output**|(% style="width:351px" %)((( | ||
1439 | Stop Tx events when read sensor data | ||
1440 | |||
1441 | 0001 2024/10/12 08:33:18 1 2807 tdc:yes alarm:false event_count:3 work_min:1 | ||
1442 | |||
1443 | 0002 2024/10/12 08:34:50 1 2808 tdc:yes alarm:false event_count:3 work_min:1 | ||
1444 | |||
1445 | 0003 2024/10/12 08:35:50 1 2808 tdc:yes alarm:false event_count:3 work_min:1 | ||
1446 | |||
1447 | 0004 2024/10/12 08:36:50 1 2809 tdc:yes alarm:false event_count:3 work_min:1 | ||
1448 | |||
1449 | 0005 2024/10/12 08:37:50 1 2810 tdc:yes alarm:false event_count:3 work_min:1 | ||
1450 | Start Tx and RTP events | ||
1451 | OK | ||
1452 | ))) | ||
1453 | |||
1454 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1455 | |||
1456 | There is no downlink command for this feature. | ||
1457 | |||
1458 | |||
1459 | == 3.13 Clear Flash Record == | ||
1460 | |||
1461 | |||
1462 | **Feature**: Clear the flash storage used by the data log feature. | ||
1463 | |||
1464 | (% style="color:#4f81bd" %)**AT Command:** | ||
1465 | |||
1466 | (% border="2" style="width:500px" %) | ||
1467 | |(% style="width:133px" %)**Command**|(% style="width:365px" %)AT+CLRDTA | ||
1468 | |(% style="width:133px" %)**Parameters**|(% style="width:365px" %)NO | ||
1469 | |(% style="width:133px" %)**Example**|(% style="width:365px" %)AT+CLRDTA ~/~/ Clear all stored sensor data in the flash. | ||
1470 | |||
1471 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
1472 | |||
1473 | (% border="2" style="width:500px" %) | ||
1474 | |(% style="width:129px" %)**Prefix**|(% style="width:369px" %)0xA3 | ||
1475 | |(% style="width:129px" %)**Parameters**|(% style="width:369px" %)01 - always use 01 (hex) with the prefix | ||
1476 | |(% style="width:129px" %)**Example**|(% style="width:369px" %)A3 **01 **~/~/ Clear all stored sensor data in the flash. | ||
1477 | |||
1478 | == 3.14 Auto Send None-ACK messages == | ||
1479 | |||
1480 | |||
1481 | **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. | ||
1482 | |||
1483 | (% style="color:#4f81bd" %)**AT Command** | ||
1484 | |||
1485 | The default factory setting is 0 | ||
1486 | |||
1487 | (% border="2" style="width:500px" %) | ||
1488 | |(% style="width:135px" %)**Command**|(% style="width:363px" %)AT+PNACKMD | ||
1489 | |(% style="width:135px" %)**Parameters**|(% style="width:363px" %)always 1 | ||
1490 | |(% style="width:135px" %)**Command format**|(% style="width:363px" %)AT+PNACKMD=1 ~/~/ Polls non-ACK message | ||
1491 | |(% style="width:135px" %)**Response**|(% style="width:363px" %)OK | ||
1492 | |||
1493 | (% style="color:#4f81bd" %)**Downlink Command** | ||
1494 | |||
1495 | Prefix: 0x34 | ||
1496 | |||
1497 | (% border="2" style="width:500px" %) | ||
1498 | |(% style="width:135px" %)**Prefix**|(% style="width:363px" %)0x34 | ||
1499 | |(% style="width:135px" %)**Parameters**|(% style="width:363px" %)01 in hexadecimal | ||
1500 | |(% style="width:135px" %)**Payload format**|(% style="width:363px" %)34**01 ~/~/ **Polls non-ACK message | ||
1501 | |||
1502 | = 4. Batteries = | ||
1503 | |||
1504 | == 4.1 Battery Type == | ||
1505 | |||
1506 | |||
1507 | ((( | ||
1508 | **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. | ||
1509 | |||
1510 | **The discharge curve is nonlinear, so the battery level cannot be simply represented as a percentage.** Below is the battery performance: | ||
1511 | ))) | ||
1512 | |||
1513 | ((( | ||
1514 | [[image:image-20220515075034-1.png||_mstalt="428961" height="208" width="644"]] | ||
1515 | ))) | ||
1516 | |||
1517 | 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. | ||
1518 | |||
1519 | |||
1520 | == 4.2 Replacing Batteries == | ||
1521 | |||
1522 | |||
1523 | 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. | ||
1524 | |||
1525 | [[image:image-20220515075440-2.png||_mstalt="429546" height="338" width="272"]][[image:image-20220515075625-3.png||_mstalt="431574" height="193" width="257"]] | ||
1526 | |||
1527 | |||
1528 | == 4.3 Battery Life Analysis == | ||
1529 | |||
1530 | |||
1531 | ((( | ||
1532 | 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]] | ||
1533 | ))) | ||
1534 | |||
1535 | ((( | ||
1536 | 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]] | ||
1537 | ))) | ||
1538 | |||
1539 | |||
1540 | = 5. FAQ = | ||
1541 | |||
1542 | == 5.1 How to connect to LHT65N-VIB via UART interface? == | ||
1543 | |||
1544 | |||
1545 | The LHT65N-VIB has the UART interface in its Type-C. The UART Interface can be used for | ||
1546 | |||
1547 | * Send AT Commands, and get output from LHT65N-VIB | ||
1548 | * Upgrade firmwre of LHT65N-VIB. | ||
1549 | |||
1550 | The hardware connection is: **PC <~-~-> USB to TTL Adapter <~-~-> Jump wires <~-~-> Type-C Adapter <~-~-> LHT65N-VIB** | ||
1551 | |||
1552 | |||
1553 | === 5.1.1 Options for USB to TTL adapter === | ||
1554 | |||
1555 | |||
1556 | * CP2101 USB TTL Adapter | ||
1557 | * CH340 USB TTL Adapter | ||
1558 | * FT232 USB TTL Adapter | ||
1559 | |||
1560 | === 5.1.2 Options for Type-C adapter === | ||
1561 | |||
1562 | |||
1563 | [[image:image-20240122103221-3.png||_mstalt="425594" height="694" width="1039"]] | ||
1564 | |||
1565 | |||
1566 | **Connection:** | ||
1567 | |||
1568 | * (% style="background-color:yellow" %)**USB to TTL GND <~-~-> LHT65N GND** | ||
1569 | * (% style="background-color:yellow" %)**USB to TTL RXD <~-~-> LHT65N TXD** | ||
1570 | * (% style="background-color:yellow" %)**USB to TTL TXD <~-~-> LHT65N RXD** | ||
1571 | |||
1572 | ((( | ||
1573 | |||
1574 | |||
1575 | === 5.1.3 Connection Example === | ||
1576 | |||
1577 | |||
1578 | [[image:1655802313617-381.png||_mstalt="293917"]] | ||
1579 | |||
1580 | |||
1581 | [[image:image-20240122092100-1.jpeg||_mstalt="467389" height="466" width="643"]] | ||
1582 | |||
1583 | |||
1584 | == 5.2 How to use AT commands? == | ||
1585 | |||
1586 | |||
1587 | First, connect the PC and LHT65N-VIB via USB TTL adapter as described in **FAQ 6.1.** | ||
1588 | |||
1589 | 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. | ||
1590 | |||
1591 | Input the password and ATZ to activate the LHT65N-VIB, as shown below: | ||
1592 | ))) | ||
1593 | |||
1594 | [[image:image-20220530095701-4.png||_mstalt="430014"]] | ||
1595 | |||
1596 | |||
1597 | === 5.2.1 AT commands === | ||
1598 | |||
1599 | |||
1600 | The AT command list is as below: | ||
1601 | |||
1602 | **AT+<CMD>?** : Help on <CMD> | ||
1603 | |||
1604 | **AT+<CMD>** : Run <CMD> | ||
1605 | |||
1606 | **AT+<CMD>=<value>** : Set the value | ||
1607 | |||
1608 | **AT+<CMD>=?** : Get the value | ||
1609 | |||
1610 | **AT+DEBUG :** Set more info output | ||
1611 | |||
1612 | **ATZ :** Triggers a reset of the MCU | ||
1613 | |||
1614 | **AT+FDR :** Reset Parameters to Factory Default, Keys Reserve | ||
1615 | |||
1616 | **AT+DEUI** : Get or Set the Device EUI | ||
1617 | |||
1618 | **AT+DADDR** : Get or Set the Device Address | ||
1619 | |||
1620 | **AT+APPKEY** : Get or Set the Application Key | ||
1621 | |||
1622 | **AT+NWKSKEY** : Get or Set the Network Session Key | ||
1623 | |||
1624 | **AT+APPSKEY** : Get or Set the Application Session Key | ||
1625 | |||
1626 | **AT+APPEUI** : Get or Set the Application EUI | ||
1627 | |||
1628 | **AT+ADR** : Get or Set the Adaptive Data Rate setting. (0: off, 1: on) | ||
1629 | |||
1630 | **AT+TXP** : Get or Set the Transmit Power (0-5, MAX:0, MIN:5, according to LoRaWAN Spec) | ||
1631 | |||
1632 | **AT+DR **: Get or Set the Data Rate. (0-7 corresponding to DR_X) | ||
1633 | |||
1634 | **AT+DCS** : Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing | ||
1635 | |||
1636 | **AT+PNM** : Get or Set the public network mode. (0: off, 1: on) | ||
1637 | |||
1638 | **AT+RX2FQ** : Get or Set the Rx2 window frequency | ||
1639 | |||
1640 | **AT+RX2DR** : Get or Set the Rx2 window data rate (0-7 corresponding to DR_X) | ||
1641 | |||
1642 | **AT+RX1DL** : Get or Set the delay between the end of the Tx and the Rx Window 1 in ms | ||
1643 | |||
1644 | **AT+RX2DL** : Get or Set the delay between the end of the Tx and the Rx Window 2 in ms | ||
1645 | |||
1646 | **AT+JN1DL** : Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms | ||
1647 | |||
1648 | **AT+JN2DL** : Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms | ||
1649 | |||
1650 | **AT+NJM** : Get or Set the Network Join Mode. (0: ABP, 1: OTAA) | ||
1651 | |||
1652 | **AT+NWKID** : Get or Set the Network ID | ||
1653 | |||
1654 | **AT+FCU** : Get or Set the Frame Counter Uplink | ||
1655 | |||
1656 | **AT+FCD** : Get or Set the Frame Counter Downlink | ||
1657 | |||
1658 | **AT+CLASS **: Get or Set the Device Class | ||
1659 | |||
1660 | **AT+JOIN **: Join network | ||
1661 | |||
1662 | **AT+NJS** : Get the join status | ||
1663 | |||
1664 | **AT+SENDB** : Send hexadecimal data along with the application port | ||
1665 | |||
1666 | **AT+SEND** : Send text data along with the application port | ||
1667 | |||
1668 | **AT+RECVB** : Print last received data in binary format (with hexadecimal values) | ||
1669 | |||
1670 | **AT+RECV** : Print last received data in raw format | ||
1671 | |||
1672 | **AT+VER** : Get current image version and Frequency Band | ||
1673 | |||
1674 | **AT+CFM** : Get or Set the confirmation mode (0-1) | ||
1675 | |||
1676 | **AT+SNR** : Get the SNR of the last received packet | ||
1677 | |||
1678 | **AT+RSSI** : Get the RSSI of the last received packet | ||
1679 | |||
1680 | **AT+TDC** : Get or set the application data transmission interval in ms | ||
1681 | |||
1682 | **AT+PORT** : Get or set the application port | ||
1683 | |||
1684 | **AT+DISAT** : Disable AT commands | ||
1685 | |||
1686 | **AT+PWORD** : Set password, max 9 digits | ||
1687 | |||
1688 | **AT+CHS** : Get or Set Frequency (Unit: Hz) for Single Channel Mode | ||
1689 | |||
1690 | **AT+CHE** : Get or Set eight channels mode,Only for US915,AU915,CN470 | ||
1691 | |||
1692 | **AT+PDTA** : Print the sector data from start page to stop page | ||
1693 | |||
1694 | **AT+PLDTA **: Print the last few sets of data | ||
1695 | |||
1696 | **AT+CLRDTA **: Clear the storage, record position back to 1st | ||
1697 | |||
1698 | **AT+SLEEP** : Set sleep mode | ||
1699 | |||
1700 | **AT+BAT **: Get the current battery voltage in mV | ||
1701 | |||
1702 | **AT+CFG** : Print all configurations | ||
1703 | |||
1704 | **AT+WMOD** : Get or Set Work Mode | ||
1705 | |||
1706 | **AT+ARTEMP** : Get or set the internal Temperature sensor alarm range | ||
1707 | |||
1708 | **AT+CITEMP** : Get or set the internal Temperature sensor collection interval in min | ||
1709 | |||
1710 | **AT+SETCNT** : Set the count at present | ||
1711 | |||
1712 | **AT+RJTDC** : Get or set the ReJoin data transmission interval in min | ||
1713 | |||
1714 | **AT+RPL** : Get or set response level | ||
1715 | |||
1716 | **AT+TIMESTAMP** : Get or Set UNIX timestamp in second | ||
1717 | |||
1718 | **AT+LEAPSEC** : Get or Set Leap Second | ||
1719 | |||
1720 | **AT+SYNCMOD** : Get or Set time synchronization method | ||
1721 | |||
1722 | **AT+SYNCTDC** : Get or set time synchronization interval in day | ||
1723 | |||
1724 | **AT+PID** : Get or set the PID | ||
1725 | |||
1726 | |||
1727 | == 5.3 How to use Downlink commands? == | ||
1728 | |||
1729 | |||
1730 | The following sections shows how to send downlinks to LHT65N-VIB from various LoRaWAN network servers. | ||
1731 | |||
1732 | |||
1733 | === (% style="color:blue" %)**5.3.1 The Things Stack**(%%) === | ||
1734 | |||
1735 | |||
1736 | The following image shows how to send downlink commands (the payloads) from The Things Stack. | ||
1737 | |||
1738 | |||
1739 | [[image:eu1.cloud.thethings.network_console_applications_dragino-docs_devices_lt-22222-l_messaging_downlink(Laptop with HiDPI screen).png]] | ||
1740 | |||
1741 | |||
1742 | === (% style="color:blue" %)**5.3.2 Helium**(%%) === | ||
1743 | |||
1744 | |||
1745 | The following image shows how to send downlink commands (the payloads) from Helium. | ||
1746 | |||
1747 | [[image:image-20220615092551-3.png||_mstalt="430794" height="423" width="835"]] | ||
1748 | |||
1749 | |||
1750 | === (% style="color:blue" %)**5.3.3 ChirpStack**(%%) === | ||
1751 | |||
1752 | |||
1753 | 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.** | ||
1754 | |||
1755 | [[image:image-20220615094850-6.png||_mstalt="433082"]] | ||
1756 | |||
1757 | |||
1758 | [[image:image-20220615094904-7.png||_mstalt="433485" height="281" width="911"]] | ||
1759 | |||
1760 | |||
1761 | The following image shows how to send downlink commands (the payloads) from AWS-IOT. | ||
1762 | |||
1763 | |||
1764 | === (% style="color:blue" %)**5.3.4 AWS-IoT**(%%) === | ||
1765 | |||
1766 | |||
1767 | [[image:image-20220615092939-4.png||_mstalt="434460" height="448" width="894"]] | ||
1768 | |||
1769 | |||
1770 | == 5.4 How to change the uplink interval? == | ||
1771 | |||
1772 | |||
1773 | See the **Sub section 3.1**, **Set Transmit Interval Time**. | ||
1774 | |||
1775 | |||
1776 | == 5.5 How to upgrade the firmware? == | ||
1777 | |||
1778 | |||
1779 | You can upgrade firmware of the LHT65N-VIB to: | ||
1780 | |||
1781 | * Change the frequency band/region. | ||
1782 | * Add new features. | ||
1783 | * Fix bugs. | ||
1784 | |||
1785 | 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]]** | ||
1786 | |||
1787 | **Methods to Update Firmware:** | ||
1788 | |||
1789 | * **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/]] | ||
1790 | * **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]]**. | ||
1791 | |||
1792 | == 5.6 Why can't I see the datalog information? == | ||
1793 | |||
1794 | |||
1795 | ~1. The time is not aligned, and the correct query command was not used. | ||
1796 | |||
1797 | 2. Decoder error: the datalog data was not parsed, and the data was filtered out. | ||
1798 | |||
1799 | |||
1800 | == 5.7 How can I read sensor data without LoRaWAN? (for calibration purpose) == | ||
1801 | |||
1802 | |||
1803 | 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]]. | ||
1804 | |||
1805 | [[image:image-20240122092100-1.jpeg||_mstalt="467389" height="346" width="476"]] | ||
1806 | |||
1807 | |||
1808 | After the UART connection is established, run the commands below: | ||
1809 | |||
1810 | 1.** AT+NJM=0 **~/~/ Set Device to ABP mode so it can work without joining the LoRaWAN network server. | ||
1811 | |||
1812 | 2.** AT+GETSENSORVALUE=0 **~/~/ The serial port gets the reading from the current sensor. | ||
1813 | |||
1814 | **Example output:** | ||
1815 | |||
1816 | [[image:image-20240128093852-1.png||_mstalt="431912" height="235" width="552"]] | ||
1817 | |||
1818 | |||
1819 | = 6. Ordering Information = | ||
1820 | |||
1821 | |||
1822 | Part Number: (% style="color:#4f81bd" %)** LHT65N-VIB-XX** | ||
1823 | |||
1824 | (% style="color:#4f81bd" %)**XX **(%%): The default frequency band | ||
1825 | |||
1826 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**AS923**(%%): LoRaWAN AS923 band | ||
1827 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**AU915**(%%): LoRaWAN AU915 band | ||
1828 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**EU433**(%%): LoRaWAN EU433 band | ||
1829 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**EU868**(%%): LoRaWAN EU868 band | ||
1830 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**KR920**(%%): LoRaWAN KR920 band | ||
1831 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**US915**(%%): LoRaWAN US915 band | ||
1832 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**IN865**(%%): LoRaWAN IN865 band | ||
1833 | * (% style="color:#4f81bd" %)** **(% _mstmutation="1" style="color:red" %)**CN470**(%%): LoRaWAN CN470 band | ||
1834 | |||
1835 | = 7. Packing Information = | ||
1836 | |||
1837 | |||
1838 | The package includes: | ||
1839 | |||
1840 | * LHT65N-VIB LoRaWAN Vibration Sensor x 1 | ||
1841 | * External vibration probe x 1 | ||
1842 | |||
1843 | = 8. Reference Materials = | ||
1844 | |||
1845 | |||
1846 | * [[Datasheet, photos, firmware>>https://www.dropbox.com/scl/fo/zfqrx88n90zofefkgug2k/AP6y5A4ZDnP3d1EUrWvRk8w?rlkey=z8qn3nx8dhjp8gy0rd7btd6it&st=sgy7v350&dl=0]] | ||
1847 | |||
1848 | = 9. FCC Warning = | ||
1849 | |||
1850 | |||
1851 | This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: | ||
1852 | |||
1853 | 1. This device may not cause harmful interference. | ||
1854 | 1. This device must accept any interference received, including interference that may cause undesired operation. | ||
1855 | |||
1856 | = 10. Use Cases = | ||
1857 | |||
1858 | |||
1859 | This section includes some example practical applications for the LHT65N-VIB. | ||
1860 | |||
1861 | |||
1862 | == 10.1 Install the LHT65N-VIB to monitor the usage of handwashing stations == | ||
1863 | |||
1864 | |||
1865 | Device settings using AT command: AT+VIBMOD=1,120,5 | ||
1866 | |||
1867 | 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. | ||
1868 | |||
1869 | * The data begins to rise after 8 o'clock, indicating that the wash basin sensor is working normally. | ||
1870 | * During lunch time, from 12 noon to 1:30 PM, the data temporarily levels off but returns to normal operation after. | ||
1871 | * 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. | ||
1872 | |||
1873 | [[image:image-20241101174220-2.png||height="349" width="560"]] | ||
1874 | |||
1875 | |||
1876 | * Number of wash basin alarms: 14 times | ||
1877 | * The rest period is concentrated around 12 o'clock, as people wash their hands during the lunch break. | ||
1878 | * The longer duration at 6 o'clock is due to someone needing to turn on the water to clean the toilet. | ||
1879 | |||
1880 | [[image:image-20241101175954-3.png||height="210" width="601"]] | ||
1881 | |||
1882 | |||
1883 | **Sink installation example:** | ||
1884 | 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. | ||
1885 | |||
1886 | [[image:image-20241202160241-2.png]] | ||
1887 | |||
1888 | |||
1889 | == 10.2 Install LHT65N-VIB on the toilet water pipe to detect the number of times it is used and the leakage status == | ||
1890 | |||
1891 | **Toilet installation example:** | ||
1892 | 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. | ||
1893 | |||
1894 | **Note:** LHT65N-VIB should not be immersed in water. If necessary, ensure it is waterproofed. | ||
1895 | |||
1896 | [[image:image-20250325101740-1.png||height="493" width="375"]][[image:image-20250325101809-2.png||height="497" width="530"]] | ||
1897 | |||
1898 | |||
1899 | Device settings using AT command: AT+VIBMOD=1,150,5 | ||
1900 | |||
1901 | 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. | ||
1902 | When the toilet vibrates for only 150 seconds each time it is flushed, any vibration exceeding 150 seconds would indicate an abnormal situation. | ||
1903 | |||
1904 | * The data starts to rise after 8 o'clock, indicating that the toilet sensor is working normally. | ||
1905 | * The data remains flat with no abnormalities during the lunch break from 12:00 PM to 1:30 PM. | ||
1906 | * The data stops rising at 6:00 PM when work is over. | ||
1907 | |||
1908 | [[image:image-20241101181711-4.png||height="330" width="562"]] | ||
1909 | |||
1910 | |||
1911 | 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. | ||
1912 | |||
1913 | 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. | ||
1914 | |||
1915 | 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. | ||
1916 | |||
1917 | [[image:image-20241101182128-5.png||height="257" width="574"]] | ||
1918 | |||
1919 | |||
1920 | |||
1921 | == 10.3 VIBMOD4: Detect vibration intensity == | ||
1922 | |||
1923 | |||
1924 | Set AT+VIBMOD=4,1,10 to collect a set of XYZ vibration data every ten seconds. | ||
1925 | |||
1926 | 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. | ||
1927 | |||
1928 | [[image:image-20241104105122-1.png||height="559" width="695"]] |