Giter Club home page Giter Club logo

ups-display's Introduction

UPS-Display

Python3 script to show info about APC UPSes on a e-Paper display and a RPi Zero W.

GitHub Logo

What you need

Before you start, make sure you have the SPI interface enabled on your Raspberry

sudo raspi-config
Choose Interfacing Options > SPI > Yes  to enable SPI interface
sudo reboot

Displayed info:

  • Status
  • Load
  • Charge
  • Time left
  • Voltage
  • Firmware
  • Serial
  • Model

Setup:

  1. Install the required packages to build BCM libraries:

     sudo apt-get install gcc make libc-dev 
    
  2. Download and install BCM2835 libraries:

     wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
     tar zxvf bcm2835-1.60.tar.gz 
     cd bcm2835-1.60/
     sudo ./configure
     sudo make
     sudo make install
    
  3. Install python3 and the required libraries and modules:

     apt-get install python3 python3-pip python3-pil python3-numpy python3-rpi.gpio python3-smbus wiringpi
     python3 -m pip install spidev
     python3 -m pip install RPi.GPIO
     python3 -m pip install setuptools
     python3 -m pip install apcaccess
    
  4. Now you can clone this repository, open the file upsdisplay.py and modify "YOUR_RASPI_IP" with the IP address of your Raspberry Pi.

  5. To run the script in background execute:

     python3 upsdisplay.py&
    

Acknowledgements:

Notes:

This project has been realized for personal use. I am not a developer, it is the first application I write in Python and it may not be optimized or formally correct.

ups-display's People

Contributors

mtrimarchi avatar stinocon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mtrimarchi

ups-display's Issues

Need some help

Hi,

Maybe could you help how to open and start properly those cloned files on raspberry pi ?

connection refused

Traceback (most recent call last):
File "upsdisplay.py", line 17, in
apcdata = apc.parse(apc.get(host="192.168.1.66"), strip_units=True)
File "/usr/local/lib/python3.7/dist-packages/apcaccess/status.py", line 37, in get
sock.connect((host, port))
ConnectionRefusedError: [Errno 111] Connection refused

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.