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.

488 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_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#ddbf4d1
  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.1
  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-ssl-debug]
  49. platform = espressif8266_stage
  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 -DASYNC_TCP_SSL_ENABLED=1
  56. [env:d1-debug-ota]
  57. platform = espressif8266
  58. framework = arduino
  59. board = d1_mini
  60. lib_deps = ${common.lib_deps}
  61. lib_ignore = ${common.lib_ignore}
  62. extra_script = pio_hooks.py
  63. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  64. upload_speed = 115200
  65. upload_port = "192.168.4.1"
  66. upload_flags = --auth=fibonacci --port 8266
  67. [env:node-debug]
  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. [env:node-debug-ota]
  76. platform = espressif8266
  77. framework = arduino
  78. board = nodemcuv2
  79. lib_deps = ${common.lib_deps}
  80. lib_ignore = ${common.lib_ignore}
  81. extra_script = pio_hooks.py
  82. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  83. upload_speed = 115200
  84. upload_port = "192.168.4.1"
  85. upload_flags = --auth=fibonacci --port 8266
  86. [env:espurna-debug]
  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. [env:espurna-debug-ota]
  95. platform = espressif8266
  96. framework = arduino
  97. board = esp12e
  98. lib_deps = ${common.lib_deps}
  99. lib_ignore = ${common.lib_ignore}
  100. extra_script = pio_hooks.py
  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. 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. [env:sonoff-debug-ota]
  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
  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. 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_DHT=1
  132. [env:sonoff-ds18b20-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 -DENABLE_DS18B20=1
  140. [env:sonoff-pow-debug]
  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. [env:sonoff-pow-debug-ota]
  149. platform = espressif8266
  150. framework = arduino
  151. board = esp01_1m
  152. lib_deps = ${common.lib_deps}
  153. lib_ignore = ${common.lib_ignore}
  154. extra_script = pio_hooks.py
  155. build_flags = ${common.build_flags_1m128} -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. 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. [env:sonoff-dual-debug-ota]
  168. platform = espressif8266
  169. framework = arduino
  170. board = esp01_1m
  171. lib_deps = ${common.lib_deps}
  172. lib_ignore = ${common.lib_ignore}
  173. extra_script = pio_hooks.py
  174. build_flags = ${common.build_flags_1m128} -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. 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. [env:sonoff-4ch-debug-ota]
  187. platform = espressif8266
  188. framework = arduino
  189. board = esp8285
  190. lib_deps = ${common.lib_deps}
  191. lib_ignore = ${common.lib_ignore}
  192. extra_script = pio_hooks.py
  193. build_flags = ${common.build_flags_1m128} -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. 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. [env:sonoff-touch-debug-ota]
  206. platform = espressif8266
  207. framework = arduino
  208. board = esp8285
  209. lib_deps = ${common.lib_deps}
  210. lib_ignore = ${common.lib_ignore}
  211. extra_script = pio_hooks.py
  212. build_flags = ${common.build_flags_1m128} -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. 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. [env:slampher-debug-ota]
  225. platform = espressif8266
  226. framework = arduino
  227. board = esp01_1m
  228. lib_deps = ${common.lib_deps}
  229. lib_ignore = ${common.lib_ignore}
  230. extra_script = pio_hooks.py
  231. build_flags = ${common.build_flags_1m128} -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. 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. [env:s20-debug-ota]
  244. platform = espressif8266
  245. framework = arduino
  246. board = esp01_1m
  247. lib_deps = ${common.lib_deps}
  248. lib_ignore = ${common.lib_ignore}
  249. extra_script = pio_hooks.py
  250. build_flags = ${common.build_flags_1m128} -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. 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. [env:1ch-inching-debug-ota]
  263. platform = espressif8266
  264. framework = arduino
  265. board = esp01_1m
  266. lib_deps = ${common.lib_deps}
  267. lib_ignore = ${common.lib_ignore}
  268. extra_script = pio_hooks.py
  269. build_flags = ${common.build_flags_1m128} -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. 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. [env:motor-debug-ota]
  282. platform = espressif8266
  283. framework = arduino
  284. board = esp01_1m
  285. lib_deps = ${common.lib_deps}
  286. lib_ignore = ${common.lib_ignore}
  287. extra_script = pio_hooks.py
  288. build_flags = ${common.build_flags_1m128} -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. extra_script = pio_hooks.py
  299. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  300. [env:electrodragon-debug-ota]
  301. platform = espressif8266
  302. framework = arduino
  303. board = esp12e
  304. lib_deps = ${common.lib_deps}
  305. lib_ignore = ${common.lib_ignore}
  306. extra_script = pio_hooks.py
  307. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  308. upload_speed = 115200
  309. upload_port = "192.168.4.1"
  310. upload_flags = --auth=fibonacci --port 8266
  311. [env:ecoplug-debug]
  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. [env:ecoplug-debug-ota]
  320. platform = espressif8266
  321. framework = arduino
  322. board = esp01_1m
  323. lib_deps = ${common.lib_deps}
  324. lib_ignore = ${common.lib_ignore}
  325. extra_script = pio_hooks.py
  326. build_flags = ${common.build_flags_1m128} -DECOPLUG
  327. upload_speed = 115200
  328. upload_port = "192.168.4.1"
  329. upload_flags = --auth=fibonacci --port 8266
  330. [env:jangoe-debug]
  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. [env:jangoe-debug-ota]
  339. platform = espressif8266
  340. framework = arduino
  341. board = esp12e
  342. lib_deps = ${common.lib_deps}
  343. lib_ignore = ${common.lib_ignore}
  344. extra_script = pio_hooks.py
  345. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  346. upload_speed = 115200
  347. upload_port = "192.168.4.1"
  348. upload_flags = --auth=fibonacci --port 8266
  349. [env:mqtt-relay-debug]
  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. [env:mqtt-relay-debug-ota]
  358. platform = espressif8266
  359. framework = arduino
  360. board = esp_wroom_02
  361. lib_deps = ${common.lib_deps}
  362. lib_ignore = ${common.lib_ignore}
  363. extra_script = pio_hooks.py
  364. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  365. upload_speed = 115200
  366. upload_port = "192.168.4.1"
  367. upload_flags = --auth=fibonacci --port 8266
  368. [env:wifi-relays-debug]
  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. [env:wifi-relays-debug-ota]
  377. platform = espressif8266
  378. framework = arduino
  379. board = esp01_1m
  380. lib_deps = ${common.lib_deps}
  381. lib_ignore = ${common.lib_ignore}
  382. extra_script = pio_hooks.py
  383. build_flags = ${common.build_flags_1m128} -DWIFI_RELAYS_BOARD_KIT
  384. upload_speed = 115200
  385. upload_port = "192.168.4.1"
  386. upload_flags = --auth=fibonacci --port 8266
  387. [env:ai-light-debug]
  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. [env:ai-light-debug-ota]
  396. platform = espressif8266
  397. framework = arduino
  398. board = esp8285
  399. lib_deps = ${common.lib_deps}
  400. lib_ignore = ${common.lib_ignore}
  401. extra_script = pio_hooks.py
  402. build_flags = ${common.build_flags_1m128} -DAI_LIGHT
  403. upload_speed = 115200
  404. upload_port = "192.168.4.1"
  405. upload_flags = --auth=fibonacci --port 8266
  406. [env:led-controller-debug]
  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. [env:led-controller-debug-ota]
  415. platform = espressif8266
  416. framework = arduino
  417. board = esp01_1m
  418. lib_deps = ${common.lib_deps}
  419. lib_ignore = ${common.lib_ignore}
  420. extra_script = pio_hooks.py
  421. build_flags = ${common.build_flags_1m128} -DLED_CONTROLLER
  422. upload_speed = 115200
  423. upload_port = "192.168.4.1"
  424. upload_flags = --auth=fibonacci --port 8266
  425. [env:h801-debug]
  426. platform = espressif8266
  427. framework = arduino
  428. board = esp01_1m
  429. lib_deps = ${common.lib_deps}
  430. lib_ignore = ${common.lib_ignore}
  431. extra_script = pio_hooks.py
  432. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  433. [env:h801-debug-ota]
  434. platform = espressif8266
  435. framework = arduino
  436. board = esp01_1m
  437. lib_deps = ${common.lib_deps}
  438. lib_ignore = ${common.lib_ignore}
  439. extra_script = pio_hooks.py
  440. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  441. upload_speed = 115200
  442. upload_port = "192.168.4.1"
  443. upload_flags = --auth=fibonacci --port 8266