Rpitools
RaspberryPi media server, with GPIO based OLED interface - with complete automatic deployment system
Install / Use
/learn @BxNxM/RpitoolsREADME

_____ _____ _____ _______ ____ ____ _ _____
| __ \ | __ \ |_ _| |__ __| / __ \ / __ \ | | / ____|
| |__) | | |__) | | | | | | | | | | | | | | | | (___
| _ / | ___/ | | | | | | | | | | | | | | \___ \
| | \ \ | | _| |_ | | | |__| | | |__| | | |____ ____) |
|_| \_\ |_| |_____| |_| \____/ \____/ |______| |_____/
WHAT IS RPITOOLS [HomeCloud]?
- RPITOOLS is an installation and configuration (deployment) system for the raspberry pi family. It deploys the official raspbain lite operating system and many useful programs(1), and set the complete system to a tiny low cost perfectly configured server.
- Completly set for remote usage - ssh, sshfs, sftp, smb, vnc(optional), website(http), camera stream support (motion)
- Sets an optional GUI (PIXEL) for graphical usage
- Supports a UNIQUE extension shiled with many periphery (Oled, led, buttons, etc.).
- LIST OF MAIN FUNCTIONALITIES:
- torrent client - transmission (with http client, port: 9091)
- network drive - samba (smb), web UI (h5ai)
- OLED (128x64) display support on extension shield
- extarnal ip deepnet clinet access (dropbox - external ip sync)
- description for duckdns installation (get your free web domain)
- disks handling: autoformat, automount, with commandline interface
- user management (permissions, groups, seperated disk space, shared disk space) with commandline interface
- terminal/command line set for easy usage - aliases and so on ...
- vim, xdotool, scrot, python (with many modules), kodi etc.
- custom
rpitools/autodeployment/config/rpitools_config.cfguser configuration based onrpitools/autodeployment/config/rpitools_config_template.cfg - security: ufw, fail2ban
- backup handling - system, user - backup, restore
- autosync based on rsync: remote, local sync with modes: copy, move, mirror
- complete system monitoring solution - sysmonitor
- embedded multiprocess communication memdict with commandline interface
- easy update:
update_rpitools
(1) Installing many linux apps and serices, furthermore creates several custom services.
More detailed informations coming soon for every function
How to install:
CONFIGURATION ON MAC & LINUX
Deploy and setup raspbian image
-
macOS: open terminal
CMD+SPACEtypeTerminalpress enter -
Linux: open
terminalandsudo apt-get install git -
clone rpitools repository from github - to get the resources
git clone https://github.com/BxNxM/rpitools.git
- go to rpitools/
cd rpitools/
source setup.bash
#### SETUP EXECUTION ####
* Detect the device | linux | mac | raspbian
* [linux | mac] install requirements on deployment side
and set installation environment.
* [raspbain] manage depoyment depends on your custom config
#########################
Follow the instructions.
Note: First you need to set up your custom configuration with confeditor. It will use vim editor, commands cheetsheet for vim:
VIM - command line text editor
ESC MODE
:w - type & enter - save the actual file
:q! - type & enter - exit without save
:wq - type & enter - save and exit
jump end of the line: $
jump beginning of the line: 0
INSERT MODE
move the cursor with the arrows [up - down - right - left]
SHIT + v - type - select line
CTRL + v - type - select block
y - type - copy selected area
x - type - cut selected area
p - type - paste copied area
Deployment
When your custom configuration (confeditor) is ready and validated, you can start to deploy your system.
- Execute deployment scripts:
./1_raspbian_imager.bash
###### DESCRIPTION ######
* It deploys (write) the factory raspbian_lite_latest image to the SD card.
(It serach your rapbian image from Downloads folder)
(If it not works copy your image under: rpitools/prepare/sd_card/raspbian_img)
#########################
./2_boot_config.bash
###### DESCRIPTION ######
* It makes an SD configuration, before the fisrt boot:
wifi, ssh, i2c, spi etc. based on previously set config file (rpitools_config.cfg)
#########################
- Unmount and disconnect the SD card from your computer. Take it to the pi, and power it up.
- Wait a little to boot up propely (max. 2-4 min.)
./3_remote_config_for_rpi_machine.bash
###### DESCRIPTION ######
* It copies all the rpitools repository to the raspberrypi
* Executes the rpitools/setup configuration sourcing
*** Based on your configuration (rpitools_config.cfg) it will prepare
your whole system.
* It takes 30-80 minutes (many installations and configurations with reboots)
#########################
./4_connect_and_enjoy.bash
###### DESCRIPTION ######
* FInally connect to your pi, and enjoy your NEW, PERSONAL environmat!
#########################
WIRING
If you have our - offcial shild - just connect it to your raspberrypi.
Otherwase if you want, build your own shield for your pi, wiring is down below.
RPITOOLS EXTENSION SHILED WIRING 1.0

