Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1071 lines
38 KiB

7 years ago
6 years ago
6 years ago
  1. /*
  2. MIGRATE MODULE
  3. Copyright (C) 2016-2018 by Xose Pérez <xose dot perez at gmail dot com>
  4. */
  5. void _migrateMoveIndexDown(const char * key, int offset = 0) {
  6. if (hasSetting(key, 0)) return;
  7. for (unsigned char index = 1; index < SETTINGS_MAX_LIST_COUNT; index++) {
  8. if (hasSetting(key, index)) {
  9. setSetting(key, index - 1, getSetting(key, index).toInt() + offset);
  10. } else {
  11. delSetting(key, index - 1);
  12. }
  13. }
  14. }
  15. void _migrateBackwards() {
  16. moveSettings("relayGPIO", "rlyGPIO");
  17. moveSettings("relayResetGPIO", "rlyResetGPIO");
  18. moveSettings("relayType", "rlyType");
  19. moveSetting("selGPIO", "hlwSELGPIO");
  20. moveSetting("cfGPIO", "hlwCFGPIO");
  21. moveSetting("cf1GPIO", "hlwCF1GPIO");
  22. moveSetting("relayProvider", "rlyProvider");
  23. moveSetting("lightProvider", "litProvider");
  24. moveSetting("relays", "rlyCount");
  25. moveSettings("chGPIO", "litCHGPIO");
  26. moveSettings("chLogic", "litCHLogic");
  27. moveSetting("enGPIO", "litEnableGPIO");
  28. moveSetting("hlwSelC", "hlwCurLevel");
  29. moveSetting("hlwIntM", "hlwInt");
  30. }
  31. // Configuration versions
  32. //
  33. // 1: based on Embedis, no board definitions
  34. // 2: based on Embedis, with board definitions 1-based
  35. // 3: based on Embedis, with board definitions 0-based
  36. void migrate() {
  37. _migrateBackwards();
  38. // Get config version
  39. unsigned int board = getSetting("board", 0).toInt();
  40. unsigned int config_version = getSetting("cfg", board > 0 ? 2 : 1).toInt();
  41. // Update if not on latest version
  42. if (config_version == CFG_VERSION) return;
  43. setSetting("cfg", CFG_VERSION);
  44. if (config_version == 2) {
  45. _migrateMoveIndexDown("ledGPIO");
  46. _migrateMoveIndexDown("ledLogic");
  47. _migrateMoveIndexDown("btnGPIO");
  48. _migrateMoveIndexDown("btnRelay", -1);
  49. _migrateMoveIndexDown("rlyGPIO");
  50. _migrateMoveIndexDown("rlyType");
  51. }
  52. if (config_version == 1) {
  53. #if defined(NODEMCU_LOLIN)
  54. setSetting("board", 2);
  55. setSetting("ledGPIO", 0, 2);
  56. setSetting("ledLogic", 0, 1);
  57. setSetting("btnGPIO", 0, 0);
  58. setSetting("btnRelay", 0, 0);
  59. setSetting("rlyGPIO", 0, 12);
  60. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  61. #elif defined(WEMOS_D1_MINI_RELAYSHIELD)
  62. setSetting("board", 3);
  63. setSetting("ledGPIO", 0, 2);
  64. setSetting("ledLogic", 0, 1);
  65. setSetting("btnGPIO", 0, 0);
  66. setSetting("btnRelay", 0, 0);
  67. setSetting("rlyGPIO", 0, 5);
  68. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  69. #elif defined(ITEAD_SONOFF_BASIC)
  70. setSetting("board", 4);
  71. setSetting("ledGPIO", 0, 13);
  72. setSetting("ledLogic", 0, 1);
  73. setSetting("btnGPIO", 0, 0);
  74. setSetting("btnRelay", 0, 0);
  75. setSetting("rlyGPIO", 0, 12);
  76. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  77. #elif defined(ITEAD_SONOFF_TH)
  78. setSetting("board", 5);
  79. setSetting("ledGPIO", 0, 13);
  80. setSetting("ledLogic", 0, 1);
  81. setSetting("btnGPIO", 0, 0);
  82. setSetting("btnRelay", 0, 0);
  83. setSetting("rlyGPIO", 0, 12);
  84. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  85. #elif defined(ITEAD_SONOFF_SV)
  86. setSetting("board", 6);
  87. setSetting("ledGPIO", 0, 13);
  88. setSetting("ledLogic", 0, 1);
  89. setSetting("btnGPIO", 0, 0);
  90. setSetting("btnRelay", 0, 0);
  91. setSetting("rlyGPIO", 0, 12);
  92. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  93. #elif defined(ITEAD_SONOFF_TOUCH)
  94. setSetting("board", 7);
  95. setSetting("ledGPIO", 0, 13);
  96. setSetting("ledLogic", 0, 1);
  97. setSetting("btnGPIO", 0, 0);
  98. setSetting("btnRelay", 0, 0);
  99. setSetting("rlyGPIO", 0, 12);
  100. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  101. #elif defined(ITEAD_SONOFF_POW)
  102. setSetting("board", 8);
  103. setSetting("ledGPIO", 0, 15);
  104. setSetting("ledLogic", 0, 1);
  105. setSetting("btnGPIO", 0, 0);
  106. setSetting("btnRelay", 0, 0);
  107. setSetting("rlyGPIO", 0, 12);
  108. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  109. setSetting("hlwSELGPIO", 5);
  110. setSetting("hlwCF1GPIO", 13);
  111. setSetting("hlwCFGPIO", 14);
  112. #elif defined(ITEAD_SONOFF_DUAL)
  113. setSetting("board", 9);
  114. setSetting("ledGPIO", 0, 13);
  115. setSetting("ledLogic", 0, 1);
  116. setSetting("btnRelay", 0, 0xFF);
  117. setSetting("btnRelay", 1, 0xFF);
  118. setSetting("btnRelay", 2, 0);
  119. setSetting("rlyProvider", RELAY_PROVIDER_DUAL);
  120. setSetting("rlyCount", 2);
  121. #elif defined(ITEAD_1CH_INCHING)
  122. setSetting("board", 10);
  123. setSetting("ledGPIO", 0, 13);
  124. setSetting("ledLogic", 0, 1);
  125. setSetting("btnGPIO", 0, 0);
  126. setSetting("btnRelay", 0, 0);
  127. setSetting("rlyGPIO", 0, 12);
  128. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  129. #elif defined(ITEAD_SONOFF_4CH)
  130. setSetting("board", 11);
  131. setSetting("ledGPIO", 0, 13);
  132. setSetting("ledLogic", 0, 1);
  133. setSetting("btnGPIO", 0, 0);
  134. setSetting("btnGPIO", 1, 9);
  135. setSetting("btnGPIO", 2, 10);
  136. setSetting("btnGPIO", 3, 14);
  137. setSetting("btnRelay", 0, 0);
  138. setSetting("btnRelay", 1, 1);
  139. setSetting("btnRelay", 2, 2);
  140. setSetting("btnRelay", 3, 3);
  141. setSetting("rlyGPIO", 0, 12);
  142. setSetting("rlyGPIO", 1, 5);
  143. setSetting("rlyGPIO", 2, 4);
  144. setSetting("rlyGPIO", 3, 15);
  145. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  146. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  147. setSetting("rlyType", 2, RELAY_TYPE_NORMAL);
  148. setSetting("rlyType", 3, RELAY_TYPE_NORMAL);
  149. #elif defined(ITEAD_SLAMPHER)
  150. setSetting("board", 12);
  151. setSetting("ledGPIO", 0, 13);
  152. setSetting("ledLogic", 0, 1);
  153. setSetting("btnGPIO", 0, 0);
  154. setSetting("btnRelay", 0, 0);
  155. setSetting("rlyGPIO", 0, 12);
  156. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  157. #elif defined(ITEAD_S20)
  158. setSetting("board", 13);
  159. setSetting("ledGPIO", 0, 13);
  160. setSetting("ledLogic", 0, 1);
  161. setSetting("btnGPIO", 0, 0);
  162. setSetting("btnRelay", 0, 0);
  163. setSetting("rlyGPIO", 0, 12);
  164. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  165. #elif defined(ELECTRODRAGON_WIFI_IOT)
  166. setSetting("board", 14);
  167. setSetting("ledGPIO", 0, 16);
  168. setSetting("ledLogic", 0, 0);
  169. setSetting("btnGPIO", 0, 0);
  170. setSetting("btnGPIO", 1, 2);
  171. setSetting("btnRelay", 0, 0);
  172. setSetting("btnRelay", 1, 1);
  173. setSetting("rlyGPIO", 0, 12);
  174. setSetting("rlyGPIO", 1, 13);
  175. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  176. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  177. #elif defined(WORKCHOICE_ECOPLUG)
  178. setSetting("board", 15);
  179. setSetting("ledGPIO", 0, 2);
  180. setSetting("ledLogic", 0, 0);
  181. setSetting("btnGPIO", 0, 13);
  182. setSetting("btnRelay", 0, 0);
  183. setSetting("rlyGPIO", 0, 15);
  184. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  185. #elif defined(JANGOE_WIFI_RELAY_NC)
  186. setSetting("board", 16);
  187. setSetting("btnGPIO", 0, 12);
  188. setSetting("btnGPIO", 1, 13);
  189. setSetting("btnRelay", 0, 0);
  190. setSetting("btnRelay", 1, 1);
  191. setSetting("rlyGPIO", 0, 2);
  192. setSetting("rlyGPIO", 1, 14);
  193. setSetting("rlyType", 0, RELAY_TYPE_INVERSE);
  194. setSetting("rlyType", 1, RELAY_TYPE_INVERSE);
  195. #elif defined(JANGOE_WIFI_RELAY_NO)
  196. setSetting("board", 17);
  197. setSetting("btnGPIO", 0, 12);
  198. setSetting("btnGPIO", 1, 13);
  199. setSetting("btnRelay", 0, 0);
  200. setSetting("btnRelay", 1, 1);
  201. setSetting("rlyGPIO", 0, 2);
  202. setSetting("rlyGPIO", 1, 14);
  203. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  204. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  205. #elif defined(OPENENERGYMONITOR_MQTT_RELAY)
  206. setSetting("board", 18);
  207. setSetting("ledGPIO", 0, 16);
  208. setSetting("ledLogic", 0, 1);
  209. setSetting("btnGPIO", 0, 0);
  210. setSetting("btnRelay", 0, 0);
  211. setSetting("rlyGPIO", 0, 12);
  212. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  213. #elif defined(JORGEGARCIA_WIFI_RELAYS)
  214. setSetting("board", 19);
  215. setSetting("rlyGPIO", 0, 0);
  216. setSetting("rlyGPIO", 1, 2);
  217. setSetting("rlyType", 0, RELAY_TYPE_INVERSE);
  218. setSetting("rlyType", 1, RELAY_TYPE_INVERSE);
  219. #elif defined(AITHINKER_AI_LIGHT)
  220. setSetting("board", 20);
  221. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  222. setSetting("litProvider", LIGHT_PROVIDER_MY92XX);
  223. setSetting("myModel", MY92XX_MODEL_MY9291);
  224. setSetting("myChips", 1);
  225. setSetting("myDIGPIO", 13);
  226. setSetting("myDCKIGPIO", 15);
  227. setSetting("rlyCount", 1);
  228. #elif defined(MAGICHOME_LED_CONTROLLER)
  229. setSetting("board", 21);
  230. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  231. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  232. setSetting("ledGPIO", 0, 2);
  233. setSetting("ledLogic", 0, 1);
  234. setSetting("litCHGPIO", 0, 14);
  235. setSetting("litCHGPIO", 1, 5);
  236. setSetting("litCHGPIO", 2, 12);
  237. setSetting("litCHGPIO", 3, 13);
  238. setSetting("litCHLogic", 0, 0);
  239. setSetting("litCHLogic", 1, 0);
  240. setSetting("litCHLogic", 2, 0);
  241. setSetting("litCHLogic", 3, 0);
  242. setSetting("rlyCount", 1);
  243. #elif defined(MAGICHOME_LED_CONTROLLER_IR)
  244. setSetting("board", 21);
  245. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  246. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  247. setSetting("ledGPIO", 0, 2);
  248. setSetting("ledLogic", 0, 1);
  249. setSetting("litCHGPIO", 0, 5);
  250. setSetting("litCHGPIO", 1, 12);
  251. setSetting("litCHGPIO", 2, 13);
  252. setSetting("litCHGPIO", 3, 14);
  253. setSetting("litCHLogic", 0, 0);
  254. setSetting("litCHLogic", 1, 0);
  255. setSetting("litCHLogic", 2, 0);
  256. setSetting("litCHLogic", 3, 0);
  257. setSetting("rlyCount", 1);
  258. #elif defined(ITEAD_MOTOR)
  259. setSetting("board", 22);
  260. setSetting("ledGPIO", 0, 13);
  261. setSetting("ledLogic", 0, 1);
  262. setSetting("btnGPIO", 0, 0);
  263. setSetting("btnRelay", 0, 0);
  264. setSetting("rlyGPIO", 0, 12);
  265. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  266. #elif defined(TINKERMAN_ESPURNA_H06)
  267. setSetting("board", 23);
  268. setSetting("ledGPIO", 0, 5);
  269. setSetting("ledLogic", 0, 0);
  270. setSetting("btnGPIO", 0, 4);
  271. setSetting("btnRelay", 0, 0);
  272. setSetting("rlyGPIO", 0, 12);
  273. setSetting("rlyType", 0, RELAY_TYPE_INVERSE);
  274. setSetting("hlwSELGPIO", 2);
  275. setSetting("hlwCF1GPIO", 13);
  276. setSetting("hlwCFGPIO", 14);
  277. #elif defined(HUACANXING_H801)
  278. setSetting("board", 24);
  279. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  280. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  281. setSetting("ledGPIO", 0, 5);
  282. setSetting("ledLogic", 0, 1);
  283. setSetting("litCHGPIO", 0, 15);
  284. setSetting("litCHGPIO", 1, 13);
  285. setSetting("litCHGPIO", 2, 12);
  286. setSetting("litCHGPIO", 3, 14);
  287. setSetting("litCHGPIO", 4, 4);
  288. setSetting("litCHLogic", 0, 0);
  289. setSetting("litCHLogic", 1, 0);
  290. setSetting("litCHLogic", 2, 0);
  291. setSetting("litCHLogic", 3, 0);
  292. setSetting("litCHLogic", 4, 0);
  293. setSetting("rlyCount", 1);
  294. #elif defined(ITEAD_BNSZ01)
  295. setSetting("board", 25);
  296. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  297. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  298. setSetting("ledGPIO", 0, 13);
  299. setSetting("ledLogic", 0, 1);
  300. setSetting("litCHGPIO", 0, 12);
  301. setSetting("litCHLogic", 0, 0);
  302. setSetting("rlyCount", 1);
  303. #elif defined(ITEAD_SONOFF_RFBRIDGE)
  304. setSetting("board", 26);
  305. setSetting("ledGPIO", 0, 13);
  306. setSetting("ledLogic", 0, 1);
  307. setSetting("btnGPIO", 0, 0);
  308. setSetting("rlyProvider", RELAY_PROVIDER_RFBRIDGE);
  309. setSetting("rlyCount", 6);
  310. #elif defined(ITEAD_SONOFF_4CH_PRO)
  311. setSetting("board", 27);
  312. setSetting("ledGPIO", 0, 13);
  313. setSetting("ledLogic", 0, 1);
  314. setSetting("btnGPIO", 0, 0);
  315. setSetting("btnGPIO", 1, 9);
  316. setSetting("btnGPIO", 2, 10);
  317. setSetting("btnGPIO", 3, 14);
  318. setSetting("btnRelay", 0, 0);
  319. setSetting("btnRelay", 1, 1);
  320. setSetting("btnRelay", 2, 2);
  321. setSetting("btnRelay", 3, 3);
  322. setSetting("rlyGPIO", 0, 12);
  323. setSetting("rlyGPIO", 1, 5);
  324. setSetting("rlyGPIO", 2, 4);
  325. setSetting("rlyGPIO", 3, 15);
  326. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  327. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  328. setSetting("rlyType", 2, RELAY_TYPE_NORMAL);
  329. setSetting("rlyType", 3, RELAY_TYPE_NORMAL);
  330. #elif defined(ITEAD_SONOFF_B1)
  331. setSetting("board", 28);
  332. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  333. setSetting("litProvider", LIGHT_PROVIDER_MY92XX);
  334. setSetting("myModel", MY92XX_MODEL_MY9231);
  335. setSetting("myChips", 2);
  336. setSetting("myDIGPIO", 12);
  337. setSetting("myDCKIGPIO", 14);
  338. setSetting("rlyCount", 1);
  339. #elif defined(ITEAD_SONOFF_LED)
  340. setSetting("board", 29);
  341. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  342. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  343. setSetting("ledGPIO", 0, 13);
  344. setSetting("ledLogic", 0, 1);
  345. setSetting("litCHGPIO", 0, 12);
  346. setSetting("litCHLogic", 0, 0);
  347. setSetting("litCHGPIO", 1, 14);
  348. setSetting("litCHLogic", 1, 0);
  349. setSetting("rlyCount", 1);
  350. #elif defined(ITEAD_SONOFF_T1_1CH)
  351. setSetting("board", 30);
  352. setSetting("ledGPIO", 0, 13);
  353. setSetting("ledLogic", 0, 1);
  354. setSetting("btnGPIO", 0, 9);
  355. setSetting("btnRelay", 0, 0);
  356. setSetting("rlyGPIO", 0, 5);
  357. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  358. #elif defined(ITEAD_SONOFF_T1_2CH)
  359. setSetting("board", 31);
  360. setSetting("ledGPIO", 0, 13);
  361. setSetting("ledLogic", 0, 1);
  362. setSetting("btnGPIO", 0, 0);
  363. setSetting("btnGPIO", 1, 10);
  364. setSetting("btnRelay", 0, 0);
  365. setSetting("btnRelay", 1, 1);
  366. setSetting("rlyGPIO", 0, 12);
  367. setSetting("rlyGPIO", 1, 4);
  368. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  369. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  370. #elif defined(ITEAD_SONOFF_T1_3CH)
  371. setSetting("board", 32);
  372. setSetting("ledGPIO", 0, 13);
  373. setSetting("ledLogic", 0, 1);
  374. setSetting("btnGPIO", 0, 0);
  375. setSetting("btnGPIO", 1, 9);
  376. setSetting("btnGPIO", 2, 10);
  377. setSetting("btnRelay", 0, 0);
  378. setSetting("btnRelay", 1, 1);
  379. setSetting("btnRelay", 2, 2);
  380. setSetting("rlyGPIO", 0, 12);
  381. setSetting("rlyGPIO", 1, 5);
  382. setSetting("rlyGPIO", 2, 4);
  383. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  384. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  385. setSetting("rlyType", 2, RELAY_TYPE_NORMAL);
  386. #elif defined(ITEAD_SONOFF_RF)
  387. setSetting("board", 33);
  388. setSetting("ledGPIO", 0, 13);
  389. setSetting("ledLogic", 0, 1);
  390. setSetting("btnGPIO", 0, 0);
  391. setSetting("btnRelay", 0, 0);
  392. setSetting("rlyGPIO", 0, 12);
  393. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  394. #elif defined(WION_50055)
  395. setSetting("board", 34);
  396. setSetting("ledGPIO", 0, 2);
  397. setSetting("ledLogic", 0, 0);
  398. setSetting("btnGPIO", 0, 13);
  399. setSetting("btnRelay", 0, 0);
  400. setSetting("rlyGPIO", 0, 15);
  401. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  402. #elif defined(EXS_WIFI_RELAY_V31)
  403. setSetting("board", 35);
  404. setSetting("btnGPIO", 0, 0);
  405. setSetting("btnRelay", 0, 0);
  406. setSetting("rlyGPIO", 0, 13);
  407. setSetting("rlyResetGPIO", 0, 12);
  408. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  409. #elif defined(HUACANXING_H802)
  410. setSetting("board", 36);
  411. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  412. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  413. setSetting("litCHGPIO", 0, 12);
  414. setSetting("litCHGPIO", 1, 14);
  415. setSetting("litCHGPIO", 2, 13);
  416. setSetting("litCHGPIO", 3, 15);
  417. setSetting("litCHLogic", 0, 0);
  418. setSetting("litCHLogic", 1, 0);
  419. setSetting("litCHLogic", 2, 0);
  420. setSetting("litCHLogic", 3, 0);
  421. setSetting("rlyCount", 1);
  422. #elif defined(GENERIC_V9261F)
  423. setSetting("board", 37);
  424. #elif defined(GENERIC_ECH1560)
  425. setSetting("board", 38);
  426. #elif defined(TINKERMAN_ESPURNA_H08)
  427. setSetting("board", 39);
  428. setSetting("ledGPIO", 0, 2);
  429. setSetting("ledLogic", 0, 0);
  430. setSetting("btnGPIO", 0, 4);
  431. setSetting("btnRelay", 0, 0);
  432. setSetting("rlyGPIO", 0, 12);
  433. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  434. setSetting("hlwSELGPIO", 5);
  435. setSetting("hlwCF1GPIO", 13);
  436. setSetting("hlwCFGPIO", 14);
  437. #elif defined(MANCAVEMADE_ESPLIVE)
  438. setSetting("board", 40);
  439. setSetting("btnGPIO", 0, 4);
  440. setSetting("btnGPIO", 1, 5);
  441. setSetting("btnRelay", 0, 0);
  442. setSetting("btnRelay", 1, 1);
  443. setSetting("rlyGPIO", 0, 12);
  444. setSetting("rlyGPIO", 1, 13);
  445. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  446. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  447. #elif defined(INTERMITTECH_QUINLED)
  448. setSetting("board", 41);
  449. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  450. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  451. setSetting("ledGPIO", 0, 1);
  452. setSetting("ledLogic", 0, 1);
  453. setSetting("litCHGPIO", 0, 0);
  454. setSetting("litCHGPIO", 1, 2);
  455. setSetting("litCHLogic", 0, 0);
  456. setSetting("litCHLogic", 1, 0);
  457. setSetting("rlyCount", 1);
  458. #elif defined(MAGICHOME_LED_CONTROLLER_20)
  459. setSetting("board", 42);
  460. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  461. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  462. setSetting("litCHGPIO", 0, 5);
  463. setSetting("litCHGPIO", 1, 12);
  464. setSetting("litCHGPIO", 2, 13);
  465. setSetting("litCHGPIO", 3, 15);
  466. setSetting("litCHLogic", 0, 0);
  467. setSetting("litCHLogic", 1, 0);
  468. setSetting("litCHLogic", 2, 0);
  469. setSetting("litCHLogic", 3, 0);
  470. setSetting("rlyCount", 1);
  471. #elif defined(ARILUX_AL_LC06)
  472. setSetting("board", 43);
  473. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  474. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  475. setSetting("litCHGPIO", 0, 12);
  476. setSetting("litCHGPIO", 1, 14);
  477. setSetting("litCHGPIO", 2, 13);
  478. setSetting("litCHGPIO", 3, 15);
  479. setSetting("litCHGPIO", 4, 5);
  480. setSetting("litCHLogic", 0, 0);
  481. setSetting("litCHLogic", 1, 0);
  482. setSetting("litCHLogic", 2, 0);
  483. setSetting("litCHLogic", 3, 0);
  484. setSetting("litCHLogic", 4, 0);
  485. setSetting("rlyCount", 1);
  486. #elif defined(XENON_SM_PW702U)
  487. setSetting("board", 44);
  488. setSetting("ledGPIO", 0, 4);
  489. setSetting("ledLogic", 0, 0);
  490. setSetting("btnGPIO", 0, 13);
  491. setSetting("btnRelay", 0, 0);
  492. setSetting("rlyGPIO", 0, 12);
  493. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  494. #elif defined(AUTHOMETION_LYT8266)
  495. setSetting("board", 45);
  496. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  497. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  498. setSetting("litCHGPIO", 0, 13);
  499. setSetting("litCHGPIO", 1, 12);
  500. setSetting("litCHGPIO", 2, 14);
  501. setSetting("litCHGPIO", 3, 2);
  502. setSetting("litCHLogic", 0, 0);
  503. setSetting("litCHLogic", 1, 0);
  504. setSetting("litCHLogic", 2, 0);
  505. setSetting("litCHLogic", 3, 0);
  506. setSetting("rlyCount", 1);
  507. setSetting("litEnableGPIO", 15);
  508. #elif defined(ARILUX_E27)
  509. setSetting("board", 46);
  510. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  511. setSetting("litProvider", LIGHT_PROVIDER_MY92XX);
  512. setSetting("myModel", MY92XX_MODEL_MY9291);
  513. setSetting("myChips", 1);
  514. setSetting("myDIGPIO", 13);
  515. setSetting("myDCKIGPIO", 15);
  516. setSetting("rlyCount", 1);
  517. #elif defined(YJZK_SWITCH_2CH)
  518. setSetting("board", 47);
  519. setSetting("ledGPIO", 0, 13);
  520. setSetting("ledLogic", 0, 0);
  521. setSetting("ledWifi", 0);
  522. setSetting("btnGPIO", 0, 0);
  523. setSetting("btnGPIO", 1, 9);
  524. setSetting("btnRelay", 0, 0);
  525. setSetting("btnRelay", 1, 1);
  526. setSetting("rlyGPIO", 0, 12);
  527. setSetting("rlyGPIO", 1, 5);
  528. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  529. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  530. #elif defined(ITEAD_SONOFF_DUAL_R2)
  531. setSetting("board", 48);
  532. setSetting("ledGPIO", 0, 13);
  533. setSetting("ledLogic", 0, 1);
  534. setSetting("btnGPIO", 0, 0);
  535. setSetting("btnGPIO", 1, 9);
  536. setSetting("btnGPIO", 2, 10);
  537. setSetting("btnRelay", 0, 0);
  538. setSetting("btnRelay", 1, 1);
  539. setSetting("btnRelay", 2, 0);
  540. setSetting("rlyGPIO", 0, 12);
  541. setSetting("rlyGPIO", 1, 5);
  542. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  543. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  544. #elif defined(GENERIC_8CH)
  545. setSetting("board", 49);
  546. setSetting("rlyGPIO", 0, 0);
  547. setSetting("rlyGPIO", 1, 2);
  548. setSetting("rlyGPIO", 2, 4);
  549. setSetting("rlyGPIO", 3, 5);
  550. setSetting("rlyGPIO", 4, 12);
  551. setSetting("rlyGPIO", 5, 13);
  552. setSetting("rlyGPIO", 6, 14);
  553. setSetting("rlyGPIO", 7, 15);
  554. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  555. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  556. setSetting("rlyType", 2, RELAY_TYPE_NORMAL);
  557. setSetting("rlyType", 3, RELAY_TYPE_NORMAL);
  558. setSetting("rlyType", 4, RELAY_TYPE_NORMAL);
  559. setSetting("rlyType", 5, RELAY_TYPE_NORMAL);
  560. setSetting("rlyType", 6, RELAY_TYPE_NORMAL);
  561. setSetting("rlyType", 7, RELAY_TYPE_NORMAL);
  562. #elif defined(ARILUX_AL_LC01)
  563. setSetting("board", 50);
  564. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  565. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  566. setSetting("litCHGPIO", 0, 5);
  567. setSetting("litCHGPIO", 1, 12);
  568. setSetting("litCHGPIO", 2, 13);
  569. setSetting("litCHGPIO", 3, 14);
  570. setSetting("litCHLogic", 0, 0);
  571. setSetting("litCHLogic", 1, 0);
  572. setSetting("litCHLogic", 2, 0);
  573. setSetting("litCHLogic", 3, 0);
  574. setSetting("rlyCount", 1);
  575. #elif defined(ARILUX_AL_LC11)
  576. setSetting("board", 51);
  577. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  578. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  579. setSetting("litCHGPIO", 0, 5);
  580. setSetting("litCHGPIO", 1, 4);
  581. setSetting("litCHGPIO", 2, 14);
  582. setSetting("litCHGPIO", 3, 13);
  583. setSetting("litCHGPIO", 4, 12);
  584. setSetting("litCHLogic", 0, 0);
  585. setSetting("litCHLogic", 1, 0);
  586. setSetting("litCHLogic", 2, 0);
  587. setSetting("litCHLogic", 3, 0);
  588. setSetting("litCHLogic", 4, 0);
  589. setSetting("rlyCount", 1);
  590. #elif defined(ARILUX_AL_LC02)
  591. setSetting("board", 52);
  592. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  593. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  594. setSetting("litCHGPIO", 0, 12);
  595. setSetting("litCHGPIO", 1, 5);
  596. setSetting("litCHGPIO", 2, 13);
  597. setSetting("litCHGPIO", 3, 15);
  598. setSetting("litCHLogic", 0, 0);
  599. setSetting("litCHLogic", 1, 0);
  600. setSetting("litCHLogic", 2, 0);
  601. setSetting("litCHLogic", 3, 0);
  602. setSetting("rlyCount", 1);
  603. #elif defined(KMC_70011)
  604. setSetting("board", 53);
  605. setSetting("ledGPIO", 0, 13);
  606. setSetting("ledLogic", 0, 0);
  607. setSetting("btnGPIO", 0, 0);
  608. setSetting("btnRelay", 0, 0);
  609. setSetting("rlyGPIO", 0, 14);
  610. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  611. setSetting("hlwSELGPIO", 12);
  612. setSetting("hlwCF1GPIO", 5);
  613. setSetting("hlwCFGPIO", 4);
  614. #elif defined(GIZWITS_WITTY_CLOUD)
  615. setSetting("board", 54);
  616. setSetting("ledGPIO", 0, 2);
  617. setSetting("ledLogic", 0, 1);
  618. setSetting("btnGPIO", 0, 4);
  619. setSetting("rlyProvider", RELAY_PROVIDER_LIGHT);
  620. setSetting("litProvider", LIGHT_PROVIDER_DIMMER);
  621. setSetting("litCHGPIO", 0, 15);
  622. setSetting("litCHGPIO", 1, 12);
  623. setSetting("litCHGPIO", 2, 13);
  624. setSetting("litCHLogic", 0, 0);
  625. setSetting("litCHLogic", 1, 0);
  626. setSetting("litCHLogic", 2, 0);
  627. setSetting("rlyCount", 1);
  628. #elif defined(EUROMATE_WIFI_STECKER_SCHUKO)
  629. setSetting("board", 55);
  630. setSetting("ledGPIO", 0, 4);
  631. setSetting("ledLogic", 0, 0);
  632. setSetting("ledGPIO", 1, 12);
  633. setSetting("ledLogic", 1, 0);
  634. setSetting("btnGPIO", 0, 14);
  635. setSetting("btnRelay", 0, 0);
  636. setSetting("rlyGPIO", 0, 5);
  637. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  638. #elif defined(TONBUX_POWERSTRIP02)
  639. setSetting("board", 56);
  640. setSetting("rlyGPIO", 0, 4);
  641. setSetting("rlyGPIO", 1, 13);
  642. setSetting("rlyGPIO", 2, 12);
  643. setSetting("rlyGPIO", 3, 14);
  644. setSetting("rlyGPIO", 4, 16);
  645. setSetting("rlyType", 0, RELAY_TYPE_INVERSE);
  646. setSetting("rlyType", 1, RELAY_TYPE_INVERSE);
  647. setSetting("rlyType", 2, RELAY_TYPE_INVERSE);
  648. setSetting("rlyType", 3, RELAY_TYPE_INVERSE);
  649. setSetting("rlyType", 4, RELAY_TYPE_NORMAL); // Not a relay. USB ports on/off
  650. setSetting("ledGPIO", 0, 0); // 1 blue led
  651. setSetting("ledLogic", 0, 1);
  652. setSetting("ledGPIO", 1, 3); // 3 red leds
  653. setSetting("ledLogic", 1, 1);
  654. setSetting("btnGPIO", 0, 5);
  655. setSetting("btnRelay", 0, 1);
  656. #elif defined(LINGAN_SWA1)
  657. setSetting("board", 57);
  658. setSetting("ledGPIO", 0, 4);
  659. setSetting("ledLogic", 0, 1);
  660. setSetting("btnGPIO", 0, 13);
  661. setSetting("btnRelay", 0, 0);
  662. setSetting("rlyGPIO", 0, 5);
  663. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  664. #elif defined(HEYGO_HY02)
  665. setSetting("board", 58);
  666. setSetting("ledGPIO", 0, 0);
  667. setSetting("ledLogic", 0, 1);
  668. setSetting("ledGPIO", 1, 15);
  669. setSetting("ledLogic", 1, 0);
  670. setSetting("btnGPIO", 0, 13);
  671. setSetting("btnRelay", 0, 0);
  672. setSetting("rlyGPIO", 0, 15);
  673. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  674. setSetting("hlwSELGPIO", 3);
  675. setSetting("hlwCF1GPIO", 14);
  676. setSetting("hlwCFGPIO", 5);
  677. #elif defined(MAXCIO_WUS002S)
  678. setSetting("board", 59);
  679. setSetting("ledGPIO", 0, 3);
  680. setSetting("ledLogic", 0, 0);
  681. setSetting("btnGPIO", 0, 2);
  682. setSetting("btnRelay", 0, 0);
  683. setSetting("rlyGPIO", 0, 13);
  684. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  685. setSetting("hlwSELGPIO", 12);
  686. setSetting("hlwCF1GPIO", 5);
  687. setSetting("hlwCFGPIO", 4);
  688. #elif defined(YIDIAN_XSSSA05)
  689. setSetting("board", 60);
  690. setSetting("ledGPIO", 0, 0);
  691. setSetting("ledLogic", 0, 0);
  692. setSetting("ledGPIO", 1, 5);
  693. setSetting("ledLogic", 1, 0);
  694. setSetting("ledGPIO", 2, 2);
  695. setSetting("ledLogic", 2, 0);
  696. setSetting("btnGPIO", 0, 13);
  697. setSetting("btnRelay", 0, 0);
  698. setSetting("rlyGPIO", 0, 15);
  699. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  700. #elif defined(TONBUX_XSSSA06)
  701. setSetting("board", 61);
  702. setSetting("ledGPIO", 0, 4);
  703. setSetting("ledLogic", 0, 1);
  704. setSetting("btnGPIO", 0, 13);
  705. setSetting("btnRelay", 0, 0);
  706. setSetting("rlyGPIO", 0, 5);
  707. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  708. #elif defined(GREEN_ESP8266RELAY)
  709. setSetting("board", 62);
  710. setSetting("ledGPIO", 0, 2);
  711. setSetting("ledLogic", 0, 1);
  712. setSetting("btnGPIO", 0, 5);
  713. setSetting("btnRelay", 0, 0);
  714. setSetting("rlyGPIO", 0, 4);
  715. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  716. #elif defined(IKE_ESPIKE)
  717. setSetting("board", 63);
  718. setSetting("ledGPIO", 0, 2);
  719. setSetting("ledLogic", 0, 1);
  720. setSetting("btnGPIO", 0, 13);
  721. setSetting("btnRelay", 0, 0);
  722. setSetting("btnGPIO", 1, 12);
  723. setSetting("btnRelay", 1, 1);
  724. setSetting("btnGPIO", 2, 13);
  725. setSetting("btnRelay", 2, 2);
  726. setSetting("rlyGPIO", 0, 4);
  727. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  728. setSetting("rlyGPIO", 1, 5);
  729. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  730. setSetting("rlyGPIO", 2, 16);
  731. setSetting("rlyType", 2, RELAY_TYPE_NORMAL);
  732. #elif defined(ARNIEX_SWIFITCH)
  733. setSetting("board", 64);
  734. setSetting("ledGPIO", 0, 12);
  735. setSetting("ledLogic", 0, 1);
  736. setSetting("btnGPIO", 0, 4);
  737. setSetting("btnRelay", 0, 1);
  738. setSetting("rlyGPIO", 0, 5);
  739. setSetting("rlyType", 0, RELAY_TYPE_INVERSE);
  740. #elif defined(GENERIC_ESP01S_RELAY_V40)
  741. setSetting("board", 65);
  742. setSetting("ledGPIO", 0, 2);
  743. setSetting("ledLogic", 0, 0);
  744. setSetting("rlyGPIO", 0, 0);
  745. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  746. #elif defined(GENERIC_ESP01S_RGBLED_V10)
  747. setSetting("board", 66);
  748. setSetting("ledGPIO", 0, 2);
  749. #elif defined(HELTEC_TOUCHRELAY)
  750. setSetting("board", 67);
  751. setSetting("btnGPIO", 0, 14);
  752. setSetting("btnRelay", 0, 1);
  753. setSetting("rlyGPIO", 0, 12);
  754. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  755. #elif defined(GENERIC_ESP01S_DHT11_V10)
  756. setSetting("board", 68);
  757. #elif defined(GENERIC_ESP01S_DS18B20_V10)
  758. setSetting("board", 69);
  759. #elif defined(ZHILDE_EU44_W)
  760. setSetting("board", 70);
  761. setSetting("btnGPIO", 0, 3);
  762. setSetting("ledGPIO", 0, 1);
  763. setSetting("ledLogic", 0, 1);
  764. setSetting("rlyGPIO", 0, 5);
  765. setSetting("rlyGPIO", 1, 4);
  766. setSetting("rlyGPIO", 2, 12);
  767. setSetting("rlyGPIO", 3, 13);
  768. setSetting("rlyGPIO", 4, 14);
  769. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  770. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  771. setSetting("rlyType", 2, RELAY_TYPE_NORMAL);
  772. setSetting("rlyType", 3, RELAY_TYPE_NORMAL);
  773. setSetting("rlyType", 4, RELAY_TYPE_NORMAL);
  774. #elif defined(ITEAD_SONOFF_POW_R2)
  775. setSetting("board", 71);
  776. setSetting("ledGPIO", 0, 15);
  777. setSetting("ledLogic", 0, 1);
  778. setSetting("btnGPIO", 0, 0);
  779. setSetting("btnRelay", 0, 0);
  780. setSetting("rlyGPIO", 0, 12);
  781. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  782. setSetting("hlwSELGPIO", 5);
  783. setSetting("hlwCF1GPIO", 13);
  784. setSetting("hlwCFGPIO", 14);
  785. #elif defined(LUANI_HVIO)
  786. setSetting("board", 72);
  787. setSetting("ledGPIO", 0, 15);
  788. setSetting("ledLogic", 0, 0);
  789. setSetting("btnGPIO", 0, 12);
  790. setSetting("btnRelay", 0, 0);
  791. setSetting("rlyGPIO", 0, 4);
  792. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  793. setSetting("rlyGPIO", 1, 5);
  794. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  795. #elif defined(ALLNET_4DUINO_IOT_WLAN_RELAIS)
  796. setSetting("board", 73);
  797. setSetting("rlyGPIO", 0, 14);
  798. setSetting("rlyResetGPIO", 0, 12);
  799. setSetting("rlyType", 0, RELAY_TYPE_LATCHED);
  800. #elif defined(TONBUX_MOSQUITO_KILLER)
  801. setSetting("board", 74);
  802. setSetting("ledGPIO", 0, 15);
  803. setSetting("ledLogic", 0, 1);
  804. setSetting("ledGPIO", 1, 14);
  805. setSetting("ledLogic", 1, 1);
  806. setSetting("ledGPIO", 2, 12);
  807. setSetting("ledLogic", 2, 0);
  808. setSetting("ledGPIO", 3, 16);
  809. setSetting("ledLogic", 3, 0);
  810. setSetting("btnGPIO", 0, 2);
  811. setSetting("btnRelay", 0, 0);
  812. setSetting("rlyGPIO", 0, 5);
  813. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  814. #elif defined(NEO_COOLCAM_NAS_WR01W)
  815. setSetting("board", 75);
  816. setSetting("ledGPIO", 0, 4);
  817. setSetting("ledLogic", 0, 1);
  818. setSetting("btnGPIO", 0, 13);
  819. setSetting("btnRelay", 0, 0);
  820. setSetting("rlyGPIO", 0, 12);
  821. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  822. #elif defined(PILOTAK_ESP_DIN_V1)
  823. setSetting("board", 76);
  824. setSetting("ledGPIO", 0, 16);
  825. setSetting("ledLogic", 0, 0);
  826. setSetting("btnGPIO", 0, 0);
  827. setSetting("btnRelay", 0, 0);
  828. setSetting("rlyGPIO", 0, 4);
  829. setSetting("rlyGPIO", 1, 5);
  830. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  831. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  832. #elif defined(ESTINK_WIFI_POWER_STRIP)
  833. setSetting("board", 77);
  834. setSetting("btnGPIO", 0, 16);
  835. setSetting("btnRelay", 0, 3);
  836. setSetting("ledGPIO", 0, 0);
  837. setSetting("ledGPIO", 1, 12);
  838. setSetting("ledGPIO", 2, 3);
  839. setSetting("ledGPIO", 3, 5);
  840. setSetting("ledLogic", 0, 1);
  841. setSetting("ledLogic", 1, 1);
  842. setSetting("ledLogic", 2, 1);
  843. setSetting("ledLogic", 3, 1);
  844. setSetting("ledMode", 0, LED_MODE_FINDME);
  845. setSetting("ledMode", 1, LED_MODE_FOLLOW);
  846. setSetting("ledMode", 2, LED_MODE_FOLLOW);
  847. setSetting("ledMode", 3, LED_MODE_FOLLOW);
  848. setSetting("ledRelay", 1, 1);
  849. setSetting("ledRelay", 2, 2);
  850. setSetting("ledRelay", 3, 3);
  851. setSetting("rlyGPIO", 0, 14);
  852. setSetting("rlyGPIO", 1, 13);
  853. setSetting("rlyGPIO", 2, 4);
  854. setSetting("rlyGPIO", 3, 15);
  855. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  856. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  857. setSetting("rlyType", 2, RELAY_TYPE_NORMAL);
  858. setSetting("rlyType", 3, RELAY_TYPE_NORMAL);
  859. #elif defined(BH_ONOFRE)
  860. setSetting("board", 78);
  861. setSetting("btnGPIO", 0, 12);
  862. setSetting("btnGPIO", 0, 13);
  863. setSetting("btnRelay", 0, 0);
  864. setSetting("btnRelay", 0, 1);
  865. setSetting("rlyGPIO", 0, 4);
  866. setSetting("rlyGPIO", 1, 5);
  867. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  868. setSetting("rlyType", 1, RELAY_TYPE_NORMAL);
  869. #elif defined(BLITZWOLF_BWSHP2)
  870. setSetting("board", 79);
  871. setSetting("ledGPIO", 0, 2);
  872. setSetting("ledLogic", 0, 1);
  873. setSetting("ledGPIO", 1, 0);
  874. setSetting("ledLogic", 1, 1);
  875. setSetting("ledMode", 1, LED_MODE_FINDME);
  876. setSetting("ledRelay", 1, 0);
  877. setSetting("btnGPIO", 0, 13);
  878. setSetting("btnRelay", 0, 0);
  879. setSetting("rlyGPIO", 0, 15);
  880. setSetting("rlyType", 0, RELAY_TYPE_NORMAL);
  881. setSetting("hlwSELGPIO", 12);
  882. setSetting("hlwCF1GPIO", 14);
  883. setSetting("hlwCFGPIO", 5);
  884. setSetting("curRatio", 25740);
  885. setSetting("volRatio", 313400);
  886. setSetting("pwrRatio", 3414290);
  887. setSetting("hlwCurLevel", LOW);
  888. setSetting("hlwInt", FALLING);
  889. #else
  890. // Allow users to define new settings without migration config
  891. //#error "UNSUPPORTED HARDWARE!"
  892. #endif
  893. }
  894. saveSettings();
  895. }