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.

481 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_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#991f855
  15. https://github.com/me-no-dev/ESPAsyncWebServer#a94265d
  16. https://github.com/marvinroger/async-mqtt-client#v0.8.1
  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.1
  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-ssl-debug]
  48. platform = espressif8266_stage
  49. framework = arduino
  50. board = d1_mini
  51. lib_deps = ${common.lib_deps}
  52. lib_ignore = ${common.lib_ignore}
  53. extra_script = pio_hooks.py
  54. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH -DASYNC_TCP_SSL_ENABLED=1
  55. [env:d1-debug-ota]
  56. platform = espressif8266
  57. framework = arduino
  58. board = d1_mini
  59. lib_deps = ${common.lib_deps}
  60. lib_ignore = ${common.lib_ignore}
  61. build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  62. upload_speed = 115200
  63. upload_port = "192.168.4.1"
  64. upload_flags = --auth=fibonacci --port 8266
  65. [env:node-debug]
  66. platform = espressif8266
  67. framework = arduino
  68. board = nodemcuv2
  69. lib_deps = ${common.lib_deps}
  70. lib_ignore = ${common.lib_ignore}
  71. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  72. [env:node-debug-ssl]
  73. platform = espressif8266_stage
  74. framework = arduino
  75. board = nodemcuv2
  76. lib_deps = ${common.lib_deps}
  77. lib_ignore = ${common.lib_ignore}
  78. extra_script = pio_hooks.py
  79. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH -DASYNC_TCP_SSL_ENABLED=1
  80. [env:node-debug-ota]
  81. platform = espressif8266
  82. framework = arduino
  83. board = nodemcuv2
  84. lib_deps = ${common.lib_deps}
  85. lib_ignore = ${common.lib_ignore}
  86. build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH
  87. upload_speed = 115200
  88. upload_port = "192.168.4.1"
  89. upload_flags = --auth=fibonacci --port 8266
  90. [env:espurna-debug]
  91. platform = espressif8266
  92. framework = arduino
  93. board = esp12e
  94. lib_deps = ${common.lib_deps}
  95. lib_ignore = ${common.lib_ignore}
  96. build_flags = ${common.build_flags} -DESPURNA_H
  97. [env:espurna-debug-ota]
  98. platform = espressif8266
  99. framework = arduino
  100. board = esp12e
  101. lib_deps = ${common.lib_deps}
  102. lib_ignore = ${common.lib_ignore}
  103. build_flags = ${common.build_flags} -DESPURNA_H
  104. upload_speed = 115200
  105. upload_port = "192.168.4.1"
  106. upload_flags = --auth=fibonacci --port 8266
  107. [env:sonoff-debug]
  108. platform = espressif8266
  109. framework = arduino
  110. board = esp01_1m
  111. board_flash_mode = dout
  112. lib_deps = ${common.lib_deps}
  113. lib_ignore = ${common.lib_ignore}
  114. build_flags = ${common.build_flags_1m} -DSONOFF
  115. [env:sonoff-debug-ota]
  116. platform = espressif8266
  117. framework = arduino
  118. board = esp01_1m
  119. board_flash_mode = dout
  120. lib_deps = ${common.lib_deps}
  121. lib_ignore = ${common.lib_ignore}
  122. build_flags = ${common.build_flags_1m} -DSONOFF
  123. upload_speed = 115200
  124. upload_port = "192.168.4.1"
  125. upload_flags = --auth=fibonacci --port 8266
  126. [env:sonoff-dht22-debug]
  127. platform = espressif8266
  128. framework = arduino
  129. board = esp01_1m
  130. board_flash_mode = dout
  131. lib_deps = ${common.lib_deps}
  132. lib_ignore = ${common.lib_ignore}
  133. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DHT=1
  134. [env:sonoff-ds18b20-debug]
  135. platform = espressif8266
  136. framework = arduino
  137. board = esp01_1m
  138. board_flash_mode = dout
  139. lib_deps = ${common.lib_deps}
  140. lib_ignore = ${common.lib_ignore}
  141. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DS18B20=1
  142. [env:sonoff-pow-debug]
  143. platform = espressif8266
  144. framework = arduino
  145. board = esp01_1m
  146. board_flash_mode = dout
  147. lib_deps = ${common.lib_deps}
  148. lib_ignore = ${common.lib_ignore}
  149. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  150. [env:sonoff-pow-debug-ota]
  151. platform = espressif8266
  152. framework = arduino
  153. board = esp01_1m
  154. board_flash_mode = dout
  155. lib_deps = ${common.lib_deps}
  156. lib_ignore = ${common.lib_ignore}
  157. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  158. upload_speed = 115200
  159. upload_port = "192.168.4.1"
  160. upload_flags = --auth=fibonacci --port 8266
  161. [env:sonoff-dual-debug]
  162. platform = espressif8266
  163. framework = arduino
  164. board = esp01_1m
  165. board_flash_mode = dout
  166. lib_deps = ${common.lib_deps}
  167. lib_ignore = ${common.lib_ignore}
  168. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  169. [env:sonoff-dual-debug-ota]
  170. platform = espressif8266
  171. framework = arduino
  172. board = esp01_1m
  173. board_flash_mode = dout
  174. lib_deps = ${common.lib_deps}
  175. lib_ignore = ${common.lib_ignore}
  176. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  177. upload_speed = 115200
  178. upload_port = "192.168.4.1"
  179. upload_flags = --auth=fibonacci --port 8266
  180. [env:sonoff-4ch-debug]
  181. platform = espressif8266
  182. framework = arduino
  183. board = esp8285
  184. board_flash_mode = dout
  185. lib_deps = ${common.lib_deps}
  186. lib_ignore = ${common.lib_ignore}
  187. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  188. [env:sonoff-4ch-debug-ota]
  189. platform = espressif8266
  190. framework = arduino
  191. board = esp8285
  192. board_flash_mode = dout
  193. lib_deps = ${common.lib_deps}
  194. lib_ignore = ${common.lib_ignore}
  195. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  196. upload_speed = 115200
  197. upload_port = "192.168.4.1"
  198. upload_flags = --auth=fibonacci --port 8266
  199. [env:sonoff-touch-debug]
  200. platform = espressif8266
  201. framework = arduino
  202. board = esp8285
  203. board_flash_mode = dout
  204. lib_deps = ${common.lib_deps}
  205. lib_ignore = ${common.lib_ignore}
  206. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  207. [env:sonoff-touch-debug-ota]
  208. platform = espressif8266
  209. framework = arduino
  210. board = esp8285
  211. board_flash_mode = dout
  212. lib_deps = ${common.lib_deps}
  213. lib_ignore = ${common.lib_ignore}
  214. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  215. upload_speed = 115200
  216. upload_port = "192.168.4.1"
  217. upload_flags = --auth=fibonacci --port 8266
  218. [env:slampher-debug]
  219. platform = espressif8266
  220. framework = arduino
  221. board = esp01_1m
  222. board_flash_mode = dout
  223. lib_deps = ${common.lib_deps}
  224. lib_ignore = ${common.lib_ignore}
  225. build_flags = ${common.build_flags_1m} -DSLAMPHER
  226. [env:slampher-debug-ota]
  227. platform = espressif8266
  228. framework = arduino
  229. board = esp01_1m
  230. board_flash_mode = dout
  231. lib_deps = ${common.lib_deps}
  232. lib_ignore = ${common.lib_ignore}
  233. build_flags = ${common.build_flags_1m} -DSLAMPHER
  234. upload_speed = 115200
  235. upload_port = "192.168.4.1"
  236. upload_flags = --auth=fibonacci --port 8266
  237. [env:s20-debug]
  238. platform = espressif8266
  239. framework = arduino
  240. board = esp01_1m
  241. board_flash_mode = dout
  242. lib_deps = ${common.lib_deps}
  243. lib_ignore = ${common.lib_ignore}
  244. build_flags = ${common.build_flags_1m} -DS20
  245. [env:s20-debug-ota]
  246. platform = espressif8266
  247. framework = arduino
  248. board = esp01_1m
  249. board_flash_mode = dout
  250. lib_deps = ${common.lib_deps}
  251. lib_ignore = ${common.lib_ignore}
  252. build_flags = ${common.build_flags_1m} -DS20
  253. upload_speed = 115200
  254. upload_port = "192.168.4.1"
  255. upload_flags = --auth=fibonacci --port 8266
  256. [env:1ch-inching-debug]
  257. platform = espressif8266
  258. framework = arduino
  259. board = esp01_1m
  260. board_flash_mode = dout
  261. lib_deps = ${common.lib_deps}
  262. lib_ignore = ${common.lib_ignore}
  263. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  264. [env:1ch-inching-debug-ota]
  265. platform = espressif8266
  266. framework = arduino
  267. board = esp01_1m
  268. board_flash_mode = dout
  269. lib_deps = ${common.lib_deps}
  270. lib_ignore = ${common.lib_ignore}
  271. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  272. upload_speed = 115200
  273. upload_port = "192.168.4.1"
  274. upload_flags = --auth=fibonacci --port 8266
  275. [env:motor-debug]
  276. platform = espressif8266
  277. framework = arduino
  278. board = esp01_1m
  279. board_flash_mode = dout
  280. lib_deps = ${common.lib_deps}
  281. lib_ignore = ${common.lib_ignore}
  282. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  283. [env:motor-debug-ota]
  284. platform = espressif8266
  285. framework = arduino
  286. board = esp01_1m
  287. board_flash_mode = dout
  288. lib_deps = ${common.lib_deps}
  289. lib_ignore = ${common.lib_ignore}
  290. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  291. upload_speed = 115200
  292. upload_port = "192.168.4.1"
  293. upload_flags = --auth=fibonacci --port 8266
  294. [env:electrodragon-debug]
  295. platform = espressif8266
  296. framework = arduino
  297. board = esp12e
  298. lib_deps = ${common.lib_deps}
  299. lib_ignore = ${common.lib_ignore}
  300. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  301. [env:electrodragon-debug-ota]
  302. platform = espressif8266
  303. framework = arduino
  304. board = esp12e
  305. lib_deps = ${common.lib_deps}
  306. lib_ignore = ${common.lib_ignore}
  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. board_flash_mode = dout
  316. lib_deps = ${common.lib_deps}
  317. lib_ignore = ${common.lib_ignore}
  318. build_flags = ${common.build_flags_1m} -DECOPLUG
  319. [env:ecoplug-debug-ota]
  320. platform = espressif8266
  321. framework = arduino
  322. board = esp01_1m
  323. board_flash_mode = dout
  324. lib_deps = ${common.lib_deps}
  325. lib_ignore = ${common.lib_ignore}
  326. build_flags = ${common.build_flags_1m} -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. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  337. [env:jangoe-debug-ota]
  338. platform = espressif8266
  339. framework = arduino
  340. board = esp12e
  341. lib_deps = ${common.lib_deps}
  342. lib_ignore = ${common.lib_ignore}
  343. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  344. upload_speed = 115200
  345. upload_port = "192.168.4.1"
  346. upload_flags = --auth=fibonacci --port 8266
  347. [env:mqtt-relay-debug]
  348. platform = espressif8266
  349. framework = arduino
  350. board = esp_wroom_02
  351. lib_deps = ${common.lib_deps}
  352. lib_ignore = ${common.lib_ignore}
  353. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  354. [env:mqtt-relay-debug-ota]
  355. platform = espressif8266
  356. framework = arduino
  357. board = esp_wroom_02
  358. lib_deps = ${common.lib_deps}
  359. lib_ignore = ${common.lib_ignore}
  360. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  361. upload_speed = 115200
  362. upload_port = "192.168.4.1"
  363. upload_flags = --auth=fibonacci --port 8266
  364. [env:wifi-relays-debug]
  365. platform = espressif8266
  366. framework = arduino
  367. board = esp01_1m
  368. lib_deps = ${common.lib_deps}
  369. lib_ignore = ${common.lib_ignore}
  370. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  371. [env:wifi-relays-debug-ota]
  372. platform = espressif8266
  373. framework = arduino
  374. board = esp01_1m
  375. lib_deps = ${common.lib_deps}
  376. lib_ignore = ${common.lib_ignore}
  377. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  378. upload_speed = 115200
  379. upload_port = "192.168.4.1"
  380. upload_flags = --auth=fibonacci --port 8266
  381. [env:ai-light-debug]
  382. platform = espressif8266
  383. framework = arduino
  384. board = esp01_1m
  385. board_flash_mode = dout
  386. lib_deps = ${common.lib_deps}
  387. lib_ignore = ${common.lib_ignore}
  388. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  389. [env:ai-light-debug-ota]
  390. platform = espressif8266
  391. framework = arduino
  392. board = esp01_1m
  393. board_flash_mode = dout
  394. lib_deps = ${common.lib_deps}
  395. lib_ignore = ${common.lib_ignore}
  396. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  397. upload_speed = 115200
  398. upload_port = "192.168.4.1"
  399. upload_flags = --auth=fibonacci --port 8266
  400. [env:led-controller-debug]
  401. platform = espressif8266
  402. framework = arduino
  403. board = esp01_1m
  404. lib_deps = ${common.lib_deps}
  405. lib_ignore = ${common.lib_ignore}
  406. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  407. [env:led-controller-debug-ota]
  408. platform = espressif8266
  409. framework = arduino
  410. board = esp01_1m
  411. lib_deps = ${common.lib_deps}
  412. lib_ignore = ${common.lib_ignore}
  413. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  414. upload_speed = 115200
  415. upload_port = "192.168.4.1"
  416. upload_flags = --auth=fibonacci --port 8266
  417. [env:h801-debug]
  418. platform = espressif8266
  419. framework = arduino
  420. board = esp01_1m
  421. board_flash_mode = dout
  422. lib_deps = ${common.lib_deps}
  423. lib_ignore = ${common.lib_ignore}
  424. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  425. [env:h801-debug-ota]
  426. platform = espressif8266
  427. framework = arduino
  428. board = esp01_1m
  429. board_flash_mode = dout
  430. lib_deps = ${common.lib_deps}
  431. lib_ignore = ${common.lib_ignore}
  432. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  433. upload_speed = 115200
  434. upload_port = "192.168.4.1"
  435. upload_flags = --auth=fibonacci --port 8266