Raspberry Pi Lightweight Media Centre
Perl HTML JavaScript Makefile CSS Shell
Clone or download
subogero Allow running stack as non-root user #21
Use own config file: /etc/remotepi.conf or ~/.remotepi.conf.
Take rootdir for file browsing from rootdir= option.

When started as non-root, run in ~/.remotepi folder.
Start own omxd daemon instance running as same user.
Latest commit b8f4bbc Apr 17, 2017
Failed to load latest commit information.
public version 2.4 Mar 22, 2017
.gitignore gitignore .u2bjar Jul 14, 2015
COPYING Copyright notices GNU AGPL v3 Sep 22, 2013
README Allow running stack as non-root user #21 Apr 18, 2017
postinst systemd config #15 May 18, 2016
prerm systemd config #15 May 18, 2016
remotepi Allow running stack as non-root user #21 Apr 18, 2017
remotepi.service systemd config #15 May 18, 2016


RemotePi -- Raspberry Pi media centre with remote control


RemotePi is a remote control web app to browse your RaspberryPi's music/videos,
internet radio stations or YouTube and play them via the omxd playlist daemon.

RemotePi is optimized for small smartphone screens.

RemotePi is strictly file and directory based and could not care less
for MP3 tags in files. MP3 tags are evil and rude.

 - browse the Raspberry file system below a specified root dir
 - browse internet radio stations using rpi.fm
 - browse and play YouTube videos
 - insert and append files, stremas or entire directories to the omxd playlist
 - play files now on Jack or HDMI audio and then return to playlist
 - play/pause, repeat, previous/next in playlist, RW/FF.

RemotePi is a Perl Mojolicious webapp with its own standalone webserver
listening on port 31100.


As root

 echo deb http://linux.subogero.com/deb/ / >/etc/apt/sources.list.d/subogero.list
 apt-get update
 apt-get install remotepi

This installs RemotePi's dependencies too: omxd, rpi.fm, u2b
and the necessary Perl libraries.


Mounting your media as a FUSE filesystem as a non-root user may necessitate
running the remotepi stack as the same user.

This is entirely possible, by e.g. a simple entry in the user's crontab

 @reboot /usr/share/remotepi/remotepi 3000 >~/.remotepi.log 2>&1 &

In this case remotepi will listen on port 3000 and run it's own omxd instance
as the same user, with all control and log files in folder ~/.remotepi.

Location of the config file will change to ~/.remotepi.conf. See FILES.

## USE

Point your PC/tablet/phone's browser to http://raspberry:31100 on your
home network. Enjoy.

The buttons wear the name of the respctive omxd commands, see the tooltips,
the "help" tab or omxd's README or man page.

The UI uses Hammer.js to change tabs with swipe and long-press gestures
for the left/right and help tabs.


RemotePi offers a JSON-based REST API to control all functions:

 GET url/S* - playlist and playback status
 POST url/S {"cmd":"x"} - playlist commands

 GET url/home/dir... - list dir on Raspberry Pi
 POST url/home {"cmd":"x","file":"file"} - append file/dir to playlist

 GET url/fm/cmd1/... - rpi.fm command list for listings
 POST url/fm ["cmd1",...] - rpi.fm command list ending with playlist command

 GET url/yt/search/term - YouTube search for term
 POST url/yt {"cmd":"ẍ","query":"id"} - YouTube playback command


Location of files depends on whether remotepi runs as root.

### /etc/remotepi.conf ~/.remotepi.conf

Contains the rootdir options for remotepi's pi file-browsing tab.
If the file does not exist, the default root directory is /home.

### /usr/share/remotepi/.rpi.fm ~/.remotepi/.rpi.fm

rpi.fm's genre cache and "My stations" database