Homewatch is a lightweight self-hosted media server.
The idea is to have media files stored on a computer or a remote server, and use a remote device (namely, a phone) to browse the library and play some files. The main use case is for watching movies without leaving the bed or the sofa.
- Browse a local or remote media library
- Control a remote VLC player
- Sleep mode with modular hooks
- Keep a viewing history
- Keep playlists, play them in order or shuffled
- Integrate with Google Chromecast
- Linux and Windows support
- Self-hosted: no data collection, no subscription plan, total control
- Lightweight: the media library is based on the existing file system
Homewatch relies on three logical components: a media server, a video player and a control remote. You can use the same machine for all of them, or one machine per component, as you like. Here are two basic setup ideas:
Bedroom setup
- A computer acts as the media server and the video player, using local video files
- A phone remotely controls the video player on the computer
Home setup
- A local server (e.g. a Raspberry Pi) acts as a media server, using local video files
- A computer acts as the video player, streaming medias from the local network
- A phone remotely controls the video player on the computer
Note that I tried using a Raspberry Pi 3B+ as a video player, but performances were to low for it to be reliable.
Each machine hosting either the media server or the video player (or both) requires an installation of Homewatch and a specific configuration. See instructions below.
You'll need Python 3 and:
- Clone this repository
git clone https://github.com/ychalier/homewatch
- Install dependencies in requirements.txt
pip install -r requirements.txt
- Edit the settings in homewatch/settings.py, everything is explained in the comments
Call the main script homewatch.py with the runserver
argument:
python homewatch.py runserver
Open a web browser to http://127.0.0.1:8000/, and you should see your media library.
Here is an example scenario, to get an idea of how Homewatch can be used.
A Raspberry Pi has media files stored on a hard drive. Install Homewatch on it,
set SERVER_MODE
to library
, LIBRARY_MODE
to local
and LIBRARY_ROOT
to
the hard drive path, e.g. /mnt/usb/
. As Homewatch server is a
WSGI application, it can be embedded
within an Apache server, e.g. with mod_wsgi.
Here is a configuration sample:
WSGIScriptAlias / /path/to/homewatch/wsgi.py
Alias /static/ /path/to/homewatch/homewatch/static/
<Directory /path/to/homewatch/homewatch/static>
Require all granted
</Directory>
Alias /media/ /mnt/usb/
<Directory /mnt/usb>
Require all granted
</Directory>
Then, on a computer, install Homewatch again, set SERVER_MODE
to player
,
LIBRARY_MODE
to remote
and LIBRARY_ROOT
to the Raspberry Pi URL, e.g.
http://192.168.1.42/library/
. Start Homewatch with the following command:
python homewatch.py --qrcode 192.168.1.69:8000
The --qrcode
flag is used to print a QR code in the terminal, that can be
scanned with the phone to get redirected to the control remote. 192.168.1.69
is the local IP address of the laptop.
On the phone, go to http://192.168.1.69:8000 (or scan the QR code), and voilà!
- Jinja - Templating engine
- python-vlc - Python bindings for libVLC
- qrcode - QR code generator
- requests - HTTP library
- tqdm - Progress display
- websockets - WebSocket API implementation for Python
- werkzeug - WSGI web application library
Chromecast integration is adapted from maxwellito/apachecast.
Sample video files are Sintel and Big Buck Bunny from the Blender Foundation.
Contributions are welcomed. Push your branch and create a pull request detailling your changes.
Project is maintained by Yohan Chalier.
This project is licensed under the GNU GPLv3 license.
This project is still in an early stage. Submit bug reports and feature suggestions in the issue tracker.