|
@@ -0,0 +1,272 @@
|
|
1
|
+> 设备连接到本地网络
|
|
2
|
+
|
|
3
|
+- 电源模块+开关+模块连接并通上电
|
|
4
|
+- 手机直接连接模块控制。通电约1分钟后,通讯模组上的”UART”蓝色指示灯亮起并闪烁,”WLAN”蓝色指示灯常亮,”WIFI”红色指示灯常亮,表示通讯模组启动完成。如果”WLAN”蓝色指示灯闪烁,”WIFI”红色指示灯,此时用手机找模块会找不到。此时,按模块上的"WIFI Hotspot"按钮2~3秒钟,就可以切换到模块的wifi状态,这时可以搜索到模块的wifi(比如是:187ED53165DB),选择并输入密码`88888888`。
|
|
5
|
+- 测试手机是否可以控制开关。打开`曼顿电博士`APP,添加模块(略),点击主界面右上角的加号,选择模块。点击主界面上的`一键开关`,进入界面测试是否可以控制开关。
|
|
6
|
+- 更改网络。点击主界面右上角的加号,点击`修改电箱网络`,选择本地的无线网络`TECHE008`,密码是`teche7208`,此时手机自动切换成本地网络。
|
|
7
|
+- 手机和模块都连局域网并控制。
|
|
8
|
+- 查看本地网关地址。在控制台输入`ipconfig/all`,确认本地的网关地址是:`192.168.9.1`
|
|
9
|
+- 查看模块在本地的ip地址。使用IP扫描工具,输入起始ip是`192.168.9.1`,结束ip地址是`192.168.9.255`,找到模块的ip是`192.168.9.131`
|
|
10
|
+- 通过浏览器登录模块。在浏览器输入`192.168.9.131:82`,用户名是`root`,密码是`abc123`
|
|
11
|
+- 查看模块当前ip指向。网络,服务器管理,输入密码`mandun_url`,服务器指向的格式一般是`47.103.61.198:5008/ebx-bishop/data/carry`
|
|
12
|
+- 修改模块的服务器指向为:`192.168.8.131:8080//ebx-bishop/data/carry`,并在模块网站界面点击重启
|
|
13
|
+
|
|
14
|
+> 在本地服务器部署
|
|
15
|
+
|
|
16
|
+- 把本地服务器连接到本地网络
|
|
17
|
+- 登录服务器界面,密码是`teche123`
|
|
18
|
+- 在命令窗口输入`ipconfig/all`查看到服务器的ip地址是`192.168.8.131`
|
|
19
|
+- 尝试自己电脑是否可以连接服务器。通过`ping 192.168.8.131`看本机是否能连接服务器,从远程桌面登录`192.168.8.131`,密码是`teche123`
|
|
20
|
+- 确定已经安装好`Mysql`数据库
|
|
21
|
+```
|
|
22
|
+连接名:自定义
|
|
23
|
+主机名或IP地址:localhost
|
|
24
|
+端口:3306
|
|
25
|
+用户名:root
|
|
26
|
+密码:lcDb_!@34%^_Mantunsci
|
|
27
|
+勾选"保存密码"
|
|
28
|
+```
|
|
29
|
+- 确定已经安装`Redis`缓存数据库
|
|
30
|
+```
|
|
31
|
+名字:自定义
|
|
32
|
+地址:127.0.0.1
|
|
33
|
+端口:6321
|
|
34
|
+验证:_ebx_cnto_r_srv
|
|
35
|
+安全:无
|
|
36
|
+```
|
|
37
|
+- 创建主数据库teche
|
|
38
|
+```
|
|
39
|
+数据库名:teche
|
|
40
|
+字符集:utf8mb4--UTF-8 Unicode
|
|
41
|
+排序规则:utf8mbs_general_ci
|
|
42
|
+```
|
|
43
|
+- 创建用户数据库techeusr
|
|
44
|
+```
|
|
45
|
+数据库名:techeusr
|
|
46
|
+字符集:utf8mb4--UTF-8 Unicode
|
|
47
|
+排序规则:utf8mbs_general_ci
|
|
48
|
+```
|
|
49
|
+
|
|
50
|
+- 创建定时任务数据库quartznet
|
|
51
|
+
|
|
52
|
+```
|
|
53
|
+数据库名:quartznet
|
|
54
|
+字符集:utf8mb4--UTF-8 Unicode
|
|
55
|
+排序规则:utf8mbs_general_ci
|
|
56
|
+```
|
|
57
|
+
|
|
58
|
+执行sql语句
|
|
59
|
+```
|
|
60
|
+# By: Ron Cordell - roncordell
|
|
61
|
+# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+# make sure you have UTF-8 collaction for best .NET interoperability
|
|
65
|
+# CREATE DATABASE quartznet CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
66
|
+
|
|
67
|
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
|
|
68
|
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
|
|
69
|
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
|
|
70
|
+DROP TABLE IF EXISTS QRTZ_LOCKS;
|
|
71
|
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
|
|
72
|
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
|
|
73
|
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
|
|
74
|
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
|
|
75
|
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
|
|
76
|
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
|
|
77
|
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
|
|
78
|
+
|
|
79
|
+CREATE TABLE QRTZ_JOB_DETAILS(
|
|
80
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
81
|
+JOB_NAME VARCHAR(60) NOT NULL,
|
|
82
|
+JOB_GROUP VARCHAR(60) NOT NULL,
|
|
83
|
+DESCRIPTION VARCHAR(250) NULL,
|
|
84
|
+JOB_CLASS_NAME VARCHAR(250) NOT NULL,
|
|
85
|
+IS_DURABLE BOOLEAN NOT NULL,
|
|
86
|
+IS_NONCONCURRENT BOOLEAN NOT NULL,
|
|
87
|
+IS_UPDATE_DATA BOOLEAN NOT NULL,
|
|
88
|
+REQUESTS_RECOVERY BOOLEAN NOT NULL,
|
|
89
|
+JOB_DATA BLOB NULL,
|
|
90
|
+PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))
|
|
91
|
+ENGINE=InnoDB;
|
|
92
|
+
|
|
93
|
+CREATE TABLE QRTZ_TRIGGERS (
|
|
94
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
95
|
+TRIGGER_NAME VARCHAR(60) NOT NULL,
|
|
96
|
+TRIGGER_GROUP VARCHAR(60) NOT NULL,
|
|
97
|
+JOB_NAME VARCHAR(60) NOT NULL,
|
|
98
|
+JOB_GROUP VARCHAR(60) NOT NULL,
|
|
99
|
+DESCRIPTION VARCHAR(250) NULL,
|
|
100
|
+NEXT_FIRE_TIME BIGINT(19) NULL,
|
|
101
|
+PREV_FIRE_TIME BIGINT(19) NULL,
|
|
102
|
+PRIORITY INTEGER NULL,
|
|
103
|
+TRIGGER_STATE VARCHAR(16) NOT NULL,
|
|
104
|
+TRIGGER_TYPE VARCHAR(8) NOT NULL,
|
|
105
|
+START_TIME BIGINT(19) NOT NULL,
|
|
106
|
+END_TIME BIGINT(19) NULL,
|
|
107
|
+CALENDAR_NAME VARCHAR(60) NULL,
|
|
108
|
+MISFIRE_INSTR SMALLINT(2) NULL,
|
|
109
|
+JOB_DATA BLOB NULL,
|
|
110
|
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
|
|
111
|
+FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
|
|
112
|
+REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))
|
|
113
|
+ENGINE=InnoDB;
|
|
114
|
+
|
|
115
|
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
|
|
116
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
117
|
+TRIGGER_NAME VARCHAR(60) NOT NULL,
|
|
118
|
+TRIGGER_GROUP VARCHAR(60) NOT NULL,
|
|
119
|
+REPEAT_COUNT BIGINT(7) NOT NULL,
|
|
120
|
+REPEAT_INTERVAL BIGINT(12) NOT NULL,
|
|
121
|
+TIMES_TRIGGERED BIGINT(10) NOT NULL,
|
|
122
|
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
|
|
123
|
+FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
|
|
124
|
+REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
|
|
125
|
+ENGINE=InnoDB;
|
|
126
|
+
|
|
127
|
+CREATE TABLE QRTZ_CRON_TRIGGERS (
|
|
128
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
129
|
+TRIGGER_NAME VARCHAR(60) NOT NULL,
|
|
130
|
+TRIGGER_GROUP VARCHAR(60) NOT NULL,
|
|
131
|
+CRON_EXPRESSION VARCHAR(120) NOT NULL,
|
|
132
|
+TIME_ZONE_ID VARCHAR(80),
|
|
133
|
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
|
|
134
|
+FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
|
|
135
|
+REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
|
|
136
|
+ENGINE=InnoDB;
|
|
137
|
+
|
|
138
|
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
|
|
139
|
+ (
|
|
140
|
+ SCHED_NAME VARCHAR(60) NOT NULL,
|
|
141
|
+ TRIGGER_NAME VARCHAR(60) NOT NULL,
|
|
142
|
+ TRIGGER_GROUP VARCHAR(60) NOT NULL,
|
|
143
|
+ STR_PROP_1 VARCHAR(512) NULL,
|
|
144
|
+ STR_PROP_2 VARCHAR(512) NULL,
|
|
145
|
+ STR_PROP_3 VARCHAR(512) NULL,
|
|
146
|
+ INT_PROP_1 INT NULL,
|
|
147
|
+ INT_PROP_2 INT NULL,
|
|
148
|
+ LONG_PROP_1 BIGINT NULL,
|
|
149
|
+ LONG_PROP_2 BIGINT NULL,
|
|
150
|
+ DEC_PROP_1 NUMERIC(13,4) NULL,
|
|
151
|
+ DEC_PROP_2 NUMERIC(13,4) NULL,
|
|
152
|
+ BOOL_PROP_1 BOOLEAN NULL,
|
|
153
|
+ BOOL_PROP_2 BOOLEAN NULL,
|
|
154
|
+ TIME_ZONE_ID VARCHAR(80) NULL,
|
|
155
|
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
|
|
156
|
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
|
|
157
|
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
|
|
158
|
+ENGINE=InnoDB;
|
|
159
|
+
|
|
160
|
+CREATE TABLE QRTZ_BLOB_TRIGGERS (
|
|
161
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
162
|
+TRIGGER_NAME VARCHAR(60) NOT NULL,
|
|
163
|
+TRIGGER_GROUP VARCHAR(60) NOT NULL,
|
|
164
|
+BLOB_DATA BLOB NULL,
|
|
165
|
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
|
|
166
|
+INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
|
|
167
|
+FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
|
|
168
|
+REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
|
|
169
|
+ENGINE=InnoDB;
|
|
170
|
+
|
|
171
|
+CREATE TABLE QRTZ_CALENDARS (
|
|
172
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
173
|
+CALENDAR_NAME VARCHAR(60) NOT NULL,
|
|
174
|
+CALENDAR BLOB NOT NULL,
|
|
175
|
+PRIMARY KEY (SCHED_NAME,CALENDAR_NAME))
|
|
176
|
+ENGINE=InnoDB;
|
|
177
|
+
|
|
178
|
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
|
|
179
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
180
|
+TRIGGER_GROUP VARCHAR(60) NOT NULL,
|
|
181
|
+PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))
|
|
182
|
+ENGINE=InnoDB;
|
|
183
|
+
|
|
184
|
+CREATE TABLE QRTZ_FIRED_TRIGGERS (
|
|
185
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
186
|
+ENTRY_ID VARCHAR(140) NOT NULL,
|
|
187
|
+TRIGGER_NAME VARCHAR(60) NOT NULL,
|
|
188
|
+TRIGGER_GROUP VARCHAR(60) NOT NULL,
|
|
189
|
+INSTANCE_NAME VARCHAR(60) NOT NULL,
|
|
190
|
+FIRED_TIME BIGINT(19) NOT NULL,
|
|
191
|
+SCHED_TIME BIGINT(19) NOT NULL,
|
|
192
|
+PRIORITY INTEGER NOT NULL,
|
|
193
|
+STATE VARCHAR(16) NOT NULL,
|
|
194
|
+JOB_NAME VARCHAR(60) NULL,
|
|
195
|
+JOB_GROUP VARCHAR(60) NULL,
|
|
196
|
+IS_NONCONCURRENT BOOLEAN NULL,
|
|
197
|
+REQUESTS_RECOVERY BOOLEAN NULL,
|
|
198
|
+PRIMARY KEY (SCHED_NAME,ENTRY_ID))
|
|
199
|
+ENGINE=InnoDB;
|
|
200
|
+
|
|
201
|
+CREATE TABLE QRTZ_SCHEDULER_STATE (
|
|
202
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
203
|
+INSTANCE_NAME VARCHAR(60) NOT NULL,
|
|
204
|
+LAST_CHECKIN_TIME BIGINT(19) NOT NULL,
|
|
205
|
+CHECKIN_INTERVAL BIGINT(19) NOT NULL,
|
|
206
|
+PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))
|
|
207
|
+ENGINE=InnoDB;
|
|
208
|
+
|
|
209
|
+CREATE TABLE QRTZ_LOCKS (
|
|
210
|
+SCHED_NAME VARCHAR(60) NOT NULL,
|
|
211
|
+LOCK_NAME VARCHAR(40) NOT NULL,
|
|
212
|
+PRIMARY KEY (SCHED_NAME,LOCK_NAME))
|
|
213
|
+ENGINE=InnoDB;
|
|
214
|
+
|
|
215
|
+CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
|
|
216
|
+CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);
|
|
217
|
+
|
|
218
|
+CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
|
|
219
|
+CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
|
|
220
|
+CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
|
|
221
|
+CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
|
|
222
|
+CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
|
|
223
|
+CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
|
|
224
|
+CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
|
|
225
|
+CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
|
|
226
|
+CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
|
|
227
|
+CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
|
|
228
|
+CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
|
|
229
|
+CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
|
|
230
|
+
|
|
231
|
+CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
|
|
232
|
+CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
|
|
233
|
+CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
|
|
234
|
+CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
|
|
235
|
+CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
|
|
236
|
+CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
|
|
237
|
+
|
|
238
|
+commit;
|
|
239
|
+```
|
|
240
|
+
|
|
241
|
+- 发布网站到'v1.1.5.4'文件夹
|
|
242
|
+- 在`appsettings.json`中配置成与当前服务器相关的设置,当前服务器的ip是`192.168.8.131`
|
|
243
|
+- 确保网站运行之前的mysql和redis服务正常
|
|
244
|
+```
|
|
245
|
+确保mysql已经启动:在服务中的名称是MysqlServer
|
|
246
|
+确保redis已经启动:在服务中的名称是redis-server
|
|
247
|
+```
|
|
248
|
+- 运行网站:`dotnet.exe TaiHe.Electricity.Web.dll`
|
|
249
|
+- 确认数据库表是否已经创建
|
|
250
|
+```
|
|
251
|
+确保teche数据库中已经有了所有表
|
|
252
|
+确保techeuser数据库中已经有了所有表
|
|
253
|
+```
|
|
254
|
+- 往teche的kaiguanapplication添加一条记录
|
|
255
|
+```
|
|
256
|
+INSERT INTO kaiguanapplication(NAME, DelFlag) VALUES('照明',0)
|
|
257
|
+```
|
|
258
|
+- 确保模块的服务器指向已经是:`192.168.8.131:8080/ebx-bishop/data/carry`
|
|
259
|
+- 查看服务器缓存数据库是否有相关数据
|
|
260
|
+- 登录:打开网站192.168.8.131:8080,输入用户名TecheFwd2018,点击"登录"按钮
|
|
261
|
+- 同步菜单
|
|
262
|
+- 项目管理
|
|
263
|
+```
|
|
264
|
+办公测试
|
|
265
|
+ceshi001
|
|
266
|
+888888
|
|
267
|
+```
|
|
268
|
+- 楼层管理
|
|
269
|
+- 区域管理
|
|
270
|
+- 电箱管理
|
|
271
|
+- 模块管理
|
|
272
|
+- 开关管理
|