This commit is contained in:
Victor Alexandrovich Tsyrenschikov
2026-02-13 21:40:00 +05:00
parent 5ee04327fd
commit ffcf420513
3 changed files with 497 additions and 12 deletions

143
gasoline-generator.yaml Normal file
View File

@@ -0,0 +1,143 @@
esphome:
name: gasoline-generator
friendly_name: gasoline_generator
esp8266:
board: esp12e
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "L4re6nsOL621xgrtSi2fMJPg/NmKyDh+V1/T1NYODvA="
ota:
- platform: esphome
password: "99f726ebd009fcb5849ad70ab052ed74"
wifi:
ssid: 'SmartHome'
password: ''
use_address: 192.168.88.40
manual_ip:
static_ip: 192.168.88.40
gateway: 192.168.88.1
subnet: 255.255.255.0
power_save_mode: none
captive_portal:
# Use the blue LED in the device as a status LED, which will blink if there are warnings (slow) or errors (fast)
status_led:
pin:
number: GPIO5
inverted: True
binary_sensor:
# - platform: gpio
# name: "Input_Start_Generator"
# pin:
# number: GPIO2 # Пин, к которому подключена кнопка
# mode: INPUT_PULLUP
# inverted: True # Полезно, если кнопка замыкает на землю (GND)
# on_press:
# - switch.toggle: pump
# on_release:
# - switch.toggle: start_generator
- platform: gpio
id: "sw420_vibration"
name: vibration
pin:
number: GPIO2
mode: INPUT
device_class: vibration
filters:
- delayed_off: 5s
switch:
- platform: gpio
pin: GPIO16
name: Start_generator
id: start_generator
on_turn_off:
then:
- wait_until:
condition:
for:
time: 3s
condition:
lambda: |-
return id(start_generator).state == true;
- lambda: |-
id(start_generator).turn_off();
- platform: gpio
pin: GPIO14
name: Pump
id: pump
on_turn_on:
then:
- delay: 2000ms
- switch.toggle: air_Damper
- delay: 2000ms
- switch.toggle: start_generator
on_turn_off:
then:
- wait_until:
condition:
for:
time: 5s
condition:
lambda: |-
return id(pump).state == true;
- lambda: |-
id(pump).turn_off();
- platform: gpio
pin: GPIO12
name: Air_Damper
id: air_Damper
on_turn_off:
then:
- wait_until:
condition:
for:
time: 2s
condition:
lambda: |-
return id(air_Damper).state == true;
- lambda: |-
id(air_Damper).turn_off();
- platform: gpio
pin: GPIO13
name: Relay4
id: relay4
one_wire:
- platform: gpio
pin: GPIO4
id: bus4
sensor:
- platform: dallas_temp
one_wire_id: bus4
name: "Engine_Temperature"
update_interval: 2s
# 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"