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.

568 lines
15 KiB

  1. [platformio]
  2. env_default = d1-debug
  3. src_dir = espurna
  4. data_dir = espurna/data
  5. [common]
  6. build_flags = -g -DDEBUG_PORT=Serial -DMQTT_MAX_PACKET_SIZE=400
  7. build_flags_512k = ${common.build_flags} -Wl,-Tesp8266.flash.512k0.ld
  8. build_flags_1m = ${common.build_flags} -Wl,-Tesp8266.flash.1m0.ld
  9. lib_deps =
  10. DHT sensor library
  11. Adafruit Unified Sensor
  12. https://github.com/xoseperez/Time
  13. ArduinoJson
  14. https://github.com/me-no-dev/ESPAsyncTCP#991f855
  15. https://github.com/me-no-dev/ESPAsyncWebServer#a94265d
  16. https://github.com/marvinroger/async-mqtt-client#v0.8.1
  17. PubSubClient
  18. Embedis
  19. NtpClientLib
  20. OneWire
  21. DallasTemperature
  22. Brzo I2C
  23. https://bitbucket.org/xoseperez/justwifi.git#1.1.3
  24. https://bitbucket.org/xoseperez/hlw8012.git#1.0.1
  25. https://bitbucket.org/xoseperez/fauxmoesp.git#2.1.0
  26. https://bitbucket.org/xoseperez/nofuss.git#0.2.2
  27. https://bitbucket.org/xoseperez/emonliteesp.git#0.1.2
  28. https://bitbucket.org/xoseperez/debounceevent.git#2.0.1
  29. https://github.com/xoseperez/my9291#1.0.0
  30. https://github.com/xoseperez/RemoteSwitch-arduino-library.git
  31. lib_ignore =
  32. # ------------------------------------------------------------------------------
  33. [env:d1-analog]
  34. platform = espressif8266
  35. framework = arduino
  36. board = d1_mini
  37. lib_deps = ${common.lib_deps}
  38. lib_ignore = ${common.lib_ignore}
  39. build_flags = ${common.build_flags} -DD1_MINI -DENABLE_DS18B20=1 -DDS_PIN=14 -DENABLE_ADC_VCC=0 -DMQTT_USE_ASYNC=0 -DENABLE_ANALOG=1 -DNOWSAUTH
  40. [env:d1-debug]
  41. platform = espressif8266
  42. framework = arduino
  43. board = d1_mini
  44. lib_deps = ${common.lib_deps}
  45. lib_ignore = ${common.lib_ignore}
  46. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  47. [env:d1-debug-ota]
  48. platform = espressif8266
  49. framework = arduino
  50. board = d1_mini
  51. lib_deps = ${common.lib_deps}
  52. lib_ignore = ${common.lib_ignore}
  53. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  54. upload_speed = 115200
  55. upload_port = "192.168.4.1"
  56. upload_flags = --auth=fibonacci --port 8266
  57. [env:node-debug]
  58. platform = espressif8266
  59. framework = arduino
  60. board = nodemcuv2
  61. lib_deps = ${common.lib_deps}
  62. lib_ignore = ${common.lib_ignore}
  63. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  64. [env:node-debug-ota]
  65. platform = espressif8266
  66. framework = arduino
  67. board = nodemcuv2
  68. lib_deps = ${common.lib_deps}
  69. lib_ignore = ${common.lib_ignore}
  70. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  71. upload_speed = 115200
  72. upload_port = "192.168.4.1"
  73. upload_flags = --auth=fibonacci --port 8266
  74. [env:espurna-debug]
  75. platform = espressif8266
  76. framework = arduino
  77. board = esp12e
  78. lib_deps = ${common.lib_deps}
  79. lib_ignore = ${common.lib_ignore}
  80. build_flags = ${common.build_flags} -DESPURNA_H
  81. [env:espurna-debug-ota]
  82. platform = espressif8266
  83. framework = arduino
  84. board = esp12e
  85. lib_deps = ${common.lib_deps}
  86. lib_ignore = ${common.lib_ignore}
  87. build_flags = ${common.build_flags} -DESPURNA_H
  88. upload_speed = 115200
  89. upload_port = "192.168.4.1"
  90. upload_flags = --auth=fibonacci --port 8266
  91. [env:sonoff-debug]
  92. platform = espressif8266
  93. framework = arduino
  94. board = esp01_1m
  95. board_flash_mode = dout
  96. lib_deps = ${common.lib_deps}
  97. lib_ignore = ${common.lib_ignore}
  98. build_flags = ${common.build_flags_1m} -DSONOFF
  99. [env:sonoff-debug-ota]
  100. platform = espressif8266
  101. framework = arduino
  102. board = esp01_1m
  103. board_flash_mode = dout
  104. lib_deps = ${common.lib_deps}
  105. lib_ignore = ${common.lib_ignore}
  106. build_flags = ${common.build_flags_1m} -DSONOFF
  107. upload_speed = 115200
  108. upload_port = "192.168.4.1"
  109. upload_flags = --auth=fibonacci --port 8266
  110. [env:sonoff-dht22-debug]
  111. platform = espressif8266
  112. framework = arduino
  113. board = esp01_1m
  114. board_flash_mode = dout
  115. lib_deps = ${common.lib_deps}
  116. lib_ignore = ${common.lib_ignore}
  117. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DHT=1
  118. [env:sonoff-ds18b20-debug]
  119. platform = espressif8266
  120. framework = arduino
  121. board = esp01_1m
  122. board_flash_mode = dout
  123. lib_deps = ${common.lib_deps}
  124. lib_ignore = ${common.lib_ignore}
  125. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DS18B20=1
  126. [env:sonoff-pow-debug]
  127. platform = espressif8266
  128. framework = arduino
  129. board = esp01_1m
  130. board_flash_mode = dout
  131. lib_deps = ${common.lib_deps}
  132. lib_ignore = ${common.lib_ignore}
  133. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  134. [env:sonoff-pow-debug-ota]
  135. platform = espressif8266
  136. framework = arduino
  137. board = esp01_1m
  138. board_flash_mode = dout
  139. lib_deps = ${common.lib_deps}
  140. lib_ignore = ${common.lib_ignore}
  141. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  142. upload_speed = 115200
  143. upload_port = "192.168.4.1"
  144. upload_flags = --auth=fibonacci --port 8266
  145. [env:sonoff-dual-debug]
  146. platform = espressif8266
  147. framework = arduino
  148. board = esp01_1m
  149. board_flash_mode = dout
  150. lib_deps = ${common.lib_deps}
  151. lib_ignore = ${common.lib_ignore}
  152. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  153. [env:sonoff-dual-debug-ota]
  154. platform = espressif8266
  155. framework = arduino
  156. board = esp01_1m
  157. board_flash_mode = dout
  158. lib_deps = ${common.lib_deps}
  159. lib_ignore = ${common.lib_ignore}
  160. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  161. upload_speed = 115200
  162. upload_port = "192.168.4.1"
  163. upload_flags = --auth=fibonacci --port 8266
  164. [env:sonoff-4ch-debug]
  165. platform = espressif8266
  166. framework = arduino
  167. board = esp8285
  168. board_flash_mode = dout
  169. lib_deps = ${common.lib_deps}
  170. lib_ignore = ${common.lib_ignore}
  171. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  172. [env:sonoff-4ch-debug-ota]
  173. platform = espressif8266
  174. framework = arduino
  175. board = esp8285
  176. board_flash_mode = dout
  177. lib_deps = ${common.lib_deps}
  178. lib_ignore = ${common.lib_ignore}
  179. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  180. upload_speed = 115200
  181. upload_port = "192.168.4.1"
  182. upload_flags = --auth=fibonacci --port 8266
  183. [env:sonoff-4ch-pro-debug]
  184. platform = espressif8266
  185. framework = arduino
  186. board = esp8285
  187. board_flash_mode = dout
  188. lib_deps = ${common.lib_deps}
  189. lib_ignore = ${common.lib_ignore}
  190. build_flags = ${common.build_flags_1m} -DSONOFF_4CH_PRO
  191. [env:sonoff-4ch-pro-debug-ota]
  192. platform = espressif8266
  193. framework = arduino
  194. board = esp8285
  195. board_flash_mode = dout
  196. lib_deps = ${common.lib_deps}
  197. lib_ignore = ${common.lib_ignore}
  198. build_flags = ${common.build_flags_1m} -DSONOFF_4CH_PRO
  199. upload_speed = 115200
  200. upload_port = "192.168.4.1"
  201. upload_flags = --auth=fibonacci --port 8266
  202. [env:sonoff-touch-debug]
  203. platform = espressif8266
  204. framework = arduino
  205. board = esp8285
  206. board_flash_mode = dout
  207. lib_deps = ${common.lib_deps}
  208. lib_ignore = ${common.lib_ignore}
  209. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  210. [env:sonoff-touch-debug-ota]
  211. platform = espressif8266
  212. framework = arduino
  213. board = esp8285
  214. board_flash_mode = dout
  215. lib_deps = ${common.lib_deps}
  216. lib_ignore = ${common.lib_ignore}
  217. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  218. upload_speed = 115200
  219. upload_port = "192.168.4.1"
  220. upload_flags = --auth=fibonacci --port 8266
  221. [env:slampher-debug]
  222. platform = espressif8266
  223. framework = arduino
  224. board = esp01_1m
  225. board_flash_mode = dout
  226. lib_deps = ${common.lib_deps}
  227. lib_ignore = ${common.lib_ignore}
  228. build_flags = ${common.build_flags_1m} -DSLAMPHER
  229. [env:slampher-debug-ota]
  230. platform = espressif8266
  231. framework = arduino
  232. board = esp01_1m
  233. board_flash_mode = dout
  234. lib_deps = ${common.lib_deps}
  235. lib_ignore = ${common.lib_ignore}
  236. build_flags = ${common.build_flags_1m} -DSLAMPHER
  237. upload_speed = 115200
  238. upload_port = "192.168.4.1"
  239. upload_flags = --auth=fibonacci --port 8266
  240. [env:s20-debug]
  241. platform = espressif8266
  242. framework = arduino
  243. board = esp01_1m
  244. board_flash_mode = dout
  245. lib_deps = ${common.lib_deps}
  246. lib_ignore = ${common.lib_ignore}
  247. build_flags = ${common.build_flags_1m} -DS20
  248. [env:s20-debug-ota]
  249. platform = espressif8266
  250. framework = arduino
  251. board = esp01_1m
  252. board_flash_mode = dout
  253. lib_deps = ${common.lib_deps}
  254. lib_ignore = ${common.lib_ignore}
  255. build_flags = ${common.build_flags_1m} -DS20
  256. upload_speed = 115200
  257. upload_port = "192.168.4.1"
  258. upload_flags = --auth=fibonacci --port 8266
  259. [env:sonoff-b1-debug]
  260. platform = espressif8266
  261. framework = arduino
  262. board = esp01_1m
  263. board_flash_mode = dout
  264. lib_deps = ${common.lib_deps}
  265. lib_ignore = ${common.lib_ignore}
  266. build_flags = ${common.build_flags_1m} -DSONOFF_B1
  267. [env:sonoff-b1-debug-ota]
  268. platform = espressif8266
  269. framework = arduino
  270. board = esp01_1m
  271. board_flash_mode = dout
  272. lib_deps = ${common.lib_deps}
  273. lib_ignore = ${common.lib_ignore}
  274. build_flags = ${common.build_flags_1m} -DSONOFF_B1
  275. upload_speed = 115200
  276. upload_port = "192.168.4.1"
  277. upload_flags = --auth=fibonacci --port 8266
  278. [env:sonoff-led-debug]
  279. platform = espressif8266
  280. framework = arduino
  281. board = esp01_1m
  282. board_flash_mode = dout
  283. lib_deps = ${common.lib_deps}
  284. lib_ignore = ${common.lib_ignore}
  285. build_flags = ${common.build_flags_1m} -DSONOFF_LED
  286. [env:sonoff-led-debug-ota]
  287. platform = espressif8266
  288. framework = arduino
  289. board = esp01_1m
  290. board_flash_mode = dout
  291. lib_deps = ${common.lib_deps}
  292. lib_ignore = ${common.lib_ignore}
  293. build_flags = ${common.build_flags_1m} -DSONOFF_LED
  294. upload_speed = 115200
  295. upload_port = "192.168.4.1"
  296. upload_flags = --auth=fibonacci --port 8266
  297. [env:rfbridge-debug]
  298. platform = espressif8266
  299. framework = arduino
  300. board = esp01_1m
  301. board_flash_mode = dout
  302. lib_deps = ${common.lib_deps}
  303. lib_ignore = ${common.lib_ignore}
  304. build_flags = ${common.build_flags_1m} -DSONOFF_RFBRIDGE
  305. [env:rfbridge-debug-ota]
  306. platform = espressif8266
  307. framework = arduino
  308. board = esp01_1m
  309. board_flash_mode = dout
  310. lib_deps = ${common.lib_deps}
  311. lib_ignore = ${common.lib_ignore}
  312. build_flags = ${common.build_flags_1m} -DSONOFF_RFBRIDGE
  313. upload_speed = 115200
  314. upload_port = "192.168.4.1"
  315. upload_flags = --auth=Algernon1 --port 8266
  316. [env:1ch-inching-debug]
  317. platform = espressif8266
  318. framework = arduino
  319. board = esp01_1m
  320. board_flash_mode = dout
  321. lib_deps = ${common.lib_deps}
  322. lib_ignore = ${common.lib_ignore}
  323. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  324. [env:1ch-inching-debug-ota]
  325. platform = espressif8266
  326. framework = arduino
  327. board = esp01_1m
  328. board_flash_mode = dout
  329. lib_deps = ${common.lib_deps}
  330. lib_ignore = ${common.lib_ignore}
  331. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  332. upload_speed = 115200
  333. upload_port = "192.168.4.1"
  334. upload_flags = --auth=fibonacci --port 8266
  335. [env:motor-debug]
  336. platform = espressif8266
  337. framework = arduino
  338. board = esp01_1m
  339. board_flash_mode = dout
  340. lib_deps = ${common.lib_deps}
  341. lib_ignore = ${common.lib_ignore}
  342. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  343. [env:motor-debug-ota]
  344. platform = espressif8266
  345. framework = arduino
  346. board = esp01_1m
  347. board_flash_mode = dout
  348. lib_deps = ${common.lib_deps}
  349. lib_ignore = ${common.lib_ignore}
  350. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  351. upload_speed = 115200
  352. upload_port = "192.168.4.1"
  353. upload_flags = --auth=fibonacci --port 8266
  354. [env:electrodragon-debug]
  355. platform = espressif8266
  356. framework = arduino
  357. board = esp12e
  358. lib_deps = ${common.lib_deps}
  359. lib_ignore = ${common.lib_ignore}
  360. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  361. [env:electrodragon-debug-ota]
  362. platform = espressif8266
  363. framework = arduino
  364. board = esp12e
  365. lib_deps = ${common.lib_deps}
  366. lib_ignore = ${common.lib_ignore}
  367. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  368. upload_speed = 115200
  369. upload_port = "192.168.4.1"
  370. upload_flags = --auth=fibonacci --port 8266
  371. [env:ecoplug-debug]
  372. platform = espressif8266
  373. framework = arduino
  374. board = esp01_1m
  375. board_flash_mode = dout
  376. lib_deps = ${common.lib_deps}
  377. lib_ignore = ${common.lib_ignore}
  378. build_flags = ${common.build_flags_1m} -DECOPLUG
  379. [env:ecoplug-debug-ota]
  380. platform = espressif8266
  381. framework = arduino
  382. board = esp01_1m
  383. board_flash_mode = dout
  384. lib_deps = ${common.lib_deps}
  385. lib_ignore = ${common.lib_ignore}
  386. build_flags = ${common.build_flags_1m} -DECOPLUG
  387. upload_speed = 115200
  388. upload_port = "192.168.4.1"
  389. upload_flags = --auth=fibonacci --port 8266
  390. [env:jangoe-debug]
  391. platform = espressif8266
  392. framework = arduino
  393. board = esp12e
  394. lib_deps = ${common.lib_deps}
  395. lib_ignore = ${common.lib_ignore}
  396. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  397. [env:jangoe-debug-ota]
  398. platform = espressif8266
  399. framework = arduino
  400. board = esp12e
  401. lib_deps = ${common.lib_deps}
  402. lib_ignore = ${common.lib_ignore}
  403. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  404. upload_speed = 115200
  405. upload_port = "192.168.4.1"
  406. upload_flags = --auth=fibonacci --port 8266
  407. [env:mqtt-relay-debug]
  408. platform = espressif8266
  409. framework = arduino
  410. board = esp_wroom_02
  411. lib_deps = ${common.lib_deps}
  412. lib_ignore = ${common.lib_ignore}
  413. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  414. [env:mqtt-relay-debug-ota]
  415. platform = espressif8266
  416. framework = arduino
  417. board = esp_wroom_02
  418. lib_deps = ${common.lib_deps}
  419. lib_ignore = ${common.lib_ignore}
  420. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  421. upload_speed = 115200
  422. upload_port = "192.168.4.1"
  423. upload_flags = --auth=fibonacci --port 8266
  424. [env:wifi-relays-debug]
  425. platform = espressif8266
  426. framework = arduino
  427. board = esp01_1m
  428. lib_deps = ${common.lib_deps}
  429. lib_ignore = ${common.lib_ignore}
  430. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  431. [env:wifi-relays-debug-ota]
  432. platform = espressif8266
  433. framework = arduino
  434. board = esp01_1m
  435. lib_deps = ${common.lib_deps}
  436. lib_ignore = ${common.lib_ignore}
  437. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  438. upload_speed = 115200
  439. upload_port = "192.168.4.1"
  440. upload_flags = --auth=fibonacci --port 8266
  441. [env:ai-light-debug]
  442. platform = espressif8266
  443. framework = arduino
  444. board = esp01_1m
  445. board_flash_mode = dout
  446. lib_deps = ${common.lib_deps}
  447. lib_ignore = ${common.lib_ignore}
  448. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  449. [env:ai-light-debug-ota]
  450. platform = espressif8266
  451. framework = arduino
  452. board = esp01_1m
  453. board_flash_mode = dout
  454. lib_deps = ${common.lib_deps}
  455. lib_ignore = ${common.lib_ignore}
  456. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  457. upload_speed = 115200
  458. upload_port = "192.168.4.1"
  459. upload_flags = --auth=fibonacci --port 8266
  460. [env:led-controller-debug]
  461. platform = espressif8266
  462. framework = arduino
  463. board = esp01_1m
  464. lib_deps = ${common.lib_deps}
  465. lib_ignore = ${common.lib_ignore}
  466. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  467. [env:led-controller-debug-ota]
  468. platform = espressif8266
  469. framework = arduino
  470. board = esp01_1m
  471. lib_deps = ${common.lib_deps}
  472. lib_ignore = ${common.lib_ignore}
  473. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  474. upload_speed = 115200
  475. upload_port = "192.168.4.1"
  476. upload_flags = --auth=fibonacci --port 8266
  477. [env:h801-debug]
  478. platform = espressif8266
  479. framework = arduino
  480. board = esp01_1m
  481. board_flash_mode = dout
  482. lib_deps = ${common.lib_deps}
  483. lib_ignore = ${common.lib_ignore}
  484. build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  485. [env:h801-debug-ota]
  486. platform = espressif8266
  487. framework = arduino
  488. board = esp01_1m
  489. board_flash_mode = dout
  490. lib_deps = ${common.lib_deps}
  491. lib_ignore = ${common.lib_ignore}
  492. build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  493. upload_speed = 115200
  494. upload_port = "192.168.4.1"
  495. upload_flags = --auth=fibonacci --port 8266
  496. [env:bnsz01-debug]
  497. platform = espressif8266
  498. framework = arduino
  499. board = esp8285
  500. board_flash_mode = dout
  501. lib_deps = ${common.lib_deps}
  502. lib_ignore = ${common.lib_ignore}
  503. build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
  504. [env:bnsz01-debug-ota]
  505. platform = espressif8266
  506. framework = arduino
  507. board = esp8285
  508. board_flash_mode = dout
  509. lib_deps = ${common.lib_deps}
  510. lib_ignore = ${common.lib_ignore}
  511. build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
  512. upload_speed = 115200
  513. upload_port = "192.168.4.1"
  514. upload_flags = --auth=fibonacci --port 8266