EspHome
This commit is contained in:
251
config/kc868-a6.yaml
Normal file
251
config/kc868-a6.yaml
Normal file
@@ -0,0 +1,251 @@
|
||||
esphome:
|
||||
name: ventilation
|
||||
friendly_name: Ventilation
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "/Tq+moXS9oIsH4e7/QMtww6zqAdP23DCzeTaM+6KxdM="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: "64c599445a6dddc9a3cfc44a1413086e"
|
||||
|
||||
wifi:
|
||||
ssid: 'SmartHome'
|
||||
password: ''
|
||||
use_address: 192.168.88.23
|
||||
|
||||
manual_ip:
|
||||
static_ip: 192.168.88.23
|
||||
gateway: 192.168.88.1
|
||||
subnet: 255.255.255.0
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
# ap:
|
||||
# ssid: "Kc868-A6 Fallback Hotspot"
|
||||
# password: "Eqh4eO1YIQUi"
|
||||
|
||||
uart:
|
||||
#RS485
|
||||
- id: uart_modbus
|
||||
tx_pin: GPIO27
|
||||
rx_pin: GPIO14
|
||||
baud_rate: 9600
|
||||
stop_bits: 1
|
||||
|
||||
|
||||
#RS2332
|
||||
- id: rs232
|
||||
tx_pin: GPIO17
|
||||
rx_pin: GPIO16
|
||||
baud_rate: 9600
|
||||
|
||||
spi:
|
||||
clk_pin: GPIO18
|
||||
mosi_pin: GPIO23
|
||||
miso_pin: GPIO19
|
||||
# cs pin: GPIO5
|
||||
|
||||
modbus:
|
||||
uart_id: uart_modbus
|
||||
id: modbus1
|
||||
|
||||
modbus_controller:
|
||||
- id: modbus_sensor
|
||||
address: 0x01 # device address
|
||||
modbus_id: modbus1
|
||||
update_interval: 2s
|
||||
|
||||
i2c:
|
||||
sda: GPIO4
|
||||
scl:
|
||||
number: GPIO15
|
||||
ignore_strapping_warning: true
|
||||
|
||||
pcf8574:
|
||||
- id: inputs
|
||||
address: 0x22
|
||||
- id: outputs
|
||||
address: 0x24
|
||||
|
||||
time:
|
||||
- platform: ds1307
|
||||
id: rtc_time
|
||||
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "KC868-A6-IN-1"
|
||||
pin:
|
||||
pcf8574: inputs
|
||||
number: 0
|
||||
mode: INPUT
|
||||
inverted: true
|
||||
on_press:
|
||||
- switch.toggle: switch_output1
|
||||
on_release:
|
||||
- switch.toggle: switch_output1
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-IN-2"
|
||||
pin:
|
||||
pcf8574: inputs
|
||||
number: 1
|
||||
mode: INPUT
|
||||
inverted: true
|
||||
on_press:
|
||||
- switch.toggle: switch_output2
|
||||
on_release:
|
||||
- switch.toggle: switch_output2
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-IN-3"
|
||||
pin:
|
||||
pcf8574: inputs
|
||||
number: 2
|
||||
mode: INPUT
|
||||
inverted: true
|
||||
on_press:
|
||||
- switch.toggle: switch_output3
|
||||
on_release:
|
||||
- switch.toggle: switch_output3
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-IN-4"
|
||||
pin:
|
||||
pcf8574: inputs
|
||||
number: 3
|
||||
mode: INPUT
|
||||
inverted: true
|
||||
on_press:
|
||||
- switch.toggle: switch_output4
|
||||
on_release:
|
||||
- switch.toggle: switch_output4
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-IN-5"
|
||||
pin:
|
||||
pcf8574: inputs
|
||||
number: 4
|
||||
mode: INPUT
|
||||
inverted: true
|
||||
on_press:
|
||||
- switch.toggle: switch_output5
|
||||
on_release:
|
||||
- switch.toggle: switch_output5
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-IN-6"
|
||||
pin:
|
||||
pcf8574: inputs
|
||||
number: 5
|
||||
mode: INPUT
|
||||
inverted: true
|
||||
on_press:
|
||||
- switch.toggle: switch_output6
|
||||
on_release:
|
||||
- switch.toggle: switch_output6
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "KC868-A6-RELAY-1"
|
||||
id: switch_output1
|
||||
pin:
|
||||
pcf8574: outputs
|
||||
number: 0
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-RELAY-2"
|
||||
id: switch_output2
|
||||
pin:
|
||||
pcf8574: outputs
|
||||
number: 1
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-RELAY-3"
|
||||
id: switch_output3
|
||||
pin:
|
||||
pcf8574: outputs
|
||||
number: 2
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-RELAY-4"
|
||||
id: switch_output4
|
||||
pin:
|
||||
pcf8574: outputs
|
||||
number: 3
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-RELAY-5"
|
||||
id: switch_output5
|
||||
pin:
|
||||
pcf8574: outputs
|
||||
number: 4
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "KC868-A6-RELAY-6"
|
||||
id: switch_output6
|
||||
pin:
|
||||
pcf8574: outputs
|
||||
number: 5
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
sensor:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_sensor
|
||||
name: "Temperature SHT30"
|
||||
id: temperature_sensor
|
||||
address: 0x0000
|
||||
register_type: holding
|
||||
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: "Humidity_SHT30"
|
||||
id: humidity_sensor
|
||||
address: 0x0001
|
||||
register_type: holding
|
||||
value_type: U_WORD
|
||||
unit_of_measurement: "%"
|
||||
accuracy_decimals: 1
|
||||
filters:
|
||||
- multiply: 0.1
|
||||
|
||||
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
auth:
|
||||
username: "silver"
|
||||
password: "cbvgcjy0"
|
||||
|
||||
mqtt:
|
||||
broker: 192.168.88.4
|
||||
username: 'miroca'
|
||||
password: 'cbvgcjy0'
|
||||
discovery: False # disable entity discovery
|
||||
discover_ip: True # enable device discovery
|
||||
Reference in New Issue
Block a user