AS 3935 franklin lightning sensor integraterd with Home assistant through ESP home and NodeMCU .Also run an automation scripts on backround to switch off main Electrical Switchgear and protect from high voltage surge.
ESPhome configuration.yaml file:
esphome:
name: lightning-detector
friendly_name: Lightning_Detector
esp8266:
board: esp01_1m
Enable logging
logger:
Enable Home Assistant API
api:
encryption:
key: "nf4KHIDda9ItUqT/9+3Eg6wGJiX15zPZ6LDuF6ZpkrQ="
ota:
- platform: esphome
password: "27e6315770c43c9b2026443de0c6079b"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lightning-Detector"
password: "mYxQmz4ylsg6"
captive_portal:
i2c:
sda: GPIO4
scl: GPIO5
scan: True
frequency: 500khz
as3935_i2c:
irq_pin: GPIO13
indoor: True
noise_level: 2
spike_rejection: 5 # Default 2
lightning_threshold: 5
mask_disturber: True
div_ratio: 0
capacitance: 1
watchdog_threshold: 2
calibration: True
binary_sensor:
- platform: as3935
name: "Storm Alert"
sensor:
- platform: as3935
address: 0x03
lightning_energy:
name: "Lightning Energy"
distance:
name: "Distance Storm"
switch:
- platform: gpio
pin:
number: GPIO0
inverted: true
name: "House Main Switch"
Paste this yaml file on your ESP home (Dfrobot Gravity Sensor).
Негізгі бет Home Assistant - AS3935 Franklin Lightning Sensor Integration and Protect Home Automation
Пікірлер