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.

479 lines
13 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:1ch-inching-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} -DITEAD_1CH_INCHING
  262. [env:1ch-inching-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} -DITEAD_1CH_INCHING
  270. upload_speed = 115200
  271. upload_port = "192.168.4.1"
  272. upload_flags = --auth=fibonacci --port 8266
  273. [env:motor-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_MOTOR
  281. [env:motor-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_MOTOR
  289. upload_speed = 115200
  290. upload_port = "192.168.4.1"
  291. upload_flags = --auth=fibonacci --port 8266
  292. [env:electrodragon-debug]
  293. platform = espressif8266
  294. framework = arduino
  295. board = esp12e
  296. lib_deps = ${common.lib_deps}
  297. lib_ignore = ${common.lib_ignore}
  298. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  299. [env:electrodragon-debug-ota]
  300. platform = espressif8266
  301. framework = arduino
  302. board = esp12e
  303. lib_deps = ${common.lib_deps}
  304. lib_ignore = ${common.lib_ignore}
  305. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  306. upload_speed = 115200
  307. upload_port = "192.168.4.1"
  308. upload_flags = --auth=fibonacci --port 8266
  309. [env:ecoplug-debug]
  310. platform = espressif8266
  311. framework = arduino
  312. board = esp01_1m
  313. board_flash_mode = dout
  314. lib_deps = ${common.lib_deps}
  315. lib_ignore = ${common.lib_ignore}
  316. build_flags = ${common.build_flags_1m} -DECOPLUG
  317. [env:ecoplug-debug-ota]
  318. platform = espressif8266
  319. framework = arduino
  320. board = esp01_1m
  321. board_flash_mode = dout
  322. lib_deps = ${common.lib_deps}
  323. lib_ignore = ${common.lib_ignore}
  324. build_flags = ${common.build_flags_1m} -DECOPLUG
  325. upload_speed = 115200
  326. upload_port = "192.168.4.1"
  327. upload_flags = --auth=fibonacci --port 8266
  328. [env:jangoe-debug]
  329. platform = espressif8266
  330. framework = arduino
  331. board = esp12e
  332. lib_deps = ${common.lib_deps}
  333. lib_ignore = ${common.lib_ignore}
  334. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  335. [env:jangoe-debug-ota]
  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} -DWIFI_RELAY_NC
  342. upload_speed = 115200
  343. upload_port = "192.168.4.1"
  344. upload_flags = --auth=fibonacci --port 8266
  345. [env:mqtt-relay-debug]
  346. platform = espressif8266
  347. framework = arduino
  348. board = esp_wroom_02
  349. lib_deps = ${common.lib_deps}
  350. lib_ignore = ${common.lib_ignore}
  351. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  352. [env:mqtt-relay-debug-ota]
  353. platform = espressif8266
  354. framework = arduino
  355. board = esp_wroom_02
  356. lib_deps = ${common.lib_deps}
  357. lib_ignore = ${common.lib_ignore}
  358. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  359. upload_speed = 115200
  360. upload_port = "192.168.4.1"
  361. upload_flags = --auth=fibonacci --port 8266
  362. [env:wifi-relays-debug]
  363. platform = espressif8266
  364. framework = arduino
  365. board = esp01_1m
  366. lib_deps = ${common.lib_deps}
  367. lib_ignore = ${common.lib_ignore}
  368. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  369. [env:wifi-relays-debug-ota]
  370. platform = espressif8266
  371. framework = arduino
  372. board = esp01_1m
  373. lib_deps = ${common.lib_deps}
  374. lib_ignore = ${common.lib_ignore}
  375. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  376. upload_speed = 115200
  377. upload_port = "192.168.4.1"
  378. upload_flags = --auth=fibonacci --port 8266
  379. [env:ai-light-debug]
  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} -DAI_LIGHT
  387. [env:ai-light-debug-ota]
  388. platform = espressif8266
  389. framework = arduino
  390. board = esp01_1m
  391. board_flash_mode = dout
  392. lib_deps = ${common.lib_deps}
  393. lib_ignore = ${common.lib_ignore}
  394. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  395. upload_speed = 115200
  396. upload_port = "192.168.4.1"
  397. upload_flags = --auth=fibonacci --port 8266
  398. [env:led-controller-debug]
  399. platform = espressif8266
  400. framework = arduino
  401. board = esp01_1m
  402. lib_deps = ${common.lib_deps}
  403. lib_ignore = ${common.lib_ignore}
  404. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  405. [env:led-controller-debug-ota]
  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} -DLED_CONTROLLER
  412. upload_speed = 115200
  413. upload_port = "192.168.4.1"
  414. upload_flags = --auth=fibonacci --port 8266
  415. [env:h801-debug]
  416. platform = espressif8266
  417. framework = arduino
  418. board = esp01_1m
  419. board_flash_mode = dout
  420. lib_deps = ${common.lib_deps}
  421. lib_ignore = ${common.lib_ignore}
  422. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  423. [env:h801-debug-ota]
  424. platform = espressif8266
  425. framework = arduino
  426. board = esp01_1m
  427. board_flash_mode = dout
  428. lib_deps = ${common.lib_deps}
  429. lib_ignore = ${common.lib_ignore}
  430. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  431. upload_speed = 115200
  432. upload_port = "192.168.4.1"
  433. upload_flags = --auth=fibonacci --port 8266