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.

547 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:rfbridge-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_RFBRIDGE
  286. [env:rfbridge-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_RFBRIDGE
  294. upload_speed = 115200
  295. upload_port = "192.168.4.1"
  296. upload_flags = --auth=Algernon1 --port 8266
  297. [env:1ch-inching-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} -DITEAD_1CH_INCHING
  305. [env:1ch-inching-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} -DITEAD_1CH_INCHING
  313. upload_speed = 115200
  314. upload_port = "192.168.4.1"
  315. upload_flags = --auth=fibonacci --port 8266
  316. [env:motor-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_MOTOR
  324. [env:motor-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_MOTOR
  332. upload_speed = 115200
  333. upload_port = "192.168.4.1"
  334. upload_flags = --auth=fibonacci --port 8266
  335. [env:electrodragon-debug]
  336. platform = espressif8266
  337. framework = arduino
  338. board = esp12e
  339. lib_deps = ${common.lib_deps}
  340. lib_ignore = ${common.lib_ignore}
  341. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  342. [env:electrodragon-debug-ota]
  343. platform = espressif8266
  344. framework = arduino
  345. board = esp12e
  346. lib_deps = ${common.lib_deps}
  347. lib_ignore = ${common.lib_ignore}
  348. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  349. upload_speed = 115200
  350. upload_port = "192.168.4.1"
  351. upload_flags = --auth=fibonacci --port 8266
  352. [env:ecoplug-debug]
  353. platform = espressif8266
  354. framework = arduino
  355. board = esp01_1m
  356. board_flash_mode = dout
  357. lib_deps = ${common.lib_deps}
  358. lib_ignore = ${common.lib_ignore}
  359. build_flags = ${common.build_flags_1m} -DECOPLUG
  360. [env:ecoplug-debug-ota]
  361. platform = espressif8266
  362. framework = arduino
  363. board = esp01_1m
  364. board_flash_mode = dout
  365. lib_deps = ${common.lib_deps}
  366. lib_ignore = ${common.lib_ignore}
  367. build_flags = ${common.build_flags_1m} -DECOPLUG
  368. upload_speed = 115200
  369. upload_port = "192.168.4.1"
  370. upload_flags = --auth=fibonacci --port 8266
  371. [env:jangoe-debug]
  372. platform = espressif8266
  373. framework = arduino
  374. board = esp12e
  375. lib_deps = ${common.lib_deps}
  376. lib_ignore = ${common.lib_ignore}
  377. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  378. [env:jangoe-debug-ota]
  379. platform = espressif8266
  380. framework = arduino
  381. board = esp12e
  382. lib_deps = ${common.lib_deps}
  383. lib_ignore = ${common.lib_ignore}
  384. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  385. upload_speed = 115200
  386. upload_port = "192.168.4.1"
  387. upload_flags = --auth=fibonacci --port 8266
  388. [env:mqtt-relay-debug]
  389. platform = espressif8266
  390. framework = arduino
  391. board = esp_wroom_02
  392. lib_deps = ${common.lib_deps}
  393. lib_ignore = ${common.lib_ignore}
  394. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  395. [env:mqtt-relay-debug-ota]
  396. platform = espressif8266
  397. framework = arduino
  398. board = esp_wroom_02
  399. lib_deps = ${common.lib_deps}
  400. lib_ignore = ${common.lib_ignore}
  401. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  402. upload_speed = 115200
  403. upload_port = "192.168.4.1"
  404. upload_flags = --auth=fibonacci --port 8266
  405. [env:wifi-relays-debug]
  406. platform = espressif8266
  407. framework = arduino
  408. board = esp01_1m
  409. lib_deps = ${common.lib_deps}
  410. lib_ignore = ${common.lib_ignore}
  411. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  412. [env:wifi-relays-debug-ota]
  413. platform = espressif8266
  414. framework = arduino
  415. board = esp01_1m
  416. lib_deps = ${common.lib_deps}
  417. lib_ignore = ${common.lib_ignore}
  418. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  419. upload_speed = 115200
  420. upload_port = "192.168.4.1"
  421. upload_flags = --auth=fibonacci --port 8266
  422. [env:ai-light-debug]
  423. platform = espressif8266
  424. framework = arduino
  425. board = esp01_1m
  426. board_flash_mode = dout
  427. lib_deps = ${common.lib_deps}
  428. lib_ignore = ${common.lib_ignore}
  429. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  430. [env:ai-light-debug-ota]
  431. platform = espressif8266
  432. framework = arduino
  433. board = esp01_1m
  434. board_flash_mode = dout
  435. lib_deps = ${common.lib_deps}
  436. lib_ignore = ${common.lib_ignore}
  437. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  438. upload_speed = 115200
  439. upload_port = "192.168.4.1"
  440. upload_flags = --auth=fibonacci --port 8266
  441. [env:led-controller-debug]
  442. platform = espressif8266
  443. framework = arduino
  444. board = esp01_1m
  445. lib_deps = ${common.lib_deps}
  446. lib_ignore = ${common.lib_ignore}
  447. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  448. [env:led-controller-debug-ota]
  449. platform = espressif8266
  450. framework = arduino
  451. board = esp01_1m
  452. lib_deps = ${common.lib_deps}
  453. lib_ignore = ${common.lib_ignore}
  454. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  455. upload_speed = 115200
  456. upload_port = "192.168.4.1"
  457. upload_flags = --auth=fibonacci --port 8266
  458. [env:h801-debug]
  459. platform = espressif8266
  460. framework = arduino
  461. board = esp01_1m
  462. board_flash_mode = dout
  463. lib_deps = ${common.lib_deps}
  464. lib_ignore = ${common.lib_ignore}
  465. build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  466. [env:h801-debug-ota]
  467. platform = espressif8266
  468. framework = arduino
  469. board = esp01_1m
  470. board_flash_mode = dout
  471. lib_deps = ${common.lib_deps}
  472. lib_ignore = ${common.lib_ignore}
  473. build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  474. upload_speed = 115200
  475. upload_port = "192.168.4.1"
  476. upload_flags = --auth=fibonacci --port 8266
  477. [env:bnsz01-debug]
  478. platform = espressif8266
  479. framework = arduino
  480. board = esp8285
  481. board_flash_mode = dout
  482. lib_deps = ${common.lib_deps}
  483. lib_ignore = ${common.lib_ignore}
  484. build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
  485. [env:bnsz01-debug-ota]
  486. platform = espressif8266
  487. framework = arduino
  488. board = esp8285
  489. board_flash_mode = dout
  490. lib_deps = ${common.lib_deps}
  491. lib_ignore = ${common.lib_ignore}
  492. build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
  493. upload_speed = 115200
  494. upload_port = "192.168.4.1"
  495. upload_flags = --auth=fibonacci --port 8266