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_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:sonoff-debug]
  79. platform = espressif8266
  80. framework = arduino
  81. board = esp01_1m
  82. lib_deps = ${common.lib_deps}
  83. lib_ignore = ${common.lib_ignore}
  84. extra_script = pio_hooks.py
  85. build_flags = ${common.build_flags_1m128} -DSONOFF
  86. [env:sonoff-debug-ota]
  87. platform = espressif8266
  88. framework = arduino
  89. board = esp01_1m
  90. lib_deps = ${common.lib_deps}
  91. lib_ignore = ${common.lib_ignore}
  92. extra_script = pio_hooks.py
  93. build_flags = ${common.build_flags_1m128} -DSONOFF
  94. upload_speed = 115200
  95. upload_port = "192.168.4.1"
  96. upload_flags = --auth=fibonacci --port 8266
  97. [env:sonoff-dht22-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 -DENABLE_DHT=1
  105. [env:sonoff-ds18b20-debug]
  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 -DENABLE_DS18B20=1
  113. [env:sonoff-pow-debug]
  114. platform = espressif8266
  115. framework = arduino
  116. board = esp01_1m
  117. lib_deps = ${common.lib_deps}
  118. lib_ignore = ${common.lib_ignore}
  119. extra_script = pio_hooks.py
  120. build_flags = ${common.build_flags_1m128} -DSONOFF_POW
  121. [env:sonoff-pow-debug-ota]
  122. platform = espressif8266
  123. framework = arduino
  124. board = esp01_1m
  125. lib_deps = ${common.lib_deps}
  126. lib_ignore = ${common.lib_ignore}
  127. extra_script = pio_hooks.py
  128. build_flags = ${common.build_flags_1m128} -DSONOFF_POW
  129. upload_speed = 115200
  130. upload_port = "192.168.4.1"
  131. upload_flags = --auth=fibonacci --port 8266
  132. [env:sonoff-dual-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_DUAL
  140. [env:sonoff-dual-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_DUAL
  148. upload_speed = 115200
  149. upload_port = "192.168.4.1"
  150. upload_flags = --auth=fibonacci --port 8266
  151. [env:sonoff-4ch-debug]
  152. platform = espressif8266
  153. framework = arduino
  154. board = esp8285
  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_4CH
  159. [env:sonoff-4ch-debug-ota]
  160. platform = espressif8266
  161. framework = arduino
  162. board = esp8285
  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_4CH
  167. upload_speed = 115200
  168. upload_port = "192.168.4.1"
  169. upload_flags = --auth=fibonacci --port 8266
  170. [env:sonoff-touch-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_TOUCH
  178. [env:sonoff-touch-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_TOUCH
  186. upload_speed = 115200
  187. upload_port = "192.168.4.1"
  188. upload_flags = --auth=fibonacci --port 8266
  189. [env:slampher-debug]
  190. platform = espressif8266
  191. framework = arduino
  192. board = esp01_1m
  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} -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. extra_script = pio_hooks.py
  204. build_flags = ${common.build_flags_1m128} -DSLAMPHER
  205. upload_speed = 115200
  206. upload_port = "192.168.4.1"
  207. upload_flags = --auth=fibonacci --port 8266
  208. [env:s20-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} -DS20
  216. [env:s20-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} -DS20
  224. upload_speed = 115200
  225. upload_port = "192.168.4.1"
  226. upload_flags = --auth=fibonacci --port 8266
  227. [env:1ch-inching-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} -DITEAD_1CH_INCHING
  235. [env:1ch-inching-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} -DITEAD_1CH_INCHING
  243. upload_speed = 115200
  244. upload_port = "192.168.4.1"
  245. upload_flags = --auth=fibonacci --port 8266
  246. [env:motor-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_MOTOR
  254. [env:motor-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_MOTOR
  262. upload_speed = 115200
  263. upload_port = "192.168.4.1"
  264. upload_flags = --auth=fibonacci --port 8266
  265. [env:electrodragon-debug]
  266. platform = espressif8266
  267. framework = arduino
  268. board = esp12e
  269. lib_deps = ${common.lib_deps}
  270. lib_ignore = ${common.lib_ignore}
  271. extra_script = pio_hooks.py
  272. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  273. [env:electrodragon-debug-ota]
  274. platform = espressif8266
  275. framework = arduino
  276. board = esp12e
  277. lib_deps = ${common.lib_deps}
  278. lib_ignore = ${common.lib_ignore}
  279. extra_script = pio_hooks.py
  280. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  281. upload_speed = 115200
  282. upload_port = "192.168.4.1"
  283. upload_flags = --auth=fibonacci --port 8266
  284. [env:ecoplug-debug]
  285. platform = espressif8266
  286. framework = arduino
  287. board = esp01_1m
  288. lib_deps = ${common.lib_deps}
  289. lib_ignore = ${common.lib_ignore}
  290. extra_script = pio_hooks.py
  291. build_flags = ${common.build_flags_1m128} -DECOPLUG
  292. [env:ecoplug-debug-ota]
  293. platform = espressif8266
  294. framework = arduino
  295. board = esp01_1m
  296. lib_deps = ${common.lib_deps}
  297. lib_ignore = ${common.lib_ignore}
  298. extra_script = pio_hooks.py
  299. build_flags = ${common.build_flags_1m128} -DECOPLUG
  300. upload_speed = 115200
  301. upload_port = "192.168.4.1"
  302. upload_flags = --auth=fibonacci --port 8266
  303. [env:jangoe-debug]
  304. platform = espressif8266
  305. framework = arduino
  306. board = esp12e
  307. lib_deps = ${common.lib_deps}
  308. lib_ignore = ${common.lib_ignore}
  309. extra_script = pio_hooks.py
  310. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  311. [env:jangoe-debug-ota]
  312. platform = espressif8266
  313. framework = arduino
  314. board = esp12e
  315. lib_deps = ${common.lib_deps}
  316. lib_ignore = ${common.lib_ignore}
  317. extra_script = pio_hooks.py
  318. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  319. upload_speed = 115200
  320. upload_port = "192.168.4.1"
  321. upload_flags = --auth=fibonacci --port 8266
  322. [env:mqtt-relay-debug]
  323. platform = espressif8266
  324. framework = arduino
  325. board = esp_wroom_02
  326. lib_deps = ${common.lib_deps}
  327. lib_ignore = ${common.lib_ignore}
  328. extra_script = pio_hooks.py
  329. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  330. [env:mqtt-relay-debug-ota]
  331. platform = espressif8266
  332. framework = arduino
  333. board = esp_wroom_02
  334. lib_deps = ${common.lib_deps}
  335. lib_ignore = ${common.lib_ignore}
  336. extra_script = pio_hooks.py
  337. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  338. upload_speed = 115200
  339. upload_port = "192.168.4.1"
  340. upload_flags = --auth=fibonacci --port 8266
  341. [env:wifi-relays-debug]
  342. platform = espressif8266
  343. framework = arduino
  344. board = esp01_1m
  345. lib_deps = ${common.lib_deps}
  346. lib_ignore = ${common.lib_ignore}
  347. extra_script = pio_hooks.py
  348. build_flags = ${common.build_flags_1m128} -DWIFI_RELAYS_BOARD_KIT
  349. [env:wifi-relays-debug-ota]
  350. platform = espressif8266
  351. framework = arduino
  352. board = esp01_1m
  353. lib_deps = ${common.lib_deps}
  354. lib_ignore = ${common.lib_ignore}
  355. extra_script = pio_hooks.py
  356. build_flags = ${common.build_flags_1m128} -DWIFI_RELAYS_BOARD_KIT
  357. upload_speed = 115200
  358. upload_port = "192.168.4.1"
  359. upload_flags = --auth=fibonacci --port 8266
  360. [env:ai-light-debug]
  361. platform = espressif8266
  362. framework = arduino
  363. board = esp8285
  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} -DAI_LIGHT
  368. [env:ai-light-debug-ota]
  369. platform = espressif8266
  370. framework = arduino
  371. board = esp8285
  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} -DAI_LIGHT
  376. upload_speed = 115200
  377. upload_port = "192.168.4.1"
  378. upload_flags = --auth=fibonacci --port 8266
  379. [env:led-controller-debug]
  380. platform = espressif8266
  381. framework = arduino
  382. board = esp12e
  383. lib_deps = ${common.lib_deps}
  384. lib_ignore = ${common.lib_ignore}
  385. extra_script = pio_hooks.py
  386. build_flags = ${common.build_flags} -DLED_CONTROLLER
  387. [env:led-controller-debug-ota]
  388. platform = espressif8266
  389. framework = arduino
  390. board = esp12e
  391. lib_deps = ${common.lib_deps}
  392. lib_ignore = ${common.lib_ignore}
  393. extra_script = pio_hooks.py
  394. build_flags = ${common.build_flags} -DLED_CONTROLLER
  395. upload_speed = 115200
  396. upload_port = "192.168.4.1"
  397. upload_flags = --auth=fibonacci --port 8266