(Die Seite wurde neu angelegt: „Pin Belegung zum verlöten des UART Adapters zum flashen<br> rahmenlos“) |
Keine Bearbeitungszusammenfassung |
||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
===== flashen: ===== | |||
[[Datei:BW-SS4 UART.jpg|rahmenlos]]<br> | |||
Zum einmaligen flashen GND und IO0 verbinden | |||
===== GPIO Belegung: ===== | |||
{| class="wikitable" | |||
|- | |||
! GPIO !! Funktion | |||
|- | |||
| GPIO5 || Relay | |||
|- | |||
| GPIO4 || Led | |||
|- | |||
| GPIO13 || Button | |||
|} | |||
===== ESPhome config: ===== | |||
<syntaxhighlight lang="YAML"> | |||
substitutions: | |||
plug_name: bw_ss4 | |||
esphome: | |||
name: ${plug_name} | |||
platform: ESP8266 | |||
board: esp8285 | |||
wifi: | |||
ssid: !secret wifi_ssid | |||
password: !secret wifi_password | |||
fast_connect: true | |||
logger: | |||
web_server: | |||
port: 80 | |||
api: | |||
password: !secret api_password | |||
ota: | |||
password: !secret ota_password | |||
time: | |||
- platform: homeassistant | |||
id: homeassistant_time | |||
binary_sensor: | |||
- platform: gpio | |||
pin: | |||
number: GPIO13 | |||
inverted: True | |||
name: "${plug_name}_Button" | |||
on_press: | |||
- switch.toggle: relay | |||
switch: | |||
- platform: gpio | |||
name: "${plug_name}_Relay" | |||
id: relay | |||
pin: GPIO5 | |||
restore_mode: ALWAYS_ON | |||
- platform: gpio | |||
name: "${plug_name}_Led" | |||
id: led | |||
pin: GPIO4 | |||
inverted: True | |||
restore_mode: ALWAYS_OFF | |||
sensor: | |||
- platform: uptime | |||
name: ${plug_name}_Uptime Sensor | |||
</syntaxhighlight> | |||
Aktuelle Version vom 23. August 2020, 20:55 Uhr
flashen:
GPIO Belegung:
| GPIO | Funktion |
|---|---|
| GPIO5 | Relay |
| GPIO4 | Led |
| GPIO13 | Button |
ESPhome config:
substitutions:
plug_name: bw_ss4
esphome:
name: ${plug_name}
platform: ESP8266
board: esp8285
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: true
logger:
web_server:
port: 80
api:
password: !secret api_password
ota:
password: !secret ota_password
time:
- platform: homeassistant
id: homeassistant_time
binary_sensor:
- platform: gpio
pin:
number: GPIO13
inverted: True
name: "${plug_name}_Button"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "${plug_name}_Relay"
id: relay
pin: GPIO5
restore_mode: ALWAYS_ON
- platform: gpio
name: "${plug_name}_Led"
id: led
pin: GPIO4
inverted: True
restore_mode: ALWAYS_OFF
sensor:
- platform: uptime
name: ${plug_name}_Uptime Sensor