Wiki source code of 02 End-user mode

Version 1.1 by Leo Wei on 2022/06/08 12:58

Show last authors
1 = **1 Description: The end-user account is a secondary account(Sub account), From the cloud business account(Parent account)Create and manage** =
2
3 = **2 Function overview** =
4
5 == **2.1 Personal information page** ==
6
7 1.1 Edit user personal information.
8
9 == **2.2 Gateway Management Page** ==
10
11 2.1 Set Management Gateway Group.
12
13 2.2 The interface displays information about the gateway.
14
15 2.3 Support the replacement of gateway configuration, the following is the gateway project configuration, networking configuration, etc. to cover the original gateway running configuration.
16
17 2.4 End users can customize the configuration of gateway parameters, which are created by the parent account of the end user and used by the end user.
18
19 2.5 Support gateway operations, such as name editing, switching groups, adding favorites and other basic functions.
20
21 2.5.1 You can add favorites to commonly used gateways or key focus gateways, which is convenient for users to find.
22
23 2.6 Support some function buttons of the gateway, such as closing V-NET, restarting the gateway, debugging, firmware upgrade, feedback information, etc.
24
25 2.6.1 After closing V-NET, the gateway will disconnect all external network connections.
26
27 2.6.2 Debug the gateway that is running normally and is executing the script. The platform will see the script running print information reported by the gateway. The debugging function can be used with the feedback information button.
28
29 2.6.3 The feedback function button can check whether the gateway executes the script normally or reports an error, etc.
30
31 2.7 You can view the last gateway project configuration, network configuration and other information sent to the gateway through the platform.
32
33 == **2.3 Gateway project configuration page** ==
34
35 3.1 The configuration is sent to the gateway, and the configuration information of the gateway operation.
36
37 3.2 The creation of the gateway project configuration must be associated with the access configuration assigned to the cloud provider account (parent account).
38
39 3.3 The vwmt compressed package can be used to import the configuration, but the imported configuration must also be associated with the access configuration assigned to the cloud provider account (parent account).
40
41 3.4 Gateway project configuration details page (five modules: communication port configuration, collection point configuration, MQTT configuration, script configuration, custom information).
42
43 3.4.1 Communication port configuration: refer to the related operations of VNET communication port.
44
45 3.4.2 Collection point configuration: refer to related operations of VNET monitoring point.
46
47 ①When adding a collection point, you can define to set custom information for the collection point. The custom information is provided by the parent account of the current account (cloud business account) and used by the end user.
48
49 ②After the custom information of the gateway project configuration collection point is sent to the gateway through the gateway project configuration, the gateway uses the relevant interface function when executing the script, such as bns_get_config('user') to retrieve and use it,
50
51 3.4.3 MQTT configuration:
52
53 ①Configure the path and parameters of the gateway to access the MQTT server, use the related interface function MQTT.setup_cfg() in the "Hui Box Interface Document" in the script configuration module script to obtain and use MQTT information (see "Hui Box Interface Document" for details 》-MQTT operating instructions).
54
55 ②If the parent account (cloud merchant account) of the current end-user has closed the relevant permissions, the current user will not be able to see and set the MQTT information. And when the gateway project configuration is delivered to the gateway, the gateway will only use the MQTT information in the access configuration associated with the current gateway project configuration by default. The current user can configure MQTT information only after the parent account has enabled relevant permissions, and when the gateway project configuration is sent to the gateway, the gateway will use the MQTT configuration in the gateway project configuration instead of using the current gateway project configuration to associate access to the MQTT information in the configuration.
56
57 3.4.4 Script configuration:
58
59 ①Configure the running script of the gateway.
60
61 ②If the parent account of the current end-user (cloud merchant account) has disabled related permissions, the current user will not be able to see and set the script. And when the gateway project configuration is delivered to the gateway, the gateway will only use the script in the access configuration associated with the current gateway project configuration by default. The current user can configure the script after the parent account has enabled the relevant permissions. After the gateway project configuration is sent to the gateway, the gateway will use the script in the gateway project configuration to associate with the current gateway project configuration to access the script in the configuration.
62
63 3.4.5 Custom information:
64
65 ①Customized information can be set for the current gateway project configuration. The customized information is provided by the parent account (cloud business account) of the current account and used by the end user.
66
67 ②After the gateway project configuration custom information is sent to the gateway through the gateway project configuration, the gateway uses related interface functions such as bns_get_config('user') to retrieve and use when executing the script.
68
69 == **2.4 Debug page** ==
70
71 4.1 The current user can turn on the debugging function through the online and normally running gateway bound to the account. After the debugging function is turned on, the gateway will report the information printed in the running script to the platform, and the user can see it on the debugging page Related script running information.
72
73 4.2 The debugging function can be used in conjunction with the feedback information button on the gateway management page. After the user sends the gateway project configuration to the gateway, the gateway will execute the script that exists in the gateway project configuration. Whether the configuration is delivered successfully and whether the script is running abnormally can be checked through the feedback information function button. If the script is running normally, you can see the corresponding print information on the debugging page after the debugging is turned on.
74
75 == **2.5 Networking configuration page** ==
76
77 5.1 Users can customize, edit and set the networking mode of different gateway models
78
79 5.2 After the user sends the networking configuration to the corresponding model gateway, the gateway will cover the original device networking mode
80
81 == **2.6 End-user account management page** ==
82
83 6.1 The user can only display and operate the module after being set as a group administrator by the parent account (cloud business account)
84
85 6.2 The group administrator manages the end users in a group and group on behalf of the cloud parent account
86
87 7.Simple description of the script
88
89 = **3 functional modules** =
90
91 == **3.1 End-user account login** ==
92
93 1) User login needs to select the radio button shown in ② as shown in the figure.
94
95 2) User login can choose the current display language, as shown in Figure ①, currently only Chinese and English are supported.
96
97 3) User login can choose whether to display the password through the figure ③.
98
99 4) Users can log in through an account or a bound mailbox.
100
101 5) User login needs to enter the name of the parent account of the account.
102
103 (% style="text-align:center" %)
104 [[image:Terminal operation help document_html_b00b974062aca7ce.png||class="img-thumbnail" height="258" width="600"]]
105
106 == **3.2 Personal information page** ==
107
108 1) The user can edit some personal information marked in red as shown in the figure below.
109
110 (% style="text-align:center" %)
111 [[image:Terminal operation help document_html_1baf3d69b94a672a.png||class="img-thumbnail" height="187" width="800"]]
112
113 == **3.3 Gateway Management Page** ==
114
115 1) The gateway is bound to the user account, and a series of operations of the gateway are completed on this page.
116
117 2) Support users to set different groups and manage the gateway in groups.
118
119 3) Support users to add frequently used gateways or focus gateways to their favorites(Right-click the gateway to operate), Optimize management.
120
121 4) When the user binds the gateway, he can configure the custom gateway parameter information corresponding to the gateway. After binding, he can also modify the gateway parameter information by editing the gateway parameter information. The gateway parameter field is provided by the parent account and used by the end user. ②After the gateway parameter field information is sent to the gateway through the gateway project configuration, it is the gateway through the relevant interface function when executing the script, such asbns_get_config('bind)Retrieve and use in the script.
122
123 5) Support users to drag and drop sorting in front of the gateway on this page.
124
125 6) Users can operate the gateway to restart, unbind and other operations(Right-click the gateway to operate).
126
127 7) The user can operate the gateway to close V-NET(Right-click the gateway to operate),shut down V-NET The gateway will disconnect all external network connections.
128
129 8) The user can issue the gateway project configuration to the online and normally operating gateway. After the configuration is issued, the original operating configuration of the gateway will be overwritten. Whether the configuration is successfully issued can be checked through the feedback information function button.
130
131 9) The user can issue the networking configuration to the online and normally operating gateway. After the networking configuration is issued to the corresponding model gateway, the gateway will cover the original device networking mode. Whether the configuration has been successfully issued can be checked through the feedback information function button.
132
133 10) For gateways with lower firmware versions, they can also be upgraded through the platform.
134
135 11) If you need to view the running information of the gateway script, you can use the debugging function button to debug, view the script running log information, and cooperate with the feedback information button to check whether the script is running normally.
136
137 (% style="text-align:center" %)
138 [[image:Terminal operation help document_html_bf0a5d7f7934d527.png||class="img-thumbnail" height="402" width="800"]]
139
140 (% style="text-align:center" %)
141 [[image:Terminal operation help document_html_7486c719d3639d14.png||class="img-thumbnail" height="370" width="800"]]
142
143 (% style="text-align:center" %)
144 [[image:Terminal operation help document_html_97812056d6e20106.png||class="img-thumbnail" height="414" width="800"]]
145
146 (% style="text-align:center" %)
147 [[image:Terminal operation help document_html_9694afc7943dd34.png||class="img-thumbnail" height="370" width="800"]]
148
149 (% style="text-align:center" %)
150 [[image:Terminal operation help document_html_7845fb7ec2c6a2da.png||class="img-thumbnail" height="367" width="800"]]
151
152 (% style="text-align:center" %)
153 [[image:Terminal operation help document_html_406f732c70d74bd7.png||class="img-thumbnail" height="342" width="800"]]
154
155 == **3.4 Gateway project configuration page** ==
156
157 1) The gateway project configuration is the configuration information issued to the gateway to run.
158
159 2) Gateway project configurations of different gateway models can be created, but all must be associated with the access configuration assigned to the cloud provider account (parent account).
160
161 3) The gateway project configuration can be created by one-click on the distribution project assigned by the parent account (cloud business account) (the communication port, collection point, script and other information in the distribution project will be copied).
162
163 ①You can use the vwmt compressed package to import the configuration, but the imported configuration must also be associated with the access configuration assigned to the cloud provider account (parent account).
164
165 ②For the gateway engineering configuration between different models, the system will filter the configuration information that does not meet the requirements.
166
167 Such as:Import a V-BOX S-4G gateway engineering configuration compressed package into the configuration of the V-BOX S-00 model, and the system will directly filter the communication port and the relevant data under the communication port that do not conform to the V-BOX S-00 model .
168
169 4) Gateway project configuration details page (Five modules: communication port configuration, collection point configuration, MQTT configuration, script configuration, custom information, four function points: send to gateway, export configuration, import Excel, export Excel)
170
171 (1) Communication port configuration: Configurable gateway serial port connection type, please refer to the related operations of VNET communication port for details.
172
173 (2) Collection point configuration: refer to related operations of VNET monitoring points
174
175 ①Users can add collection point groups of different trigger types. Collection points can be added to the group. The upper limit of the number of collection points that can be added is controlled by the model of the current gateway project configuration (for example: the current gateway project configuration model is V-BOX S-4G, the current account number The parent account of is set the number of trigger type collection points added for this model, and the collection points within this model added by the end user will be restricted).
176
177 ②The upper limit of the number of collection points that can be added in a group under each trigger type refers to the total number of collection points that can be added under all groups of the trigger type.
178
179 ③When adding a collection point, you can define custom information for the collection point. The custom information is provided by the parent account of the current account (cloud business account) and used by the end user.
180
181 ④After the gateway project configuration collection point custom information is sent to the gateway through the gateway project configuration, the gateway uses related interface functions such as bns_get_config('user') to retrieve and use when executing the script.
182
183 (3) MQTT configuration:
184
185 ①Configure the path and parameters of the gateway to access the MQTT server, use the related interface function MQTT.setup_cfg() in the "Hui Box Interface Document" in the script configuration module script to obtain and use MQTT information (see "Hui Box Interface Document" for details 》-MQTT operating instructions).
186
187 ②If the parent account (cloud merchant account) of the current end-user has closed related permissions, the current user will not be able to see the MQTT module and set the MQTT information. And when the gateway project configuration is delivered to the gateway, the gateway will only use the MQTT information in the access configuration associated with the current gateway project configuration by default. After the parent account has enabled relevant permissions, the current user can configure MQTT information, and when the gateway project configuration is sent to the gateway, the gateway will use the MQTT configuration in the gateway project configuration instead of using the current gateway project configuration to associate access to the MQTT information in the configuration .
188
189 (4) Script configuration:
190
191 ① Configure the gateway to run the script.
192
193 ②If the parent account of the current end-user (cloud business account) has closed related permissions, the current user will not be able to see the script module and set the script. And when the gateway project configuration is delivered to the gateway, the gateway will only use the script in the access configuration associated with the current gateway project configuration by default. The current user can configure the script after the parent account has enabled the relevant permissions. After the gateway project configuration is sent to the gateway, the gateway will use the script in the gateway project configuration to associate with the current gateway project configuration to access the script in the configuration
194
195 (5) Custom information:
196
197 ①Customized information can be set for the current gateway project configuration. The customized information is provided by the parent account (cloud merchant account) of the current account, and the end-user edits the field content information.
198
199 ②After the gateway project configuration custom information is sent to the gateway through the gateway project configuration, it is called and used by the gateway through related interface functions such as bns_get_config('user') when executing the script.
200
201 (6) Delivered to the gateway:
202
203 ①The user can open the gateway pop-up interface, the system will automatically filter out the gateways that match the current configuration model, and are online and operating normally. The user can directly issue the configuration by selecting the gateway.
204
205 (7) Export configuration:
206
207 ①Click the export configuration function button, the user will export a vwmt compressed package, which covers all the information in the gateway project configuration (such as: communication port, free label, collection point grouping, collection point related information, MQTT configuration information, script).
208
209 ②The exported vwmt compressed package can be imported as a new configuration on the platform gateway project configuration page.
210
211 ③Or use the maintenance control configuration tool to directly issue to the gateway, covering the original operating information of the gateway.
212
213 ④When the export configuration is imported as the import configuration, the model type selected for import is inconsistent with the export model, the system will automatically pass the relevant data that does not meet the requirements (such as: export as the configuration of V-BOX S-4G, but used to import the cloud When the platform is a new configuration, the V-BOX E-4G model is selected, and the system will automatically filter out other information such as communication ports that do not meet the requirements).
214
215 (8) Import Excel
216
217 ① Support users to import related data into the gateway project configuration through Excel tables, custom editing of communication ports, collection points, free labels, etc.
218
219 ②After the import is successful, the original communication port, free label, collection point grouping, and collection point data in the configuration will be deleted.
220
221 ③Excel table supports the independent import of unrelated table cells, or import all relevant information.
222
223 ④Please check the Excel template for import content related information (click the Excel template function button to export the relevant template).
224
225 **For example:**
226
227 ①The user needs to import the communication port and the free label under the communication port, and only the communication port table unit and the free label table unit need to exist in the Excel table.
228
229 ②The user needs to import the collection point grouping associated with the internal address, and the Excel table only needs to have the collection point grouping table unit.
230
231 ③If the user needs to import collection points, there must be collection point grouping, and the Excel table must have collection point grouping and collection point table units.
232
233 ④ If the user needs to import the collection point, and the collection point needs to have related information in the communication port and free label, then the communication port, free label, collection point grouping and collection belt and table unit must be imported.
234
235 (9) Export Excel
236
237 ①Support the user to directly export the data in Excel form of the gateway project configuration communication port, free label, collection point grouping and collection point.
238
239 (% style="text-align:center" %)
240 [[image:Terminal operation help document_html_7147bbb183e1abd3.png||class="img-thumbnail" height="415" width="800"]]
241
242 (% style="text-align:center" %)
243 [[image:Terminal operation help document_html_3b5500ba8626d084.png||class="img-thumbnail" height="438" width="800"]]
244
245 (% style="text-align:center" %)
246 [[image:Terminal operation help document_html_95fa50b87cc3507f.png||class="img-thumbnail" height="486" width="800"]]
247
248 (% style="text-align:center" %)
249 [[image:Terminal operation help document_html_32347eac3cb33016.png||class="img-thumbnail" height="294" width="800"]]
250
251 (% style="text-align:center" %)
252 [[image:Terminal operation help document_html_77a9d243dcdfef0e.png||class="img-thumbnail" height="443" width="800"]]
253
254 (% style="text-align:center" %)
255 [[image:Terminal operation help document_html_13cbe58d56232cac.png||class="img-thumbnail" height="447" width="800"]]
256
257 (% style="text-align:center" %)
258 [[image:Terminal operation help document_html_2d6b1b94fc002a0.png||class="img-thumbnail" height="436" width="800"]]
259
260 (% style="text-align:center" %)
261 [[image:Terminal operation help document_html_70cea56a8e86e0c7.png||class="img-thumbnail" height="437" width="800"]]
262
263 (% style="text-align:center" %)
264 [[image:Terminal operation help document_html_225f464c86acc8a2.png||class="img-thumbnail" height="436" width="800"]]
265
266 (% style="text-align:center" %)
267 [[image:Terminal operation help document_html_543de719a584102e.png||class="img-thumbnail" height="436" width="800"]]
268
269 == **3.5 Debug page** ==
270
271 ~1. For the user binding, online, normal operation, script execution, and there is a gateway printing information in the script, after the user opens the debugging, the gateway will report the script printing information, and the user can view the script running status on the platform.
272
273 2. The debugging function can be used in conjunction with the feedback information button on the gateway management page (for example, after the gateway project configuration is delivered to the gateway, you can view the configuration delivery status and the script running status in the feedback information. If the configuration delivery fails or If the script runs abnormally, the debugging function will not be able to view any feedback information).
274
275 (% style="text-align:center" %)
276 [[image:Terminal operation help document_html_6baba730ca7961c7.png||class="img-thumbnail" height="436" width="800"]]
277
278 (% style="text-align:center" %)
279 [[image:Terminal operation help document_html_61ccb5a04a14a4d0.png||class="img-thumbnail" height="436" width="800"]]
280
281 == **3.6 Networking configuration page** ==
282
283 ~1. The user can customize, edit and set the networking mode of different gateway models.
284
285 2. After the user sends the networking configuration to the corresponding model gateway, the gateway will cover the original device networking mode.
286
287 (% style="text-align:center" %)
288 [[image:Terminal operation help document_html_f5293750667826c.png||class="img-thumbnail" height="436" width="800"]]
289
290 (% style="text-align:center" %)
291 [[image:Terminal operation help document_html_7ed43b87f91eb1d7.png||class="img-thumbnail" height="436" width="800"]]
292
293 == **3.7 End-user account management page** ==
294
295 ~1. The end-user acts as the group administrator to manage the end-users in a certain group under the parent account.
296
297 2. The rights that can be exercised are:
298
299 ①Add, delete and reorganize members.
300
301 ②Enable and disable members.
302
303 ③Check the gateways bound to the members of the group, and debug the gateways or issue configurations to replace the original gateway running configurations.
304
305 ④Check the configuration and configuration details of the gateway project configured by the group members.
306
307 (% style="text-align:center" %)
308 [[image:Terminal operation help document_html_5e4599f49c2a9fd7.png||class="img-thumbnail" height="437" width="800"]]
309
310 (% style="text-align:center" %)
311 [[image:Terminal operation help document_html_9106b788f90538ba.png||class="img-thumbnail" height="437" width="800"]]
312
313 (% style="text-align:center" %)
314 [[image:Terminal operation help document_html_c1fe72e65724108b.png||class="img-thumbnail" height="437" width="800"]]
315
316 (% style="text-align:center" %)
317 [[image:Terminal operation help document_html_459659ed86d00dfd.png||class="img-thumbnail" height="437" width="800"]]
318
319 == **3.8 Simple description of the script** ==
320
321 ~1. For the basic functions of the script, please refer to the tutorial in the URL
322
323 __[[https:~~/~~/www.runoob.com/lua/lua-tutorial.html>>url:https://www.runoob.com/lua/lua-tutorial.html]]__
324
325 2. For the interface functions such as reading and writing of platform data and internal address operations that need to be used in the script, please refer to the description of the interface functions in the "Hui Box Interface Document".
326
327 3. There must be a main running function in the definition script, the format is: function xxx.main() end, where xxx is the script name.
328
329 4. When used in the script to obtain platform custom gateway parameters, configure custom parameters, or configure custom parameters for collection points, use the interface function bns_get_config() in the "Smart Box Interface Document".
330
331 5. Please contact the technical staff for other related operations