This commit is contained in:
Victor Alexandrovich Tsyrenschikov
2025-08-19 00:12:47 +05:00
parent 95f9370302
commit 2baf2f209c
12 changed files with 110 additions and 1043 deletions

View File

@@ -1,114 +0,0 @@
esphome:
name: test-kc868-a16
friendly_name: Test-KC868-A16
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "D/MuChEBR8XVbCR8SpQIml+bxj3Huh5tKlwLpZ1QqeU="
ota:
- platform: esphome
password: "df5a4ea7cc6a8b628f781e27751c43cf"
# ethernet:
# type: LAN8720
# mdc_pin: GPIO23
# mdio_pin: GPIO18
# clk_mode: GPIO17_OUT
# phy_addr: 0
# use_address: 192.168.88.25
wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
ssid: "SmartHome"
password: ""
use_address: 192.168.88.172
manual_ip:
static_ip: 192.168.88.172
gateway: 192.168.88.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
# ap:
# ssid: "Kc868-A16 Fallback Hotspot"
# password: "gCJlyJ5kec3y"
uart:
- id: uart_modbus
tx_pin: GPIO13
rx_pin: GPIO16
baud_rate: 9600
remote_receiver:
pin:
number: GPIO2
ignore_strapping_warning: true
remote_transmitter:
pin:
number: GPIO15
ignore_strapping_warning: true
carrier_duty_percent: 100%
i2c:
sda: GPIO4
scl:
number: GPIO5
ignore_strapping_warning: true
# Config Modbus
modbus:
uart_id: uart_modbus
id: modbus1
modbus_controller:
- id: modbus_sensor
address: 0x01 # device address
modbus_id: modbus1
update_interval: 10s
sensor:
- platform: modbus_controller
modbus_controller_id: modbus_sensor
name: "RS485 Temperature Sensor"
id: temperature_sensor
address: 0x0001
register_type: read
value_type: U_WORD
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1;
- platform: modbus_controller
modbus_controller_id: modbus_sensor
name: "RS485 Humidity Sensor"
id: humidity_sensor
address: 0x0002
register_type: read
value_type: U_WORD
unit_of_measurement: "%"
accuracy_decimals: 1
filters:
- multiply: 0.1
web_server:
port: 80
auth:
username: "silver"
password: "cbvgcjy0"