Home Assistant Git Exporter
This commit is contained in:
0
esphome/.base.yaml
Normal file
0
esphome/.base.yaml
Normal file
53
esphome/.common.yaml
Normal file
53
esphome/.common.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
# Core Configuration: https://esphome.io/components/esphome.html
|
||||
esphome:
|
||||
name: ${esphome_name}
|
||||
|
||||
# WiFi Component: https://esphome.io/components/wifi.html
|
||||
wifi:
|
||||
ssid: !secret esphome_wifi_ssid
|
||||
password: !secret esphome_wifi_password
|
||||
ssid0: !secret esphome_wifi_ssid0
|
||||
password0: !secret esphome_wifi_password0
|
||||
ssid1: !secret esphome_wifi_ssid1
|
||||
password1: !secret esphome_wifi_password1
|
||||
ap:
|
||||
ssid: "AP - ${devicename}"
|
||||
password: !secret esphome_wifi_ap_password
|
||||
|
||||
# OTA Update Component: https://esphome.io/components/ota.html
|
||||
ota:
|
||||
password: !secret esphome_ota_password
|
||||
|
||||
# Logger Component: https://esphome.io/components/logger.html
|
||||
logger:
|
||||
level: $logger_level
|
||||
|
||||
# Native API Component: https://esphome.io/components/api.html
|
||||
api:
|
||||
encryption:
|
||||
key: $api_encryption_key
|
||||
password: $api_password
|
||||
|
||||
# Captive Portal: https://esphome.io/components/captive_portal.html
|
||||
captive_portal:
|
||||
|
||||
# Web Server: https://esphome.io/components/web_server.html
|
||||
web_server:
|
||||
local: true
|
||||
port: 80
|
||||
|
||||
# Time: https://esphome.io/components/time.html
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: homeassistant_time
|
||||
|
||||
# Status Binary Sensor: https://esphome.io/components/binary_sensor/status.html
|
||||
binary_sensor:
|
||||
- platform: status
|
||||
name: "${devicename} - Status"
|
||||
|
||||
# Restart Button: https://esphome.io/components/button/restart.html
|
||||
button:
|
||||
- platform: restart
|
||||
name: "${devicename} - Restart"
|
||||
5
esphome/.gitignore
vendored
Normal file
5
esphome/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# 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
|
||||
132
esphome/athom-smart-plug2.yaml
Normal file
132
esphome/athom-smart-plug2.yaml
Normal file
@@ -0,0 +1,132 @@
|
||||
substitutions:
|
||||
device_name: "athom-smart-plug"
|
||||
friendly_name: "prise_ecran"
|
||||
project_name: "prise.ecran"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.254
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
name_add_mac_suffix: true
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
disabled_by_default: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- switch.toggle: relay
|
||||
- timing:
|
||||
- ON for at least 4s
|
||||
then:
|
||||
- switch.turn_on: restart_switch
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
- platform: hlw8012
|
||||
sel_pin:
|
||||
number: GPIO12
|
||||
inverted: True
|
||||
cf_pin: GPIO4
|
||||
cf1_pin: GPIO5
|
||||
voltage_divider: 780
|
||||
current:
|
||||
name: "${friendly_name} Current"
|
||||
filters:
|
||||
- calibrate_linear:
|
||||
- 0.0000 -> 0.0110 # Relay off no load
|
||||
- 0.0097 -> 0.0260 # Relay on no load
|
||||
- 0.9270 -> 0.7570
|
||||
- 2.0133 -> 1.6330
|
||||
- 2.9307 -> 2.3750
|
||||
- 5.4848 -> 4.4210
|
||||
- 8.4308 -> 6.8330
|
||||
- 9.9171 -> 7.9830
|
||||
# Normalize for plug load
|
||||
- lambda: if (x < 0.0260) return 0; else return (x - 0.0260);
|
||||
voltage:
|
||||
name: "${friendly_name} Voltage"
|
||||
|
||||
power:
|
||||
name: "${friendly_name} Power"
|
||||
id: socket_my_power
|
||||
unit_of_measurement: W
|
||||
filters:
|
||||
- calibrate_linear:
|
||||
- 0.0000 -> 0.5900 # Relay off no load
|
||||
- 0.0000 -> 1.5600 # Relay on no load
|
||||
- 198.5129 -> 87.8300
|
||||
- 434.2469 -> 189.5000
|
||||
- 628.6241 -> 273.9000
|
||||
- 1067.0067 -> 460.1000
|
||||
- 1619.8098 -> 699.2000
|
||||
- 2043.0282 -> 885.0000
|
||||
# Normalize for plug load
|
||||
- lambda: if (x < 1.5600) return 0; else return (x - 1.5600);
|
||||
change_mode_every: 1
|
||||
update_interval: 5s
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: "${friendly_name} Total Daily Energy"
|
||||
power_id: socket_my_power
|
||||
unit_of_measurement: kWh
|
||||
accuracy_decimals: 3
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO14
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
on_turn_on:
|
||||
- light.turn_on: blue_led
|
||||
|
||||
on_turn_off:
|
||||
- light.turn_off: blue_led
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "${friendly_name} Status LED"
|
||||
id: blue_led
|
||||
disabled_by_default: true
|
||||
pin:
|
||||
inverted: true
|
||||
number: GPIO13
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
31
esphome/common/device_base.yaml
Normal file
31
esphome/common/device_base.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
|
||||
# ajouter ces 3 lignes:
|
||||
#packages:
|
||||
# #include logger with syslog, api, ota, webserver, captive portal
|
||||
# device_base: !include common/device_base.yaml
|
||||
|
||||
#external_components:
|
||||
# - source: github://TheStaticTurtle/esphome_syslog
|
||||
# components: [syslog]
|
||||
|
||||
logger:
|
||||
#level: VERY_VERBOSE
|
||||
|
||||
#syslog:
|
||||
# ip_address: "10.0.0.20"
|
||||
# port: 1514
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
|
||||
ota:
|
||||
password: "esphome8"
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
captive_portal:
|
||||
|
||||
3
esphome/common/generic_binarysensor.yaml
Normal file
3
esphome/common/generic_binarysensor.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
- platform: status
|
||||
name: "${friendly_name} Status"
|
||||
disabled_by_default: true
|
||||
8
esphome/common/generic_sensor.yaml
Normal file
8
esphome/common/generic_sensor.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
- platform: uptime
|
||||
name: "${friendly_name} Uptime Sensor"
|
||||
update_interval: 600s
|
||||
disabled_by_default: true
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal ${friendly_name}"
|
||||
disabled_by_default: true
|
||||
update_interval: 600s
|
||||
5
esphome/common/generic_sensor_wifisignal.yaml
Normal file
5
esphome/common/generic_sensor_wifisignal.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal ${friendly_name}"
|
||||
#disabled_by_default: false
|
||||
update_interval: 600s
|
||||
disabled_by_default: true
|
||||
4
esphome/common/generic_switch.yaml
Normal file
4
esphome/common/generic_switch.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
- platform: restart
|
||||
id: restart_switch
|
||||
name: "${friendly_name} Restart"
|
||||
disabled_by_default: true
|
||||
7
esphome/common/generic_textsensor.yaml
Normal file
7
esphome/common/generic_textsensor.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: "${friendly_name} IP Address"
|
||||
disabled_by_default: true
|
||||
ssid:
|
||||
name: "${friendly_name} SSID"
|
||||
disabled_by_default: true
|
||||
5
esphome/common/generic_textsensor_version.yaml
Normal file
5
esphome/common/generic_textsensor_version.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
- platform: version
|
||||
name: "ESPHome Version"
|
||||
update_interval: 600s
|
||||
disabled_by_default: true
|
||||
|
||||
32
esphome/common/wifi.yaml
Normal file
32
esphome/common/wifi.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
# In wifi.yaml
|
||||
# include wifi networks, manual_ip, ap
|
||||
#add in substitutions:
|
||||
# devicename: wemosxx
|
||||
# adresse_ip: 10.0.0.x
|
||||
|
||||
# ajouter ces 3 lignes:
|
||||
#packages:
|
||||
# # include wifi networks, manual_ip, ap
|
||||
# wifi: !include common/wifi.yaml
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: WifiHome0
|
||||
password: louca2212
|
||||
- ssid: WifiHome
|
||||
password: louca2212
|
||||
- ssid: WifiHome2
|
||||
password: louca2212
|
||||
- ssid: WifiHomeG
|
||||
password: louca2212
|
||||
|
||||
manual_ip:
|
||||
static_ip: ${adresse_ip}
|
||||
gateway: 10.0.0.1
|
||||
subnet: 255.255.252.0
|
||||
dns1: 10.0.0.1
|
||||
dns2: 8.8.8.8
|
||||
|
||||
ap:
|
||||
ssid: ${device_name}SSID
|
||||
password: "esphome8"
|
||||
213
esphome/kc868-a8-d758d0.yaml
Normal file
213
esphome/kc868-a8-d758d0.yaml
Normal file
@@ -0,0 +1,213 @@
|
||||
substitutions:
|
||||
device_name: kc868-a8-d758d0
|
||||
friendly_name: kc868-a8
|
||||
project_name: "kc868.a8"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.177
|
||||
#outlet_icon: mdi:power-socket-au
|
||||
#switch_restore: ALWAYS_ON
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
name_add_mac_suffix: true
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
|
||||
|
||||
|
||||
# Example configuration entry for ESP32
|
||||
i2c:
|
||||
sda: 4
|
||||
scl: 5
|
||||
scan: true
|
||||
id: bus_a
|
||||
|
||||
|
||||
# Example configuration entry
|
||||
pcf8574:
|
||||
- id: "pcf8574_hub_out_1" # for output channel 1-8
|
||||
address: 0x24
|
||||
|
||||
- id: "pcf8574_hub_in_1" # for input channel 9-16
|
||||
address: 0x22
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: gpio
|
||||
name: "relay1_kc"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 0
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "relay2_kc"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 1
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "relay3_kc"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 2
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "relay4_kc"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 3
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
# eclairage plafond est branché entre NC et commum
|
||||
- platform: gpio
|
||||
name: "eclairage plafond_kc"
|
||||
# name: "relay5"
|
||||
restore_mode: ALWAYS_ON
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 4
|
||||
mode: OUTPUT
|
||||
inverted: false
|
||||
# niche cuisine est branché entre NC et commum
|
||||
- platform: gpio
|
||||
name: "niche cuisine_kc"
|
||||
restore_mode: ALWAYS_ON
|
||||
# name: "relay6"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 5
|
||||
mode: OUTPUT
|
||||
inverted: false
|
||||
# tableau domotique est branché entre NC et commum
|
||||
- platform: gpio
|
||||
name: "tableau_domo_kc"
|
||||
# name: "relay7"
|
||||
restore_mode: ALWAYS_ON
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 6
|
||||
mode: OUTPUT
|
||||
inverted: false
|
||||
# lumiere comble est branché entre N0 et commum
|
||||
- platform: gpio
|
||||
name: "lumiere_comble_kc"
|
||||
#name: "relay8"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_out_1
|
||||
number: 7
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
# - platform: gpio
|
||||
# name: "input1"
|
||||
# pin:
|
||||
# pcf8574: pcf8574_hub_in_1
|
||||
# number: 0
|
||||
# mode: INPUT
|
||||
# inverted: true
|
||||
|
||||
# - platform: gpio
|
||||
# name: "input2"
|
||||
# pin:
|
||||
# pcf8574: pcf8574_hub_in_1
|
||||
# number: 1
|
||||
# mode: INPUT
|
||||
# inverted: true
|
||||
|
||||
# - platform: gpio
|
||||
# name: "input3"
|
||||
# pin:
|
||||
# pcf8574: pcf8574_hub_in_1
|
||||
# number: 2
|
||||
# mode: INPUT
|
||||
# inverted: true
|
||||
|
||||
# - platform: gpio
|
||||
# name: "input4"
|
||||
# pin:
|
||||
# pcf8574: pcf8574_hub_in_1
|
||||
# number: 3
|
||||
# mode: INPUT
|
||||
# inverted: true
|
||||
|
||||
# - platform: gpio
|
||||
# name: "input5"
|
||||
# pin:
|
||||
# pcf8574: pcf8574_hub_in_1
|
||||
# number: 4
|
||||
# mode: INPUT
|
||||
# inverted: true
|
||||
|
||||
# - platform: gpio
|
||||
# name: "input6"
|
||||
# pin:
|
||||
# pcf8574: pcf8574_hub_in_1
|
||||
# number: 5
|
||||
# mode: INPUT
|
||||
# inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: "interrupteur_chambre1"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_in_1
|
||||
number: 6
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
filters:
|
||||
- delayed_on: 80ms
|
||||
|
||||
- platform: gpio
|
||||
name: "porte_dressing"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub_in_1
|
||||
number: 7
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
device_class: door
|
||||
filters:
|
||||
- delayed_on: 60ms
|
||||
|
||||
|
||||
dallas:
|
||||
- pin: GPIO14
|
||||
update_interval: 240s
|
||||
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
- platform: dallas
|
||||
address: 0x50031771df43ff28
|
||||
name: "Temp_salon"
|
||||
|
||||
- platform: bh1750
|
||||
name: "BH1750 Illuminance"
|
||||
address: 0x23
|
||||
update_interval: 20s
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
139
esphome/meuble-dashboard.yaml
Normal file
139
esphome/meuble-dashboard.yaml
Normal file
@@ -0,0 +1,139 @@
|
||||
substitutions:
|
||||
device_name: "meuble-dashboard"
|
||||
friendly_name: "meuble-dashboard"
|
||||
project_name: "prise.meuble-dashboard"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.241
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
name_add_mac_suffix: true
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
disabled_by_default: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- switch.toggle: relay
|
||||
- timing:
|
||||
- ON for at least 4s
|
||||
then:
|
||||
- switch.turn_on: restart_switch
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
- platform: hlw8012
|
||||
sel_pin:
|
||||
number: GPIO12
|
||||
inverted: True
|
||||
cf_pin: GPIO4
|
||||
cf1_pin: GPIO5
|
||||
voltage_divider: 780
|
||||
current:
|
||||
name: "${friendly_name} Current"
|
||||
filters:
|
||||
- calibrate_linear:
|
||||
- 0.0000 -> 0.0110 # Relay off no load
|
||||
- 0.0097 -> 0.0260 # Relay on no load
|
||||
- 0.9270 -> 0.7570
|
||||
- 2.0133 -> 1.6330
|
||||
- 2.9307 -> 2.3750
|
||||
- 5.4848 -> 4.4210
|
||||
- 8.4308 -> 6.8330
|
||||
- 9.9171 -> 7.9830
|
||||
# Normalize for plug load
|
||||
- lambda: if (x < 0.0260) return 0; else return (x - 0.0260);
|
||||
voltage:
|
||||
name: "${friendly_name} Voltage"
|
||||
|
||||
power:
|
||||
name: "${friendly_name} Power"
|
||||
id: socket_my_power
|
||||
unit_of_measurement: W
|
||||
device_class: "power"
|
||||
#state_class: "total"
|
||||
filters:
|
||||
- calibrate_linear:
|
||||
- 0.0000 -> 0.5900 # Relay off no load
|
||||
- 0.0000 -> 1.5600 # Relay on no load
|
||||
- 198.5129 -> 87.8300
|
||||
- 434.2469 -> 189.5000
|
||||
- 628.6241 -> 273.9000
|
||||
- 1067.0067 -> 460.1000
|
||||
- 1619.8098 -> 699.2000
|
||||
- 2043.0282 -> 885.0000
|
||||
# Normalize for plug load
|
||||
- lambda: if (x < 1.5600) return 0; else return (x - 1.5600);
|
||||
change_mode_every: 1
|
||||
update_interval: 5s
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: "${friendly_name} Total Daily Energy"
|
||||
power_id: socket_my_power
|
||||
unit_of_measurement: kWh
|
||||
device_class: "energy"
|
||||
state_class: "total_increasing"
|
||||
accuracy_decimals: 3
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO14
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
on_turn_on:
|
||||
- light.turn_on: blue_led
|
||||
|
||||
on_turn_off:
|
||||
- light.turn_off: blue_led
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "${friendly_name} Status LED"
|
||||
id: blue_led
|
||||
disabled_by_default: true
|
||||
pin:
|
||||
inverted: true
|
||||
number: GPIO13
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
|
||||
|
||||
348
esphome/nmcu-voletsalon1yaml.yaml
Normal file
348
esphome/nmcu-voletsalon1yaml.yaml
Normal file
@@ -0,0 +1,348 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletsalon1
|
||||
friendly_name: volet_salon_1
|
||||
project_name: "volet.salon_1"
|
||||
project_version: "1.0"
|
||||
shortname: V_S_01
|
||||
adresse_ip: 10.0.2.74
|
||||
op_duration: 22s
|
||||
cl_duration: 22s
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
- platform: template
|
||||
name: "Associer"
|
||||
lambda: |-
|
||||
return {"up & down + 8 x stop"};
|
||||
disabled_by_default: true
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
343
esphome/nmcuvoletsalon2yaml.yaml
Normal file
343
esphome/nmcuvoletsalon2yaml.yaml
Normal file
@@ -0,0 +1,343 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletsalon2
|
||||
friendly_name: volet_salon_2
|
||||
project_name: "volet.salon_2"
|
||||
project_version: "1.0"
|
||||
shortname: V_S_02
|
||||
adresse_ip: 10.0.2.75
|
||||
op_duration: 22s
|
||||
cl_duration: 22s
|
||||
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
343
esphome/node-mcu-voletporteyaml.yaml
Normal file
343
esphome/node-mcu-voletporteyaml.yaml
Normal file
@@ -0,0 +1,343 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletporte
|
||||
friendly_name: volet_porte
|
||||
project_name: "volet.porte"
|
||||
project_version: "1.0"
|
||||
shortname: V_P_01
|
||||
adresse_ip: 10.0.2.76
|
||||
op_duration: 36s
|
||||
cl_duration: 34s
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
342
esphome/nodemcu-volet-arriere.yaml
Normal file
342
esphome/nodemcu-volet-arriere.yaml
Normal file
@@ -0,0 +1,342 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletarriere1
|
||||
friendly_name: volet_arriere
|
||||
project_name: "volet.arriere"
|
||||
project_version: "1.0"
|
||||
shortname: V_A_01
|
||||
adresse_ip: 10.0.2.77
|
||||
op_duration: 30s
|
||||
cl_duration: 29s
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
342
esphome/nodemcuvoletchambre1.yaml
Normal file
342
esphome/nodemcuvoletchambre1.yaml
Normal file
@@ -0,0 +1,342 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletchambre1
|
||||
friendly_name: volet_chambre_1
|
||||
project_name: "volet.chambre_1"
|
||||
project_version: "1.0"
|
||||
shortname: V_Ch_01
|
||||
adresse_ip: 10.0.2.80
|
||||
op_duration: 22s
|
||||
cl_duration: 22s
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
342
esphome/nodemcuvoletchambre2.yaml
Normal file
342
esphome/nodemcuvoletchambre2.yaml
Normal file
@@ -0,0 +1,342 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletchambre2
|
||||
friendly_name: volet_chambre_2
|
||||
project_name: "volet_chambre.2"
|
||||
project_version: "1.0"
|
||||
shortname: V_Ch_02
|
||||
adresse_ip: 10.0.2.81
|
||||
op_duration: 22s
|
||||
cl_duration: 22s
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
|
||||
- platform: restart
|
||||
name: Restart ${device_name}
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
342
esphome/nodemcuvoletcuisine1.yaml
Normal file
342
esphome/nodemcuvoletcuisine1.yaml
Normal file
@@ -0,0 +1,342 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletcuisine1
|
||||
friendly_name: volet_cuisine_1
|
||||
project_name: "volet.cuisine1"
|
||||
project_version: "1.0"
|
||||
shortname: V_C_01
|
||||
adresse_ip: 10.0.2.78
|
||||
op_duration: 22s
|
||||
cl_duration: 22s
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
343
esphome/nodemcuvoletcuisine2.yaml
Normal file
343
esphome/nodemcuvoletcuisine2.yaml
Normal file
@@ -0,0 +1,343 @@
|
||||
substitutions:
|
||||
device_name: nmcuvoletcuisine2
|
||||
friendly_name: volet_cuisine_2
|
||||
project_name: "volet.cuisine_2"
|
||||
project_version: "1.0"
|
||||
shortname: V_C_02
|
||||
adresse_ip: 10.0.2.79
|
||||
op_duration: 22s
|
||||
cl_duration: 22s
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: ${friendly_name}
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
includes:
|
||||
- my_remote_fonction.h
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
|
||||
#aller dans le dossier config et modifier le fichier .h en consequence
|
||||
|
||||
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
- platform: template
|
||||
name: "Pin"
|
||||
icon: "mdi:account-question"
|
||||
lambda: |-
|
||||
return {"D1:up D2:down D5:stop"};
|
||||
update_interval: 60000s
|
||||
disabled_by_default: true
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
output:
|
||||
|
||||
# D1 :up
|
||||
# D2 : down
|
||||
# D5 : stop
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: button_UP
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
id: button_DOWN
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
pin: D5
|
||||
id: button_STOP
|
||||
inverted: true
|
||||
|
||||
- platform: custom
|
||||
type: binary
|
||||
lambda: |-
|
||||
auto associer_binary_output = new AssocierBinaryOutput();
|
||||
App.register_component(associer_binary_output);
|
||||
return {associer_binary_output};
|
||||
|
||||
outputs:
|
||||
id: associer_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto dissocier_binary_output = new DissocierBinaryOutput();
|
||||
# App.register_component(dissocier_binary_output);
|
||||
# return {dissocier_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: dissocier_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_bottom_limit_binary_output = new Set_bottom_limitBinaryOutput();
|
||||
# App.register_component(set_bottom_limit_binary_output);
|
||||
# return {set_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_top_limit_binary_output = new Set_top_limitBinaryOutput();
|
||||
# App.register_component(set_top_limit_binary_output);
|
||||
# return {set_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_top_limit_binary
|
||||
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_bottom_limit_binary_output = new Delete_bottom_limitBinaryOutput();
|
||||
# App.register_component(delete_bottom_limit_binary_output);
|
||||
# return {delete_bottom_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_bottom_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto delete_top_limit_binary_output = new Delete_top_limitBinaryOutput();
|
||||
# App.register_component(delete_top_limit_binary_output);
|
||||
# return {delete_top_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: delete_top_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto set_third_limit_binary_output = new Set_third_limitBinaryOutput();
|
||||
# App.register_component(set_third_limit_binary_output);
|
||||
# return {set_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: set_third_limit_binary
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto goto_third_limit_binary_output = new Goto_third_limitBinaryOutput();
|
||||
# App.register_component(goto_third_limit_binary_output);
|
||||
# return {goto_third_limit_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: goto_third_limit_binary
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_on_binary_output = new Mode_step_onBinaryOutput();
|
||||
# App.register_component(mode_step_on_binary_output);
|
||||
# return {mode_step_on_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_on_binary_output
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto mode_step_off_binary_output = new Mode_step_offBinaryOutput();
|
||||
# App.register_component(mode_step_off_binary_output);
|
||||
# return {mode_step_off_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: mode_step_off_binary_output
|
||||
|
||||
|
||||
# - platform: custom
|
||||
# type: binary
|
||||
# lambda: |-
|
||||
# auto change_dir_motor_binary_output = new Change_dir_motorBinaryOutput();
|
||||
# App.register_component(change_dir_motor_binary_output);
|
||||
# return {change_dir_motor_binary_output};
|
||||
|
||||
# outputs:
|
||||
# id: change_dir_motor_binary_output
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: template
|
||||
name: UP ${shortname}
|
||||
icon: "mdi:arrow-up-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
- platform: template
|
||||
name: DOWN ${shortname}
|
||||
icon: "mdi:arrow-down-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
- platform: template
|
||||
name: STOP ${shortname}
|
||||
icon: "mdi:stop-circle"
|
||||
turn_on_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
- platform: template
|
||||
name: Associer ${device_name}
|
||||
icon: "mdi:gesture-tap-button"
|
||||
turn_on_action:
|
||||
- output.turn_on: associer_binary
|
||||
turn_off_action:
|
||||
- output.turn_off: associer_binary
|
||||
disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Dissocier ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: dissocier_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: dissocier_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set top limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Set bottom limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Delete top limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_top_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_top_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Delete bottom limit ${device_name}
|
||||
# icon: "mdi:delete"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: delete_bottom_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: delete_bottom_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: set third limit ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: set_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: set_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
# - platform: template
|
||||
# name: Goto third limit ${device_name}
|
||||
# icon: "mdi:blinds"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: goto_third_limit_binary
|
||||
# turn_off_action:
|
||||
# - output.turn_off: goto_third_limit_binary
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mode step on ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_on_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_on_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Mmode step off ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: mode_step_off_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: mode_step_off_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
# - platform: template
|
||||
# name: Change dir motor ${device_name}
|
||||
# icon: "mdi:gesture-tap-button"
|
||||
# turn_on_action:
|
||||
# - output.turn_on: change_dir_motor_binary_output
|
||||
# turn_off_action:
|
||||
# - output.turn_off: change_dir_motor_binary_output
|
||||
# disabled_by_default: true
|
||||
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: ${friendly_name}
|
||||
open_action:
|
||||
- output.turn_on: button_UP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_UP
|
||||
open_duration: ${op_duration}
|
||||
close_action:
|
||||
- output.turn_on: button_DOWN
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_DOWN
|
||||
close_duration: ${cl_duration}
|
||||
stop_action:
|
||||
- output.turn_on: button_STOP
|
||||
- delay: 300ms
|
||||
- output.turn_off: button_STOP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
62
esphome/sonoff-couloir.yaml
Normal file
62
esphome/sonoff-couloir.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
substitutions:
|
||||
device_name: "sonoff-couloir"
|
||||
friendly_name: "sonoff-couloir"
|
||||
project_name: "sonoff.couloir"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.59
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "Sonoff Couloir"
|
||||
output: light_output
|
||||
id: light_couloir
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
|
||||
output:
|
||||
- id: light_output
|
||||
platform: gpio
|
||||
pin: GPIO12
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "Sonoff couloir Button"
|
||||
on_press:
|
||||
- light.toggle: light_couloir
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO13
|
||||
inverted: yes
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
65
esphome/sonoff-dressing.yaml
Normal file
65
esphome/sonoff-dressing.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
substitutions:
|
||||
device_name: "sonoff-dressing"
|
||||
friendly_name: "sonoff-dressing"
|
||||
project_name: "sonoff.dressing"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.62
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "Dressing"
|
||||
output: light_output
|
||||
id: light_dressing
|
||||
|
||||
output:
|
||||
- id: light_output
|
||||
platform: gpio
|
||||
pin: GPIO12
|
||||
|
||||
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "Sonoff Dressing Button"
|
||||
on_press:
|
||||
- light.toggle: light_dressing
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO13
|
||||
inverted: yes
|
||||
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
56
esphome/sonoff-escalier.yaml
Normal file
56
esphome/sonoff-escalier.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
substitutions:
|
||||
device_name: "sonoff-escalier"
|
||||
friendly_name: "sonoff-escalier"
|
||||
project_name: "sonoff.escalier"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.58
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "Sonoff Basic Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
- platform: gpio
|
||||
name: "Sonoff Basic Relay escalier"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO13
|
||||
inverted: yes
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
80
esphome/sonoff-niche1.yaml
Normal file
80
esphome/sonoff-niche1.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
substitutions:
|
||||
device_name: "sonoff-niche1"
|
||||
friendly_name: "Prise_niche1"
|
||||
project_name: "prise.niche1"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.131
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
disabled_by_default: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- switch.toggle: relay
|
||||
- timing:
|
||||
- ON for at least 4s
|
||||
then:
|
||||
- switch.turn_on: restart_switch
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
# on_turn_on:
|
||||
# - light.turn_on: blue_led
|
||||
#
|
||||
# on_turn_off:
|
||||
# - light.turn_off: blue_led
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "${friendly_name} Status LED"
|
||||
id: blue_led
|
||||
disabled_by_default: true
|
||||
pin:
|
||||
inverted: true
|
||||
number: GPIO13
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
82
esphome/sonoff-niche2.yaml
Normal file
82
esphome/sonoff-niche2.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
substitutions:
|
||||
device_name: "sonoff-niche2"
|
||||
friendly_name: "Prise_niche2"
|
||||
project_name: "prise.niche2"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.132
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
disabled_by_default: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- switch.toggle: relay
|
||||
- timing:
|
||||
- ON for at least 4s
|
||||
then:
|
||||
- switch.turn_on: restart_switch
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
# on_turn_on:
|
||||
# - light.turn_on: blue_led
|
||||
#
|
||||
# on_turn_off:
|
||||
# - light.turn_off: blue_led
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "${friendly_name} Status LED"
|
||||
id: blue_led
|
||||
disabled_by_default: true
|
||||
pin:
|
||||
inverted: true
|
||||
number: GPIO13
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
|
||||
81
esphome/sonoff-niche3.yaml
Normal file
81
esphome/sonoff-niche3.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
substitutions:
|
||||
device_name: "sonoff-niche3"
|
||||
friendly_name: "Prise_niche3"
|
||||
project_name: "prise.niche3"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.133
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
|
||||
|
||||
binary_sensor:
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
disabled_by_default: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- switch.toggle: relay
|
||||
- timing:
|
||||
- ON for at least 4s
|
||||
then:
|
||||
- switch.turn_on: restart_switch
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
# on_turn_on:
|
||||
# - light.turn_on: blue_led
|
||||
#
|
||||
# on_turn_off:
|
||||
# - light.turn_off: blue_led
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "${friendly_name} Status LED"
|
||||
id: blue_led
|
||||
disabled_by_default: true
|
||||
pin:
|
||||
inverted: true
|
||||
number: GPIO13
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
82
esphome/sonoff-niche4.yaml
Normal file
82
esphome/sonoff-niche4.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
substitutions:
|
||||
device_name: "sonoff-niche4"
|
||||
friendly_name: "Prise_niche4"
|
||||
project_name: "prise.niche4"
|
||||
project_version: "1.0"
|
||||
adresse_ip: 10.0.2.134
|
||||
|
||||
packages:
|
||||
## include wifi networks, manual_ip, ap
|
||||
wifi: !include common/wifi.yaml
|
||||
#include logger with syslog, api, ota, webserver, captive portal
|
||||
device_base: !include common/device_base.yaml
|
||||
|
||||
|
||||
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "${friendly_name} Power Button"
|
||||
disabled_by_default: true
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- switch.toggle: relay
|
||||
- timing:
|
||||
- ON for at least 4s
|
||||
then:
|
||||
- switch.turn_on: restart_switch
|
||||
#include status
|
||||
- <<: !include common/generic_binarysensor.yaml
|
||||
|
||||
sensor:
|
||||
#include uptime et wifisignal
|
||||
- <<: !include common/generic_sensor.yaml
|
||||
|
||||
|
||||
|
||||
switch:
|
||||
#include restart
|
||||
- <<: !include common/generic_switch.yaml
|
||||
|
||||
- platform: gpio
|
||||
name: "${friendly_name}"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
# on_turn_on:
|
||||
# - light.turn_on: blue_led
|
||||
#
|
||||
# on_turn_off:
|
||||
# - light.turn_off: blue_led
|
||||
|
||||
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "${friendly_name} Status LED"
|
||||
id: blue_led
|
||||
disabled_by_default: true
|
||||
pin:
|
||||
inverted: true
|
||||
number: GPIO13
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
|
||||
text_sensor:
|
||||
#include wifi info : ipaddress ssid
|
||||
- <<: !include common/generic_textsensor.yaml
|
||||
73
esphome/sonoff-prise.yaml
Normal file
73
esphome/sonoff-prise.yaml
Normal file
@@ -0,0 +1,73 @@
|
||||
esphome:
|
||||
name: sonoff-prise
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
password: "257e2759c54b37ec0dc09295dd79f34d"
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: WifiHome0
|
||||
password: louca2212
|
||||
- ssid: WifiHome
|
||||
password: louca2212
|
||||
- ssid: WifiHome2
|
||||
password: louca2212
|
||||
- ssid: WifiHomeG
|
||||
password: louca2212
|
||||
|
||||
manual_ip:
|
||||
static_ip: 10.0.0.53
|
||||
gateway: 10.0.0.1
|
||||
subnet: 255.255.255.0
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Sonoff-Prise Fallback Hotspot"
|
||||
password: "QaNy5G8FruSx"
|
||||
|
||||
captive_portal:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "Sonoff Basic Button"
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Sonoff Basic Prise"
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
|
||||
- platform: restart
|
||||
name: sonoff-prise Restart
|
||||
|
||||
output:
|
||||
# Register the green LED as a dimmable output ....
|
||||
- platform: esp8266_pwm
|
||||
id: s20_green_led
|
||||
pin:
|
||||
number: GPIO13
|
||||
inverted: true
|
||||
|
||||
light:
|
||||
# ... and then make a light out of it.
|
||||
- platform: monochromatic
|
||||
name: "Sonoff S20 Green LED"
|
||||
output: s20_green_led
|
||||
71
esphome/test.yaml
Normal file
71
esphome/test.yaml
Normal file
@@ -0,0 +1,71 @@
|
||||
substitutions:
|
||||
name: sonoff-basic
|
||||
friendly_name: Sonoff Basic
|
||||
esphome:
|
||||
name: $name
|
||||
comment: Sonoff Basic
|
||||
name_add_mac_suffix: true
|
||||
# This will allow for (future) project identification,
|
||||
# configuration and updates.
|
||||
project:
|
||||
name: esphomeBlack.sonoff-basic
|
||||
version: "1.0"
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
logger:
|
||||
|
||||
# API is a requirement of the dashboard import.
|
||||
api:
|
||||
|
||||
# OTA is required for Over-the-Air updating
|
||||
ota:
|
||||
password: "esphome"
|
||||
|
||||
# This should point to the public location of this yaml file.
|
||||
dashboard_import:
|
||||
package_import_url: github://biloba2002/esphome-template/blob/main/sonoff-basic.yaml@main
|
||||
|
||||
|
||||
wifi:
|
||||
# Set up a wifi access point
|
||||
ap:
|
||||
ssid: "Sonoff-Basic"
|
||||
password: "esphome0"
|
||||
|
||||
# In combination with the `ap` this allows the user
|
||||
# to provision wifi credentials to the device.
|
||||
captive_portal:
|
||||
|
||||
# Sets up the improv via serial client for Wi-Fi provisioning
|
||||
improv_serial:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
name: "${friendly_name} Button"
|
||||
on_release:
|
||||
- light.toggle: light_output
|
||||
light:
|
||||
- platform: binary
|
||||
output: relay
|
||||
name: "${friendly_name}"
|
||||
id: light_output
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO13
|
||||
inverted: yes
|
||||
|
||||
switch:
|
||||
- platform: restart
|
||||
name: "Sonoff Basic Restart"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user