Esphome
This commit is contained in:
@@ -85,6 +85,28 @@ sensor:
|
||||
i2c_id: bus_a
|
||||
address: 0x76
|
||||
update_interval: 1s
|
||||
|
||||
# - platform: gpio
|
||||
# id: switch_output1
|
||||
# name: "a8-output1"
|
||||
# pin:
|
||||
# pcf8574: pcf8574_hub_out_1
|
||||
# number: 0
|
||||
# mode: OUTPUT
|
||||
# inverted: true
|
||||
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: switch_output1
|
||||
pin: GPIO5
|
||||
inverted: True
|
||||
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "Pin GPIO21"
|
||||
pin: GPIO21
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
67
esp8266.yaml
Normal file
67
esp8266.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
esphome:
|
||||
name: komp_vitya
|
||||
friendly_name: esp8266
|
||||
|
||||
esp8266:
|
||||
board: esp12e
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "DLO/jlbPutpVyTwKB5fP7oO36K58yiLzU0Fpw0ZN/hM="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: "f98db3b86ae6f19b2d1aec85ee5f5bcd"
|
||||
|
||||
wifi:
|
||||
ssid: 'SmartHome'
|
||||
password: ''
|
||||
use_address: 192.168.88.39
|
||||
|
||||
manual_ip:
|
||||
static_ip: 192.168.88.39
|
||||
gateway: 192.168.88.1
|
||||
subnet: 255.255.255.0
|
||||
power_save_mode: none
|
||||
|
||||
captive_portal:
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO16
|
||||
inverted: True
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: GPIO5
|
||||
name: Relay_komp
|
||||
id: relay
|
||||
on_turn_off:
|
||||
then:
|
||||
- wait_until:
|
||||
condition:
|
||||
for:
|
||||
time: 2s
|
||||
condition:
|
||||
lambda: |-
|
||||
return id(relay).state == true;
|
||||
- lambda: |-
|
||||
id(relay).turn_off();
|
||||
|
||||
|
||||
mqtt:
|
||||
broker: 192.168.88.4
|
||||
username: 'miroca'
|
||||
password: 'cbvgcjy0'
|
||||
discovery: False # disable entity discovery
|
||||
discover_ip: True # enable device discovery
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
auth:
|
||||
username: "silver"
|
||||
password: "cbvgcjy0"
|
||||
@@ -24,13 +24,6 @@ ota:
|
||||
wifi:
|
||||
ssid: "SmartHome"
|
||||
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
|
||||
ap:
|
||||
|
||||
@@ -211,26 +211,26 @@ switch:
|
||||
inverted: true
|
||||
|
||||
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: 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
|
||||
modbus_controller_id: modbus_sensor
|
||||
@@ -256,7 +256,6 @@ sensor:
|
||||
filters:
|
||||
- multiply: 0.1
|
||||
|
||||
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
@@ -437,6 +437,16 @@ switch:
|
||||
# update_interval: 1s
|
||||
|
||||
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
|
||||
|
||||
@@ -38,6 +38,20 @@ ethernet:
|
||||
gateway: 192.168.88.1
|
||||
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:
|
||||
- id: 'pcf8574_hub_out_1' # for output channel 1-8
|
||||
address: 0x24
|
||||
@@ -49,6 +63,7 @@ pcf8574:
|
||||
# Individual outputs
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: switch_output1
|
||||
name: "a8-output1"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -57,6 +72,7 @@ switch:
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: switch_output2
|
||||
name: "a8-output2"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -65,6 +81,7 @@ switch:
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: switch_output3
|
||||
name: "a8-output3"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -73,6 +90,7 @@ switch:
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: switch_output4
|
||||
name: "close_gas"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -81,6 +99,7 @@ switch:
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: switch_output5
|
||||
name: "open_gas"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -89,6 +108,7 @@ switch:
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: switch_output6
|
||||
name: "a8-output6"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -97,6 +117,7 @@ switch:
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: switch_output7
|
||||
name: "a8-output7"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -105,6 +126,7 @@ switch:
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
id: switch_output8
|
||||
name: "a8-output8"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
@@ -113,6 +135,28 @@ switch:
|
||||
inverted: true
|
||||
|
||||
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
|
||||
name: "a8-input1"
|
||||
pin:
|
||||
|
||||
@@ -33,6 +33,21 @@ wifi:
|
||||
gateway: 192.168.88.1
|
||||
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%
|
||||
|
||||
|
||||
|
||||
i2c:
|
||||
sda: 4
|
||||
@@ -138,6 +153,29 @@ switch:
|
||||
inverted: true
|
||||
|
||||
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
|
||||
name: "a8-input1"
|
||||
pin:
|
||||
@@ -148,10 +186,8 @@ binary_sensor:
|
||||
on_press:
|
||||
- switch.toggle: switch_output1
|
||||
on_release:
|
||||
- switch.toggle: switch_output1
|
||||
- switch.toggle: switch_output1
|
||||
|
||||
|
||||
|
||||
- platform: gpio
|
||||
name: "a8-input2"
|
||||
pin:
|
||||
|
||||
Reference in New Issue
Block a user