Coder Social home page Coder Social logo

seanmavley / unifi-guest-bundle-check Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 2.0 3.59 MB

Let Unifi Guests check voucher data bundle left

Home Page: https://blog.khophi.co/tag/unifi

JavaScript 29.58% HTML 68.46% CSS 1.97%
unifi hotspot unifi-controller unifi-hotspot vouchers-check voucher wifi-hotspot

unifi-guest-bundle-check's Introduction

Unifi Guest Voucher Check

Allow users of your Unifi hotspot with vouchers check how much data they have left.

This is a stripped down version of the entire

What

A way for my Unifi WiFi Hotspot users to check the data left on their voucher quota themselves. I'm tired of doing the maths for them every now and then.

Here's how it looks in the browser:

Voucher Stats Display Screenshot 1 - Voucher Stats Display

Voucher Check Form Screenshot 2 - Voucher Check Form

Why

Users of our wifi network needed a way to check the validity, data remaining and expiry of their vouchers on their own. Worked on this project to get that done.

Not interested in customers knocking my door at 2 am just to ask how much data left in their 100mb package.

How

The Unifi Controller comes with an API. Delian, beautifully also has this project https://github.com/delian/node-unifiapi which is node-based and exposes an API for consuming Unifi Controller's API.

I just query for a list of guests, the return the object with a matching voucher as the requested.

A bit of additions and or subtractions are done in the templates to present the total data quota, how much used and left.

How to Use

This project was built with Node 7+ in mind, so make sure you have Node installed, Bower and NPM ready.

  • Download this repository
  • Create a credentials.js file, and modify it with content similar to as seen in the credentials-sample.js file.
  • Run node bin/www within the project directory to start the server on port 3010
  • Open localhost:3010/check-voucher in your browser to see voucher interface.

The / (homepage) of the project above is simply something particular for the WiFi hotspot I run. Just change the routes to match whatever you want.

Check Unifi articles on Khophi's Dev Blog to read an article about this project.

unifi-guest-bundle-check's People

Contributors

jeffgodwyll avatar seanmavley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

unifi-guest-bundle-check's Issues

Checking time before expiration

Heya! Really great and much needed addition to UniFi controller!

I'm wondering if this could be expanded to check time based vouchers / authorizations done by payments as well?

Instead of only showing data quota left, it would also display the time when voucher or payment authorization will expire.

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.