Version 4.0.0
There are two ways you can install AdoPiSoft System into your machine:
Image flashing is the easiest way to install the system into your machine (if an image is available for your board/machine).
Softwares to Download:
After downloading the needed softwares, we need to flash the image into the midro SD card using Etcher. To do so, unzip the contents of the zip file (adopisoft-xxxxx.zip).
Insert the micro SD card into the your computer using a card reader.
Open Etcher and click Select Image.
Then select adopisoft-(version).img from the zip file.
Make sure to select your micro SD card
Click the Flash button and wait for the process to finish.
NOTE: If you encounter prompts about formatting your sd card, just click Cancel.
Now, you are ready to configure the machine. Eject the SD card and Proceed to Initial Setup section.
Important: Before proceeding with command-line installation, it is assumed that you are already familiar on how to install a debian-based operating system into your board/machine.
Command line installation is used when software image is not available for your board/machine. First, you need to have access to the command line of your board/machine. In this guide, we will use Raspbian as an example. But this guide is also applicable to any debian-based OS like Armbian and Ubuntu Server 16.04/18.04 . For Orange PI boards, you can download the OPI image here. Just follow the corresponding board type and their supported OS.
NOTE: Make sure to install a command-line OS only. OS's with desktop environment is not supported. For Raspberry Pi, this means the Raspbian Lite image. For Ubuntu, choose the Ubuntu Server ISO(16.04/18.04). Armbian is almost always command-line only.
Connect your LAN cable, keyboard, monitor and USB to LAN adapter(optional) to your board. Then power on your board and wait for the login screen to appear. The default user for Raspbian is pi with password raspberry.
For armbian: After logging in, you will then be asked to create a new user. Just follow the instructions on your device's screen. After creating a new user, you are now ready to install the system into your board/machine.
Just copy-paste the commands below line by line:
sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install curl -y curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y nodejs python nginx bind9 isc-dhcp-server sudo apt-get install -y hostapd dmidecode build-essential openssh-server python-pip unzip bridge-utils
This is for Orange Pi only:
sudo pip install --upgrade OPi.GPIO
Note: You can find your board's architecture using:
dpkg --print-architecture
For Raspberry Pi 3 & 4, OrangePi Zero/One/PC (armhf architecture):
wget https://github.com/AdoPiSoft/Releases/releases/download/4.1.2/adopisoft-4.1.2-release-armhf-node-v12.16.1.deb sudo apt-get install ./adopisoft-4.1.2-release-armhf-node-v12.16.1.deb
For x64 machines - VM's/Server (amd64 architecture):
wget https://github.com/AdoPiSoft/Releases/releases/download/4.1.2/adopisoft-4.1.2-release-amd64-node-v12.18.3.deb sudo apt-get install ./adopisoft-4.1.2-release-amd64-node-v12.18.3.deb
For RaspberryPi, you have to unblock wifi:
sudo rfkill unblock 0
Make sure to disable SSH service after a successful installation. Warning: You will not be able to access your board/machine command-line remotely after this.
sudo systemctl disable ssh
Now, enable and start adopisoft service and proceed to Initial Setup section.
sudo systemctl enable adopisoft sudo systemctl start adopisoft
Note: The default database used is sqlite because it's the only database that can be package into the debian file. But we highly advice to change the database to postgresql after you have successfully setup the admin.
Run the command below line by line to create postgresql account:
(if the script will not work you can follow the step by step guide here)
wget https://gist.githubusercontent.com/alenteria/791dbe32175a01d1f1b602b25489ad22/raw/9a5aa879ac70d24bd9a7dd7f8ed97d7fe2c2f597/ado-psql-script.sh sudo chmod a+x ./ado-psql-script.sh sudo ./ado-psql-script.sh --- if the above command failed, try the following: --- bash ./ado-psql-script.sh
Then in the admin “Security → Database Connection” settings, change the config to:
Database Type: postgres Host/IP: localhost Port Number: Database Name: adopisoft Username: adopisoft Password: adopisoft
Restart machine and go back to “Security → Data Connection” after boot and click “Run migrations”.
IMPORTANT: Make sure you do the following before turning on your board/machine:
Find your board/machine's IP address. In your board/machine's screen, just type:
ip addr
On windows, you can install network scanner on your PC to scan for your board/machine's IP.
Once you have identified your board/machine's IP address, open your browser on your PC and type the url to your board/machine's IP address.
Example:
http://192.168.1.123
Important: Make sure your board/machine has two network interface. For boards without wifi interface, you have to insert the USB to LAN adapter first.
NOTE: This is only applicable for boards/machine with built-in wifi interface like Raspberry Pi.
Reboot your machine. Then proceed to Wired Coinslot Configuration section.
Contains announcements fetched from our server. Contents of this page can also be viewed at website home page.
In wifi users list, you can view the devices connected to wifi which includes the hostname, mac address, ip address and status of individual device.
For each device, you have the options to view sessions, edit and block or unblock the device.
You can view the sessions for each individual device.
You can add/edit/remove individual sessions. Please see Session Types for more information about session types.
Built-in coinslot uses on-board GPIO pins as sensor for coin acceptors.
Please refer to gpio_numbering page.
Serial coinslot uses Arduino to handle credit pulses, lcd display, and keypad E-loading. The data is transmitted via USB serial.
2 ways to flash arduino
Materials Needed:
Wireless coinslot uses ESP8266 board as coinslot sensor. You can also connect LCD and keypad to the ESP8266 board for E-loading setup. The ESP8266 will automatically connect to the machine given that it has the correct ssid config and has matching token or encryption key. Connected ESP8266 devices will show in the CONNECTED WIRELESS COINSLOTS table. Click on the edit or pencil icon on the device to show the LCD menu settings.
Materials needed:
Important Note: All the modules should be in common grounds, or use common power adapter. For bill acceptor, don't directly connect the inhibit wire into the ESP8266 as it can damage your board. Use a relay to ON and Off the ground connection to the inhibit.
PIN D8 can be use for Buzzer or for Physical Reset button (use the correct binary file, suffix with D8-reset or D8-buzzer).
For a Reset Button, connect to 3V on button press. When pin D8 is HIGH, payment que session will be cancelled same as clicking “Cancel” on the captive portal payment que.
For a Buzzer, it usually has 3 wires 2 for power(+/-) and 1 for input which is PIN D8. Please refer to Buzzer module guide
There are 3 main types of sessions in our system available in captive portal:
This is the traditional session with remaining time in seconds. But unlike before, each transaction has separate time. They are not combined to previous session. The session becomes invalid once the user has consumed the allocated time.
This session is based on data consumption of the user. The session becomes invalid once the user consumed the allocated data in megabytes (MB).
Whichever is consumed first, time or data. The session will become invalid once either of time or data is consumed by the user.
The user can have multiple sessions, including the subscription session. Once the previous session is consumed, it will automatically activate the next available session. If the user has no more sessions available, the user is automatically disconnected from the internet.
The other type of session is Subscription. Subscription session does not have allocated time or data. Instead, it will only track the data consumption of the device and how long the session has been running. Subscription session can only be generated manually in the dashboard for the intended device or through voucher. It can be used to allow only specific hosts to connect outside the network - e.g. smart TV’s, CCTV/IP Cameras, etc. aside from walled-garden based on TCP/IP port numbers. It can also be used to accommodate a whole household using a voucher with subscription type session.
Each session is editable and has the following options:
The default bandwidth of a session is taken from captive portal bandwidth settings. The default session expiration is taken from session settings in the admin dashboard. The expiration date/time can be disabled.