鼎鼎知识库
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

智能照明实验环境搭建.md 11KB

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