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.

497 lines
14 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-ssl]
  76. platform = espressif8266_stage
  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 -DASYNC_TCP_SSL_ENABLED=1
  83. [env:node-debug-ota]
  84. platform = espressif8266
  85. framework = arduino
  86. board = nodemcuv2
  87. lib_deps = ${common.lib_deps}
  88. lib_ignore = ${common.lib_ignore}
  89. extra_script = pio_hooks.py
  90. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  91. upload_speed = 115200
  92. upload_port = "192.168.4.1"
  93. upload_flags = --auth=fibonacci --port 8266
  94. [env:espurna-debug]
  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. [env:espurna-debug-ota]
  103. platform = espressif8266
  104. framework = arduino
  105. board = esp12e
  106. lib_deps = ${common.lib_deps}
  107. lib_ignore = ${common.lib_ignore}
  108. extra_script = pio_hooks.py
  109. build_flags = ${common.build_flags} -DESPURNA_H
  110. upload_speed = 115200
  111. upload_port = "192.168.4.1"
  112. upload_flags = --auth=fibonacci --port 8266
  113. [env:sonoff-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
  121. [env:sonoff-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
  129. upload_speed = 115200
  130. upload_port = "192.168.4.1"
  131. upload_flags = --auth=fibonacci --port 8266
  132. [env:sonoff-dht22-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_DHT=1
  140. [env:sonoff-ds18b20-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 -DENABLE_DS18B20=1
  148. [env:sonoff-pow-debug]
  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. [env:sonoff-pow-debug-ota]
  157. platform = espressif8266
  158. framework = arduino
  159. board = esp01_1m
  160. lib_deps = ${common.lib_deps}
  161. lib_ignore = ${common.lib_ignore}
  162. extra_script = pio_hooks.py
  163. build_flags = ${common.build_flags_1m128} -DSONOFF_POW
  164. upload_speed = 115200
  165. upload_port = "192.168.4.1"
  166. upload_flags = --auth=fibonacci --port 8266
  167. [env:sonoff-dual-debug]
  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. [env:sonoff-dual-debug-ota]
  176. platform = espressif8266
  177. framework = arduino
  178. board = esp01_1m
  179. lib_deps = ${common.lib_deps}
  180. lib_ignore = ${common.lib_ignore}
  181. extra_script = pio_hooks.py
  182. build_flags = ${common.build_flags_1m128} -DSONOFF_DUAL
  183. upload_speed = 115200
  184. upload_port = "192.168.4.1"
  185. upload_flags = --auth=fibonacci --port 8266
  186. [env:sonoff-4ch-debug]
  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. [env:sonoff-4ch-debug-ota]
  195. platform = espressif8266
  196. framework = arduino
  197. board = esp8285
  198. lib_deps = ${common.lib_deps}
  199. lib_ignore = ${common.lib_ignore}
  200. extra_script = pio_hooks.py
  201. build_flags = ${common.build_flags_1m128} -DSONOFF_4CH
  202. upload_speed = 115200
  203. upload_port = "192.168.4.1"
  204. upload_flags = --auth=fibonacci --port 8266
  205. [env:sonoff-touch-debug]
  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. [env:sonoff-touch-debug-ota]
  214. platform = espressif8266
  215. framework = arduino
  216. board = esp8285
  217. lib_deps = ${common.lib_deps}
  218. lib_ignore = ${common.lib_ignore}
  219. extra_script = pio_hooks.py
  220. build_flags = ${common.build_flags_1m128} -DSONOFF_TOUCH
  221. upload_speed = 115200
  222. upload_port = "192.168.4.1"
  223. upload_flags = --auth=fibonacci --port 8266
  224. [env:slampher-debug]
  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. [env:slampher-debug-ota]
  233. platform = espressif8266
  234. framework = arduino
  235. board = esp01_1m
  236. lib_deps = ${common.lib_deps}
  237. lib_ignore = ${common.lib_ignore}
  238. extra_script = pio_hooks.py
  239. build_flags = ${common.build_flags_1m128} -DSLAMPHER
  240. upload_speed = 115200
  241. upload_port = "192.168.4.1"
  242. upload_flags = --auth=fibonacci --port 8266
  243. [env:s20-debug]
  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. [env:s20-debug-ota]
  252. platform = espressif8266
  253. framework = arduino
  254. board = esp01_1m
  255. lib_deps = ${common.lib_deps}
  256. lib_ignore = ${common.lib_ignore}
  257. extra_script = pio_hooks.py
  258. build_flags = ${common.build_flags_1m128} -DS20
  259. upload_speed = 115200
  260. upload_port = "192.168.4.1"
  261. upload_flags = --auth=fibonacci --port 8266
  262. [env:1ch-inching-debug]
  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. [env:1ch-inching-debug-ota]
  271. platform = espressif8266
  272. framework = arduino
  273. board = esp01_1m
  274. lib_deps = ${common.lib_deps}
  275. lib_ignore = ${common.lib_ignore}
  276. extra_script = pio_hooks.py
  277. build_flags = ${common.build_flags_1m128} -DITEAD_1CH_INCHING
  278. upload_speed = 115200
  279. upload_port = "192.168.4.1"
  280. upload_flags = --auth=fibonacci --port 8266
  281. [env:motor-debug]
  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. [env:motor-debug-ota]
  290. platform = espressif8266
  291. framework = arduino
  292. board = esp01_1m
  293. lib_deps = ${common.lib_deps}
  294. lib_ignore = ${common.lib_ignore}
  295. extra_script = pio_hooks.py
  296. build_flags = ${common.build_flags_1m128} -DITEAD_MOTOR
  297. upload_speed = 115200
  298. upload_port = "192.168.4.1"
  299. upload_flags = --auth=fibonacci --port 8266
  300. [env:electrodragon-debug]
  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. [env:electrodragon-debug-ota]
  309. platform = espressif8266
  310. framework = arduino
  311. board = esp12e
  312. lib_deps = ${common.lib_deps}
  313. lib_ignore = ${common.lib_ignore}
  314. extra_script = pio_hooks.py
  315. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  316. upload_speed = 115200
  317. upload_port = "192.168.4.1"
  318. upload_flags = --auth=fibonacci --port 8266
  319. [env:ecoplug-debug]
  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. [env:ecoplug-debug-ota]
  328. platform = espressif8266
  329. framework = arduino
  330. board = esp01_1m
  331. lib_deps = ${common.lib_deps}
  332. lib_ignore = ${common.lib_ignore}
  333. extra_script = pio_hooks.py
  334. build_flags = ${common.build_flags_1m128} -DECOPLUG
  335. upload_speed = 115200
  336. upload_port = "192.168.4.1"
  337. upload_flags = --auth=fibonacci --port 8266
  338. [env:jangoe-debug]
  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. [env:jangoe-debug-ota]
  347. platform = espressif8266
  348. framework = arduino
  349. board = esp12e
  350. lib_deps = ${common.lib_deps}
  351. lib_ignore = ${common.lib_ignore}
  352. extra_script = pio_hooks.py
  353. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  354. upload_speed = 115200
  355. upload_port = "192.168.4.1"
  356. upload_flags = --auth=fibonacci --port 8266
  357. [env:mqtt-relay-debug]
  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. [env:mqtt-relay-debug-ota]
  366. platform = espressif8266
  367. framework = arduino
  368. board = esp_wroom_02
  369. lib_deps = ${common.lib_deps}
  370. lib_ignore = ${common.lib_ignore}
  371. extra_script = pio_hooks.py
  372. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  373. upload_speed = 115200
  374. upload_port = "192.168.4.1"
  375. upload_flags = --auth=fibonacci --port 8266
  376. [env:wifi-relays-debug]
  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. [env:wifi-relays-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. extra_script = pio_hooks.py
  391. build_flags = ${common.build_flags_1m128} -DWIFI_RELAYS_BOARD_KIT
  392. upload_speed = 115200
  393. upload_port = "192.168.4.1"
  394. upload_flags = --auth=fibonacci --port 8266
  395. [env:ai-light-debug]
  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. [env:ai-light-debug-ota]
  404. platform = espressif8266
  405. framework = arduino
  406. board = esp8285
  407. lib_deps = ${common.lib_deps}
  408. lib_ignore = ${common.lib_ignore}
  409. extra_script = pio_hooks.py
  410. build_flags = ${common.build_flags_1m128} -DAI_LIGHT
  411. upload_speed = 115200
  412. upload_port = "192.168.4.1"
  413. upload_flags = --auth=fibonacci --port 8266
  414. [env:led-controller-debug]
  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. [env:led-controller-debug-ota]
  423. platform = espressif8266
  424. framework = arduino
  425. board = esp01_1m
  426. lib_deps = ${common.lib_deps}
  427. lib_ignore = ${common.lib_ignore}
  428. extra_script = pio_hooks.py
  429. build_flags = ${common.build_flags_1m128} -DLED_CONTROLLER
  430. upload_speed = 115200
  431. upload_port = "192.168.4.1"
  432. upload_flags = --auth=fibonacci --port 8266
  433. [env:h801-debug]
  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. [env:h801-debug-ota]
  442. platform = espressif8266
  443. framework = arduino
  444. board = esp01_1m
  445. lib_deps = ${common.lib_deps}
  446. lib_ignore = ${common.lib_ignore}
  447. extra_script = pio_hooks.py
  448. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  449. upload_speed = 115200
  450. upload_port = "192.168.4.1"
  451. upload_flags = --auth=fibonacci --port 8266