Git Product home page Git Product logo

guest-password-printer's Introduction

guest-password-printer

This project uses a thermalprinter, which is connected via Serial, to print out guest passes for Ubiquiti Unifi enabled wireless networks. We use this one: https://www.adafruit.com/product/597 - but you can use any, if the protocols are the same.

Installation

Node part

This Project uses Node 6.10.0, so you have to install this.

Use either NVM or follow the docs at https://nodejs.org/en/ to install Node and NPM. Once you installed Node do npm install. This will install the needed libs and you are ready to go.

You propably need to adjust the Serialport used. Just change line 2 in index.js to your corresponding port. The one used, is the correct one for the raspberrypi zero.

Python part

TODO

Usage

The button.py script, listens for buttonpresses on GPIO Pin 24 (Pin 19 on the Board) on a Raspberrypi Zero or compatible and then runs the Node script, if the button is pressed. Example:

# export USER=unifiuser;
# export PASSWORD=unifiuserpassword;
# export HOST=unificontrollerhost
# python button.py

Or replace python button.py with node index.js if you just want to print a code.

guest-password-printer's People

Contributors

hennedo 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  avatar  avatar

guest-password-printer's Issues

Python Code Request

I am wondering if your willing to share a detailed part's list and the python code that was used for this project. Amazing progress on the work so far. +2

Thanks,
David Stahl

Slow Printing

Let the NodeJS script act as webserver, and start printing through http request.
The NodeJS script could run all the time, so it has already setup the serial connection, which cuts down the printing time to 4 seconds.

CUPS support?

Would it be possible to add CUPS support? I've tried adding a cups printer to your script with zero sucess. Is it possible to comment out the serial information and use a path like: usb://Unknown/Printer?serial=Printer Currently I am able to print a test page from the CUPS web interface to the printer.

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.