libreELEC on A Raspberry Pi

Try a media center on a Raspberry Pi.

1. Overview

1.1 What is LibreELEC? What is Kodi?

  • What is LibreELEC? Directly cited from LibreELEC Wiki: LibreELEC is a minimalist 'Just enough OS' Linux distribution for running Kodi.
  • What is Kodi? Directly cited from About Kodi: Kodi is an award-winning free and open source (GPL) software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS, tvOS and Android. It is designed around a "10-foot user interface" for use with televisions and remote controls.

1.2 Flash LibreELEC Onto Raspberry Pi

1
2
3
4
5
$ sudo dd if=./LibreELEC-RPi4.aarch64-12.0.0.img of=/dev/sdb bs=1M status=progress conv=fsync
[sudo] password for lvision:
549+0 records in
549+0 records out
575668224 bytes (576 MB, 549 MiB) copied, 68.3918 s, 8.4 MB/s

2. Demonstration

2.1 First View

You’ll be automatically led to the following two pages after direct reboot. The ONLY thing you need to do is to connect your Raspberry Pi (already installed with LibreELEC) with HDMI cable and connect to your Smart TV.

LibreELEC Welcome LibreELEC Kodi
LibreELEC Welcome LibreELEC Kodi

2.2 Enable SSH and Allow HTTP

Same as OctoPi discussed in my previous blog OctoPrint on A Raspberry Pi, LibreELEC's Wi-Fi is NOT started by default. Therefore, we’ll have to access LibreELEC via Wired connection for the FIRST time.

In fact, you’ll even have to enable SSH from within LibreELEC smart TV configuration before you’re able to SSH into LibreELEC on the Raspberry Pi. Better allow HTTP at the same time. As follows:

LibreELEC Enable SSH LibreELEC Allow HTTP
LibreELEC Enable SSH LibreELEC Allow HTTP

2.3 ssh Into LibreELEC via Wired Connection

1
2
3
4
5
6
7
8
$ ssh root@192.168.1.75
root@192.168.1.75's password:
##############################################
# LibreELEC #
# https://libreelec.tv #
##############################################

LibreELEC (official): 12.0.0 (RPi4.aarch64)

Now, you’re able to SSH into LibreELEC through Wired Connection.

2.4 View LibreELEC Over HTTP

LibreELEC Web

And, you’re able to browse content of LibreELEC via HTTP remotely.

2.5 Configure Wi-Fi

You’ll have to use the command connmanctl.

connmanctl How? connmanctl Outcome
connmanctl How? connmanctl Outcome

2.5.1 Passphrase is Just Your Wifi Password!!

1
2
3
4
connmanctl> connect wifi_<my_network_service_id>
Agent RequestInput wifi_<my_network_service_id>
Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase?

When you meet the above question (Passphrase?), please input your Wifi password.

2.5.2 Important Commands

You may use the following commands from time to time during Wifi configuration.

  • systemctl status connman
  • systemctl restart connman
  • journalctl -u connman
  • connmanctl state
  • connmanctl services
  • etc.

2.5.3 LibreELEC Configuration

And, you should be able to doublecheck your Wifi configuration via LibreELEC Configuration as:

LibreELEC Configuration Connections Wifi
LibreELEC Configuration Connections Wifi

Now, you’re good to go. You can put your videos, pictures, etc. under respective folder of LibreELEC as a real media center.

3. Upgrade LibreELEC

3.1 Check Current Version

1
2
3
4
5
6
7
8
9
10
11
12
13
LibreELEC:~ # cat /etc/os-release
NAME="LibreELEC"
VERSION="12.0.0"
ID="libreelec"
VERSION_ID="12.0"
PRETTY_NAME="LibreELEC (official): 12.0.0"
HOME_URL="https://libreelec.tv"
BUG_REPORT_URL="https://github.com/LibreELEC/LibreELEC.tv"
BUILD_ID="451387894ba86fd65079fcba21f5b30392f6435d"
LIBREELEC_ARCH="RPi4.aarch64"
LIBREELEC_BUILD="official"
LIBREELEC_PROJECT="RPi"
LIBREELEC_DEVICE="RPi4"

3.2 LibreELEC For Raspberry Pi 4

3.2.1 Two Source of LibreELEC Builds

I'll upgrade my current LibreELEC from 12.0.0 to 12.0.1.

3.2.2 Upgrade

The ONLY thing you need to do is to put LibreELEC-RPi4.aarch64-12.0.1.img.gz under folder /storage/.update. And then, reboot.

1
2
3
4
5
6
7
8
➜  ~ ssh root@192.168.1.74
root@192.168.1.74's password:
##############################################
# LibreELEC #
# https://libreelec.tv #
##############################################

LibreELEC (official): 12.0.1 (RPi4.aarch64)

and

1
2
3
4
5
6
7
8
9
10
11
12
13
LibreELEC:~ # cat /etc/os-release 
NAME="LibreELEC"
VERSION="12.0.1"
ID="libreelec"
VERSION_ID="12.0"
PRETTY_NAME="LibreELEC (official): 12.0.1"
HOME_URL="https://libreelec.tv"
BUG_REPORT_URL="https://github.com/LibreELEC/LibreELEC.tv"
BUILD_ID="7e0b15d49ae7beb086bd2fd00fbf5d107aa9f251"
LIBREELEC_ARCH="RPi4.aarch64"
LIBREELEC_BUILD="official"
LIBREELEC_PROJECT="RPi"
LIBREELEC_DEVICE="RPi4"