DietPi-Software | Details for ALL installation options

Everything you need to download and start your DietPi experience.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v158

Post by Fourdee »

AudioPhonics Pi-SPC:
Power control module for Raspberry Pi which allows you to physically power on/off the system, without the need to run "poweroff".
https://www.audiophonics.fr/fr/kits-mod ... 11125.html
pi-spc.jpg
Notes:
  • Please ensure the correct GPIO pins are used, when connecting Pi-SPC to RPi (see image below)
  • To power off system, and begin the shutdown process: Hold the power button for < 0.5 seconds. If you don't have a button, you can also close the pins BP PIN C and BP PIN NO, with your favorite electrically conductive metal (eg: tweezers).
  • NB: Avoid holding the power button for longer than 2 seconds, as this will hard power off system (same effect as pulling the power). Doing so will create file-system corruptions, during shutdown IO operations.

>> Return to DietPi-Software List
Attachments
gpio-numbers-pi2.png
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v158

Post by Fourdee »

Raspotify:
Spotify Connect client for the Raspberry Pi that Just Works™.
  • NB: You’ll need a Spotify Premium account in order to use Connect.
spotify-connect.png
spotify-connect.png (11.15 KiB) Viewed 53828 times
Notes:
Raspotify should work straight out of the box.
  • However, you can change the available options in:

    Code: Select all

    /etc/default/raspotify
  • Then restart services with:

    Code: Select all

    dietpi-services restart

>> Return to DietPi-Software List
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v158

Post by Fourdee »

Google AIY voice kit:
"Ok Google. Who is your daddy?"

Notes:
  • Our installation is highly optimized and lightweight. We do not install a desktop environment. User will be required to setup Google API and keys on another system (please see 1st run setup below)
  • We highly recommend SSH to allow for a quick setup of Google API and device link.
  • We also recommend one of DietPi File servers, for easy transfer of assistant.json, generated during Google API setup.
googleaiy.jpg
1st Run Setup:
Once DietPi has installed the Google AIY voice kit, and rebooted, you will need to setup your Google API account and link the device.
  • Follow the link below, to setup Google API and download client keys, required to enable the speech API:
    https://aiyprojects.withgoogle.com/voic ... istant-api
    NB: When setting up the activity controls, ensure you also enable "Include Chrome browsing history and activity from websites and apps that use Google services", else, she will not function ;)
  • Make sure you have one of DietPi's File Servers installed.
    Once completed, download the client_secret.json and save it to:
    - If using SSH = /mnt/dietpi_userdata/voice-recognizer-raspi/assistant.json
    - If using File Server = voice-recognizer-raspi/assistant.json
  • Run the command below, then follow the onscreen link/instructions to setup verification:

    Code: Select all

    sudo -u dietpi /mnt/dietpi_userdata/voice-recognizer-raspi/env/bin/python3 -u /mnt/dietpi_userdata/voice-recognizer-raspi/src/main.py
  • Once the "Ok, Google" prompt appears, test the device, then, you can terminate the program with CTRL+C, then restart services:

    Code: Select all

    dietpi-services restart

Install Notes:
Where is the voice software located?

Code: Select all

/mnt/dietpi_userdata/voice-recognizer-raspi
Check service status:

Code: Select all

dietpi-services status

Attachments
32693153-c5f5883e-c71d-11e7-9e6c-e4f6fbd9ec7a.png
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v158

Post by Fourdee »

Gitea:
Your very own GitHub style server, with web interface.
gitea_0.jpg
gitea_0.jpg (7.31 KiB) Viewed 44552 times

Access Gitea web interface:
url = http://192.168.0.100:3000

