Add Switchbot support and discovery. (#995)

* Use a task to process immediate BLE actions to prevent MQTT disconnection if the action takes too long to complete.

* Add state_on and state_off parameters to createDiscovery
This commit is contained in:
h2zero authored and GitHub committed 2022-04-30 09:16:06 -05:00
1 parent a15a1c0851
commit 8d6acbee12
7 files changed
+222 -62

No files matched your search

+9 -9
View File
@@ -212,11 +212,11 @@ board_build.ldscript = eagle.flash.1m64.ld ;this frees more space for firmware u
[env:sonoff-rfbridge-direct]
platform = espressif8266@^2
board = esp8285
lib_deps =
lib_deps =
${com-esp.lib_deps}
${libraries.wifimanager8266}
${libraries.esppilight}
build_flags =
build_flags =
${com-esp.build_flags}
'-DZgatewayPilight="Pilight"'
'-DRF_RECEIVER_GPIO=4'
@@ -374,9 +374,9 @@ lib_deps =
${com-esp.lib_deps}
${libraries.wifimanager32}
${libraries.emodbus}
${libraries.gfSunInverter}
${libraries.gfSunInverter}
build_flags =
${com-esp.build_flags}
${com-esp.build_flags}
'-DZgatewayGFSunInverter="GFSunInverter"'
'-DGateway_Name="OpenMQTTGateway_ESP32_GFSunInverter"'
@@ -702,7 +702,7 @@ lib_deps =
${libraries.ble}
${libraries.decoder}
${libraries.irremoteesp}
build_flags =
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DZgatewayIR="IR"'
@@ -726,7 +726,7 @@ build_flags =
'-DZgatewayRTL_433="rtl_433"'
'-DGateway_Name="OpenMQTTGateway_rtl_433_ESP"'
'-DvalueAsASubject=true' ; mqtt topic includes model and device
; '-DPUBLISH_UNPARSED=true' ; Publish details of undecoded signals
; '-DPUBLISH_UNPARSED=true' ; Publish details of undecoded signals
; '-DRTL_DEBUG=4' ; enable rtl_433 verbose device decode
[env:esp32dev-multi_receiver]
@@ -810,7 +810,7 @@ build_flags =
'-DZgatewayLORA="LORA"'
'-DZgatewayBT="BT"'
'-DGateway_Name="OpenMQTTGateway_ESP32_BLE_LORA"'
'-DLED_SEND_RECEIVE=21' # T-BEAM board V0.5
# '-DLED_SEND_RECEIVE=14' # T-BEAM board V0.7
# '-DLED_SEND_RECEIVE=4' # T-BEAM board V1.0+
@@ -823,7 +823,7 @@ build_flags =
'-DADC_GPIO=35'
'-DADC_DIVIDER=2'
# Reading battery level every minutes should be more than enought
'-DTimeBetweenReadingADC=60000'
'-DTimeBetweenReadingADC=60000'
[env:heltec-wifi-lora-32-868]
platform = ${com.esp32_platform}
@@ -990,7 +990,7 @@ lib_deps =
${libraries.wifimanager8266}
${libraries.irremoteesp}
${libraries.esp8266_mdns}
build_flags =
build_flags =
${com-esp.build_flags}
'-DZgatewayIR="IR"'
'-DTRIGGER_GPIO=13'