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.

458 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_1m128 = ${common.build_flags} -Wl,-Tesp8266.flash.1m128.ld
  8. lib_deps =
  9. DHT sensor library
  10. Adafruit Unified Sensor
  11. https://github.com/xoseperez/Time
  12. ArduinoJson
  13. https://github.com/me-no-dev/ESPAsyncTCP#36b6b5a
  14. https://github.com/me-no-dev/ESPAsyncWebServer#bab5457
  15. https://github.com/marvinroger/async-mqtt-client#f1b4576
  16. PubSubClient
  17. Embedis
  18. NtpClientLib
  19. OneWire
  20. DallasTemperature
  21. Brzo I2C
  22. https://bitbucket.org/xoseperez/justwifi.git#1.1.3
  23. https://bitbucket.org/xoseperez/hlw8012.git#1.0.0
  24. https://bitbucket.org/xoseperez/fauxmoesp.git#2.1.0
  25. https://bitbucket.org/xoseperez/nofuss.git#0.2.2
  26. https://bitbucket.org/xoseperez/emonliteesp.git#0.1.2
  27. https://bitbucket.org/xoseperez/debounceevent.git#2.0.0
  28. https://github.com/xoseperez/my9291#1.0.0
  29. https://github.com/xoseperez/RemoteSwitch-arduino-library.git
  30. lib_ignore =
  31. # ------------------------------------------------------------------------------
  32. [env:d1-analog]
  33. platform = espressif8266
  34. framework = arduino
  35. board = d1_mini
  36. lib_deps = ${common.lib_deps}
  37. lib_ignore = ${common.lib_ignore}
  38. extra_script = pio_hooks.py
  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. extra_script = pio_hooks.py
  47. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  48. [env:d1-debug-ota]
  49. platform = espressif8266
  50. framework = arduino
  51. board = d1_mini
  52. lib_deps = ${common.lib_deps}
  53. lib_ignore = ${common.lib_ignore}
  54. extra_script = pio_hooks.py
  55. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  56. upload_speed = 115200
  57. upload_port = "192.168.4.1"
  58. upload_flags = --auth=fibonacci --port 8266
  59. [env:node-debug]
  60. platform = espressif8266
  61. framework = arduino
  62. board = nodemcuv2
  63. lib_deps = ${common.lib_deps}
  64. lib_ignore = ${common.lib_ignore}
  65. extra_script = pio_hooks.py
  66. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  67. [env:node-debug-ota]
  68. platform = espressif8266
  69. framework = arduino
  70. board = nodemcuv2
  71. lib_deps = ${common.lib_deps}
  72. lib_ignore = ${common.lib_ignore}
  73. extra_script = pio_hooks.py
  74. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  75. upload_speed = 115200
  76. upload_port = "192.168.4.1"
  77. upload_flags = --auth=fibonacci --port 8266
  78. [env:espurna-debug]
  79. platform = espressif8266
  80. framework = arduino
  81. board = esp12e
  82. lib_deps = ${common.lib_deps}
  83. lib_ignore = ${common.lib_ignore}
  84. extra_script = pio_hooks.py
  85. build_flags = ${common.build_flags} -DESPURNA_H
  86. [env:espurna-debug-ota]
  87. platform = espressif8266
  88. framework = arduino
  89. board = esp12e
  90. lib_deps = ${common.lib_deps}
  91. lib_ignore = ${common.lib_ignore}
  92. extra_script = pio_hooks.py
  93. build_flags = ${common.build_flags} -DESPURNA_H
  94. upload_speed = 115200
  95. upload_port = "192.168.4.1"
  96. upload_flags = --auth=fibonacci --port 8266
  97. [env:sonoff-debug]
  98. platform = espressif8266
  99. framework = arduino
  100. board = esp01_1m
  101. lib_deps = ${common.lib_deps}
  102. lib_ignore = ${common.lib_ignore}
  103. extra_script = pio_hooks.py
  104. build_flags = ${common.build_flags_1m128} -DSONOFF
  105. [env:sonoff-debug-ota]
  106. platform = espressif8266
  107. framework = arduino
  108. board = esp01_1m
  109. lib_deps = ${common.lib_deps}
  110. lib_ignore = ${common.lib_ignore}
  111. extra_script = pio_hooks.py
  112. build_flags = ${common.build_flags_1m128} -DSONOFF
  113. upload_speed = 115200
  114. upload_port = "192.168.4.1"
  115. upload_flags = --auth=fibonacci --port 8266
  116. [env:sonoff-dht22-debug]
  117. platform = espressif8266
  118. framework = arduino
  119. board = esp01_1m
  120. lib_deps = ${common.lib_deps}
  121. lib_ignore = ${common.lib_ignore}
  122. extra_script = pio_hooks.py
  123. build_flags = ${common.build_flags_1m128} -DSONOFF -DENABLE_DHT=1
  124. [env:sonoff-ds18b20-debug]
  125. platform = espressif8266
  126. framework = arduino
  127. board = esp01_1m
  128. lib_deps = ${common.lib_deps}
  129. lib_ignore = ${common.lib_ignore}
  130. extra_script = pio_hooks.py
  131. build_flags = ${common.build_flags_1m128} -DSONOFF -DENABLE_DS18B20=1
  132. [env:sonoff-pow-debug]
  133. platform = espressif8266
  134. framework = arduino
  135. board = esp01_1m
  136. lib_deps = ${common.lib_deps}
  137. lib_ignore = ${common.lib_ignore}
  138. extra_script = pio_hooks.py
  139. build_flags = ${common.build_flags_1m128} -DSONOFF_POW
  140. [env:sonoff-pow-debug-ota]
  141. platform = espressif8266
  142. framework = arduino
  143. board = esp01_1m
  144. lib_deps = ${common.lib_deps}
  145. lib_ignore = ${common.lib_ignore}
  146. extra_script = pio_hooks.py
  147. build_flags = ${common.build_flags_1m128} -DSONOFF_POW
  148. upload_speed = 115200
  149. upload_port = "192.168.4.1"
  150. upload_flags = --auth=fibonacci --port 8266
  151. [env:sonoff-dual-debug]
  152. platform = espressif8266
  153. framework = arduino
  154. board = esp01_1m
  155. lib_deps = ${common.lib_deps}
  156. lib_ignore = ${common.lib_ignore}
  157. extra_script = pio_hooks.py
  158. build_flags = ${common.build_flags_1m128} -DSONOFF_DUAL
  159. [env:sonoff-dual-debug-ota]
  160. platform = espressif8266
  161. framework = arduino
  162. board = esp01_1m
  163. lib_deps = ${common.lib_deps}
  164. lib_ignore = ${common.lib_ignore}
  165. extra_script = pio_hooks.py
  166. build_flags = ${common.build_flags_1m128} -DSONOFF_DUAL
  167. upload_speed = 115200
  168. upload_port = "192.168.4.1"
  169. upload_flags = --auth=fibonacci --port 8266
  170. [env:sonoff-4ch-debug]
  171. platform = espressif8266
  172. framework = arduino
  173. board = esp8285
  174. lib_deps = ${common.lib_deps}
  175. lib_ignore = ${common.lib_ignore}
  176. extra_script = pio_hooks.py
  177. build_flags = ${common.build_flags_1m128} -DSONOFF_4CH
  178. [env:sonoff-4ch-debug-ota]
  179. platform = espressif8266
  180. framework = arduino
  181. board = esp8285
  182. lib_deps = ${common.lib_deps}
  183. lib_ignore = ${common.lib_ignore}
  184. extra_script = pio_hooks.py
  185. build_flags = ${common.build_flags_1m128} -DSONOFF_4CH
  186. upload_speed = 115200
  187. upload_port = "192.168.4.1"
  188. upload_flags = --auth=fibonacci --port 8266
  189. [env:sonoff-touch-debug]
  190. platform = espressif8266
  191. framework = arduino
  192. board = esp8285
  193. lib_deps = ${common.lib_deps}
  194. lib_ignore = ${common.lib_ignore}
  195. extra_script = pio_hooks.py
  196. build_flags = ${common.build_flags_1m128} -DSONOFF_TOUCH
  197. [env:sonoff-touch-debug-ota]
  198. platform = espressif8266
  199. framework = arduino
  200. board = esp8285
  201. lib_deps = ${common.lib_deps}
  202. lib_ignore = ${common.lib_ignore}
  203. extra_script = pio_hooks.py
  204. build_flags = ${common.build_flags_1m128} -DSONOFF_TOUCH
  205. upload_speed = 115200
  206. upload_port = "192.168.4.1"
  207. upload_flags = --auth=fibonacci --port 8266
  208. [env:slampher-debug]
  209. platform = espressif8266
  210. framework = arduino
  211. board = esp01_1m
  212. lib_deps = ${common.lib_deps}
  213. lib_ignore = ${common.lib_ignore}
  214. extra_script = pio_hooks.py
  215. build_flags = ${common.build_flags_1m128} -DSLAMPHER
  216. [env:slampher-debug-ota]
  217. platform = espressif8266
  218. framework = arduino
  219. board = esp01_1m
  220. lib_deps = ${common.lib_deps}
  221. lib_ignore = ${common.lib_ignore}
  222. extra_script = pio_hooks.py
  223. build_flags = ${common.build_flags_1m128} -DSLAMPHER
  224. upload_speed = 115200
  225. upload_port = "192.168.4.1"
  226. upload_flags = --auth=fibonacci --port 8266
  227. [env:s20-debug]
  228. platform = espressif8266
  229. framework = arduino
  230. board = esp01_1m
  231. lib_deps = ${common.lib_deps}
  232. lib_ignore = ${common.lib_ignore}
  233. extra_script = pio_hooks.py
  234. build_flags = ${common.build_flags_1m128} -DS20
  235. [env:s20-debug-ota]
  236. platform = espressif8266
  237. framework = arduino
  238. board = esp01_1m
  239. lib_deps = ${common.lib_deps}
  240. lib_ignore = ${common.lib_ignore}
  241. extra_script = pio_hooks.py
  242. build_flags = ${common.build_flags_1m128} -DS20
  243. upload_speed = 115200
  244. upload_port = "192.168.4.1"
  245. upload_flags = --auth=fibonacci --port 8266
  246. [env:1ch-inching-debug]
  247. platform = espressif8266
  248. framework = arduino
  249. board = esp01_1m
  250. lib_deps = ${common.lib_deps}
  251. lib_ignore = ${common.lib_ignore}
  252. extra_script = pio_hooks.py
  253. build_flags = ${common.build_flags_1m128} -DITEAD_1CH_INCHING
  254. [env:1ch-inching-debug-ota]
  255. platform = espressif8266
  256. framework = arduino
  257. board = esp01_1m
  258. lib_deps = ${common.lib_deps}
  259. lib_ignore = ${common.lib_ignore}
  260. extra_script = pio_hooks.py
  261. build_flags = ${common.build_flags_1m128} -DITEAD_1CH_INCHING
  262. upload_speed = 115200
  263. upload_port = "192.168.4.1"
  264. upload_flags = --auth=fibonacci --port 8266
  265. [env:motor-debug]
  266. platform = espressif8266
  267. framework = arduino
  268. board = esp01_1m
  269. lib_deps = ${common.lib_deps}
  270. lib_ignore = ${common.lib_ignore}
  271. extra_script = pio_hooks.py
  272. build_flags = ${common.build_flags_1m128} -DITEAD_MOTOR
  273. [env:motor-debug-ota]
  274. platform = espressif8266
  275. framework = arduino
  276. board = esp01_1m
  277. lib_deps = ${common.lib_deps}
  278. lib_ignore = ${common.lib_ignore}
  279. extra_script = pio_hooks.py
  280. build_flags = ${common.build_flags_1m128} -DITEAD_MOTOR
  281. upload_speed = 115200
  282. upload_port = "192.168.4.1"
  283. upload_flags = --auth=fibonacci --port 8266
  284. [env:electrodragon-debug]
  285. platform = espressif8266
  286. framework = arduino
  287. board = esp12e
  288. lib_deps = ${common.lib_deps}
  289. lib_ignore = ${common.lib_ignore}
  290. extra_script = pio_hooks.py
  291. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  292. [env:electrodragon-debug-ota]
  293. platform = espressif8266
  294. framework = arduino
  295. board = esp12e
  296. lib_deps = ${common.lib_deps}
  297. lib_ignore = ${common.lib_ignore}
  298. extra_script = pio_hooks.py
  299. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  300. upload_speed = 115200
  301. upload_port = "192.168.4.1"
  302. upload_flags = --auth=fibonacci --port 8266
  303. [env:ecoplug-debug]
  304. platform = espressif8266
  305. framework = arduino
  306. board = esp01_1m
  307. lib_deps = ${common.lib_deps}
  308. lib_ignore = ${common.lib_ignore}
  309. extra_script = pio_hooks.py
  310. build_flags = ${common.build_flags_1m128} -DECOPLUG
  311. [env:ecoplug-debug-ota]
  312. platform = espressif8266
  313. framework = arduino
  314. board = esp01_1m
  315. lib_deps = ${common.lib_deps}
  316. lib_ignore = ${common.lib_ignore}
  317. extra_script = pio_hooks.py
  318. build_flags = ${common.build_flags_1m128} -DECOPLUG
  319. upload_speed = 115200
  320. upload_port = "192.168.4.1"
  321. upload_flags = --auth=fibonacci --port 8266
  322. [env:jangoe-debug]
  323. platform = espressif8266
  324. framework = arduino
  325. board = esp12e
  326. lib_deps = ${common.lib_deps}
  327. lib_ignore = ${common.lib_ignore}
  328. extra_script = pio_hooks.py
  329. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  330. [env:jangoe-debug-ota]
  331. platform = espressif8266
  332. framework = arduino
  333. board = esp12e
  334. lib_deps = ${common.lib_deps}
  335. lib_ignore = ${common.lib_ignore}
  336. extra_script = pio_hooks.py
  337. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  338. upload_speed = 115200
  339. upload_port = "192.168.4.1"
  340. upload_flags = --auth=fibonacci --port 8266
  341. [env:mqtt-relay-debug]
  342. platform = espressif8266
  343. framework = arduino
  344. board = esp_wroom_02
  345. lib_deps = ${common.lib_deps}
  346. lib_ignore = ${common.lib_ignore}
  347. extra_script = pio_hooks.py
  348. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  349. [env:mqtt-relay-debug-ota]
  350. platform = espressif8266
  351. framework = arduino
  352. board = esp_wroom_02
  353. lib_deps = ${common.lib_deps}
  354. lib_ignore = ${common.lib_ignore}
  355. extra_script = pio_hooks.py
  356. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  357. upload_speed = 115200
  358. upload_port = "192.168.4.1"
  359. upload_flags = --auth=fibonacci --port 8266
  360. [env:wifi-relays-debug]
  361. platform = espressif8266
  362. framework = arduino
  363. board = esp01_1m
  364. lib_deps = ${common.lib_deps}
  365. lib_ignore = ${common.lib_ignore}
  366. extra_script = pio_hooks.py
  367. build_flags = ${common.build_flags_1m128} -DWIFI_RELAYS_BOARD_KIT
  368. [env:wifi-relays-debug-ota]
  369. platform = espressif8266
  370. framework = arduino
  371. board = esp01_1m
  372. lib_deps = ${common.lib_deps}
  373. lib_ignore = ${common.lib_ignore}
  374. extra_script = pio_hooks.py
  375. build_flags = ${common.build_flags_1m128} -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 = esp8285
  383. lib_deps = ${common.lib_deps}
  384. lib_ignore = ${common.lib_ignore}
  385. extra_script = pio_hooks.py
  386. build_flags = ${common.build_flags_1m128} -DAI_LIGHT
  387. [env:ai-light-debug-ota]
  388. platform = espressif8266
  389. framework = arduino
  390. board = esp8285
  391. lib_deps = ${common.lib_deps}
  392. lib_ignore = ${common.lib_ignore}
  393. extra_script = pio_hooks.py
  394. build_flags = ${common.build_flags_1m128} -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. extra_script = pio_hooks.py
  405. build_flags = ${common.build_flags_1m128} -DLED_CONTROLLER
  406. [env:led-controller-debug-ota]
  407. platform = espressif8266
  408. framework = arduino
  409. board = esp01_1m
  410. lib_deps = ${common.lib_deps}
  411. lib_ignore = ${common.lib_ignore}
  412. extra_script = pio_hooks.py
  413. build_flags = ${common.build_flags_1m128} -DLED_CONTROLLER
  414. upload_speed = 115200
  415. upload_port = "192.168.4.1"
  416. upload_flags = --auth=fibonacci --port 8266