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.

437 lines
12 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#36b6b5a
  15. https://github.com/me-no-dev/ESPAsyncWebServer#bab5457
  16. https://github.com/marvinroger/async-mqtt-client#f1b4576
  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.0
  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. lib_deps = ${common.lib_deps}
  96. lib_ignore = ${common.lib_ignore}
  97. build_flags = ${common.build_flags_1m} -DSONOFF
  98. [env:sonoff-debug-ota]
  99. platform = espressif8266
  100. framework = arduino
  101. board = esp01_1m
  102. lib_deps = ${common.lib_deps}
  103. lib_ignore = ${common.lib_ignore}
  104. build_flags = ${common.build_flags_1m} -DSONOFF
  105. upload_speed = 115200
  106. upload_port = "192.168.4.1"
  107. upload_flags = --auth=fibonacci --port 8266
  108. [env:sonoff-dht22-debug]
  109. platform = espressif8266
  110. framework = arduino
  111. board = esp01_1m
  112. lib_deps = ${common.lib_deps}
  113. lib_ignore = ${common.lib_ignore}
  114. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DHT=1
  115. [env:sonoff-ds18b20-debug]
  116. platform = espressif8266
  117. framework = arduino
  118. board = esp01_1m
  119. lib_deps = ${common.lib_deps}
  120. lib_ignore = ${common.lib_ignore}
  121. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DS18B20=1
  122. [env:sonoff-pow-debug]
  123. platform = espressif8266
  124. framework = arduino
  125. board = esp01_1m
  126. lib_deps = ${common.lib_deps}
  127. lib_ignore = ${common.lib_ignore}
  128. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  129. [env:sonoff-pow-debug-ota]
  130. platform = espressif8266
  131. framework = arduino
  132. board = esp01_1m
  133. lib_deps = ${common.lib_deps}
  134. lib_ignore = ${common.lib_ignore}
  135. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  136. upload_speed = 115200
  137. upload_port = "192.168.4.1"
  138. upload_flags = --auth=fibonacci --port 8266
  139. [env:sonoff-dual-debug]
  140. platform = espressif8266
  141. framework = arduino
  142. board = esp01_1m
  143. lib_deps = ${common.lib_deps}
  144. lib_ignore = ${common.lib_ignore}
  145. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  146. [env:sonoff-dual-debug-ota]
  147. platform = espressif8266
  148. framework = arduino
  149. board = esp01_1m
  150. lib_deps = ${common.lib_deps}
  151. lib_ignore = ${common.lib_ignore}
  152. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  153. upload_speed = 115200
  154. upload_port = "192.168.4.1"
  155. upload_flags = --auth=fibonacci --port 8266
  156. [env:sonoff-4ch-debug]
  157. platform = espressif8266
  158. framework = arduino
  159. board = esp8285
  160. lib_deps = ${common.lib_deps}
  161. lib_ignore = ${common.lib_ignore}
  162. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  163. [env:sonoff-4ch-debug-ota]
  164. platform = espressif8266
  165. framework = arduino
  166. board = esp8285
  167. lib_deps = ${common.lib_deps}
  168. lib_ignore = ${common.lib_ignore}
  169. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  170. upload_speed = 115200
  171. upload_port = "192.168.4.1"
  172. upload_flags = --auth=fibonacci --port 8266
  173. [env:sonoff-touch-debug]
  174. platform = espressif8266
  175. framework = arduino
  176. board = esp8285
  177. lib_deps = ${common.lib_deps}
  178. lib_ignore = ${common.lib_ignore}
  179. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  180. [env:sonoff-touch-debug-ota]
  181. platform = espressif8266
  182. framework = arduino
  183. board = esp8285
  184. lib_deps = ${common.lib_deps}
  185. lib_ignore = ${common.lib_ignore}
  186. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  187. upload_speed = 115200
  188. upload_port = "192.168.4.1"
  189. upload_flags = --auth=fibonacci --port 8266
  190. [env:slampher-debug]
  191. platform = espressif8266
  192. framework = arduino
  193. board = esp01_1m
  194. lib_deps = ${common.lib_deps}
  195. lib_ignore = ${common.lib_ignore}
  196. build_flags = ${common.build_flags_1m} -DSLAMPHER
  197. [env:slampher-debug-ota]
  198. platform = espressif8266
  199. framework = arduino
  200. board = esp01_1m
  201. lib_deps = ${common.lib_deps}
  202. lib_ignore = ${common.lib_ignore}
  203. build_flags = ${common.build_flags_1m} -DSLAMPHER
  204. upload_speed = 115200
  205. upload_port = "192.168.4.1"
  206. upload_flags = --auth=fibonacci --port 8266
  207. [env:s20-debug]
  208. platform = espressif8266
  209. framework = arduino
  210. board = esp01_1m
  211. lib_deps = ${common.lib_deps}
  212. lib_ignore = ${common.lib_ignore}
  213. build_flags = ${common.build_flags_1m} -DS20
  214. [env:s20-debug-ota]
  215. platform = espressif8266
  216. framework = arduino
  217. board = esp01_1m
  218. lib_deps = ${common.lib_deps}
  219. lib_ignore = ${common.lib_ignore}
  220. build_flags = ${common.build_flags_1m} -DS20
  221. upload_speed = 115200
  222. upload_port = "192.168.4.1"
  223. upload_flags = --auth=fibonacci --port 8266
  224. [env:1ch-inching-debug]
  225. platform = espressif8266
  226. framework = arduino
  227. board = esp01_1m
  228. lib_deps = ${common.lib_deps}
  229. lib_ignore = ${common.lib_ignore}
  230. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  231. [env:1ch-inching-debug-ota]
  232. platform = espressif8266
  233. framework = arduino
  234. board = esp01_1m
  235. lib_deps = ${common.lib_deps}
  236. lib_ignore = ${common.lib_ignore}
  237. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  238. upload_speed = 115200
  239. upload_port = "192.168.4.1"
  240. upload_flags = --auth=fibonacci --port 8266
  241. [env:motor-debug]
  242. platform = espressif8266
  243. framework = arduino
  244. board = esp01_1m
  245. lib_deps = ${common.lib_deps}
  246. lib_ignore = ${common.lib_ignore}
  247. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  248. [env:motor-debug-ota]
  249. platform = espressif8266
  250. framework = arduino
  251. board = esp01_1m
  252. lib_deps = ${common.lib_deps}
  253. lib_ignore = ${common.lib_ignore}
  254. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  255. upload_speed = 115200
  256. upload_port = "192.168.4.1"
  257. upload_flags = --auth=fibonacci --port 8266
  258. [env:electrodragon-debug]
  259. platform = espressif8266
  260. framework = arduino
  261. board = esp12e
  262. lib_deps = ${common.lib_deps}
  263. lib_ignore = ${common.lib_ignore}
  264. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  265. [env:electrodragon-debug-ota]
  266. platform = espressif8266
  267. framework = arduino
  268. board = esp12e
  269. lib_deps = ${common.lib_deps}
  270. lib_ignore = ${common.lib_ignore}
  271. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  272. upload_speed = 115200
  273. upload_port = "192.168.4.1"
  274. upload_flags = --auth=fibonacci --port 8266
  275. [env:ecoplug-debug]
  276. platform = espressif8266
  277. framework = arduino
  278. board = esp01_1m
  279. lib_deps = ${common.lib_deps}
  280. lib_ignore = ${common.lib_ignore}
  281. build_flags = ${common.build_flags_1m} -DECOPLUG
  282. [env:ecoplug-debug-ota]
  283. platform = espressif8266
  284. framework = arduino
  285. board = esp01_1m
  286. lib_deps = ${common.lib_deps}
  287. lib_ignore = ${common.lib_ignore}
  288. build_flags = ${common.build_flags_1m} -DECOPLUG
  289. upload_speed = 115200
  290. upload_port = "192.168.4.1"
  291. upload_flags = --auth=fibonacci --port 8266
  292. [env:jangoe-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} -DWIFI_RELAY_NC
  299. [env:jangoe-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} -DWIFI_RELAY_NC
  306. upload_speed = 115200
  307. upload_port = "192.168.4.1"
  308. upload_flags = --auth=fibonacci --port 8266
  309. [env:mqtt-relay-debug]
  310. platform = espressif8266
  311. framework = arduino
  312. board = esp_wroom_02
  313. lib_deps = ${common.lib_deps}
  314. lib_ignore = ${common.lib_ignore}
  315. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  316. [env:mqtt-relay-debug-ota]
  317. platform = espressif8266
  318. framework = arduino
  319. board = esp_wroom_02
  320. lib_deps = ${common.lib_deps}
  321. lib_ignore = ${common.lib_ignore}
  322. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  323. upload_speed = 115200
  324. upload_port = "192.168.4.1"
  325. upload_flags = --auth=fibonacci --port 8266
  326. [env:wifi-relays-debug]
  327. platform = espressif8266
  328. framework = arduino
  329. board = esp01_1m
  330. lib_deps = ${common.lib_deps}
  331. lib_ignore = ${common.lib_ignore}
  332. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  333. [env:wifi-relays-debug-ota]
  334. platform = espressif8266
  335. framework = arduino
  336. board = esp01_1m
  337. lib_deps = ${common.lib_deps}
  338. lib_ignore = ${common.lib_ignore}
  339. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  340. upload_speed = 115200
  341. upload_port = "192.168.4.1"
  342. upload_flags = --auth=fibonacci --port 8266
  343. [env:ai-light-debug]
  344. platform = espressif8266
  345. framework = arduino
  346. board = esp8285
  347. lib_deps = ${common.lib_deps}
  348. lib_ignore = ${common.lib_ignore}
  349. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  350. [env:ai-light-debug-ota]
  351. platform = espressif8266
  352. framework = arduino
  353. board = esp8285
  354. lib_deps = ${common.lib_deps}
  355. lib_ignore = ${common.lib_ignore}
  356. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  357. upload_speed = 115200
  358. upload_port = "192.168.4.1"
  359. upload_flags = --auth=fibonacci --port 8266
  360. [env:led-controller-debug]
  361. platform = espressif8266
  362. framework = arduino
  363. board = esp01_1m
  364. lib_deps = ${common.lib_deps}
  365. lib_ignore = ${common.lib_ignore}
  366. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  367. [env:led-controller-debug-ota]
  368. platform = espressif8266
  369. framework = arduino
  370. board = esp01_1m
  371. lib_deps = ${common.lib_deps}
  372. lib_ignore = ${common.lib_ignore}
  373. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  374. upload_speed = 115200
  375. upload_port = "192.168.4.1"
  376. upload_flags = --auth=fibonacci --port 8266
  377. [env:h801-debug]
  378. platform = espressif8266
  379. framework = arduino
  380. board = esp01_1m
  381. lib_deps = ${common.lib_deps}
  382. lib_ignore = ${common.lib_ignore}
  383. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  384. [env:h801-debug-ota]
  385. platform = espressif8266
  386. framework = arduino
  387. board = esp01_1m
  388. lib_deps = ${common.lib_deps}
  389. lib_ignore = ${common.lib_ignore}
  390. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  391. upload_speed = 115200
  392. upload_port = "192.168.4.1"
  393. upload_flags = --auth=fibonacci --port 8266