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.

483 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#36b6b5a
  15. https://github.com/me-no-dev/ESPAsyncWebServer#bab5457
  16. https://github.com/marvinroger/async-mqtt-client#f1b4576
  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. board_flash_mode = dout
  86. lib_deps = ${common.lib_deps}
  87. lib_ignore = ${common.lib_ignore}
  88. build_flags = ${common.build_flags} -DESPURNA_H
  89. upload_speed = 115200
  90. upload_port = "192.168.4.1"
  91. upload_flags = --auth=fibonacci --port 8266
  92. [env:sonoff-debug]
  93. platform = espressif8266
  94. framework = arduino
  95. board = esp01_1m
  96. board_flash_mode = dout
  97. lib_deps = ${common.lib_deps}
  98. lib_ignore = ${common.lib_ignore}
  99. build_flags = ${common.build_flags_1m} -DSONOFF
  100. [env:sonoff-debug-ota]
  101. platform = espressif8266
  102. framework = arduino
  103. board = esp01_1m
  104. board_flash_mode = dout
  105. lib_deps = ${common.lib_deps}
  106. lib_ignore = ${common.lib_ignore}
  107. build_flags = ${common.build_flags_1m} -DSONOFF
  108. upload_speed = 115200
  109. upload_port = "192.168.4.1"
  110. upload_flags = --auth=fibonacci --port 8266
  111. [env:sonoff-dht22-debug]
  112. platform = espressif8266
  113. framework = arduino
  114. board = esp01_1m
  115. board_flash_mode = dout
  116. lib_deps = ${common.lib_deps}
  117. lib_ignore = ${common.lib_ignore}
  118. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DHT=1
  119. [env:sonoff-ds18b20-debug]
  120. platform = espressif8266
  121. framework = arduino
  122. board = esp01_1m
  123. board_flash_mode = dout
  124. lib_deps = ${common.lib_deps}
  125. lib_ignore = ${common.lib_ignore}
  126. build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DS18B20=1
  127. [env:sonoff-pow-debug]
  128. platform = espressif8266
  129. framework = arduino
  130. board = esp01_1m
  131. board_flash_mode = dout
  132. lib_deps = ${common.lib_deps}
  133. lib_ignore = ${common.lib_ignore}
  134. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  135. [env:sonoff-pow-debug-ota]
  136. platform = espressif8266
  137. framework = arduino
  138. board = esp01_1m
  139. board_flash_mode = dout
  140. lib_deps = ${common.lib_deps}
  141. lib_ignore = ${common.lib_ignore}
  142. build_flags = ${common.build_flags_1m} -DSONOFF_POW
  143. upload_speed = 115200
  144. upload_port = "192.168.4.1"
  145. upload_flags = --auth=fibonacci --port 8266
  146. [env:sonoff-dual-debug]
  147. platform = espressif8266
  148. framework = arduino
  149. board = esp01_1m
  150. board_flash_mode = dout
  151. lib_deps = ${common.lib_deps}
  152. lib_ignore = ${common.lib_ignore}
  153. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  154. [env:sonoff-dual-debug-ota]
  155. platform = espressif8266
  156. framework = arduino
  157. board = esp01_1m
  158. board_flash_mode = dout
  159. lib_deps = ${common.lib_deps}
  160. lib_ignore = ${common.lib_ignore}
  161. build_flags = ${common.build_flags_1m} -DSONOFF_DUAL
  162. upload_speed = 115200
  163. upload_port = "192.168.4.1"
  164. upload_flags = --auth=fibonacci --port 8266
  165. [env:sonoff-4ch-debug]
  166. platform = espressif8266
  167. framework = arduino
  168. board = esp8285
  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. lib_deps = ${common.lib_deps}
  177. lib_ignore = ${common.lib_ignore}
  178. build_flags = ${common.build_flags_1m} -DSONOFF_4CH
  179. upload_speed = 115200
  180. upload_port = "192.168.4.1"
  181. upload_flags = --auth=fibonacci --port 8266
  182. [env:sonoff-touch-debug]
  183. platform = espressif8266
  184. framework = arduino
  185. board = esp01_1m
  186. board_flash_mode = dout
  187. lib_deps = ${common.lib_deps}
  188. lib_ignore = ${common.lib_ignore}
  189. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  190. [env:sonoff-touch-debug-ota]
  191. platform = espressif8266
  192. framework = arduino
  193. board = esp01_1m
  194. board_flash_mode = dout
  195. lib_deps = ${common.lib_deps}
  196. lib_ignore = ${common.lib_ignore}
  197. build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH
  198. upload_speed = 115200
  199. upload_port = "192.168.4.1"
  200. upload_flags = --auth=fibonacci --port 8266
  201. [env:slampher-debug]
  202. platform = espressif8266
  203. framework = arduino
  204. board = esp01_1m
  205. board_flash_mode = dout
  206. lib_deps = ${common.lib_deps}
  207. lib_ignore = ${common.lib_ignore}
  208. build_flags = ${common.build_flags_1m} -DSLAMPHER
  209. [env:slampher-debug-ota]
  210. platform = espressif8266
  211. framework = arduino
  212. board = esp01_1m
  213. board_flash_mode = dout
  214. lib_deps = ${common.lib_deps}
  215. lib_ignore = ${common.lib_ignore}
  216. build_flags = ${common.build_flags_1m} -DSLAMPHER
  217. upload_speed = 115200
  218. upload_port = "192.168.4.1"
  219. upload_flags = --auth=fibonacci --port 8266
  220. [env:s20-debug]
  221. platform = espressif8266
  222. framework = arduino
  223. board = esp01_1m
  224. board_flash_mode = dout
  225. lib_deps = ${common.lib_deps}
  226. lib_ignore = ${common.lib_ignore}
  227. build_flags = ${common.build_flags_1m} -DS20
  228. [env:s20-debug-ota]
  229. platform = espressif8266
  230. framework = arduino
  231. board = esp01_1m
  232. board_flash_mode = dout
  233. lib_deps = ${common.lib_deps}
  234. lib_ignore = ${common.lib_ignore}
  235. build_flags = ${common.build_flags_1m} -DS20
  236. upload_speed = 115200
  237. upload_port = "192.168.4.1"
  238. upload_flags = --auth=fibonacci --port 8266
  239. [env:rfbridge-debug]
  240. platform = espressif8266
  241. framework = arduino
  242. board = esp01_1m
  243. board_flash_mode = dout
  244. lib_deps = ${common.lib_deps}
  245. lib_ignore = ${common.lib_ignore}
  246. build_flags = ${common.build_flags_1m} -DSONOFF_RFBRIDGE
  247. [env:rfbridge-debug-ota]
  248. platform = espressif8266
  249. framework = arduino
  250. board = esp01_1m
  251. board_flash_mode = dout
  252. lib_deps = ${common.lib_deps}
  253. lib_ignore = ${common.lib_ignore}
  254. build_flags = ${common.build_flags_1m} -DSONOFF_RFBRIDGE
  255. upload_speed = 115200
  256. upload_port = "192.168.4.1"
  257. upload_flags = --auth=Algernon1 --port 8266
  258. [env:1ch-inching-debug]
  259. platform = espressif8266
  260. framework = arduino
  261. board = esp01_1m
  262. board_flash_mode = dout
  263. lib_deps = ${common.lib_deps}
  264. lib_ignore = ${common.lib_ignore}
  265. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  266. [env:1ch-inching-debug-ota]
  267. platform = espressif8266
  268. framework = arduino
  269. board = esp01_1m
  270. board_flash_mode = dout
  271. lib_deps = ${common.lib_deps}
  272. lib_ignore = ${common.lib_ignore}
  273. build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING
  274. upload_speed = 115200
  275. upload_port = "192.168.4.1"
  276. upload_flags = --auth=fibonacci --port 8266
  277. [env:motor-debug]
  278. platform = espressif8266
  279. framework = arduino
  280. board = esp01_1m
  281. board_flash_mode = dout
  282. lib_deps = ${common.lib_deps}
  283. lib_ignore = ${common.lib_ignore}
  284. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  285. [env:motor-debug-ota]
  286. platform = espressif8266
  287. framework = arduino
  288. board = esp01_1m
  289. board_flash_mode = dout
  290. lib_deps = ${common.lib_deps}
  291. lib_ignore = ${common.lib_ignore}
  292. build_flags = ${common.build_flags_1m} -DITEAD_MOTOR
  293. upload_speed = 115200
  294. upload_port = "192.168.4.1"
  295. upload_flags = --auth=fibonacci --port 8266
  296. [env:electrodragon-debug]
  297. platform = espressif8266
  298. framework = arduino
  299. board = esp12e
  300. lib_deps = ${common.lib_deps}
  301. lib_ignore = ${common.lib_ignore}
  302. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  303. [env:electrodragon-debug-ota]
  304. platform = espressif8266
  305. framework = arduino
  306. board = esp12e
  307. lib_deps = ${common.lib_deps}
  308. lib_ignore = ${common.lib_ignore}
  309. build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1
  310. upload_speed = 115200
  311. upload_port = "192.168.4.1"
  312. upload_flags = --auth=fibonacci --port 8266
  313. [env:ecoplug-debug]
  314. platform = espressif8266
  315. framework = arduino
  316. board = esp01_1m
  317. board_flash_mode = dout
  318. lib_deps = ${common.lib_deps}
  319. lib_ignore = ${common.lib_ignore}
  320. build_flags = ${common.build_flags_1m} -DECOPLUG
  321. [env:ecoplug-debug-ota]
  322. platform = espressif8266
  323. framework = arduino
  324. board = esp01_1m
  325. board_flash_mode = dout
  326. lib_deps = ${common.lib_deps}
  327. lib_ignore = ${common.lib_ignore}
  328. build_flags = ${common.build_flags_1m} -DECOPLUG
  329. upload_speed = 115200
  330. upload_port = "192.168.4.1"
  331. upload_flags = --auth=fibonacci --port 8266
  332. [env:jangoe-debug]
  333. platform = espressif8266
  334. framework = arduino
  335. board = esp12e
  336. lib_deps = ${common.lib_deps}
  337. lib_ignore = ${common.lib_ignore}
  338. build_flags = ${common.build_flags} -DWIFI_RELAY_NC
  339. [env:jangoe-debug-ota]
  340. platform = espressif8266
  341. framework = arduino
  342. board = esp12e
  343. lib_deps = ${common.lib_deps}
  344. lib_ignore = ${common.lib_ignore}
  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. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  356. [env:mqtt-relay-debug-ota]
  357. platform = espressif8266
  358. framework = arduino
  359. board = esp_wroom_02
  360. lib_deps = ${common.lib_deps}
  361. lib_ignore = ${common.lib_ignore}
  362. build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1
  363. upload_speed = 115200
  364. upload_port = "192.168.4.1"
  365. upload_flags = --auth=fibonacci --port 8266
  366. [env:wifi-relays-debug]
  367. platform = espressif8266
  368. framework = arduino
  369. board = esp01_1m
  370. lib_deps = ${common.lib_deps}
  371. lib_ignore = ${common.lib_ignore}
  372. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  373. [env:wifi-relays-debug-ota]
  374. platform = espressif8266
  375. framework = arduino
  376. board = esp01_1m
  377. lib_deps = ${common.lib_deps}
  378. lib_ignore = ${common.lib_ignore}
  379. build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT
  380. upload_speed = 115200
  381. upload_port = "192.168.4.1"
  382. upload_flags = --auth=fibonacci --port 8266
  383. [env:ai-light-debug]
  384. platform = espressif8266
  385. framework = arduino
  386. board = esp01_1m
  387. board_flash_mode = dout
  388. lib_deps = ${common.lib_deps}
  389. lib_ignore = ${common.lib_ignore}
  390. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  391. [env:ai-light-debug-ota]
  392. platform = espressif8266
  393. framework = arduino
  394. board = esp01_1m
  395. board_flash_mode = dout
  396. lib_deps = ${common.lib_deps}
  397. lib_ignore = ${common.lib_ignore}
  398. build_flags = ${common.build_flags_1m} -DAI_LIGHT
  399. upload_speed = 115200
  400. upload_port = "192.168.4.1"
  401. upload_flags = --auth=fibonacci --port 8266
  402. [env:led-controller-debug]
  403. platform = espressif8266
  404. framework = arduino
  405. board = esp01_1m
  406. lib_deps = ${common.lib_deps}
  407. lib_ignore = ${common.lib_ignore}
  408. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  409. [env:led-controller-debug-ota]
  410. platform = espressif8266
  411. framework = arduino
  412. board = esp01_1m
  413. lib_deps = ${common.lib_deps}
  414. lib_ignore = ${common.lib_ignore}
  415. build_flags = ${common.build_flags_1m} -DLED_CONTROLLER
  416. upload_speed = 115200
  417. upload_port = "192.168.4.1"
  418. upload_flags = --auth=fibonacci --port 8266
  419. [env:h801-debug]
  420. platform = espressif8266
  421. framework = arduino
  422. board = esp01_1m
  423. board_flash_mode = dout
  424. lib_deps = ${common.lib_deps}
  425. lib_ignore = ${common.lib_ignore}
  426. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  427. [env:h801-debug-ota]
  428. platform = espressif8266
  429. framework = arduino
  430. board = esp01_1m
  431. board_flash_mode = dout
  432. lib_deps = ${common.lib_deps}
  433. lib_ignore = ${common.lib_ignore}
  434. build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1
  435. upload_speed = 115200
  436. upload_port = "192.168.4.1"
  437. upload_flags = --auth=fibonacci --port 8266