GithubHelp home page GithubHelp logo

the78mole / bthometrap Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.31 MB

A BThome device for sending trap events.

License: Mozilla Public License 2.0

CMake 2.32% C++ 77.94% C 1.46% Python 5.81% Assembly 12.47%

bthometrap's Introduction

BTHomeTrap IoT Mouse Trap

An ESP-IDF project which reads hall sensor in ULP unit and sends data encoded in the BTHome format over BLE.

The hall sensor of the ESP32 is read in Ultra Low Power coprocessor in deep-sleep mode with consumption about 0.00016A. When hall sensor value trips more than 15 units, it wakes up main ESP unit, creates a BThome advertisment containing the event and its counts, adds the battery voltage and broadcasts the BLE signal (in BTHome standard), after that, it goes deep-sleep again.

Instructions

  1. Set up vscode with platform.io (recommended) or a CLI platform.io project
  2. Run build
  3. Upload to your board
  4. Connect 5V/VBat through 100K/47K Divider to ADC1_CH6
  5. Connect 3V3V through 100K/47K Divider to ADC1_CH5
  6. Place the ESP32 where the magnet will appear
  7. Power the board (with USB or with battery)
  8. New BTHome device should appear in home-assistant automatically

Assembly

Mouse Trap Assembly Wiring

Home Assistant BThome

HA-BThomeMouseTrap

References

  1. BTHome Water Meter
  2. BTHome Weather Station
  3. ULP Pulse Counting Example
  4. BTHome

Improvements

  • Use even less power (maybe unmount the power LED of the ESP DevKit)
  • Add OTA functionality

bthometrap's People

Contributors

the78mole avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.