Esphome
This commit is contained in:
@@ -1,9 +1,15 @@
|
|||||||
esphome:
|
esphome:
|
||||||
name: co2-podval
|
name: gas-reserv
|
||||||
friendly_name: CO2_Podval
|
friendly_name: Gas_Reserv
|
||||||
|
|
||||||
esp8266:
|
esp8266:
|
||||||
board: esp01_1m
|
board: nodemcuv2
|
||||||
|
framework:
|
||||||
|
version: recommended
|
||||||
|
|
||||||
|
one_wire:
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO14
|
||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
logger:
|
logger:
|
||||||
@@ -20,12 +26,6 @@ ota:
|
|||||||
wifi:
|
wifi:
|
||||||
ssid: "SmartHome"
|
ssid: "SmartHome"
|
||||||
password: ""
|
password: ""
|
||||||
# networks:
|
|
||||||
# ssid: "SmartHome"
|
|
||||||
# password: ""
|
|
||||||
# bssid: 78:9A:18:88:E0:79
|
|
||||||
# channel: 1
|
|
||||||
power_save_mode: none
|
|
||||||
|
|
||||||
|
|
||||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
|||||||
@@ -24,13 +24,6 @@ ota:
|
|||||||
wifi:
|
wifi:
|
||||||
ssid: "SmartHome"
|
ssid: "SmartHome"
|
||||||
password: ""
|
password: ""
|
||||||
# networks:
|
|
||||||
# ssid: "SmartHome"
|
|
||||||
# password: ""
|
|
||||||
# bssid: 78:9A:18:88:E0:79
|
|
||||||
# channel: 1
|
|
||||||
power_save_mode: none
|
|
||||||
|
|
||||||
|
|
||||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
ap:
|
ap:
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ uart:
|
|||||||
tx_pin: GPIO27
|
tx_pin: GPIO27
|
||||||
rx_pin: GPIO14
|
rx_pin: GPIO14
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
stop_bits: 1
|
# stop_bits: 1
|
||||||
|
|
||||||
|
|
||||||
#RS2332
|
#RS2332
|
||||||
@@ -211,12 +211,33 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
|
- platform: ina219
|
||||||
|
address: 0x40
|
||||||
|
shunt_resistance: 0.1 ohm
|
||||||
|
current:
|
||||||
|
name: "INA219 Current"
|
||||||
|
unit_of_measurement: "A"
|
||||||
|
power:
|
||||||
|
name: "INA219 Power"
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
filters:
|
||||||
|
- multiply: 10
|
||||||
|
bus_voltage:
|
||||||
|
name: "INA219 Bus Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
shunt_voltage:
|
||||||
|
name: "INA219 Shunt Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
max_voltage: 32.0V
|
||||||
|
max_current: 3.2A
|
||||||
|
update_interval: 1s
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
modbus_controller_id: modbus_sensor
|
modbus_controller_id: modbus_sensor
|
||||||
name: "Temperature SHT30"
|
name: "Temperature SHT30"
|
||||||
id: temperature_sensor
|
id: temperature_sensor
|
||||||
address: 0x0000
|
address: 0x0001
|
||||||
register_type: holding
|
register_type: read
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
unit_of_measurement: "°C"
|
unit_of_measurement: "°C"
|
||||||
accuracy_decimals: 1
|
accuracy_decimals: 1
|
||||||
@@ -227,8 +248,8 @@ sensor:
|
|||||||
modbus_controller_id: modbus_sensor
|
modbus_controller_id: modbus_sensor
|
||||||
name: "Humidity_SHT30"
|
name: "Humidity_SHT30"
|
||||||
id: humidity_sensor
|
id: humidity_sensor
|
||||||
address: 0x0001
|
address: 0x0002
|
||||||
register_type: holding
|
register_type: read
|
||||||
value_type: U_WORD
|
value_type: U_WORD
|
||||||
unit_of_measurement: "%"
|
unit_of_measurement: "%"
|
||||||
accuracy_decimals: 1
|
accuracy_decimals: 1
|
||||||
@@ -236,7 +257,6 @@ sensor:
|
|||||||
- multiply: 0.1
|
- multiply: 0.1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
web_server:
|
web_server:
|
||||||
port: 80
|
port: 80
|
||||||
auth:
|
auth:
|
||||||
|
|||||||
@@ -437,17 +437,55 @@ switch:
|
|||||||
# update_interval: 1s
|
# update_interval: 1s
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
|
# - platform: adc
|
||||||
|
# pin: A0
|
||||||
|
# name: "Flame Detector QRB1"
|
||||||
|
# update_interval: 1s
|
||||||
|
# unit_of_measurement: "V"
|
||||||
|
# filters:
|
||||||
|
# # Опционально: инверсия или калибровка
|
||||||
|
# # Чем выше вольтаж, тем интенсивнее пламя
|
||||||
|
# - multiply: 1.0
|
||||||
|
|
||||||
|
- platform: ina219
|
||||||
|
address: 0x40
|
||||||
|
shunt_resistance: 0.1 ohm
|
||||||
|
current:
|
||||||
|
name: "INA219 Current"
|
||||||
|
unit_of_measurement: "A"
|
||||||
|
power:
|
||||||
|
name: "INA219 Power"
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
filters:
|
||||||
|
- multiply: 10
|
||||||
|
bus_voltage:
|
||||||
|
name: "INA219 Bus Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
shunt_voltage:
|
||||||
|
name: "INA219 Shunt Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
max_voltage: 32.0V
|
||||||
|
max_current: 3.2A
|
||||||
|
update_interval: 1s
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
modbus_controller_id: modbus_sensor
|
modbus_controller_id: modbus_sensor
|
||||||
name: "Temperature Sensor"
|
name: "Temperature Sensor"
|
||||||
id: temperature_sensor
|
id: temperature_sensor
|
||||||
address: 0x0001
|
address: 0x0001
|
||||||
register_type: read
|
# register_type: read
|
||||||
value_type: U_WORD
|
# value_type: U_WORD
|
||||||
|
# unit_of_measurement: "°C"
|
||||||
|
# accuracy_decimals: 1
|
||||||
|
# filters:
|
||||||
|
# - lambda: if (x < 10000) return x * 0.1; else return -1 * x * 0.0001;
|
||||||
unit_of_measurement: "°C"
|
unit_of_measurement: "°C"
|
||||||
|
register_type: read
|
||||||
|
value_type: S_WORD
|
||||||
accuracy_decimals: 1
|
accuracy_decimals: 1
|
||||||
filters:
|
filters:
|
||||||
- lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1;
|
- multiply: 0.1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
esphome:
|
esphome:
|
||||||
name: kontroller-kocheg-a8
|
name: kontroller-kocheg-a8
|
||||||
friendly_name: Kontroller_Kocheg_a8
|
friendly_name: kocheg_a8
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: esp32dev
|
board: esp32dev
|
||||||
@@ -38,6 +38,20 @@ ethernet:
|
|||||||
gateway: 192.168.88.1
|
gateway: 192.168.88.1
|
||||||
subnet: 255.255.255.0
|
subnet: 255.255.255.0
|
||||||
|
|
||||||
|
remote_receiver:
|
||||||
|
pin: 15
|
||||||
|
dump:
|
||||||
|
- rc_switch
|
||||||
|
tolerance: 100%
|
||||||
|
filter: 250us
|
||||||
|
idle: 4ms
|
||||||
|
buffer_size: 4kb
|
||||||
|
|
||||||
|
remote_transmitter:
|
||||||
|
pin: 2
|
||||||
|
# RF uses a 100% carrier signal
|
||||||
|
carrier_duty_percent: 100%
|
||||||
|
|
||||||
pcf8574:
|
pcf8574:
|
||||||
- id: 'pcf8574_hub_out_1' # for output channel 1-8
|
- id: 'pcf8574_hub_out_1' # for output channel 1-8
|
||||||
address: 0x24
|
address: 0x24
|
||||||
@@ -49,6 +63,7 @@ pcf8574:
|
|||||||
# Individual outputs
|
# Individual outputs
|
||||||
switch:
|
switch:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
id: switch_output1
|
||||||
name: "a8-output1"
|
name: "a8-output1"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
@@ -57,6 +72,7 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
id: switch_output2
|
||||||
name: "a8-output2"
|
name: "a8-output2"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
@@ -65,6 +81,7 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
id: switch_output3
|
||||||
name: "a8-output3"
|
name: "a8-output3"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
@@ -73,7 +90,8 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-output4"
|
id: switch_output4
|
||||||
|
name: "close_gas"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
number: 3
|
number: 3
|
||||||
@@ -81,7 +99,8 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-output5"
|
id: switch_output5
|
||||||
|
name: "open_gas"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
number: 4
|
number: 4
|
||||||
@@ -89,6 +108,7 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
id: switch_output6
|
||||||
name: "a8-output6"
|
name: "a8-output6"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
@@ -97,6 +117,7 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
id: switch_output7
|
||||||
name: "a8-output7"
|
name: "a8-output7"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
@@ -105,6 +126,7 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
id: switch_output8
|
||||||
name: "a8-output8"
|
name: "a8-output8"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_out_1
|
pcf8574: pcf8574_hub_out_1
|
||||||
@@ -113,6 +135,28 @@ switch:
|
|||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
|
- platform: remote_receiver
|
||||||
|
name: "remoter1"
|
||||||
|
rc_switch_raw:
|
||||||
|
protocol: 3
|
||||||
|
code: '000000111110110100001'
|
||||||
|
# on_press:
|
||||||
|
# - switch.turn_off: switch_output7
|
||||||
|
# - switch.turn_on: switch_output6
|
||||||
|
filters:
|
||||||
|
- delayed_off: 20ms
|
||||||
|
|
||||||
|
- platform: remote_receiver
|
||||||
|
name: "remoter2"
|
||||||
|
rc_switch_raw:
|
||||||
|
protocol: 3
|
||||||
|
code: '000000111110110100010'
|
||||||
|
# on_press:
|
||||||
|
# - switch.turn_off: switch_output6
|
||||||
|
# - switch.turn_on: switch_output7
|
||||||
|
filters:
|
||||||
|
- delayed_off: 20ms
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input1"
|
name: "a8-input1"
|
||||||
pin:
|
pin:
|
||||||
@@ -199,6 +243,28 @@ one_wire:
|
|||||||
id: bus13
|
id: bus13
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
|
- platform: ina219
|
||||||
|
address: 0x40
|
||||||
|
shunt_resistance: 0.1 ohm
|
||||||
|
current:
|
||||||
|
name: "INA219 Current"
|
||||||
|
unit_of_measurement: "A"
|
||||||
|
power:
|
||||||
|
name: "INA219 Power"
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
filters:
|
||||||
|
- multiply: 10
|
||||||
|
bus_voltage:
|
||||||
|
name: "INA219 Bus Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
shunt_voltage:
|
||||||
|
name: "INA219 Shunt Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
max_voltage: 32.0V
|
||||||
|
max_current: 3.2A
|
||||||
|
update_interval: 1s
|
||||||
|
|
||||||
|
|
||||||
- platform: dallas_temp
|
- platform: dallas_temp
|
||||||
one_wire_id: bus14
|
one_wire_id: bus14
|
||||||
name: "DS18B20_kontroller"
|
name: "DS18B20_kontroller"
|
||||||
|
|||||||
@@ -207,6 +207,27 @@ one_wire:
|
|||||||
id: bus14
|
id: bus14
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
|
- platform: ina219
|
||||||
|
address: 0x40
|
||||||
|
shunt_resistance: 0.1 ohm
|
||||||
|
current:
|
||||||
|
name: "INA219 Current"
|
||||||
|
unit_of_measurement: "A"
|
||||||
|
power:
|
||||||
|
name: "INA219 Power"
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
filters:
|
||||||
|
- multiply: 10
|
||||||
|
bus_voltage:
|
||||||
|
name: "INA219 Bus Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
shunt_voltage:
|
||||||
|
name: "INA219 Shunt Voltage"
|
||||||
|
unit_of_measurement: "V"
|
||||||
|
max_voltage: 32.0V
|
||||||
|
max_current: 3.2A
|
||||||
|
update_interval: 1s
|
||||||
|
|
||||||
- platform: dallas_temp
|
- platform: dallas_temp
|
||||||
one_wire_id: bus14
|
one_wire_id: bus14
|
||||||
name: "DS18B20"
|
name: "DS18B20"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
esphome:
|
esphome:
|
||||||
name: test-kc868-a16
|
name: vanna-kc868-a6
|
||||||
friendly_name: Test-KC868-A16
|
friendly_name: Vanna-KC868-A6
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: esp32dev
|
board: esp32dev
|
||||||
@@ -47,8 +47,8 @@ wifi:
|
|||||||
|
|
||||||
uart:
|
uart:
|
||||||
- id: uart_modbus
|
- id: uart_modbus
|
||||||
tx_pin: GPIO13
|
tx_pin: GPIO27
|
||||||
rx_pin: GPIO16
|
rx_pin: GPIO14
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
|
|
||||||
remote_receiver:
|
remote_receiver:
|
||||||
@@ -56,16 +56,10 @@ remote_receiver:
|
|||||||
number: GPIO2
|
number: GPIO2
|
||||||
ignore_strapping_warning: true
|
ignore_strapping_warning: true
|
||||||
|
|
||||||
remote_transmitter:
|
|
||||||
pin:
|
|
||||||
number: GPIO15
|
|
||||||
ignore_strapping_warning: true
|
|
||||||
carrier_duty_percent: 100%
|
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
sda: GPIO4
|
sda: GPIO4
|
||||||
scl:
|
scl:
|
||||||
number: GPIO5
|
number: GPIO15
|
||||||
ignore_strapping_warning: true
|
ignore_strapping_warning: true
|
||||||
|
|
||||||
# Config Modbus
|
# Config Modbus
|
||||||
@@ -77,7 +71,7 @@ modbus_controller:
|
|||||||
- id: modbus_sensor
|
- id: modbus_sensor
|
||||||
address: 0x01 # device address
|
address: 0x01 # device address
|
||||||
modbus_id: modbus1
|
modbus_id: modbus1
|
||||||
update_interval: 10s
|
update_interval: 2s
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
@@ -85,12 +79,18 @@ sensor:
|
|||||||
name: "RS485 Temperature Sensor"
|
name: "RS485 Temperature Sensor"
|
||||||
id: temperature_sensor
|
id: temperature_sensor
|
||||||
address: 0x0001
|
address: 0x0001
|
||||||
register_type: read
|
# register_type: read
|
||||||
value_type: U_WORD
|
# 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;
|
||||||
unit_of_measurement: "°C"
|
unit_of_measurement: "°C"
|
||||||
|
register_type: read
|
||||||
|
value_type: S_WORD
|
||||||
accuracy_decimals: 1
|
accuracy_decimals: 1
|
||||||
filters:
|
filters:
|
||||||
- lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1;
|
- multiply: 0.1
|
||||||
|
|
||||||
|
|
||||||
- platform: modbus_controller
|
- platform: modbus_controller
|
||||||
@@ -107,8 +107,8 @@ sensor:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
web_server:
|
# web_server:
|
||||||
port: 80
|
# port: 80
|
||||||
auth:
|
# auth:
|
||||||
username: "silver"
|
# username: "silver"
|
||||||
password: "cbvgcjy0"
|
# password: "cbvgcjy0"
|
||||||
Reference in New Issue
Block a user