OLED BOOTUP LAUNCH SETUP - CONFIGURE A SERVICE (optional) [1]
for more info:
oledinterface -h
- Use virtual buttons:
Oled dedicated buttons
oledinterface -b LEFT
oledinterface -b RIGHT
oledinterface -b OK
oledinterface -b standby
Oled page joystick buttons
oledinterface -j LEFT
oledinterface -j RIGHT
oledinterface -j CENTER
oledinterface -j UP
oledinterface -j DOWN
CUSTOMIZE OLED FRAMEWORK AND CREATE NEW PAGES (OPTIONAL)
- create your own page under
/home/$USER/rpitools/gpio/oled_128x64/lib/pages/page_XY.py
Change XY to the next page number
Use the example page resources under page folder, and create your own custom pages. List existing pages with:
List folder content:
llt /home/$USER/rpitools/gpio/oled_128x64/lib/pages
or
ls -lath /home/$USER/rpitools/gpio/oled_128x64/lib/pages
oled framework main features
- draw text
- draw shapes: ellipse, rectangle, line, poligon
- draw image
- automatic functions: header bar (optional), page bar (optional), button handling
- automatic button handling (physical and virtual over oledinterface)
- page control, load, run in loop, unload, next, previus etc...
performance with default settings (medium)
RaspberryPi Zero W - get service CPU usage (average)
while true; do cpu=$(ps aux | grep -v grep | grep "oled_gui_core" | awk '{print $3}') && echo -ne "oledfw: $cpu %\r"; done
On MEDIUM performance set:
CPU LOAD: 25 % - 35 %
CPU if oled in STANDBY: 2.3 %
BUILT IN KODI
_ __ ____ _____ _____
| |/ / / __ \ | __ \ |_ _|
| ' / | | | | | | | | | |
| < | | | | | | | | | |
| . \ | |__| | | |__| | _| |_
|_|\_\ \____/ |_____/ |_____|
use hardware optimized media player for 720p and 180p videos
run in command line:
kodibg
It gives you a full media player with many options. The video output goes to the dedicated HDMI connector.
RGB interface
_ _ _ __
| | (_) | | / _|
_ __ __ _ | |__ _ _ __ | |_ ___ _ __ | |_ __ _ ___ ___
| '__| / _` | | '_ \ | | | '_ \ | __| / _ \ | '__| | _| / _` | / __| / _ \
| | | (_| | | |_) | | | | | | | | |_ | __/ | | | | | (_| | | (__ | __/
|_| \__, | |_.__/ |_| |_| |_| \__| \___| |_| |_| \__,_| \___| \___|
__/ |
|___/
To controll connected rgb leds.
- start rgb service - it controlls the leds - and process requests
rgbinterface -s ON
- turn on the leds
rgbinterface -l ON
- set colors
rgbinterface -r 0 -g 0 -b 0
rgbinterface -r 100 -g 100 -b 100
# color ranges: 0-100, min. step 1
- turn off the leds
rgbinterface -l OFF
- turn off the service
rgbinterface -s OFF
You don't have to turn off the service, it can runs in the background, so you can send data for it over rgbinterface and it makes the magic ;)
- show rgb leds service status
rgbinterface -sh
- interface help for informations
rgbinterface -h
HAPTIC-ENGINE interface
_ _ _____ _______ _____ _____ ______ _ _ _____ _____ _ _ ______
| | | | /\ | __ \ |__ __| |_ _| / ____| | ____| | \ | | / ____| |_ _| | \ | | | ____|
| |__| | / \ | |__) | | | | | | | | |__ | \| | | | __ | | | \| | | |__
| __ | / /\ \ | ___/ | | | | | | | __| | . ` | | | |_ | | | | . ` | | __|
| | | | / ____ \ | | | | _| |_ | |____ | |____ | |\ | | |__| | _| |_ | |\ | | |____
|_| |_| /_/ \_\ |_| |_| |_____| \_____| |______| |_| \_| \_____| |_____| |_| \_| |______|
hapticengingeinterface -h
optional arguments:
-h, --help show this help message and exit
-u, --up HapticEngine UP signel
-d, --down HapticEngi
