Created
March 21, 2021 09:30
-
-
Save ithygit/5ee49784e4544117fbfca9138cb685fe to your computer and use it in GitHub Desktop.
esphome_esp8266_rcwl0516_v1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#For using RCWL0516 microwave motion detectors. Using a dev/breakout board I find is easiest for this. | |
#ESP8266 Pins | RCWL0516/Connection | Comment| | |
#| VIN | 5v from PSU | Provides 5V to the ESP8266/Alt use the breakoutboards DC | |
#| VU/5V | VCC on RCWL0516 | Powers the module with 5v from esp's rails, pref add cap/direct power, just remember the earth back to the esp | |
#| D2/GPIO4 | OUT on RCWL0516 | RCWL sends HIGH signal when motion detected | | |
# Tune the way you wish this sensor to be triggered, ideally on the esphome to reduce the flapping/sensitivity of this module. | |
# Use several or other detectors for confidence in precense detection | |
esphome: | |
name: esp8266room | |
platform: ESP8266 | |
board: nodemcuv2 | |
sensor: | |
- platform: wifi_signal | |
name: "WiFi Signal Sensor" | |
filters: | |
- median: | |
window_size: 7 | |
send_every: 4 | |
send_first_at: 3 | |
update_interval: 300s | |
binary_sensor: | |
- platform: gpio | |
pin: D2 | |
name: "MicroBoi" | |
id: "MicroBoi" | |
device_class: motion | |
filters: | |
- delayed_on_off: 1000ms #Debounce somewhat | |
# on_state: # Alternate state changing. Ditchd in favour of local api querying using Python3 module | |
# then: | |
# - lambda: !lambda |- | |
# id(MicroBoi).publish_state(true); | |
######### | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_pass | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "ESP8266-FALLBACK" | |
password: "Allyouwantisapasswordbutallyougotwaswastedcycles^$\n" | |
captive_portal: | |
text_sensor: | |
- platform: wifi_info | |
ip_address: | |
name: "Esp8266Room ESP IP Address" | |
ssid: | |
name: "Esp8266Room ESP Connected SSID" | |
bssid: | |
name: "Esp8266Room ESP Connected BSSID" | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: ""Allyouwantisapasswordbutallyougotwaswastedcycles^$\n"" | |
ota: | |
password: ""Allyouwantisapasswordbutallyougotwaswastedcycles^$\n"" | |
# Example configuration entry | |
switch: | |
- platform: shutdown | |
name: "Esp8266Room ESPHome Shutdown" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment