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.

521 lines
14 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-ssl-debug]
  48. platform = espressif8266_stage
  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 -DASYNC_TCP_SSL_ENABLED=1
  54. [env:d1-debug-ota]
  55. platform = espressif8266
  56. framework = arduino
  57. board = d1_mini
  58. lib_deps = ${common.lib_deps}
  59. lib_ignore = ${common.lib_ignore}
  60. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  61. upload_speed = 115200
  62. upload_port = "192.168.4.1"
  63. upload_flags = --auth=fibonacci --port 8266
  64. [env:node-debug]
  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. [env:node-debug-ssl]
  72. platform = espressif8266_stage
  73. framework = arduino
  74. board = nodemcuv2
  75. lib_deps = ${common.lib_deps}
  76. lib_ignore = ${common.lib_ignore}
  77. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH -DASYNC_TCP_SSL_ENABLED=1
  78. [env:node-debug-ota]
  79. platform = espressif8266
  80. framework = arduino
  81. board = nodemcuv2
  82. lib_deps = ${common.lib_deps}
  83. lib_ignore = ${common.lib_ignore}
  84. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  85. upload_speed = 115200
  86. upload_port = "192.168.4.1"
  87. upload_flags = --auth=fibonacci --port 8266
  88. [env:espurna-debug]
  89. platform = espressif8266
  90. framework = arduino
  91. board = esp12e
  92. lib_deps = ${common.lib_deps}
  93. lib_ignore = ${common.lib_ignore}
  94. build_flags = ${common.build_flags} -DESPURNA_H
  95. [env:espurna-debug-ota]
  96. platform = espressif8266
  97. framework = arduino
  98. board = esp12e
  99. lib_deps = ${common.lib_deps}
  100. lib_ignore = ${common.lib_ignore}
  101. build_flags = ${common.build_flags} -DESPURNA_H
  102. upload_speed = 115200
  103. upload_port = "192.168.4.1"
  104. upload_flags = --auth=fibonacci --port 8266
  105. [env:sonoff-debug]
  106. platform = espressif8266
  107. framework = arduino
  108. board = esp01_1m
  109. board_flash_mode = dout
  110. lib_deps = ${common.lib_deps}
  111. lib_ignore = ${common.lib_ignore}
  112. build_flags = ${common.build_flags_1m} -DSONOFF
  113. [env:sonoff-debug-ota]
  114. platform = espressif8266
  115. framework = arduino
  116. board = esp01_1m
  117. board_flash_mode = dout
  118. lib_deps = ${common.lib_deps}
  119. lib_ignore = ${common.lib_ignore}
  120. build_flags = ${common.build_flags_1m} -DSONOFF
  121. upload_speed = 115200
  122. upload_port = "192.168.4.1"
  123. upload_flags = --auth=fibonacci --port 8266
  124. [env:sonoff-dht22-debug]
  125. platform = espressif8266
  126. framework = arduino
  127. board = esp01_1m
  128. board_flash_mode = dout
  129. lib_deps = ${common.lib_deps}
  130. lib_ignore = ${common.lib_ignore}
  131. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DHT=1
  132. [env:sonoff-ds18b20-debug]
  133. platform = espressif8266
  134. framework = arduino
  135. board = esp01_1m
  136. board_flash_mode = dout
  137. lib_deps = ${common.lib_deps}
  138. lib_ignore = ${common.lib_ignore}
  139. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DS18B20=1
  140. [env:sonoff-pow-debug]
  141. platform = espressif8266
  142. framework = arduino
  143. board = esp01_1m
  144. board_flash_mode = dout
  145. lib_deps = ${common.lib_deps}
  146. lib_ignore = ${common.lib_ignore}
  147. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  148. [env:sonoff-pow-debug-ota]
  149. platform = espressif8266
  150. framework = arduino
  151. board = esp01_1m
  152. board_flash_mode = dout
  153. lib_deps = ${common.lib_deps}
  154. lib_ignore = ${common.lib_ignore}
  155. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  156. upload_speed = 115200
  157. upload_port = "192.168.4.1"
  158. upload_flags = --auth=fibonacci --port 8266
  159. [env:sonoff-dual-debug]
  160. platform = espressif8266
  161. framework = arduino
  162. board = esp01_1m
  163. board_flash_mode = dout
  164. lib_deps = ${common.lib_deps}
  165. lib_ignore = ${common.lib_ignore}
  166. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  167. [env:sonoff-dual-debug-ota]
  168. platform = espressif8266
  169. framework = arduino
  170. board = esp01_1m
  171. board_flash_mode = dout
  172. lib_deps = ${common.lib_deps}
  173. lib_ignore = ${common.lib_ignore}
  174. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  175. upload_speed = 115200
  176. upload_port = "192.168.4.1"
  177. upload_flags = --auth=fibonacci --port 8266
  178. [env:sonoff-4ch-debug]
  179. platform = espressif8266
  180. framework = arduino
  181. board = esp8285
  182. board_flash_mode = dout
  183. lib_deps = ${common.lib_deps}
  184. lib_ignore = ${common.lib_ignore}
  185. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  186. [env:sonoff-4ch-debug-ota]
  187. platform = espressif8266
  188. framework = arduino
  189. board = esp8285
  190. board_flash_mode = dout
  191. lib_deps = ${common.lib_deps}
  192. lib_ignore = ${common.lib_ignore}
  193. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  194. upload_speed = 115200
  195. upload_port = "192.168.4.1"
  196. upload_flags = --auth=fibonacci --port 8266
  197. [env:sonoff-touch-debug]
  198. platform = espressif8266
  199. framework = arduino
  200. board = esp8285
  201. board_flash_mode = dout
  202. lib_deps = ${common.lib_deps}
  203. lib_ignore = ${common.lib_ignore}
  204. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  205. [env:sonoff-touch-debug-ota]
  206. platform = espressif8266
  207. framework = arduino
  208. board = esp8285
  209. board_flash_mode = dout
  210. lib_deps = ${common.lib_deps}
  211. lib_ignore = ${common.lib_ignore}
  212. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  213. upload_speed = 115200
  214. upload_port = "192.168.4.1"
  215. upload_flags = --auth=fibonacci --port 8266
  216. [env:slampher-debug]
  217. platform = espressif8266
  218. framework = arduino
  219. board = esp01_1m
  220. board_flash_mode = dout
  221. lib_deps = ${common.lib_deps}
  222. lib_ignore = ${common.lib_ignore}
  223. build_flags = ${common.build_flags_1m} -DSLAMPHER
  224. [env:slampher-debug-ota]
  225. platform = espressif8266
  226. framework = arduino
  227. board = esp01_1m
  228. board_flash_mode = dout
  229. lib_deps = ${common.lib_deps}
  230. lib_ignore = ${common.lib_ignore}
  231. build_flags = ${common.build_flags_1m} -DSLAMPHER
  232. upload_speed = 115200
  233. upload_port = "192.168.4.1"
  234. upload_flags = --auth=fibonacci --port 8266
  235. [env:s20-debug]
  236. platform = espressif8266
  237. framework = arduino
  238. board = esp01_1m
  239. board_flash_mode = dout
  240. lib_deps = ${common.lib_deps}
  241. lib_ignore = ${common.lib_ignore}
  242. build_flags = ${common.build_flags_1m} -DS20
  243. [env:s20-debug-ota]
  244. platform = espressif8266
  245. framework = arduino
  246. board = esp01_1m
  247. board_flash_mode = dout
  248. lib_deps = ${common.lib_deps}
  249. lib_ignore = ${common.lib_ignore}
  250. build_flags = ${common.build_flags_1m} -DS20
  251. upload_speed = 115200
  252. upload_port = "192.168.4.1"
  253. upload_flags = --auth=fibonacci --port 8266
  254. [env:rfbridge-debug]
  255. platform = espressif8266
  256. framework = arduino
  257. board = esp01_1m
  258. board_flash_mode = dout
  259. lib_deps = ${common.lib_deps}
  260. lib_ignore = ${common.lib_ignore}
  261. build_flags = ${common.build_flags_1m} -DSONOFF_RFBRIDGE
  262. [env:rfbridge-debug-ota]
  263. platform = espressif8266
  264. framework = arduino
  265. board = esp01_1m
  266. board_flash_mode = dout
  267. lib_deps = ${common.lib_deps}
  268. lib_ignore = ${common.lib_ignore}
  269. build_flags = ${common.build_flags_1m} -DSONOFF_RFBRIDGE
  270. upload_speed = 115200
  271. upload_port = "192.168.4.1"
  272. upload_flags = --auth=Algernon1 --port 8266
  273. [env:1ch-inching-debug]
  274. platform = espressif8266
  275. framework = arduino
  276. board = esp01_1m
  277. board_flash_mode = dout
  278. lib_deps = ${common.lib_deps}
  279. lib_ignore = ${common.lib_ignore}
  280. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  281. [env:1ch-inching-debug-ota]
  282. platform = espressif8266
  283. framework = arduino
  284. board = esp01_1m
  285. board_flash_mode = dout
  286. lib_deps = ${common.lib_deps}
  287. lib_ignore = ${common.lib_ignore}
  288. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  289. upload_speed = 115200
  290. upload_port = "192.168.4.1"
  291. upload_flags = --auth=fibonacci --port 8266
  292. [env:motor-debug]
  293. platform = espressif8266
  294. framework = arduino
  295. board = esp01_1m
  296. board_flash_mode = dout
  297. lib_deps = ${common.lib_deps}
  298. lib_ignore = ${common.lib_ignore}
  299. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  300. [env:motor-debug-ota]
  301. platform = espressif8266
  302. framework = arduino
  303. board = esp01_1m
  304. board_flash_mode = dout
  305. lib_deps = ${common.lib_deps}
  306. lib_ignore = ${common.lib_ignore}
  307. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  308. upload_speed = 115200
  309. upload_port = "192.168.4.1"
  310. upload_flags = --auth=fibonacci --port 8266
  311. [env:electrodragon-debug]
  312. platform = espressif8266
  313. framework = arduino
  314. board = esp12e
  315. lib_deps = ${common.lib_deps}
  316. lib_ignore = ${common.lib_ignore}
  317. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  318. [env:electrodragon-debug-ota]
  319. platform = espressif8266
  320. framework = arduino
  321. board = esp12e
  322. lib_deps = ${common.lib_deps}
  323. lib_ignore = ${common.lib_ignore}
  324. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  325. upload_speed = 115200
  326. upload_port = "192.168.4.1"
  327. upload_flags = --auth=fibonacci --port 8266
  328. [env:ecoplug-debug]
  329. platform = espressif8266
  330. framework = arduino
  331. board = esp01_1m
  332. board_flash_mode = dout
  333. lib_deps = ${common.lib_deps}
  334. lib_ignore = ${common.lib_ignore}
  335. build_flags = ${common.build_flags_1m} -DECOPLUG
  336. [env:ecoplug-debug-ota]
  337. platform = espressif8266
  338. framework = arduino
  339. board = esp01_1m
  340. board_flash_mode = dout
  341. lib_deps = ${common.lib_deps}
  342. lib_ignore = ${common.lib_ignore}
  343. build_flags = ${common.build_flags_1m} -DECOPLUG
  344. upload_speed = 115200
  345. upload_port = "192.168.4.1"
  346. upload_flags = --auth=fibonacci --port 8266
  347. [env:jangoe-debug]
  348. platform = espressif8266
  349. framework = arduino
  350. board = esp12e
  351. lib_deps = ${common.lib_deps}
  352. lib_ignore = ${common.lib_ignore}
  353. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  354. [env:jangoe-debug-ota]
  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} -DWIFI_RELAY_NC
  361. upload_speed = 115200
  362. upload_port = "192.168.4.1"
  363. upload_flags = --auth=fibonacci --port 8266
  364. [env:mqtt-relay-debug]
  365. platform = espressif8266
  366. framework = arduino
  367. board = esp_wroom_02
  368. lib_deps = ${common.lib_deps}
  369. lib_ignore = ${common.lib_ignore}
  370. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  371. [env:mqtt-relay-debug-ota]
  372. platform = espressif8266
  373. framework = arduino
  374. board = esp_wroom_02
  375. lib_deps = ${common.lib_deps}
  376. lib_ignore = ${common.lib_ignore}
  377. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  378. upload_speed = 115200
  379. upload_port = "192.168.4.1"
  380. upload_flags = --auth=fibonacci --port 8266
  381. [env:wifi-relays-debug]
  382. platform = espressif8266
  383. framework = arduino
  384. board = esp01_1m
  385. lib_deps = ${common.lib_deps}
  386. lib_ignore = ${common.lib_ignore}
  387. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  388. [env:wifi-relays-debug-ota]
  389. platform = espressif8266
  390. framework = arduino
  391. board = esp01_1m
  392. lib_deps = ${common.lib_deps}
  393. lib_ignore = ${common.lib_ignore}
  394. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  395. upload_speed = 115200
  396. upload_port = "192.168.4.1"
  397. upload_flags = --auth=fibonacci --port 8266
  398. [env:ai-light-debug]
  399. platform = espressif8266
  400. framework = arduino
  401. board = esp01_1m
  402. board_flash_mode = dout
  403. lib_deps = ${common.lib_deps}
  404. lib_ignore = ${common.lib_ignore}
  405. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  406. [env:ai-light-debug-ota]
  407. platform = espressif8266
  408. framework = arduino
  409. board = esp01_1m
  410. board_flash_mode = dout
  411. lib_deps = ${common.lib_deps}
  412. lib_ignore = ${common.lib_ignore}
  413. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  414. upload_speed = 115200
  415. upload_port = "192.168.4.1"
  416. upload_flags = --auth=fibonacci --port 8266
  417. [env:led-controller-debug]
  418. platform = espressif8266
  419. framework = arduino
  420. board = esp01_1m
  421. lib_deps = ${common.lib_deps}
  422. lib_ignore = ${common.lib_ignore}
  423. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  424. [env:led-controller-debug-ota]
  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} -DLED_CONTROLLER
  431. upload_speed = 115200
  432. upload_port = "192.168.4.1"
  433. upload_flags = --auth=fibonacci --port 8266
  434. [env:h801-debug]
  435. platform = espressif8266
  436. framework = arduino
  437. board = esp01_1m
  438. board_flash_mode = dout
  439. lib_deps = ${common.lib_deps}
  440. lib_ignore = ${common.lib_ignore}
  441. build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  442. [env:h801-debug-ota]
  443. platform = espressif8266
  444. framework = arduino
  445. board = esp01_1m
  446. board_flash_mode = dout
  447. lib_deps = ${common.lib_deps}
  448. lib_ignore = ${common.lib_ignore}
  449. build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  450. upload_speed = 115200
  451. upload_port = "192.168.4.1"
  452. upload_flags = --auth=fibonacci --port 8266
  453. [env:bnsz01-debug]
  454. platform = espressif8266
  455. framework = arduino
  456. board = esp8285
  457. board_flash_mode = dout
  458. lib_deps = ${common.lib_deps}
  459. lib_ignore = ${common.lib_ignore}
  460. build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
  461. [env:bnsz01-debug-ota]
  462. platform = espressif8266
  463. framework = arduino
  464. board = esp8285
  465. board_flash_mode = dout
  466. lib_deps = ${common.lib_deps}
  467. lib_ignore = ${common.lib_ignore}
  468. build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
  469. upload_speed = 115200
  470. upload_port = "192.168.4.1"
  471. upload_flags = --auth=fibonacci --port 8266