Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/unipiPublic

WiFi voucher vending machine leveraging UniFi controller and UniFi access points

License

NotificationsYou must be signed in to change notification settings

kleo/unipi

Repository files navigation

UniPi is a WiFi voucher vending machine leveraging UniFi controller and UniFi access points.

Demo

UniPi demo

Pics

  1. WiFi selection

  2. Voucher entry

  3. Finished build

Example use cases
  • Single access point and a Raspberry Pi as controller server and client.
  • Large deployment with wide coverage multiple access points and Raspberry Pi clients and a controller server.
  • Multiple sites with cloud controller server.
Advantages over existing proprietary solutions
  • Raspberry Pi does not handle network connections therefore no bottleneck on internet connection.
  • Modular and simple for large scale sites, establishments and outdoor locations.

Setup

Hardware requirements

  1. Raspberry Pi 3 Model B
  2. Micro SD Card
  3. Universal coinslot
  4. Switching power supply
  5. 2 pieces button switch
  6. Jumper wires
  7. 16x2 character LCD
  8. 1 Piece 3.3k Ohms 5% resistor # for setting character LCD contrast
  9. Micro USB power cable
  10. UniFi wireless access point

Wiring

Breadboard setup

Also includedunipi.fzz usingFritzing

Finalization includes removing breadboard and connecting button and ground pins directly to the Raspberry Pi.

Connect 12V universal coinslot to BL-100 switching power supply 12V and ground.

Cut and connect Micro USB power cable to BL-100 switching power supply 5V and ground.

Controller

Controller setup is for Raspberry Pi without a controller server existing on the network.

If you already have an existing Controller skip toSetup Client.

Flashing Raspbian

Download Raspberry Pi OS (32-bit) Lite fromraspberrypi.org

Install Docker using the convenience script

$ curl -fsSL https://get.docker.com -o get-docker.sh$ sudo sh get-docker.sh$ sudo usermod -aG docker pi$ newgrp docker$ sudo apt install docker-compose

Install Docker UniFi Controller for Raspberry Pi

$ mkdir unifi && cd unifi$ curl -O https://raw.githubusercontent.com/ryansch/docker-unifi-rpi/master/docker-compose.yml$ docker-compose up -d

Wait for a few minutes and the controller should be up athttps://raspberrypi.local:8443 orhttps://<ip>:8443

Tested on UniFi controller version 5.13.32(Build: atag_5.13.32_13646) on latest tag.

Configure UniFi controller (Classic settings)

Settings > Wireless Networks

Create Wireless Network with Name/SSD: UniPi or anything

Enable Wireless Network

Set Security as Open

Settings Wireless Networks > Advanced Options

Disable Block LAN to WLAN Multicast and Broadcast Data

Enable Combine 2 GHz and 5 GHz WiFi Network Names into one

Settings > Guest Control > Guest Policies

Enable Guest PortalSet Authentication as Hotspot

Portal Customization

Customize Portal to your preference

Hotspot

Enable voucher-based authorization

Setup Client

Clone UniPi

$ cd ~$ git clone https://github.com/kleo/unipi

Configure config.ini

Defaultconfig.ini provides defaults for the client setup on the Raspberry Pi used byunipi-coinslot.

[config]# the controller address (default "unifi", example "unifi.example.com")controller = localhost# the controller username (default "admin")username = admin# the controller passwordpassword = password# the controller port (default "8443")port = 8443# the controller base version (default "v5")version = v5# the site ID, UniFi >=3.x only (default "default")siteid = default# don't verify ssl certificates set as True or False without quotesnosslverify = True# verify with ssl certificate pem file (not required)certificate =

Configure rates

Modify the script unipi-coinslot and change the set default values for upload speed allowed in kbps (optional)up_bandwidth=4098, download speed allowed in kbps (optional)down_bandwidth=4098 and quantity of bytes allowed in MB (optional)byte_quota=1000.

More info oncreate_voucher() atPyUnifi create_voucher

Start UniPi client

$ docker-compose up -d

Manual setup/development

Install required dependencies

$ sudo apt install git python3-venv

Setup virtual environment

$ python3 -m venv venv$ source venv/bin/activate$ pip install -r requirements.txt$ python unipi-coinslot

About

WiFi voucher vending machine leveraging UniFi controller and UniFi access points

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp