Skip to content

debsahu/HASirenMQTT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP8266/32 (Home Assistant 120dB Siren Switch) connected to GPIO5

Build Status License: MIT version LastCommit

Home Assistant Switch for 120dB Siren on GPIO5

  • Code can compile on ESP8266/32
  • Uses WiFiManager to get WiFi/MQTT info from users
  • Gets auto-discovered by Home Assistant as a MQTT switch
  • Web-Server/WebSockets to control alarm
  • REST-API to control alarm
  • 120dB Siren is connected to D1/GPIO5
  • GPIO0/FLASH_BUTTON acts as "test"

HASirenMQTT

Libraries Needed

platformio.ini is included, use PlatformIO and it will take care of installing the following libraries.

Library Link
MQTT https://github.com/256dpi/arduino-mqtt
Bounce 2 https://github.com/thomasfredericks/Bounce2
ArduinoJson https://github.com/bblanchon/ArduinoJson
WiFiManager Develop https://github.com/tzapu/WiFiManager/archive/development.zip
Arduino WebSockets https://github.com/Links2004/arduinoWebSockets
UpdateUploadServer (ESP8266) https://github.com/debsahu/DDUpdateUploadServer

Hardware

Items

  1. ESP8266 (aliexpress) / ESP32 (aliexpress)
  2. 120dB 12V Siren (amazon)
  3. IRLB8721 N-channel MOSFET (adafruit)
  4. 3S Battery (amazon)
  5. B3 Charger (aliexpress)
  6. Project Box (amazon)

Instructions

  • Use N-channel MOSFET, exact one used here is IRLB8721: works with 12V, gate can be controlled by 3.3V signal
  • Connect the gate of MOSFET to D1/GPIO5, source to GND, drain to -ve of siren, +ve of battery to +ve of siren
  • Use 300k and 100k voltage divider for checking battery voltage of 3S battery

schematic

About

Home Assistant Switch for 120dB Siren on GPIO5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published