mirror of
https://github.com/esphome/esphome.git
synced 2025-10-12 06:43:48 +01:00
add modbus
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
modbus:
|
||||
flow_control_pin: ${flow_control_pin}
|
||||
|
||||
sensor:
|
||||
- platform: growatt_solar
|
||||
modbus_id: modbus_bus
|
||||
update_interval: 10s
|
||||
protocol_version: RTU
|
||||
inverter_status:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
substitutions:
|
||||
flow_control_pin: GPIO3
|
||||
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
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO13
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO15
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO3
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,8 +1,6 @@
|
||||
modbus:
|
||||
flow_control_pin: ${flow_control_pin}
|
||||
|
||||
sensor:
|
||||
- platform: havells_solar
|
||||
modbus_id: modbus_bus
|
||||
update_interval: 60s
|
||||
phase_a:
|
||||
voltage:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
substitutions:
|
||||
flow_control_pin: GPIO3
|
||||
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
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO13
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO15
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO3
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,8 +1,6 @@
|
||||
modbus:
|
||||
flow_control_pin: ${flow_control_pin}
|
||||
|
||||
sensor:
|
||||
- platform: kuntze
|
||||
modbus_id: modbus_bus
|
||||
ph:
|
||||
name: Kuntze pH
|
||||
temperature:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
substitutions:
|
||||
flow_control_pin: GPIO3
|
||||
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
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO13
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO15
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -4,6 +4,6 @@ substitutions:
|
||||
flow_control_pin: GPIO3
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,12 +3,9 @@ esphome:
|
||||
then:
|
||||
- pzemac.reset_energy: pzemac1
|
||||
|
||||
modbus:
|
||||
- id: pzemac_modbus
|
||||
|
||||
sensor:
|
||||
- platform: pzemac
|
||||
modbus_id: pzemac_modbus
|
||||
modbus_id: modbus_bus
|
||||
id: pzemac1
|
||||
voltage:
|
||||
name: PZEMAC Voltage
|
||||
|
@@ -1,5 +1,5 @@
|
||||
substitutions:
|
||||
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
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO5
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO2
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO5
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,12 +3,9 @@ esphome:
|
||||
then:
|
||||
- pzemdc.reset_energy: pzemdc1
|
||||
|
||||
modbus:
|
||||
- id: pzemdc_modbus
|
||||
|
||||
sensor:
|
||||
- platform: pzemdc
|
||||
modbus_id: pzemdc_modbus
|
||||
modbus_id: modbus_bus
|
||||
id: pzemdc1
|
||||
voltage:
|
||||
name: PZEMDC Voltage
|
||||
|
@@ -1,5 +1,5 @@
|
||||
substitutions:
|
||||
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
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO5
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO2
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO5
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -1,5 +1,6 @@
|
||||
sensor:
|
||||
- platform: sdm_meter
|
||||
modbus_id: modbus_bus
|
||||
phase_a:
|
||||
current:
|
||||
name: Phase A Current
|
||||
|
@@ -1,5 +1,5 @@
|
||||
substitutions:
|
||||
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
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO5
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp32-idf.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO2
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@@ -3,6 +3,6 @@ substitutions:
|
||||
rx_pin: GPIO5
|
||||
|
||||
packages:
|
||||
uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml
|
||||
modbus: !include ../../test_build_components/common/modbus/rp2040-ard.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