Giter Club home page Giter Club logo

pidisplaysleep's Introduction

PiDisplaySleep

A powersaver code written in python3 to put your Pi's display to sleep when you are not near it (checks if your phone is connected to the wifi !). This code is mainly aimed to run on smart mirrors(I use MagicMirror). If you live in a dorm room like me and dont want your mirror up all day long when you are away: this does the purpose !

Set up : Enter your phone's or whatever devices' IP address in the script. Run the script at boot OR just run the main.py as : " python main.py & " through ssh and exit ssh with Ctrl + D. This will run the script in background until the next power down.

Note: this project uses the nmap package to do network scans; make sure you install it on your device using $ sudo apt-get install nmap

pidisplaysleep's People

Contributors

ndom91 avatar rpdp-git avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pidisplaysleep's Issues

Is PiDisplaySleep still active?

Is this module still active? I can't get it to work correct. I do the install and end with the "python main.py &", but there is no turn off when my phone leave the house. Have try with 2 different IP-adresses. I do have the sudo apt-get install nmap.

multiple users?

Sorry, i'm really new with programming. Would it be possible to have the module us 2 different ip's to look for? would like it to be able to tell if either my wife or I are home.

Hostname

I'm not good with python, but check if hostname is active on network?
In case of DHCP change of IP.

hostname="samsung_s10"
nmap_out=str(popen('nmap -sP '+hostname).read())

Could work?

Great idea for module, just what I want. :)

Display turns of all 30sec

Hey I really like your little Script, but it turns off and on the Display in short intervals of about 30 seconds or less while the Device it´s looking for is in the WIFI-Network all the time.
Is this a normal behavior?

Greetings from Germany

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.