Changes for page Monitor Gateway
Last modified by Xiaoling on 2022/07/14 15:37
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,12 +1,15 @@ 1 - **Contents:** 1 + **Table of** **Contents:** 2 2 3 3 {{toc/}} 4 4 5 5 6 -= **1. Introduction** = 6 += **1. Introduction** = 7 7 8 + 8 8 ((( 9 9 This introduction shows how to use a script to monitor the gateway. The video link for this instruction is: [[https:~~/~~/youtu.be/8PieIwfSF_g>>url:https://youtu.be/8PieIwfSF_g]] 11 + 12 + 10 10 ))) 11 11 12 12 [[image:image-20220527111742-1.png]] ... ... @@ -14,14 +14,18 @@ 14 14 Monitor Gateway 15 15 16 16 17 -= **2. Steps** = 18 18 21 += **2. Steps** = 22 + 23 + 19 19 ((( 20 -~1. Create account in ThingsSpeak and creat channel. 25 +(% style="color:blue" %)**1. Create account in ThingsSpeak and creat channel.** 26 + 27 + 21 21 ))) 22 22 23 23 ((( 24 -2. Download script from dragino site and move it to properly directory 31 +(% style="color:blue" %)**2. Download script from dragino site and move it to properly directory** 25 25 ))) 26 26 27 27 (% class="box" %) ... ... @@ -37,28 +37,29 @@ 37 37 root@dragino-1baf44:~~# 38 38 ))) 39 39 47 + 40 40 ((( 41 -3. change the script monitor_gateway.sh with properly users setting: 49 +(% style="color:blue" %)**3. change the script monitor_gateway.sh with properly users setting:** 42 42 ))) 43 43 44 44 (% class="box" %) 45 45 ((( 46 -USER='xxxxx' 47 -PASS='xxxxx' #MQTT_API_KEY in your thinkspeak ~-~-> Profile 54 +**USER='xxxxx' # user name in your thinkspeak ~-~-> Profile 55 +PASS='xxxxx' # MQTT_API_KEY in your thinkspeak ~-~-> Profile** 48 48 ))) 49 49 50 50 (% class="box" %) 51 51 ((( 52 -CHAN_ID='xxxx' 53 -CHAN_KEY='xxxxx' #Channel Write API of the channel for this gateway 60 +**CHAN_ID='xxxx' # Channel ID of the channel for this gateway 61 +CHAN_KEY='xxxxx' # Channel Write API of the channel for this gateway** 54 54 ))) 55 55 56 56 ((( 57 - ~1. run **/usr/bin/monitor_gateway.sh** to test if upload is good.65 +1). run **/usr/bin/monitor_gateway.sh** to test if upload is good. 58 58 ))) 59 59 60 60 ((( 61 -2. Add monitor_gateway.sh to cron work **/etc/crontabs/root** to make this script runs perdiocally, below is an example to update every 20 minutes 69 +2). Add monitor_gateway.sh to cron work **/etc/crontabs/root** to make this script runs perdiocally, below is an example to update every 20 minutes 62 62 ))) 63 63 64 64 (% class="box" %) ... ... @@ -78,12 +78,14 @@ 78 78 ))) 79 79 80 80 ((( 81 -3. Reboot device. 89 +3). Reboot device. 82 82 ))) 83 83 84 84 85 -= **3. Monitor Public IP** = 86 86 94 += **3. Monitor Public IP** = 95 + 96 + 87 87 The monitor_gateway.sh has been updated to upload the public ip of the device as well. 88 88 89 89 ((( ... ... @@ -93,3 +93,5 @@ 93 93 [[image:image-20220527111850-2.png]] 94 94 95 95 Find Public IP 106 + 107 +