Você está no 3DFinder
Buscamos em Thingiverse, MakerWorld e Printables ao mesmo tempo para te dar o melhor de cada uma.
Descrição
This is a case with a snap on back for a reed switch connected to a D1 mini that can be used as a door/window sensor.
The reed switch is connected to pins D2 and GND. There is the option power the D1 mini by USB or hard wire it to a 5V power supply, where the wires can pass through the top of the case. To hard wire it to a 5V supply the connection needs to be to the 5V pin and GND.
The D1 mini can be snapped into place inside the case, and the case has a horizontal marker at the front indicating the position of the reed switch so it can be aligned to the magnet.
I find these switches are ideal where there is a permanent power supply and they are incredibly reliable. They can be setup in ESPHome in Home Assistant and used to run various automations and notifications. Below is the yaml code for the switch:
esphome:
name: "garage-door-sensor
friendly_name: Garage door sensor
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "your_encryption_key"
ota:
- platform: esphome
password: "your_ota_password"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: NONE
ap:
ssid: "Garage door sensor"
password: "your_ap_password"
sensor:
- platform: uptime
name: "Uptime"
- platform: wifi_signal
name: "Wi-Fi Signal Strength"
update_interval: 30s
binary_sensor:
- platform: gpio
pin:
number: D2
mode: INPUT_PULLUP # Uses internal pull-up resistor
inverted: false # Invert if using NO switch
name: "Door"
device_class: garage_door
filters:
- delayed_on: 50ms
- delayed_off: 100ms
on_press:
- lambda: ESP_LOGD("Garage door sensor", "Open");
on_release:
- lambda: ESP_LOGD("Garage door 2 sensor new", "Closed");
text_sensor:
- platform: wifi_info
ip_address:
name: "IP"
Gostou deste modelo? Crie uma conta grátis para salvar seus favoritos e voltar a eles depois.
Criar conta