Giter Site home page Giter Site logo

rebootmaddevice's Introduction

RebootMadDevice V2 - MAD Plugin

Reboot MAD devices via ADB or PowerSwitch when device is not responding.

Only works with Python 3.6 and above.

Run the installation and this scripts not with sudo. Use root user!

Running the daemon is only possible with root user!

After restarting MAD it will take about 5 minutes before a client can connect.

This time is nessessary to give MAD enough time to collect the nessessary data for the plugin.

Install:

MAD Server:
- Copy plugin from folder /MAD_plugin to <MAD plugin folder>/RebootMadDevice/ 
- adjust plugin.ini to your requirements

Raspberry or Server:
- pip3 install -r requirements.txt
- pip3 install -r requirements_rpi.txt (only for raspberry - add support for GPIO and LED)
- copy config.ini.example to config.ini and adjust the values
- adjust RMDclientDaemon.sh with install path

Using the daemon:

The deamon has to be started with:

RMDclientDaemon.sh start

if you want to check that is running:

RMDclientDaemon.sh status

and if you want to stop:

RMDclientDaemon.sh stop

Doing a manual reboot (e.g. for testing):

A manual reboot can be done with the ManualReboot.py script:

   ManualReboot.py -o <DEVICE_ORIGIN_TO_REBOOT>
or
   ManualReboot.py --origin <DEVICE_ORIGIN_TO_REBOOT>

Features and supported hardware:

- support for status LED with WS2812 led stripe
- support for external status LED via websocket (https://github.com/FabLab-Luenen/McLighting)
- usable with PowerBoard (Link will follow)
- usable with external commands
- usable with web api like sonoff
- usable with snmp
- usable with gpio
- relay mode NC or NO

Whats new:

- MAD plugin 
- server client architecture
- timeout can now be configured in plugin.ini
- next reboot of a device only after defined timeframe
- Discord Webhook support (without discord_webhook dependency)
- devided requirements in two parts (general and raspi)
- ADB reboot optional
- manual reboot script for testing
- IP ban check for MAD backend and PTC

License

See the LICENSE file for license rights and limitations (MIT).

rebootmaddevice's People

Contributors

ghosttalker avatar reedy avatar debaucus avatar pfitzer 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.