Giter Club home page Giter Club logo

esp8266door's Introduction

esp8266door

pic1

pic2

Needed boards and libraries

How it works

Project uses ATTiny45 (although it should fit into 25). ATTiny monitors one pin for the change. It is important to pull that pin HIGH or LOW depending on the used sensor. ATTiny can detect any change (raising and falling) using pin change interrupt.

When the change is detected, pin "client power" goes HIGH. The client (ESP8266 in this case) runs its code. ATTiny waits for the client blinking every second (if LED is connected to "status led" pin). When processing is finished, ESP8266 sends LOW state to the "client callback" pin on the ATTiny. ATTiny changes "client power" pin to LOW, effectively powering down ESP8266.

Pin names are in sketches.

Remember about pull-up and pull-down resistors. I used 10K.

Configuration

If there is no configuration yet, ESP8266 turns itself in Access Point mode. The pin "configuration portal" can be pulled down to force Access Point mode.

The project uses WiFiSettings by Juerd:

WiFiSettings example

Additional configuration options (not present in the screenshot):

  • alarm_text - the text to be sent when pin changes state. Default: "⚠️ Alarm! ⚡ ${VCC} volts. 📶 ${RSSI} ${SSID}, ${IP}, ${MAC}.",
  • telegram_bot_token - token of your telegram bot,
  • telegram_user_id - your telegram user id.

alarm_text configuration

Following parts of the text will be replaced before the message is sent:

  • ${VCC} - internal voltage, when a regulator is used, will be 3V most of the time,
  • ${RSSI} - network signal strength, 100 % is the strongest signal, 0 % - the weakest,
  • ${MAC} - mac address,
  • ${SSID} - network name,
  • ${IP} - local IP address.

How to add your own telegram bot and get the token

  1. Install Telegram on local PC or your phone: from Play Store or from F-Droid.
  2. Talk to @BotFather to create your bot. Telegram bot manual can be found here.
  3. Note the token to access the HTTP API.
  4. Do not forget to start conversation with your newly created bot!

How to find telegram user id

  1. Talk to @userinfobot.
  2. The bot will give you your user id.

Battery usage

One 18650 battery lasted for 186 days. During that time 1130 messages have been sent. There were 4 warnings about low voltage before battery was removed. Voltage at the end of test was 3.41, charger reported 2366mAh to 4.2V.

Average use: 2366/186 = 12.72mA daily; 2366/1130 = 2.1mA per message.

esp8266door's People

Contributors

gdmn 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.