Skip to content

mashedkeyboard/Headlights

Repository files navigation

Headlights

Information when it's needed, where it's needed.

What is Headlights?

Headlights is a project that aims to deliver information across a variety of different and novel formats. The main goal of Headlights is to create a product that delivers information in a new and useful way. Headlights currently utilises ESCPOS receipt printing and e-ink PaPiRus displays to do this.

What is Headlights written in?

Headlights is a Python application, currently running in Python 2.7 due to the need for PaPiRus support. It uses a very slightly modified version of the wonderful Meteocons icon set for weather icons in the output, and the python-escpos library for printer communication.

What prerequisites are there?

How do I work this thing?

  1. git clone https://github.com/mashedkeyboard/Headlights.git
  2. cd Headlights
  3. Run sudo apt-get install libjpeg-dev to install JPEG libraries, if not already there
  4. pip install -r requirements.txt
  5. Run headlights.py and browse to localhost:9375.
  6. Complete the setup with your own values. To find your printer's vendor and product IDs, use the python-escpos documentation. Note that at this time Headlights only supports USB printers.

NOTE: This setup is not 100% complete at the moment. If something breaks, manually copy headlights.cfg.sample in the config directory, and edit from there.

What's all this about plugins?

All the individual sections of the report are put into plugins - you can enable or disable whatever you want within the app. Individual plugin configuration files live within the /config directory, and the plugins themselves live within the /plugins one. If you want to build a plugin, take a look at the weather plugin for an example to go on.

What if something goes wrong?

  1. Make sure you a) have headlights.cfg in your config directory, and b) it's syntactically valid (check the sample to make sure).
  2. Check headlights.log - see if there's anything helpful in there, it should all be human readable.
  3. Create an issue on GitHub if you still can't get things working. Include your headlights.log file.