Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ansible playbook to setup a raspberry >pi2 for tv7 (init7)

License

bbkz/pi-tv7-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-tv7-ansible

This ansible playbook is ment to setup a raspberry >pi2 for tv7 (init7). The idea is to take a fresh raspbian lite installation and run the playbook to have a fully working tv7 player.

Todo

  • Add a storage for timeshift (pause) functionality, i don't know yet what is a good idea to do so:
    • NFS automounts, i use this and it works fine
    • Plugged in USB disk, not tested
  • Update webradio channels

Installation

  1. Get a PI and a network cable
  2. Download the "Raspbian Lite" image and install it according to:
  3. Install ansible on your admin computer
  4. Download this ansible playbook
  5. Give ssh access to the pi from your admin computer
  6. Play it

Configure ansible playbook

  • Edit the file production; replace your_pi with ether the ip address of your pi or the dns name.

Install ansible on your admin computer

The following can be used on a ubuntu installation:

sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt-get install ansible

Pre-configure the pi (hostname/ssh access)

Set a new hostname for your pi:

sudo hostnamectl set-hostname your_pi

Edit/Add the following file/folder containing your ssh public key:

.ssh/authorized_keys

Run ansible

ansible-playbook -i production site.yml

or if you use su and like to be used for the root password you can use, for this to work you have to add ansible_become_method=su to your inventory file ('production'):

ansible-playbook -K -i production site.yml

Components

kodi

kodi is used as the player and user interface and will be pre-configured to use the tvheadend pvr addon, which is providing the channel list and the epg (electronic program guide).

  • It installs kodi and the pvr addon.
  • It adds a service to autostart kodi as a standalone app.
  • It increases the GPU memory to work with the playout

tvheadend

tvheadend will make the connection to the init7 stream and provide it in your network as a stream which will work over wi-fi as well, packed with epg (program data) and channel logo.

In this case here we just install and configure it alongside of kodi.

The webinterface runs on http://your_pi:9981, the username and password is "admin".

Recording and Timeshift

When not configured otherwise in the tvheadend webinterface your recording and timeshift path will be the home folder of the hts user (which the installation package tvheadend creates) will be used.

The configuration is found on:

  • http://your_pi:9981 -> Configuration -> Recording

scripts

prepare_channels.py

This script is getting the latest tv7 playlist and downloads the logos. We need to prepare our own playlist because for tvheadend to be setup automatically it requires a channel number to be set in the playlist.

getepg.sh

This script is downloading the epg from https://github.com/mathewmeconry/TV7_EPG_Data and import it into tvheadend.

The epg data is gathered with the scripts of https://github.com/mathewmeconry/TV7_EPG_Parser but as these require at least python version 3.6 and raspbian is providing 3.5, we cannot use the scripts directly.

About

ansible playbook to setup a raspberry >pi2 for tv7 (init7)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published