Files
gateway/apps/gateway/main/Kconfig.projbuild
T

938 lines
28 KiB
Plaintext

menu "Gateway App"
config GATEWAY_CHANNEL_COUNT
int "Gateway channel count"
range 1 2
default 2
help
Number of logical DALI gateway channels exposed by the native gateway.
menu "Gateway Channel 1"
config GATEWAY_CHANNEL1_GW_ID
int "Gateway id"
range 0 255
default 3
help
Lua-compatible gateway id for the first DALI channel.
choice GATEWAY_CHANNEL1_PHY
prompt "Channel 1 PHY"
default GATEWAY_CHANNEL1_PHY_DISABLED
help
Select the physical transport used by channel 1.
config GATEWAY_CHANNEL1_PHY_DISABLED
bool "Disabled"
config GATEWAY_CHANNEL1_PHY_NATIVE
bool "Native DALI GPIO"
config GATEWAY_CHANNEL1_PHY_UART1
bool "Serial PHY on UART1"
config GATEWAY_CHANNEL1_PHY_UART2
bool "Serial PHY on UART2"
endchoice
config GATEWAY_CHANNEL1_NATIVE_BUS_ID
int "Native DALI bus id"
depends on GATEWAY_CHANNEL1_PHY_NATIVE
range 0 15
default 0
help
Logical DALI HAL bus index for channel 1.
config GATEWAY_CHANNEL1_NATIVE_TX_PIN
int "Native DALI TX pin"
depends on GATEWAY_CHANNEL1_PHY_NATIVE
range 0 48
default 18
help
ESP32-S3 GPIO used for channel 1 native DALI transmit.
config GATEWAY_CHANNEL1_NATIVE_RX_PIN
int "Native DALI RX pin"
depends on GATEWAY_CHANNEL1_PHY_NATIVE
range 0 48
default 8
help
ESP32-S3 GPIO used for channel 1 native DALI receive.
config GATEWAY_CHANNEL1_NATIVE_BAUDRATE
int "Native DALI baudrate"
depends on GATEWAY_CHANNEL1_PHY_NATIVE
range 400 2400
default 1200
help
Runtime baudrate used for channel 1 native DALI timing.
config GATEWAY_CHANNEL1_SERIAL_TX_PIN
int "Serial PHY TX pin"
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
range 0 48
default 1
help
ESP32-S3 GPIO used by the channel 1 serial PHY transmit pin.
config GATEWAY_CHANNEL1_SERIAL_RX_PIN
int "Serial PHY RX pin"
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
range 0 48
default 2
help
ESP32-S3 GPIO used by the channel 1 serial PHY receive pin.
config GATEWAY_CHANNEL1_SERIAL_BAUDRATE
int "Serial PHY baudrate"
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
range 1200 921600
default 9600
help
UART baudrate used by the channel 1 serial PHY.
config GATEWAY_CHANNEL1_SERIAL_RX_BUFFER
int "Serial PHY RX buffer bytes"
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
range 128 4096
default 512
config GATEWAY_CHANNEL1_SERIAL_TX_BUFFER
int "Serial PHY TX buffer bytes"
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
range 0 4096
default 512
config GATEWAY_CHANNEL1_SERIAL_QUERY_TIMEOUT_MS
int "Serial PHY query timeout ms"
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
range 10 5000
default 500
endmenu
menu "Gateway Channel 2"
config GATEWAY_CHANNEL2_GW_ID
int "Gateway id"
depends on GATEWAY_CHANNEL_COUNT >= 2
range 0 255
default 4
help
Lua-compatible gateway id for the second DALI channel.
choice GATEWAY_CHANNEL2_PHY
prompt "Channel 2 PHY"
depends on GATEWAY_CHANNEL_COUNT >= 2
default GATEWAY_CHANNEL2_PHY_DISABLED
help
Select the physical transport used by channel 2.
config GATEWAY_CHANNEL2_PHY_DISABLED
bool "Disabled"
config GATEWAY_CHANNEL2_PHY_NATIVE
bool "Native DALI GPIO"
config GATEWAY_CHANNEL2_PHY_UART1
bool "Serial PHY on UART1"
config GATEWAY_CHANNEL2_PHY_UART2
bool "Serial PHY on UART2"
endchoice
config GATEWAY_CHANNEL2_NATIVE_BUS_ID
int "Native DALI bus id"
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
range 0 15
default 1
help
Logical DALI HAL bus index for channel 2.
config GATEWAY_CHANNEL2_NATIVE_TX_PIN
int "Native DALI TX pin"
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
range 0 48
default 19
help
ESP32-S3 GPIO used for channel 2 native DALI transmit.
config GATEWAY_CHANNEL2_NATIVE_RX_PIN
int "Native DALI RX pin"
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
range 0 48
default 9
help
ESP32-S3 GPIO used for channel 2 native DALI receive.
config GATEWAY_CHANNEL2_NATIVE_BAUDRATE
int "Native DALI baudrate"
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
range 400 2400
default 1200
help
Runtime baudrate used for channel 2 native DALI timing.
config GATEWAY_CHANNEL2_SERIAL_TX_PIN
int "Serial PHY TX pin"
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
range 0 48
default 6
help
ESP32-S3 GPIO used by the channel 2 serial PHY transmit pin.
config GATEWAY_CHANNEL2_SERIAL_RX_PIN
int "Serial PHY RX pin"
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
range 0 48
default 7
help
ESP32-S3 GPIO used by the channel 2 serial PHY receive pin.
config GATEWAY_CHANNEL2_SERIAL_BAUDRATE
int "Serial PHY baudrate"
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
range 1200 921600
default 9600
help
UART baudrate used by the channel 2 serial PHY.
config GATEWAY_CHANNEL2_SERIAL_RX_BUFFER
int "Serial PHY RX buffer bytes"
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
range 128 4096
default 512
config GATEWAY_CHANNEL2_SERIAL_TX_BUFFER
int "Serial PHY TX buffer bytes"
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
range 0 4096
default 512
config GATEWAY_CHANNEL2_SERIAL_QUERY_TIMEOUT_MS
int "Serial PHY query timeout ms"
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
range 10 5000
default 500
endmenu
menu "Gateway Cache"
config GATEWAY_CACHE_SUPPORTED
bool "Gateway cache support"
default y
help
Enables the gateway cache facade. When disabled, internal scene and group
commands still persist through direct NVS writes.
config GATEWAY_CACHE_START_ENABLED
bool "Start gateway cache in deferred mode"
depends on GATEWAY_CACHE_SUPPORTED
default y
help
Starts the deferred RAM cache and background flush task at boot. Disable
this to keep scene and group persistence in direct-NVS mode.
config GATEWAY_CACHE_RECONCILIATION_ENABLED
bool "Enable cache reconciliation tracking"
depends on GATEWAY_CACHE_SUPPORTED && GATEWAY_CACHE_START_ENABLED
default y
help
Tracks outside DALI bus mutations as update-needed flags for resumable
reconciliation work.
config GATEWAY_CACHE_FULL_STATE_MIRROR
bool "Enable full DALI state mirror"
depends on GATEWAY_CACHE_RECONCILIATION_ENABLED
default n
help
Enables the heavier full bus-state mirror path for future reconciliation.
config GATEWAY_CACHE_FLUSH_INTERVAL_MS
int "Cache flush interval ms"
depends on GATEWAY_CACHE_SUPPORTED && GATEWAY_CACHE_START_ENABLED
range 100 600000
default 5000
help
Interval used to batch scene and group cache writes to flash.
choice GATEWAY_CACHE_CONFLICT_PRIORITY
prompt "Cache conflict priority default"
depends on GATEWAY_CACHE_RECONCILIATION_ENABLED
default GATEWAY_CACHE_OUTSIDE_BUS_FIRST
help
Default source of truth to use when future cache reconciliation detects
changes made on the DALI bus outside this gateway.
config GATEWAY_CACHE_OUTSIDE_BUS_FIRST
bool "Outside bus first"
config GATEWAY_CACHE_LOCAL_GATEWAY_FIRST
bool "Local gateway first"
endchoice
endmenu
config GATEWAY_ENABLE_DALI_BUS
bool "Legacy single local DALI bus switch"
default n
help
Legacy compatibility option retained for existing sdkconfig files. New code uses the
per-channel PHY selectors above.
config GATEWAY_DALI_BUS_ID
int "DALI bus id"
depends on GATEWAY_ENABLE_DALI_BUS
range 0 15
default 0
help
Logical DALI bus index used by the HAL queue set.
config GATEWAY_DALI_TX_PIN
int "DALI TX pin"
depends on GATEWAY_ENABLE_DALI_BUS
range 0 48
default 18
help
ESP32-S3 GPIO used for the DALI transmit pin.
config GATEWAY_DALI_RX_PIN
int "DALI RX pin"
depends on GATEWAY_ENABLE_DALI_BUS
range 0 48
default 8
help
ESP32-S3 GPIO used for the DALI receive pin.
config GATEWAY_DALI_BAUDRATE
int "DALI baudrate"
depends on GATEWAY_ENABLE_DALI_BUS
range 400 2400
default 1200
help
Runtime baudrate used when initializing the local DALI bus.
menu "Gateway Startup Services"
config GATEWAY_BLE_SUPPORTED
bool "BLE gateway transport is supported"
default y
help
Builds and starts the BLE gateway bridge. Runtime BLE enable state is controlled separately.
config GATEWAY_START_BLE_ENABLED
bool "Enable BLE at startup"
depends on GATEWAY_BLE_SUPPORTED
default y
help
Default runtime BLE state when no persisted BLE setting exists. Lua gateway behavior starts BLE by default.
config GATEWAY_WIFI_SUPPORTED
bool "Wi-Fi gateway transport is supported"
default y
help
Keeps Wi-Fi control, HTTP/UDP networking, setup AP, and ESP-NOW setup paths available.
config GATEWAY_START_WIFI_STA_ENABLED
bool "Start Wi-Fi STA at startup"
depends on GATEWAY_WIFI_SUPPORTED
default n
help
Connect to persisted Wi-Fi credentials at boot. Disabled by default so wireless stays off until commanded.
config GATEWAY_ESPNOW_SETUP_SUPPORTED
bool "ESP-NOW setup transport is supported"
depends on GATEWAY_WIFI_SUPPORTED
default y
help
Enables ESP-NOW setup ingress when setup AP mode is entered.
config GATEWAY_SMARTCONFIG_SUPPORTED
bool "ESP-Touch smartconfig provisioning is supported"
depends on GATEWAY_WIFI_SUPPORTED
default y
help
Enables Lua-compatible ESP-Touch smartconfig provisioning for Wi-Fi credentials.
config GATEWAY_START_ESPNOW_SETUP_ENABLED
bool "Enter ESP-NOW setup mode at startup"
depends on GATEWAY_ESPNOW_SETUP_SUPPORTED
default n
help
Starts the setup AP and ESP-NOW setup ingress immediately at boot. Disabled by default.
config GATEWAY_START_SMARTCONFIG_ENABLED
bool "Start ESP-Touch smartconfig at startup"
depends on GATEWAY_SMARTCONFIG_SUPPORTED
default n
help
Starts ESP-Touch provisioning at boot. Disabled by default so Wi-Fi stays off unless configured.
config GATEWAY_SMARTCONFIG_TIMEOUT_SEC
int "ESP-Touch smartconfig timeout seconds"
depends on GATEWAY_SMARTCONFIG_SUPPORTED
range 15 255
default 60
help
Timeout passed to ESP-IDF smartconfig before provisioning restarts internally.
config GATEWAY_ETHERNET_SUPPORTED
bool "Wired Ethernet gateway transport is supported"
default y
select ETH_USE_SPI_ETHERNET
select ETH_SPI_ETHERNET_W5500
help
Enables the ESP-IDF Ethernet driver path for wired gateway networking. The
native gateway currently provisions a W5500 SPI Ethernet controller and
exposes the same HTTP, UDP, KNXnet/IP, BACnet/IP, Modbus TCP, and cloud
services over the wired netif.
config GATEWAY_START_ETHERNET_ENABLED
bool "Start wired Ethernet at startup"
depends on GATEWAY_ETHERNET_SUPPORTED
default y
help
Starts the configured W5500 Ethernet netif during boot and uses DHCP for
address assignment. Disable this when the board is built without Ethernet
hardware even though the firmware keeps Ethernet support compiled in.
config GATEWAY_ETHERNET_IGNORE_INIT_FAILURE
bool "Ignore wired Ethernet init failures"
depends on GATEWAY_START_ETHERNET_ENABLED
default y
help
Continues booting if the W5500 Ethernet controller is missing, held in
reset, miswired, or otherwise fails ESP-IDF Ethernet driver startup.
Disable this for strict hardware bring-up where Ethernet failure should
abort application startup.
menu "Gateway Wired Ethernet"
depends on GATEWAY_ETHERNET_SUPPORTED
config GATEWAY_ETHERNET_W5500_SPI_HOST
int "W5500 SPI host number"
range 1 2
default 1
help
SPI host used for the W5500 Ethernet controller. On ESP32-S3, host 1 maps
to SPI2 and host 2 maps to SPI3; do not use host 0 because it is reserved
by flash/PSRAM.
config GATEWAY_ETHERNET_W5500_SCLK_GPIO
int "W5500 SPI SCLK GPIO"
range 0 48
default 14
config GATEWAY_ETHERNET_W5500_MOSI_GPIO
int "W5500 SPI MOSI GPIO"
range 0 48
default 13
config GATEWAY_ETHERNET_W5500_MISO_GPIO
int "W5500 SPI MISO GPIO"
range 0 48
default 12
config GATEWAY_ETHERNET_W5500_CS_GPIO
int "W5500 SPI CS GPIO"
range 0 48
default 15
config GATEWAY_ETHERNET_W5500_INT_GPIO
int "W5500 interrupt GPIO"
range -1 48
default 4
help
W5500 interrupt pin. Set to -1 to disable interrupt mode and poll RX
status periodically.
config GATEWAY_ETHERNET_W5500_POLL_PERIOD_MS
int "W5500 polling period ms"
range 0 1000
default 0
help
Polling interval used when the W5500 interrupt pin is disabled. A value of
0 keeps interrupt mode when an interrupt GPIO is configured; if the
interrupt GPIO is -1, the gateway falls back to 100 ms polling.
config GATEWAY_ETHERNET_W5500_CLOCK_MHZ
int "W5500 SPI clock MHz"
range 5 80
default 36
config GATEWAY_ETHERNET_PHY_RESET_GPIO
int "Ethernet PHY reset GPIO"
range -1 48
default 5
help
GPIO used to reset the W5500 PHY. Set to -1 to disable hardware reset.
config GATEWAY_ETHERNET_PHY_ADDR
int "Ethernet PHY address"
range 0 31
default 1
config GATEWAY_ETHERNET_RX_TASK_STACK_SIZE
int "Ethernet RX task stack bytes"
range 2048 8192
default 3072
endmenu
config GATEWAY_BRIDGE_SUPPORTED
bool "dali_cpp bridge runtime is supported"
default y
help
Enables per-channel dali_cpp bridge model provisioning, execution, and protocol adapter state.
config GATEWAY_MODBUS_BRIDGE_SUPPORTED
bool "Modbus bridge is supported"
depends on GATEWAY_BRIDGE_SUPPORTED
default y
help
Enables the gateway-owned per-channel Modbus TCP, RTU, or ASCII server,
generated DALI point map, and provisioned model overrides.
config GATEWAY_START_MODBUS_BRIDGE_ENABLED
bool "Start Modbus bridge at startup"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED
default n
help
Starts the configured or Kconfig-default Modbus listener at boot. Disabled
by default so ports are opened only after provisioning or explicit runtime start.
choice GATEWAY_MODBUS_DEFAULT_TRANSPORT
prompt "Default Modbus transport"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED
default GATEWAY_MODBUS_DEFAULT_TRANSPORT_TCP
help
Selects the default Modbus transport used before runtime bridge config is saved.
config GATEWAY_MODBUS_DEFAULT_TRANSPORT_TCP
bool "TCP server"
depends on GATEWAY_WIFI_SUPPORTED || GATEWAY_ETHERNET_SUPPORTED
config GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU
bool "RTU server on UART"
config GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII
bool "ASCII server on UART"
endchoice
config GATEWAY_MODBUS_TCP_PORT
int "Default Modbus TCP port"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && GATEWAY_MODBUS_DEFAULT_TRANSPORT_TCP
range 1 65535
default 1502
config GATEWAY_MODBUS_UNIT_ID
int "Default Modbus unit id"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED
range 0 247
default 1
help
Unit id used by the default Modbus server. A value of 0 keeps the existing
gateway wildcard behavior for incoming requests.
config GATEWAY_MODBUS_SERIAL_UART_PORT
int "Default Modbus serial UART port"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && (GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU || GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII)
range 0 2
default 1
config GATEWAY_MODBUS_ALLOW_UART0
bool "Allow Modbus/setup to claim UART0"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && (GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU || GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII)
default n
help
UART0 is normally reserved for the ESP-IDF console. Enable only when the
console has been moved away from UART0 or the deployment intentionally
repurposes it.
config GATEWAY_MODBUS_SERIAL_TX_PIN
int "Default Modbus serial TX pin"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && (GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU || GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII)
range -1 48
default -1
config GATEWAY_MODBUS_SERIAL_RX_PIN
int "Default Modbus serial RX pin"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && (GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU || GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII)
range -1 48
default -1
config GATEWAY_MODBUS_SERIAL_BAUDRATE
int "Default Modbus serial baudrate"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && (GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU || GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII)
range 1200 921600
default 9600
config GATEWAY_MODBUS_SERIAL_RESPONSE_TIMEOUT_MS
int "Default Modbus serial response timeout ms"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && (GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU || GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII)
range 1 1000
default 20
config GATEWAY_MODBUS_SERIAL_RS485_ENABLED
bool "Enable Modbus RS485 half-duplex mode"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED && (GATEWAY_MODBUS_DEFAULT_TRANSPORT_RTU || GATEWAY_MODBUS_DEFAULT_TRANSPORT_ASCII)
default n
config GATEWAY_MODBUS_SERIAL_RS485_DE_PIN
int "Default Modbus RS485 DE/RTS pin"
depends on GATEWAY_MODBUS_SERIAL_RS485_ENABLED
range -1 48
default -1
config GATEWAY_BACNET_BRIDGE_SUPPORTED
bool "BACnet/IP bridge is supported"
depends on GATEWAY_BRIDGE_SUPPORTED && (GATEWAY_WIFI_SUPPORTED || GATEWAY_ETHERNET_SUPPORTED)
default n
help
Enables BACnet bridge configuration, binding discovery, and the bacnet-stack BACnet/IP server adapter.
Disable this option for smaller flash builds that do not need BACnet/IP.
config GATEWAY_START_BACNET_BRIDGE_ENABLED
bool "Start BACnet/IP bridge at startup"
depends on GATEWAY_BACNET_BRIDGE_SUPPORTED
default n
help
Starts configured BACnet/IP object bindings at boot. Disabled by default so the UDP BACnet/IP port is opened only after provisioning or explicit runtime start.
config GATEWAY_KNX_BRIDGE_SUPPORTED
bool "KNX to DALI bridge is supported"
depends on GATEWAY_BRIDGE_SUPPORTED && (GATEWAY_WIFI_SUPPORTED || GATEWAY_ETHERNET_SUPPORTED)
default n
help
Enables the gateway-owned KNX group-address router and KNXnet/IP TP/IP
router. Group addresses use the configured main group, middle groups as
DALI data types, and subgroups matching DALI short address structure.
config GATEWAY_START_KNX_BRIDGE_ENABLED
bool "Start KNX/IP bridge at startup"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
default n
help
Starts the KNXnet/IP tunneling/multicast listener at boot. Disabled by
default so UDP port 3671 is opened only after provisioning or explicit start.
config GATEWAY_KNX_DATA_SECURE_SUPPORTED
bool "Enable KNX Data Secure support"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
default n
help
Compiles the OpenKNX SecurityInterfaceObject and SecureApplicationLayer
into the ETS runtime. This is the application-layer security path used
for secure KNX group-object and ETS tool traffic.
config GATEWAY_KNX_IP_SECURE_SUPPORTED
bool "Enable KNXnet/IP Secure support"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
default n
help
Builds gateway support for KNXnet/IP Secure tunneling and routing. The
secure session transport is implemented by the gateway-owned KNX/IP
router and is separate from KNX Data Secure APDU handling.
config GATEWAY_KNX_SECURITY_DEV_ENDPOINTS
bool "Enable KNX security development HTTP endpoints"
depends on GATEWAY_KNX_DATA_SECURE_SUPPORTED || GATEWAY_KNX_IP_SECURE_SUPPORTED
default n
help
Exposes development-only HTTP actions for reading, writing, generating,
and resetting KNX security material. Disable this for production builds.
config GATEWAY_KNX_SECURITY_PLAIN_NVS
bool "Store KNX security material in plain NVS"
depends on GATEWAY_KNX_DATA_SECURE_SUPPORTED || GATEWAY_KNX_IP_SECURE_SUPPORTED
default y
help
Stores development KNX security material in normal NVS. This is useful
during bring-up, but production builds should replace it with encrypted
NVS, flash encryption, and secure boot before exposing real keys.
config GATEWAY_KNX_MAIN_GROUP
int "KNX DALI main group"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range 0 31
default 0
help
Main group used by the built-in KNX to DALI router. Middle groups select
the data type and subgroups select broadcast, short-address, or group targets.
config GATEWAY_KNX_TUNNEL_ENABLED
bool "Enable KNXnet/IP tunneling mode"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
default y
config GATEWAY_KNX_MULTICAST_ENABLED
bool "Enable KNXnet/IP multicast routing mode"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
default y
config GATEWAY_KNX_UDP_PORT
int "KNXnet/IP UDP port"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range 1 65535
default 3671
config GATEWAY_KNX_MULTICAST_ADDRESS
string "KNXnet/IP multicast address"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED && GATEWAY_KNX_MULTICAST_ENABLED
default "224.0.23.12"
config GATEWAY_KNX_INDIVIDUAL_ADDRESS
int "KNX individual address raw value"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range 0 65535
default 4353
help
Raw 16-bit individual address advertised to KNXnet/IP tunnel clients.
The default 4353 is 1.1.1.
config GATEWAY_KNX_TP_UART_PORT
int "KNX TP UART port"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range 0 2
default 1
config GATEWAY_KNX_TP_TX_PIN
int "KNX TP UART TX pin"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range -1 48
default -1
config GATEWAY_KNX_TP_RX_PIN
int "KNX TP UART RX pin"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range -1 48
default -1
config GATEWAY_KNX_TP_BAUDRATE
int "KNX TP UART baudrate"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range 1200 921600
default 19200
config GATEWAY_BRIDGE_KNX_TASK_STACK_SIZE
int "KNX/IP bridge task stack bytes"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range 6144 24576
default 8192
config GATEWAY_BRIDGE_KNX_TASK_PRIORITY
int "KNX/IP bridge task priority"
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
range 1 10
default 5
config GATEWAY_CLOUD_BRIDGE_SUPPORTED
bool "MQTT cloud bridge is supported"
depends on GATEWAY_BRIDGE_SUPPORTED && (GATEWAY_WIFI_SUPPORTED || GATEWAY_ETHERNET_SUPPORTED)
default y
help
Enables per-channel DaliCloudBridge provisioning and MQTT downlink execution.
config GATEWAY_START_CLOUD_BRIDGE_ENABLED
bool "Start MQTT cloud bridge at startup"
depends on GATEWAY_CLOUD_BRIDGE_SUPPORTED
default n
help
Starts configured MQTT cloud bridges at boot when broker URI and device id are present.
config GATEWAY_BRIDGE_MODBUS_TASK_STACK_SIZE
int "Modbus bridge task stack bytes"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED
range 4096 16384
default 6144
config GATEWAY_BRIDGE_MODBUS_TASK_PRIORITY
int "Modbus bridge task priority"
depends on GATEWAY_MODBUS_BRIDGE_SUPPORTED
range 1 10
default 4
config GATEWAY_BRIDGE_BACNET_TASK_STACK_SIZE
int "BACnet/IP bridge task stack bytes"
depends on GATEWAY_BACNET_BRIDGE_SUPPORTED
range 6144 24576
default 8192
config GATEWAY_BRIDGE_BACNET_TASK_PRIORITY
int "BACnet/IP bridge task priority"
depends on GATEWAY_BACNET_BRIDGE_SUPPORTED
range 1 10
default 5
choice GATEWAY_USB_STARTUP_MODE
prompt "USB Serial/JTAG startup mode"
default GATEWAY_USB_STARTUP_DEBUG_JTAG
help
Select whether the built-in USB Serial/JTAG interface remains available for debug or is claimed by the setup bridge.
config GATEWAY_USB_STARTUP_DEBUG_JTAG
bool "USB Serial/JTAG debug interface"
config GATEWAY_USB_STARTUP_SETUP_SERIAL
bool "USB Serial/JTAG setup bridge"
endchoice
config GATEWAY_USB_SETUP_CHANNEL_INDEX
int "USB setup DALI channel index"
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
range 0 1
default 0
help
Native zero-based DALI channel used for short raw USB setup frames on the single USB stream.
config GATEWAY_USB_SETUP_RX_BUFFER
int "USB setup RX buffer bytes"
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
range 64 4096
default 256
config GATEWAY_USB_SETUP_TX_BUFFER
int "USB setup TX buffer bytes"
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
range 64 4096
default 256
config GATEWAY_USB_SETUP_READ_TIMEOUT_MS
int "USB setup read timeout ms"
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
range 1 1000
default 20
config GATEWAY_485_CONTROL_ENABLED
bool "Enable UART0 Lua control bridge"
default n
help
Claims UART0 for the Lua-compatible framed gateway control channel at boot.
This requires moving the ESP-IDF console away from UART0 and prevents Modbus
serial from using UART0 at runtime.
config GATEWAY_485_CONTROL_BAUDRATE
int "UART0 control baudrate"
depends on GATEWAY_485_CONTROL_ENABLED
range 1200 921600
default 9600
config GATEWAY_485_CONTROL_TX_PIN
int "UART0 control TX pin"
depends on GATEWAY_485_CONTROL_ENABLED
range -1 48
default -1
help
Leave at -1 to keep the current UART0 TX routing.
config GATEWAY_485_CONTROL_RX_PIN
int "UART0 control RX pin"
depends on GATEWAY_485_CONTROL_ENABLED
range -1 48
default -1
help
Leave at -1 to keep the current UART0 RX routing.
config GATEWAY_485_CONTROL_RX_BUFFER
int "UART0 control RX buffer bytes"
depends on GATEWAY_485_CONTROL_ENABLED
range 64 4096
default 256
config GATEWAY_485_CONTROL_TX_BUFFER
int "UART0 control TX buffer bytes"
depends on GATEWAY_485_CONTROL_ENABLED
range 64 4096
default 256
config GATEWAY_485_CONTROL_READ_TIMEOUT_MS
int "UART0 control read timeout ms"
depends on GATEWAY_485_CONTROL_ENABLED
range 1 1000
default 20
config GATEWAY_485_CONTROL_WRITE_TIMEOUT_MS
int "UART0 control write timeout ms"
depends on GATEWAY_485_CONTROL_ENABLED
range 1 1000
default 20
config GATEWAY_485_CONTROL_TASK_STACK_SIZE
int "UART0 control task stack bytes"
depends on GATEWAY_485_CONTROL_ENABLED
range 2048 16384
default 4096
config GATEWAY_485_CONTROL_TASK_PRIORITY
int "UART0 control task priority"
depends on GATEWAY_485_CONTROL_ENABLED
range 1 10
default 4
endmenu
menu "Gateway Network Services"
config GATEWAY_NETWORK_HTTP_ENABLED
bool "Enable HTTP gateway API"
default y
help
Enables Lua-compatible HTTP gateway routes such as /info and /dali/cmd.
config GATEWAY_NETWORK_HTTP_PORT
int "HTTP API port"
depends on GATEWAY_NETWORK_HTTP_ENABLED
range 1 65535
default 80
config GATEWAY_NETWORK_UDP_ROUTER_ENABLED
bool "Enable UDP IP router"
default y
help
Enables raw gateway command ingress and notification replies on UDP port 2020 by default.
config GATEWAY_NETWORK_UDP_PORT
int "UDP IP router port"
depends on GATEWAY_NETWORK_UDP_ROUTER_ENABLED
range 1 65535
default 2020
config GATEWAY_STATUS_LED_GPIO
int "Status LED GPIO"
range -1 48
default -1
help
GPIO used by the HTTP /led/1 and /led/0 routes. Set to -1 to disable GPIO control.
config GATEWAY_STATUS_LED_ACTIVE_HIGH
bool "Status LED is active high"
depends on GATEWAY_STATUS_LED_GPIO >= 0
default y
config GATEWAY_BOOT_BUTTON_GPIO
int "BOOT button GPIO"
range -1 48
default 0
help
GPIO used for Lua-compatible setup entry and Wi-Fi credential clearing. Set to -1 to disable.
config GATEWAY_BOOT_BUTTON_ACTIVE_LOW
bool "BOOT button is active low"
depends on GATEWAY_BOOT_BUTTON_GPIO >= 0
default y
config GATEWAY_BOOT_BUTTON_LONG_PRESS_MS
int "BOOT button long press ms"
depends on GATEWAY_BOOT_BUTTON_GPIO >= 0
range 500 10000
default 3000
endmenu
endmenu