First run setup:
Once connected to the web interface:
  • Change the following values only:
    • MySQL database user = gitea
    • MySQL database password = dietpi
    • Repository Root Path = /mnt/dietpi_userdata/gitea/gitea-repositories
    • Log Path = /var/log/gitea
  • Scroll to the bottom of page and select Install Gitea
  • When the web address changes to localhost: and fails to load, you need to reconnect to the webpage using the ip address (eg: http://192.168.0.100:3000)
  • Once the page has reloaded, you will need to click register to create the admin account
External access:
If you wish to allow external access to your Gitea server, you will need to setup port fowarding on your router, pointing to the IP address of your DietPi device.
  • Port = 3000
  • Protocol = TCP+UDP
>> Return to DietPi-Software List
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v156

Post by Fourdee »

Home Assistant
Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control. Perfect to run on a Raspberry Pi.

Image

(IMPORTANT) Initial install and access:
The install process on slower SBC models can take a very long time, up to 2 hours, hence take a coffee, find some other activity and check back once in a while. It will show Installing Python-3.8.0... a very long time. If you want to see processing details, run htop on a dedicated terminal or SSH session to watch Python build process live.
After dietpi-software has finished and the service starts the first time, please go through the following steps manually:
  1. Run htop and wait until homeassistant processes CPU usage goes down to ~zero.
  2. Run systemctl restart home-assistant
  3. Run htop and wait until homeassistant processes CPU usage goes down to ~zero.
  4. Open the HA web UI (see below). It will again install some Python modules on first access, which can again take a little while. Always check htop if you are unsure, which reveals any Python/pip module install process, if currently done.
Access Web Interface:
URL = <your.domain/IP>:8123

Configuration files:
The configuration files are stored system-wide within: /mnt/dietpi_userdata/homeassistant
Please see the online documentation: https://home-assistant.io/docs/

Customise Python environment:
Home Assistant is installed within a dedicated Python environment, powered by: https://github.com/pyenv/pyenv
This places a standalone Python instance which runs completely independent from any other installed Python instance or modules. If you need to install additional Python modules into this pyenv environment, update Python itself or similar, you need to open a shell as user homeassistant and activate the pyenv environment:
  • sudo -u homeassistant bash
  • . /home/homeassistant/pyenv-activate.sh
  • pip3 install <module> # Or whichever install/update you need to do
Update Home Assistant to current version:
To quickly update Home Assistant to the current version, run:
  • /home/homeassistant/homeassistant-update.sh
Known additional dependencies for optional integrations:
  • IKEA TRÅDFRI: apt install autoconf

>> Return to DietPi-Software List
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

.

Post by Fourdee »

Nukkit:
Nukkit is Java based server for Minecraft Pocket Edition.
nukkit.png
Info:
Nukkit by default runs a single server, available on LAN.

Tweak the server settings by modifying the following file:
  • /usr/local/bin/nukkit/server.properties
You can restart the service by running:

Code: Select all

dietpi-services restart

>> Return to DietPi-Software List
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v6.2

Post by Fourdee »

PiJuice:
All in one, battery based power supply HAT for the RPi, featuring UPS capabilities and battery run time.
pijuice.jpg
Information:
  • Our default installation does not include the desktop application, if required, please install a desktop first, then following command to install the GUI afterwards:

    Code: Select all

    G_AGI pijuice-gui
    The PiJuice program can then be launched (LXDE) from LXDE start > Preferences
  • SW1 = Power on unit
  • SW2 = Power off unit (runs a sample script which can be modified /var/lib/dietpi/dietpi-software/installed/pijuice/pijuice_func1.sh)
  • Additional configuration can be made via editing the following file (Full list of available config options):

    Code: Select all

    nano /var/lib/pijuice/pijuice_config.JSON
    Restart services to apply any changes.

    Code: Select all

    dietpi-services restart
  • Update firmware
    At the time of writing, this will update firmware on the device to V1.1_2018_01_15, however, please replace the firmware link with the latest version:

    Code: Select all

    wget https://github.com/PiSupply/PiJuice/raw/master/Firmware/PiJuice-V1.1_2018_01_15.elf.binary -O package.binary
    chmod +x package.binary
    pijuiceboot 14 package.binary
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v6.3

Post by Fourdee »

Airsonic:
Feature rich media streaming server with a web interface. Coded in Java.
airsonic.png
Access the web interface: First run setup:
Once connected to the web interface, we need to configure the Music directory:
  • Click the Settings button
  • Under Media Folders, replace the current music folder entry with /mnt/dietpi_userdata/Music, then select Save
  • Select Scan media folders now to update the library
Transfer music to your device:
Make sure you have one of DietPi's File Servers installed.
folder = /mnt/dietpi_userdata/Music



>> Return to DietPi-Software List
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v6.9

Post by Fourdee »

InfluxDB
influxDB is a database optimized to save time based data as logs or data from a sensor.
The main interface to the database for management and data transfert is http requests that are handled directly by influxdb service (default port being 8086).

The data can be nicely viewed with Grafana.
This installation and documentation was possible, thanks to @marcobrianza

Influxdb_logo.svg.jpg

Usage:
The package comes with a command line tool influx for database management operations
This tool also uses http so it can manage a database on a remote machine setting the -host option.
Official documentation can be found at https://docs.influxdata.com/influxdb/
  • Create a database

    Code: Select all

    influx -execute 'create database mydb'
    • Another method

      Code: Select all

      curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
  • Posting data

    Code: Select all

    curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'temperature value=20.12'
  • Show data

    Code: Select all

    influx -database mydb -execute 'SELECT * FROM temperature'
    • Another method

      Code: Select all

      curl -i -XPOST http://localhost:8086/query?db=mydb --data-urlencode "q=SELECT * FROM temperature"
  • By default http authentication is disabled, to enable, change auth-enabled = true in the configuration file /etc/influxdb/influxdb.conf, then restart services with dietpi-services restart
  • Create users and authorizations from influx CLI

    Code: Select all

    influx -username admin -password admin01

    Code: Select all

    CREATE USER admin WITH PASSWORD 'admin01' WITH ALL PRIVILEGES
    CREATE USER test_user WITH PASSWORD 'test_user01'
    GRANT ALL ON mydb TO test_user
    exit
Install information:
The data location for InfluxDB is stored/symlinked to the DietPi userdata directory: /mnt/dietpi_userdata/influxdb



>> Return to DietPi-Software List
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

v6.9

Post by Fourdee »

Grafana
The open platform for beautiful analytics and monitoring.

This installation and documentation was possible, thanks to @marcobrianza
NB: Grafana binaries are specific to the CPU architecture, therefore, swapping SD cards between RPi 1 <> 2+, is not recommended


Pre-req:
A database server is required for Grafana. As Grafana offers many options (InfluxDB/MySQL), we have not automatically installed either as manual configuration may be preferred.
However, we highly recommend installing InfluxDB:
  • dietpi-software install 74
Then follow the database creation guide here: viewtopic.php?p=12523#p12523

grafana.png

Access web interface: Usage Information:
If you have created a database as per the InfluxDB online doc, please follow these instructions:
  • From the Home Dashboard click Add data source, then enter the following information:
    • Type = InfluxDB
    • URL = http://localhost:8086
    • Database = mydb
    • User = test_user
    • Password = test_password01
    • Leave the remaining items with the default values.
  • Click Save & Test
  • From the Home Dashboard click New dashboard
    • click Graph
    • Click the example graph
    • Press e to edit the Data Source and the custom query
Install information:
The data location for Grafana is stored/symlinked to the DietPi userdata directory: /mnt/dietpi_userdata/grafana


>> Return to DietPi-Software List
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Locked