Git Product home page Git Product logo

tasmota_safepower's Introduction

tasmota_safepower

Using Tasmota rules as a safe shutdown for linux sbc.

I use rules so it can be run in either ESP8266 or ESP32. For ESP32, it also create a serial bridge using 2nd serial channal, so you can monitor a serial console.

The rule basically does the following:

  • Detect a button press
  • Turn a relay on or off and pulse an output call shutdown
  • Depending on the number of times and the duration of the press, it does the following:
    1. First press when the system powers up will turn the relay on and change shutdown to low
    2. Second press will pulse the shutdown output
    3. Third press will change shtdown to low and turn relay off for 3 second, then turn it back on
    4. The sequence will repeat from 1.
    5. At anytime, when the button is press and hold for longer than 3 second, shutdown wil be pulsed and relay turn off after 30 second.

There is also a companion c program on the linux side which detect the shutdown signal on a GPIO, triggering a falling edge, which issue a system poweroff.

I have tested this on a LC Technology DC5-60V 1 Channel Relay Board, which is a ESP32 based board and a Nanopi Neo 2.

tasmota_safepower's People

Contributors

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