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.

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