Compare commits
11 Commits
ffcf420513
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7b869b005 | ||
|
|
1f7260d869 | ||
|
|
2b3cbabf24 | ||
|
|
9567f5ee54 | ||
|
|
8fbb66a440 | ||
|
|
d20fc7f245 | ||
|
|
725b324f7b | ||
|
|
ef2a1edcf1 | ||
|
|
acc09e6352 | ||
|
|
8bb4fec06a | ||
|
|
20d79c9fb3 |
56
8266-2relay.yaml
Normal file
56
8266-2relay.yaml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
esphome:
|
||||||
|
name: 8266-2relay
|
||||||
|
friendly_name: 8266-2relay
|
||||||
|
|
||||||
|
esp8266:
|
||||||
|
board: esp12e
|
||||||
|
|
||||||
|
status_led:
|
||||||
|
pin:
|
||||||
|
number: GPIO2
|
||||||
|
inverted: True
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "WHdmy8+3X0Xee3SjWEFDNvdC8I7qDDyv0DqVTPR24yk="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "4376c4cbc5e8e243d2caf4f0237a9639"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
id: wifi_component
|
||||||
|
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
|
||||||
|
|
||||||
|
# ap:
|
||||||
|
# ssid: "Miroca"
|
||||||
|
# password: "" # Можно оставить пустым для быстрого входа
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO5
|
||||||
|
name: Relay1
|
||||||
|
id: relay1
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO4
|
||||||
|
name: Relay2
|
||||||
|
id: relay2
|
||||||
|
# Blue LED on Board (not ESP board) as switch in Home Assistant
|
||||||
|
- platform: gpio
|
||||||
|
name: Led16
|
||||||
|
pin: GPIO16
|
||||||
|
inverted: true
|
||||||
107
bak.yaml
Normal file
107
bak.yaml
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
esphome:
|
||||||
|
name: relay_auto_bak
|
||||||
|
friendly_name: bak
|
||||||
|
|
||||||
|
esp8266:
|
||||||
|
board: esp12e
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "DLO/jlbPutpVyTwKB5fP7oO36K58yiLzU0Fpw0ZN/hM="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "f98db3b86ae6f19b2d1aec85ee5f5bcd"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
id: wifi_component
|
||||||
|
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
|
||||||
|
|
||||||
|
# ap:
|
||||||
|
# ssid: "Miroca"
|
||||||
|
# password: "" # Можно оставить пустым для быстрого входа
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
|
||||||
|
status_led:
|
||||||
|
pin:
|
||||||
|
number: GPIO16
|
||||||
|
inverted: True
|
||||||
|
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
pin:
|
||||||
|
number: GPIO5
|
||||||
|
inverted: true
|
||||||
|
name: Relay
|
||||||
|
id: relay
|
||||||
|
|
||||||
|
# sensor:
|
||||||
|
# - platform: adc
|
||||||
|
# pin: A0 # Replace A0 with the actual GPIO pin you are using
|
||||||
|
# name: "CT Clamp Raw Voltage"
|
||||||
|
# id: ct_raw_voltage
|
||||||
|
# update_interval: 100ms
|
||||||
|
# internal: True
|
||||||
|
|
||||||
|
# - platform: ct_clamp
|
||||||
|
# sensor: ct_raw_voltage
|
||||||
|
# id: measured_current
|
||||||
|
# name: "Grid Current"
|
||||||
|
# update_interval: 2s
|
||||||
|
# # This filter line is for calibration. You need to adjust the multiplier
|
||||||
|
# # based on your specific hardware setup and measurements.
|
||||||
|
# filters:
|
||||||
|
# - calibrate_linear:
|
||||||
|
# - 0.001 -> 0.0
|
||||||
|
# - 1.000 -> 100.0 # Example: if 1V input corresponds to 100A
|
||||||
|
# unit_of_measurement: "A"
|
||||||
|
# accuracy_decimals: 2
|
||||||
|
|
||||||
|
# - platform: template
|
||||||
|
# name: "Measured Power (Apparent)"
|
||||||
|
# unit_of_measurement: "W"
|
||||||
|
# id: measured_power
|
||||||
|
# device_class: power
|
||||||
|
# update_interval: 2s
|
||||||
|
# # Умножение тока на фиксированное напряжение сети (например, 220В)
|
||||||
|
# lambda: |-
|
||||||
|
# return id(measured_current).state * 230.0;
|
||||||
|
|
||||||
|
# binary_sensor:
|
||||||
|
# - platform: gpio
|
||||||
|
# pin:
|
||||||
|
# number: GPIO12
|
||||||
|
# mode:
|
||||||
|
# input: true
|
||||||
|
# device_class: moisture
|
||||||
|
# name: Liquid_sensor_upper
|
||||||
|
|
||||||
|
# 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
|
||||||
|
version: 3
|
||||||
|
auth:
|
||||||
|
username: "silver"
|
||||||
|
password: "cbvgcjy0"
|
||||||
|
js_url: 'https://miroca.ru/static/file/upanel/js/esphome.js'
|
||||||
182
config/.gitignore
vendored
Normal file
182
config/.gitignore
vendored
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
# Gitignore settings for ESPHome
|
||||||
|
# This is an example and may include too much for your use-case.
|
||||||
|
# You can modify this file to suit your needs.
|
||||||
|
/.esphome/
|
||||||
|
/secrets.yaml
|
||||||
|
# ---> Python
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# UV
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
#uv.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
#poetry.lock
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
#pdm.lock
|
||||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
|
# in version control.
|
||||||
|
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
||||||
|
.pdm.toml
|
||||||
|
.pdm-python
|
||||||
|
.pdm-build/
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
#.idea/
|
||||||
|
|
||||||
|
# Ruff stuff:
|
||||||
|
.ruff_cache/
|
||||||
|
|
||||||
|
# PyPI configuration file
|
||||||
|
.pypirc
|
||||||
|
|
||||||
|
/.idea/
|
||||||
67
config/esp8266.yaml
Normal file
67
config/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"
|
||||||
342
config/small-home.yaml
Normal file
342
config/small-home.yaml
Normal file
@@ -0,0 +1,342 @@
|
|||||||
|
esphome:
|
||||||
|
name: small-home
|
||||||
|
friendly_name: Small-home
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32dev
|
||||||
|
framework:
|
||||||
|
type: esp-idf
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "/EFz4JsOw/FQu2RGJEmHg9+xm5/UdBeNbTd6mQbDN/U="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "0dac1ac3f1bae5208cc8ea81356da792"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "SmartHome"
|
||||||
|
password: ""
|
||||||
|
use_address: 192.168.88.27
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
# ap:
|
||||||
|
# ssid: "Kc868-A8 Fallback Hotspot"
|
||||||
|
# password: "gCJlyJ5kec3y"
|
||||||
|
|
||||||
|
manual_ip:
|
||||||
|
static_ip: 192.168.88.27
|
||||||
|
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
|
||||||
|
scl: 5
|
||||||
|
scan: true
|
||||||
|
id: bus_a
|
||||||
|
|
||||||
|
# ethernet:
|
||||||
|
# type: LAN8720
|
||||||
|
# mdc_pin: GPIO23
|
||||||
|
# mdio_pin: GPIO18
|
||||||
|
# clk_mode: GPIO17_OUT
|
||||||
|
# phy_addr: 0
|
||||||
|
# use_address: 192.168.88.27
|
||||||
|
|
||||||
|
# manual_ip:
|
||||||
|
# static_ip: 192.168.88.27
|
||||||
|
# gateway: 192.168.88.1
|
||||||
|
# subnet: 255.255.255.0
|
||||||
|
# dns1: 192.168.88.1
|
||||||
|
|
||||||
|
pcf8574:
|
||||||
|
- id: 'pcf8574_hub_out_1' # for output channel 1-8
|
||||||
|
address: 0x24
|
||||||
|
|
||||||
|
- id: 'pcf8574_hub_in_1' # for input channel 1-8
|
||||||
|
address: 0x22
|
||||||
|
|
||||||
|
|
||||||
|
# Individual outputs
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output1"
|
||||||
|
id: switch_output1
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 0
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output2"
|
||||||
|
id: switch_output2
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 1
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output3"
|
||||||
|
id: switch_output3
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 2
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output4"
|
||||||
|
id: switch_output4
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 3
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output5"
|
||||||
|
id: switch_output5
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 4
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output6"
|
||||||
|
id: switch_output6
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 5
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output7"
|
||||||
|
id: switch_output7
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 6
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-output8"
|
||||||
|
id: switch_output8
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_out_1
|
||||||
|
number: 7
|
||||||
|
mode: OUTPUT
|
||||||
|
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:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 0
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output1
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output1
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-input2"
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 1
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output2
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output2
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-input3"
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 2
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output3
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output3
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-input4"
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 3
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output4
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output4
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-input5"
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 4
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output5
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output5
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-input6"
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 5
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output6
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output6
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-input7"
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 6
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output7
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output7
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-input8"
|
||||||
|
pin:
|
||||||
|
pcf8574: pcf8574_hub_in_1
|
||||||
|
number: 7
|
||||||
|
mode: INPUT
|
||||||
|
inverted: true
|
||||||
|
on_press:
|
||||||
|
- switch.toggle: switch_output8
|
||||||
|
on_release:
|
||||||
|
- switch.toggle: switch_output8
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-s3"
|
||||||
|
pin:
|
||||||
|
number: 32
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
name: "a8-s4"
|
||||||
|
pin:
|
||||||
|
number: 33
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
|
||||||
|
one_wire:
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO14
|
||||||
|
id: bus14
|
||||||
|
|
||||||
|
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
|
||||||
|
one_wire_id: bus14
|
||||||
|
name: "DS18B20"
|
||||||
|
update_interval: 2s
|
||||||
|
on_value_range:
|
||||||
|
- above: 27.0
|
||||||
|
then:
|
||||||
|
- delay: 10s
|
||||||
|
- switch.turn_on: switch_output8
|
||||||
|
- below: 26.5
|
||||||
|
then:
|
||||||
|
- delay: 10s
|
||||||
|
- switch.turn_off: switch_output8
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
112
esp32-c3.yaml
Normal file
112
esp32-c3.yaml
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
esphome:
|
||||||
|
name: esp32-c3
|
||||||
|
friendly_name: ESP32-C3
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-c3-devkitm-1
|
||||||
|
framework:
|
||||||
|
type: esp-idf
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "LE0/9X2TSZLPQk4r+xCAQHtiSWQXyk1Lct50IggUlUs="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "614014afc2d80f6552a59442dd02de05"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: 'SmartHome'
|
||||||
|
password: ''
|
||||||
|
use_address: 192.168.88.#
|
||||||
|
|
||||||
|
manual_ip:
|
||||||
|
static_ip: 192.168.88.#
|
||||||
|
gateway: 192.168.88.1
|
||||||
|
subnet: 255.255.255.0
|
||||||
|
power_save_mode: none
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
# ap:
|
||||||
|
# ssid: "Esp32-C3-Mini Fallback Hotspot"
|
||||||
|
# password: "wuMGlIsDXN19"
|
||||||
|
|
||||||
|
one_wire:
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO4
|
||||||
|
id: bus1
|
||||||
|
|
||||||
|
i2c:
|
||||||
|
- id: bus_a
|
||||||
|
sda: GPIO6
|
||||||
|
scl: GPIO7
|
||||||
|
scan: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
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
|
||||||
|
one_wire_id: bus1
|
||||||
|
name: "DS18B20"
|
||||||
|
update_interval: 2s
|
||||||
|
|
||||||
|
- platform: bme680
|
||||||
|
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
|
||||||
|
auth:
|
||||||
|
username: "silver"
|
||||||
|
password: "cbvgcjy0"
|
||||||
|
|
||||||
@@ -47,12 +47,16 @@ sensor:
|
|||||||
icon: "mdi:meter-gas-outline"
|
icon: "mdi:meter-gas-outline"
|
||||||
|
|
||||||
|
|
||||||
mqtt:
|
# mqtt:
|
||||||
broker: 192.168.88.4
|
# broker: 192.168.88.4
|
||||||
username: 'miroca'
|
# username: 'miroca'
|
||||||
password: 'cbvgcjy0'
|
# password: 'cbvgcjy0'
|
||||||
discovery: False # disable entity discovery
|
# discovery: False # disable entity discovery
|
||||||
discover_ip: True # enable device discovery
|
# discover_ip: True # enable device discovery
|
||||||
|
|
||||||
# web_server:
|
# web_server:
|
||||||
# port: 80
|
# port: 80
|
||||||
|
# auth:
|
||||||
|
# username: "silver"
|
||||||
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
@@ -72,10 +72,11 @@ sensor:
|
|||||||
# auth:
|
# auth:
|
||||||
# username: "silver"
|
# username: "silver"
|
||||||
# password: "cbvgcjy0"
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
|
|
||||||
mqtt:
|
# mqtt:
|
||||||
broker: 192.168.88.4
|
# broker: 192.168.88.4
|
||||||
username: 'miroca'
|
# username: 'miroca'
|
||||||
password: 'cbvgcjy0'
|
# password: 'cbvgcjy0'
|
||||||
discovery: False # disable entity discovery
|
# discovery: False # disable entity discovery
|
||||||
discover_ip: True # enable device discovery
|
# discover_ip: True # enable device discovery
|
||||||
313
generator.yaml
313
generator.yaml
@@ -33,262 +33,152 @@ wifi:
|
|||||||
gateway: 192.168.88.1
|
gateway: 192.168.88.1
|
||||||
subnet: 255.255.255.0
|
subnet: 255.255.255.0
|
||||||
|
|
||||||
remote_receiver:
|
uart:
|
||||||
pin: 15
|
- id: rs485
|
||||||
dump:
|
tx_pin: GPIO27
|
||||||
- rc_switch
|
rx_pin: GPIO14
|
||||||
tolerance: 100%
|
baud_rate: 9600
|
||||||
filter: 250us
|
- id: rs232
|
||||||
idle: 4ms
|
tx_pin: GPIO17
|
||||||
buffer_size: 4kb
|
rx_pin: GPIO16
|
||||||
|
baud_rate: 9600
|
||||||
remote_transmitter:
|
|
||||||
pin: 2
|
|
||||||
# RF uses a 100% carrier signal
|
|
||||||
carrier_duty_percent: 100%
|
|
||||||
|
|
||||||
|
|
||||||
|
spi:
|
||||||
|
clk_pin: GPIO18
|
||||||
|
mosi_pin: GPIO23
|
||||||
|
miso_pin: GPIO19
|
||||||
|
# cs pin: GPIO5
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
sda: 4
|
sda: GPIO4
|
||||||
scl: 5
|
scl:
|
||||||
scan: true
|
number: GPIO15
|
||||||
id: bus_a
|
ignore_strapping_warning: true
|
||||||
|
|
||||||
# ethernet:
|
|
||||||
# type: LAN8720
|
|
||||||
# mdc_pin: GPIO23
|
|
||||||
# mdio_pin: GPIO18
|
|
||||||
# clk_mode: GPIO17_OUT
|
|
||||||
# phy_addr: 0
|
|
||||||
# use_address: 192.168.88.27
|
|
||||||
|
|
||||||
# manual_ip:
|
|
||||||
# static_ip: 192.168.88.27
|
|
||||||
# gateway: 192.168.88.1
|
|
||||||
# subnet: 255.255.255.0
|
|
||||||
# dns1: 192.168.88.1
|
|
||||||
|
|
||||||
pcf8574:
|
pcf8574:
|
||||||
- id: 'pcf8574_hub_out_1' # for output channel 1-8
|
- id: inputs
|
||||||
|
address: 0x22
|
||||||
|
- id: outputs
|
||||||
address: 0x24
|
address: 0x24
|
||||||
|
|
||||||
- id: 'pcf8574_hub_in_1' # for input channel 1-8
|
time:
|
||||||
address: 0x22
|
- platform: ds1307
|
||||||
|
id: rtc_time
|
||||||
|
|
||||||
# Individual outputs
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output1"
|
|
||||||
id: switch_output1
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 0
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output2"
|
|
||||||
id: switch_output2
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output3"
|
|
||||||
id: switch_output3
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 2
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output4"
|
|
||||||
id: switch_output4
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 3
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output5"
|
|
||||||
id: switch_output5
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 4
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output6"
|
|
||||||
id: switch_output6
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 5
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output7"
|
|
||||||
id: switch_output7
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 6
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output8"
|
|
||||||
id: switch_output8
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 7
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: remote_receiver
|
- platform: gpio
|
||||||
name: "remoter1"
|
id: "sw420_vibration"
|
||||||
rc_switch_raw:
|
name: vibration
|
||||||
protocol: 3
|
pin:
|
||||||
code: '000000111110110100001'
|
number: GPIO26
|
||||||
on_press:
|
mode: INPUT
|
||||||
- switch.turn_off: switch_output7
|
device_class: vibration
|
||||||
- switch.turn_on: switch_output6
|
|
||||||
filters:
|
filters:
|
||||||
- delayed_off: 20ms
|
- delayed_off: 5s
|
||||||
|
|
||||||
- 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: "KC868-A6-IN-1"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 0
|
number: 0
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output1
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output1
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input2"
|
name: "KC868-A6-IN-2"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 1
|
number: 1
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output2
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output2
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input3"
|
name: "KC868-A6-IN-3"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 2
|
number: 2
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output3
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output3
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input4"
|
name: "KC868-A6-IN-4"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 3
|
number: 3
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output4
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output4
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input5"
|
name: "KC868-A6-IN-5"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 4
|
number: 4
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output5
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output5
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input6"
|
name: "KC868-A6-IN-6"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 5
|
number: 5
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output6
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output6
|
|
||||||
|
|
||||||
|
switch:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input7"
|
name: "KC868-A6-RELAY-1"
|
||||||
|
id: relay_1
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: outputs
|
||||||
number: 6
|
number: 0
|
||||||
mode: INPUT
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output7
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output7
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input8"
|
name: "KC868-A6-RELAY-2"
|
||||||
|
id: relay_2
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: outputs
|
||||||
number: 7
|
number: 1
|
||||||
mode: INPUT
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output8
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output8
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-s3"
|
name: "KC868-A6-RELAY-3"
|
||||||
|
id: relay_3
|
||||||
pin:
|
pin:
|
||||||
number: 32
|
pcf8574: outputs
|
||||||
|
number: 2
|
||||||
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-s4"
|
name: "KC868-A6-RELAY-4"
|
||||||
|
id: relay_4
|
||||||
pin:
|
pin:
|
||||||
number: 33
|
pcf8574: outputs
|
||||||
|
number: 3
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
- platform: gpio
|
||||||
|
name: "KC868-A6-RELAY-5"
|
||||||
|
id: relay_5
|
||||||
|
pin:
|
||||||
|
pcf8574: outputs
|
||||||
|
number: 4
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
- platform: gpio
|
||||||
|
name: "KC868-A6-RELAY-6"
|
||||||
|
id: relay_6
|
||||||
|
pin:
|
||||||
|
pcf8574: outputs
|
||||||
|
number: 5
|
||||||
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
|
|
||||||
one_wire:
|
one_wire:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin: GPIO14
|
pin: GPIO32
|
||||||
id: bus14
|
id: bus32
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO33
|
||||||
|
id: bus33
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: ina219
|
- platform: ina219
|
||||||
@@ -313,25 +203,22 @@ sensor:
|
|||||||
update_interval: 1s
|
update_interval: 1s
|
||||||
|
|
||||||
- platform: dallas_temp
|
- platform: dallas_temp
|
||||||
one_wire_id: bus14
|
one_wire_id: bus32
|
||||||
name: "DS18B20"
|
name: "DS18B20_motor"
|
||||||
update_interval: 2s
|
update_interval: 2s
|
||||||
on_value_range:
|
|
||||||
- above: 27.0
|
- platform: dallas_temp
|
||||||
then:
|
one_wire_id: bus33
|
||||||
- delay: 10s
|
name: "DS18B20_temp2"
|
||||||
- switch.turn_on: switch_output8
|
update_interval: 10s
|
||||||
- below: 26.5
|
|
||||||
then:
|
|
||||||
- delay: 10s
|
|
||||||
- switch.turn_off: switch_output8
|
|
||||||
|
|
||||||
|
|
||||||
web_server:
|
# web_server:
|
||||||
port: 80
|
# port: 80
|
||||||
auth:
|
# auth:
|
||||||
username: "silver"
|
# username: "silver"
|
||||||
password: "cbvgcjy0"
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
|
|
||||||
|
|
||||||
# mqtt:
|
# mqtt:
|
||||||
|
|||||||
@@ -257,15 +257,16 @@ sensor:
|
|||||||
- multiply: 0.1
|
- multiply: 0.1
|
||||||
|
|
||||||
|
|
||||||
web_server:
|
# web_server:
|
||||||
port: 80
|
# port: 80
|
||||||
auth:
|
# auth:
|
||||||
username: "silver"
|
# username: "silver"
|
||||||
password: "cbvgcjy0"
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
|
|
||||||
mqtt:
|
# mqtt:
|
||||||
broker: 192.168.88.4
|
# broker: 192.168.88.4
|
||||||
username: 'miroca'
|
# username: 'miroca'
|
||||||
password: 'cbvgcjy0'
|
# password: 'cbvgcjy0'
|
||||||
discovery: False # disable entity discovery
|
# discovery: False # disable entity discovery
|
||||||
discover_ip: True # enable device discovery
|
# discover_ip: True # enable device discovery
|
||||||
@@ -511,10 +511,12 @@ sensor:
|
|||||||
# auth:
|
# auth:
|
||||||
# username: "silver"
|
# username: "silver"
|
||||||
# password: "cbvgcjy0"
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
|
|
||||||
mqtt:
|
|
||||||
broker: 192.168.88.4
|
# mqtt:
|
||||||
username: 'miroca'
|
# broker: 192.168.88.4
|
||||||
password: 'cbvgcjy0'
|
# username: 'miroca'
|
||||||
discovery: False # disable entity discovery
|
# password: 'cbvgcjy0'
|
||||||
discover_ip: True # enable device discovery
|
# discovery: False # disable entity discovery
|
||||||
|
# discover_ip: True # enable device discovery
|
||||||
@@ -275,15 +275,16 @@ sensor:
|
|||||||
name: "DS18B20_server"
|
name: "DS18B20_server"
|
||||||
update_interval: 10s
|
update_interval: 10s
|
||||||
|
|
||||||
web_server:
|
# web_server:
|
||||||
port: 80
|
# port: 80
|
||||||
auth:
|
# auth:
|
||||||
username: "silver"
|
# username: "silver"
|
||||||
password: "cbvgcjy0"
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
|
|
||||||
mqtt:
|
# mqtt:
|
||||||
broker: 192.168.88.4
|
# broker: 192.168.88.4
|
||||||
username: 'miroca'
|
# username: 'miroca'
|
||||||
password: 'cbvgcjy0'
|
# password: 'cbvgcjy0'
|
||||||
discovery: False # disable entity discovery
|
# discovery: False # disable entity discovery
|
||||||
discover_ip: True # enable device discovery
|
# discover_ip: True # enable device discovery
|
||||||
110
node.yaml
Normal file
110
node.yaml
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
substitutions:
|
||||||
|
# Modify variables based on your settings
|
||||||
|
hostname: "heart"
|
||||||
|
devicename: heart light
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: heart
|
||||||
|
|
||||||
|
esp8266:
|
||||||
|
board: esp01_1m
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "Iw7I/llBJ4LsVy28quiL5/imptDeJxix+oUOvF2kAZs="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "7764e46209332102a3622e6bceb2afba"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret wifi_ssid
|
||||||
|
password: !secret wifi_password
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
# ap:
|
||||||
|
# ssid: "Heart Fallback Hotspot"
|
||||||
|
# password: "f2MTBkrPhnmX"
|
||||||
|
|
||||||
|
use_address: 192.168.88.164
|
||||||
|
|
||||||
|
manual_ip:
|
||||||
|
static_ip: 192.168.88.164
|
||||||
|
gateway: 192.168.88.1
|
||||||
|
subnet: 255.255.255.0
|
||||||
|
# dns1: 8.8.8.8
|
||||||
|
# dns2: 8.8.4.4
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO0
|
||||||
|
name: "Heart switch"
|
||||||
|
inverted: true
|
||||||
|
|
||||||
|
# The following can be omitted
|
||||||
|
- platform: restart
|
||||||
|
name: ${devicename} restart
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: ${devicename} wifi signal
|
||||||
|
update_interval: 600s
|
||||||
|
|
||||||
|
# human readable uptime sensor output to the text sensor above
|
||||||
|
- platform: uptime
|
||||||
|
name: ${devicename} Uptime in Days
|
||||||
|
id: uptime_sensor_days
|
||||||
|
update_interval: 60s
|
||||||
|
on_raw_value:
|
||||||
|
then:
|
||||||
|
- text_sensor.template.publish:
|
||||||
|
id: uptime_human
|
||||||
|
state: !lambda |-
|
||||||
|
int seconds = round(id(uptime_sensor_days).raw_state);
|
||||||
|
int days = seconds / (24 * 3600);
|
||||||
|
seconds = seconds % (24 * 3600);
|
||||||
|
int hours = seconds / 3600;
|
||||||
|
seconds = seconds % 3600;
|
||||||
|
int minutes = seconds / 60;
|
||||||
|
seconds = seconds % 60;
|
||||||
|
return (
|
||||||
|
(days ? String(days) + "d " : "") +
|
||||||
|
(hours ? String(hours) + "h " : "") +
|
||||||
|
(minutes ? String(minutes) + "m " : "") +
|
||||||
|
(String(seconds) + "s")
|
||||||
|
).c_str();
|
||||||
|
|
||||||
|
time:
|
||||||
|
- platform: homeassistant
|
||||||
|
id: homeassistant_time
|
||||||
|
|
||||||
|
# Text sensors with general information.
|
||||||
|
text_sensor:
|
||||||
|
# Expose ESPHome version as sensor.
|
||||||
|
- platform: version
|
||||||
|
name: $devicename Version
|
||||||
|
# Expose WiFi information as sensors.
|
||||||
|
- platform: wifi_info
|
||||||
|
ip_address:
|
||||||
|
name: $devicename IP
|
||||||
|
bssid:
|
||||||
|
name: $devicename BSSID
|
||||||
|
|
||||||
|
# human readable update text sensor from sensor:uptime
|
||||||
|
- platform: template
|
||||||
|
name: Uptime Human Readable
|
||||||
|
id: uptime_human
|
||||||
|
icon: mdi:clock-start
|
||||||
|
|
||||||
|
# web_server:
|
||||||
|
# port: 80
|
||||||
|
# auth:
|
||||||
|
# username: "silver"
|
||||||
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
59
test-wemos.yaml
Normal file
59
test-wemos.yaml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
substitutions:
|
||||||
|
# Modify variables based on your settings
|
||||||
|
hostname: "test-wemos"
|
||||||
|
devicename: test-wemos
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: test-wemos
|
||||||
|
friendly_name: test_wemos
|
||||||
|
|
||||||
|
esp8266:
|
||||||
|
board: esp01_1m
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "qEOA6hQaiz2eGOGyScJtwC7gGa1XyJEjw3qDShi529U="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "95d41c6e935db2827ae63c2afeafec40"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: 'SmartHome'
|
||||||
|
password: ''
|
||||||
|
use_address: 192.168.88.29
|
||||||
|
|
||||||
|
manual_ip:
|
||||||
|
static_ip: 192.168.88.29
|
||||||
|
gateway: 192.168.88.1
|
||||||
|
subnet: 255.255.255.0
|
||||||
|
power_save_mode: none
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
name: switch
|
||||||
|
id: switch_output1
|
||||||
|
pin: GPIO4
|
||||||
|
inverted: True
|
||||||
|
restore_mode: ALWAYS_OFF
|
||||||
|
|
||||||
|
- platform: restart
|
||||||
|
name: ${devicename} restart
|
||||||
|
|
||||||
|
# web_server:
|
||||||
|
# port: 80
|
||||||
|
# auth:
|
||||||
|
# username: "silver"
|
||||||
|
# password: "cbvgcjy0"
|
||||||
|
# js_url: "http://192.168.88.4/static/file/upanel/js/esphome.js"
|
||||||
Reference in New Issue
Block a user