mirror of
https://github.com/esphome/esphome.git
synced 2025-10-12 14:53:49 +01:00
add modbus
This commit is contained in:
@@ -40,6 +40,14 @@ from esphome.config_helpers import Extend, Remove
|
|||||||
# Path to common bus configs
|
# Path to common bus configs
|
||||||
COMMON_BUS_PATH = Path("tests/test_build_components/common")
|
COMMON_BUS_PATH = Path("tests/test_build_components/common")
|
||||||
|
|
||||||
|
# Package dependencies - maps packages to the packages they include
|
||||||
|
# When a component uses a package on the left, it automatically gets
|
||||||
|
# the packages on the right as well
|
||||||
|
PACKAGE_DEPENDENCIES = {
|
||||||
|
"modbus": ["uart"], # modbus packages include uart packages
|
||||||
|
# Add more package dependencies here as needed
|
||||||
|
}
|
||||||
|
|
||||||
# Components that must be tested in isolation (not grouped or batched with others)
|
# Components that must be tested in isolation (not grouped or batched with others)
|
||||||
# These have known build issues that prevent grouping
|
# These have known build issues that prevent grouping
|
||||||
# NOTE: This should be kept in sync with both test_build_components and split_components_for_ci.py
|
# NOTE: This should be kept in sync with both test_build_components and split_components_for_ci.py
|
||||||
@@ -208,6 +216,11 @@ def analyze_yaml_file(yaml_file: Path) -> dict[str, Any]:
|
|||||||
for pkg_name in packages:
|
for pkg_name in packages:
|
||||||
if pkg_name in valid_buses:
|
if pkg_name in valid_buses:
|
||||||
result["buses"].add(pkg_name)
|
result["buses"].add(pkg_name)
|
||||||
|
# Add any package dependencies (e.g., modbus includes uart)
|
||||||
|
if pkg_name in PACKAGE_DEPENDENCIES:
|
||||||
|
for dep in PACKAGE_DEPENDENCIES[pkg_name]:
|
||||||
|
if dep in valid_buses:
|
||||||
|
result["buses"].add(dep)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ sys.path.insert(0, str(Path(__file__).parent.parent))
|
|||||||
|
|
||||||
from esphome import yaml_util
|
from esphome import yaml_util
|
||||||
from esphome.config_helpers import merge_config
|
from esphome.config_helpers import merge_config
|
||||||
from script.analyze_component_buses import get_common_bus_packages
|
from script.analyze_component_buses import PACKAGE_DEPENDENCIES, get_common_bus_packages
|
||||||
|
|
||||||
|
|
||||||
def load_yaml_file(yaml_file: Path) -> dict:
|
def load_yaml_file(yaml_file: Path) -> dict:
|
||||||
@@ -68,6 +68,13 @@ def extract_packages_from_yaml(data: dict) -> dict[str, str]:
|
|||||||
# Only include common bus packages, ignore component-specific ones
|
# Only include common bus packages, ignore component-specific ones
|
||||||
if name in common_bus_packages:
|
if name in common_bus_packages:
|
||||||
packages[name] = str(value)
|
packages[name] = str(value)
|
||||||
|
# Also track package dependencies (e.g., modbus includes uart)
|
||||||
|
# This ensures components using modbus are grouped with uart
|
||||||
|
if name in PACKAGE_DEPENDENCIES:
|
||||||
|
for dep in PACKAGE_DEPENDENCIES[name]:
|
||||||
|
if dep in common_bus_packages:
|
||||||
|
# Mark as included via dependency
|
||||||
|
packages[f"_dep_{dep}"] = f"(included via {name})"
|
||||||
|
|
||||||
return packages
|
return packages
|
||||||
|
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
modbus:
|
|
||||||
flow_control_pin: ${flow_control_pin}
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: growatt_solar
|
- platform: growatt_solar
|
||||||
|
modbus_id: modbus_bus
|
||||||
update_interval: 10s
|
update_interval: 10s
|
||||||
protocol_version: RTU
|
protocol_version: RTU
|
||||||
inverter_status:
|
inverter_status:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
substitutions:
|
substitutions:
|
||||||
flow_control_pin: GPIO3
|
flow_control_pin: GPIO3
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO13
|
flow_control_pin: GPIO13
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO15
|
flow_control_pin: GPIO15
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO3
|
flow_control_pin: GPIO3
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
modbus:
|
|
||||||
flow_control_pin: ${flow_control_pin}
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: havells_solar
|
- platform: havells_solar
|
||||||
|
modbus_id: modbus_bus
|
||||||
update_interval: 60s
|
update_interval: 60s
|
||||||
phase_a:
|
phase_a:
|
||||||
voltage:
|
voltage:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
substitutions:
|
substitutions:
|
||||||
flow_control_pin: GPIO3
|
flow_control_pin: GPIO3
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO13
|
flow_control_pin: GPIO13
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO15
|
flow_control_pin: GPIO15
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO3
|
flow_control_pin: GPIO3
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
modbus:
|
|
||||||
flow_control_pin: ${flow_control_pin}
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: kuntze
|
- platform: kuntze
|
||||||
|
modbus_id: modbus_bus
|
||||||
ph:
|
ph:
|
||||||
name: Kuntze pH
|
name: Kuntze pH
|
||||||
temperature:
|
temperature:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
substitutions:
|
substitutions:
|
||||||
flow_control_pin: GPIO3
|
flow_control_pin: GPIO3
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO13
|
flow_control_pin: GPIO13
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO15
|
flow_control_pin: GPIO15
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -4,6 +4,6 @@ substitutions:
|
|||||||
flow_control_pin: GPIO3
|
flow_control_pin: GPIO3
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,12 +3,9 @@ esphome:
|
|||||||
then:
|
then:
|
||||||
- pzemac.reset_energy: pzemac1
|
- pzemac.reset_energy: pzemac1
|
||||||
|
|
||||||
modbus:
|
|
||||||
- id: pzemac_modbus
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: pzemac
|
- platform: pzemac
|
||||||
modbus_id: pzemac_modbus
|
modbus_id: modbus_bus
|
||||||
id: pzemac1
|
id: pzemac1
|
||||||
voltage:
|
voltage:
|
||||||
name: PZEMAC Voltage
|
name: PZEMAC Voltage
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
substitutions:
|
substitutions:
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO2
|
rx_pin: GPIO2
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,12 +3,9 @@ esphome:
|
|||||||
then:
|
then:
|
||||||
- pzemdc.reset_energy: pzemdc1
|
- pzemdc.reset_energy: pzemdc1
|
||||||
|
|
||||||
modbus:
|
|
||||||
- id: pzemdc_modbus
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: pzemdc
|
- platform: pzemdc
|
||||||
modbus_id: pzemdc_modbus
|
modbus_id: modbus_bus
|
||||||
id: pzemdc1
|
id: pzemdc1
|
||||||
voltage:
|
voltage:
|
||||||
name: PZEMDC Voltage
|
name: PZEMDC Voltage
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
substitutions:
|
substitutions:
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO2
|
rx_pin: GPIO2
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
sensor:
|
sensor:
|
||||||
- platform: sdm_meter
|
- platform: sdm_meter
|
||||||
|
modbus_id: modbus_bus
|
||||||
phase_a:
|
phase_a:
|
||||||
current:
|
current:
|
||||||
name: Phase A Current
|
name: Phase A Current
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
substitutions:
|
substitutions:
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO2
|
rx_pin: GPIO2
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
@@ -3,6 +3,6 @@ substitutions:
|
|||||||
rx_pin: GPIO5
|
rx_pin: GPIO5
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||||
|
|
||||||
<<: !include common.yaml
|
<<: !include common.yaml
|
||||||
|
12
tests/test_build_components/common/modbus/bk72xx-ard.yaml
Normal file
12
tests/test_build_components/common/modbus/bk72xx-ard.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for BK72XX Arduino tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/bk72xx-ard.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: P6
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp32-ard.yaml
Normal file
12
tests/test_build_components/common/modbus/esp32-ard.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP32 Arduino tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-ard.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp32-c3-ard.yaml
Normal file
12
tests/test_build_components/common/modbus/esp32-c3-ard.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP32-C3 Arduino tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-c3-ard.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp32-c3-idf.yaml
Normal file
12
tests/test_build_components/common/modbus/esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP32-C3 IDF tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-c3-idf.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
13
tests/test_build_components/common/modbus/esp32-idf.yaml
Normal file
13
tests/test_build_components/common/modbus/esp32-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Common Modbus configuration for ESP32 IDF tests
|
||||||
|
# Provides a shared Modbus bus that all components can use
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-idf.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp32-s2-ard.yaml
Normal file
12
tests/test_build_components/common/modbus/esp32-s2-ard.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP32-S2 Arduino tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-s2-ard.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp32-s2-idf.yaml
Normal file
12
tests/test_build_components/common/modbus/esp32-s2-idf.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP32-S2 IDF tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-s2-idf.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp32-s3-ard.yaml
Normal file
12
tests/test_build_components/common/modbus/esp32-s3-ard.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP32-S3 Arduino tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-s3-ard.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp32-s3-idf.yaml
Normal file
12
tests/test_build_components/common/modbus/esp32-s3-idf.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP32-S3 IDF tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp32-s3-idf.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO4
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/esp8266-ard.yaml
Normal file
12
tests/test_build_components/common/modbus/esp8266-ard.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for ESP8266 Arduino tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/esp8266-ard.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO5
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
12
tests/test_build_components/common/modbus/rp2040-ard.yaml
Normal file
12
tests/test_build_components/common/modbus/rp2040-ard.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common Modbus configuration for RP2040 Arduino tests
|
||||||
|
|
||||||
|
packages:
|
||||||
|
uart: !include ../uart/rp2040-ard.yaml
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
flow_control_pin: GPIO2
|
||||||
|
|
||||||
|
modbus:
|
||||||
|
- id: modbus_bus
|
||||||
|
uart_id: uart_bus
|
||||||
|
flow_control_pin: ${flow_control_pin}
|
Reference in New Issue
Block a user