zilexa

RPi Simple Guide

Aug 31st, 2017
7,646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.86 KB | None | 0 0
  1. There are lots of guides online to tell you how to install a mediacenter, none of them will show you how to [i]automatically [/i]install the tools that truly turn your Raspberry into a full blown mediacenter.
  2. The automatic part makes it extremely easy to install. Even if you have zero Linux experience! This is possible because all installation actions and configuration steps have now been automated in 1 installation script: autosetup.sh
  3.  
  4. [b][size=125]INTRO[/size][/b]
  5. A Raspberry is an amazing device. Not just because it is cheap, uses very little power (2.5W) and makes no noise. Mostly because there is a huge community supporting it. This now allows your Raspberry Pi to do a multitude of things. In this guide, it will transform your Raspberry Pi 3 (or 2B) into a full blown mediacenter that you can fully control with your TV remote. If you need more control checkout the Yatse remote app in the Google Play Store.
  6.  
  7. [b][size=125]WHAT WILL IT DO FOR YOU?[/size][/b]
  8. A lazy couch tv experience via Kodi and Flexget. I have Netflix and a cable subscription. So I am paying in every way possible for content. But unfortunately the industry does not provide a central channel to be able to select the content (from all available content) you want on-demand. Even the content you can access this way has limited access. Part of this solution takes care of that.
  9. [list]
  10. [*] TV shows and Movies you follow on trakt.tv (a free and legal site, it doesn't contain any tv shows or movies but just lists them) will be searched for. Not just that, it will only search for things you haven't watched yet and clean up your Trakt list once you have watched something completely (you only have to add stuff!). Also, subtitles will be added and they will be correctly organised on the harddrive attached to your Raspberry Pi, Kodi will always recognise them and show everything in a slick interface on your TV.
  11. NOTE: no illegal streaming addons are used. Content is retrieved by Flexget which is an extremely powerful tool to watch RSS feeds and NZB/newsserver/torrent sites. This topic is not about torrent, it is only about the automatic installation of Flexget on a Raspberry Pi which does not contain any illegal content. None of the links in this post link directly or indirectly to such sites/content.
  12. [*] Spotify-Connect support via Raspotify/Librespot. Use Spotify on your phone or pc? Keep doing that! But now you can select your Raspberry Pi in the app to playback the audio to the Raspberry! Amazing when you do this for the first time!
  13. [*] DynamicDNS: create your own domain to easily access your RPi via SSH (the most secure connection possible) when not at home.
  14. [*] Personal Cloud: Even SyncThing will be installed automatically!
  15. [/list]
  16.  
  17.  
  18. [b][size=125]HARDWARE Requirements:[/size][/b]
  19. - A Raspberry Pi 3 (if you want something more powerful: Vero 4K), HDMI cable, network cable, 16GB or 32GB fast microSD card for the device.
  20. - a USB harddrive, connected to your device.
  21. - If you use a RPi3 instead of a Vero 4K, I highly recommend installing OSMC.tv on your RPi3. This script has been tested on RPI3 devices only.
  22.  
  23. [b][size=125]OTHER Requirements: [/size][/b]
  24. **For the system to know what series and movies you want to watch, you need a free account on trakt.tv. Go to trakt.tv, create an account, go to your profile, create a list called "TVshows". Now search the tvshows you like to watch and add them to the "TVshows" list.
  25. For movies, Search movies and add them to your "watchlist" (not to your TVshows list).**
  26.  
  27. **VERY IMPORTANT: you need to mark the seasons or episodes you have already seen as "watched". Otherwise the system will think you want every season of every series (for example, NCIS has 14 seasons.. you might have seen season 1-12 already and the first episodes of season 13).
  28. This is probably a lot of work. I have used the app "Nachos" in the Google Play Store to do this, it's a lot easier. Took me half an hour which is more work than the steps below to install everything.**
  29.  
  30.  
  31.  
  32. [b][u][size=125]**MAKE SURE YOU FOLLOW OSMC INSTALLATION INSTRUCTIONS FIRST: [url]https://osmc.tv/download/[/url][/size][/u][/b]
  33.  
  34. [b][i]PREPARE your device:[/i][/b]
  35. 1. On first boot, follow the install wizard on your TV. Use your remote or the Yatse app on your phone (recommended! Find it in Play Store).
  36. 2. Go to MyOSMC > Apps and install Transmission.
  37. 3. Go to MyOSMC > Services, enable SSH and Cron.
  38. 4. Go back to the homescreen, find Settings and select System Information. Find the "IP Address" and write it down. For example 192.168.1.1
  39.  
  40. [b][i]Get a laptop and LOGIN TO YOUR DEVICE VIA SSH:[/i][/b]
  41. 1. Get the tool Putty and open it.
  42. 2. Enter your device IP address like this: [email protected] and select SSH. Now hit connect.
  43. 3. Enter the default password (osmc) and hit enter.
  44. 4. Change the password by typing: passwd and hit enter.
  45.  
  46. [b][i]USE AUTOSETUP.SH:[/i][/b]
  47. 1. Download autosetup.sh by copy pasting this command (you can paste by simply right-clicking in the black Putty window):
  48. [code]wget https://rawgit.com/zilexa/autosetup/master/autosetup.sh[/code]
  49. 2. [i]See the FEATURES and REQUIRED USER-SPECIFIC SETTINGS below. [/i]Edit the file to select the features you need and fill in the required details. Run this command to edit the file:
  50. sudo nano autosetup.sh
  51. (save the file with CTRL+O, exit the editor with CTRL+X)
  52. 3. Now run the script:
  53. [code]sudo bash autosetup.sh[/code]
  54. 4. A lot will happen now, just leave it be. When it's done, all that's left is for you to authorize the device to access your trakt account. This process will be triggered, just follow the instructions: go to trakt.tv/activate and fill in the temporary password. If you are too late, you can trigger this process yourself by running the following command:
  55. [code]/home/osmc/flexget/bin/flexget trakt auth yourtraktusername[/code]
  56. 5. Now you can enable Flexget with this command:
  57. [code]/home/osmc/flexget/bin/flexget daemon start[/code]
  58. 6. Flexget is active but will run most tasks between 2AM and 8AM. You have to run it manuallly the first time though! Run this command:
  59. [code]/home/osmc/flexget/bin/flexget execute --now[/code]
  60.  
  61. .
  62. [size=125]That's all! [/size]
  63. Try playing a song through Spotify. Have a look at the available Skins for Kodi. Etc. Enjoy!
  64.  
  65. Useful links:
  66. For Flexget related questions please see the Flexget forum: https://discuss.flexget.com/
  67. For specific questions about this Flexget configuration, create an issue here: https://github.com/zilexa/flexget_config
  68. For questions related to Kodi read the wiki first: http://kodi.wiki/ then check the forum: https://forum.kodi.tv/
  69. For questions related to OSMC, read the homepage and Wiki first: https://osmc.tv/ then check the forum: https://discourse.osmc.tv/
  70. And if you use Windows and want to use SyncThing on your RPi to sync important documents: https://github.com/canton7/SyncTrayzor
  71. And of course SyncThing for your smartphone: https://play.google.com/store/apps/details?id=com.nutomic.syncthingandroid
  72. Or completely replace your current cloud solution (Dropbox, Google Drive, Onedrive) with SyncThing: https://play.google.com/store/apps/details?id=it.anyplace.syncbrowser
  73.  
  74. Many many thanks to:
  75. jonybat for his flexget config, the config used by this script is based on his.
  76. OSMC dev team. Flexget devteam. Raspotify & Librespot devteam. SyncThing creators.
  77.  
  78. .
  79. --------------------
  80. .
  81.  
  82.  
  83. [b][i]FEATURES of the autosetup.sh script (1 = will be installed, 0= will be skipped):[/i][/b]
  84. Make sure you go through the features, by default everything except OpenVPN, SyncThing and Spotify are selected. If you don't need those, leave it. Do go through all user-specific settings, you need change them correctly.
  85.  
  86. [i]NOTE: every application installed will show up in MyOSMC > Apps. You can start/stop the apps from there using your TV remote.
  87. [/i]
  88.  
  89. [b]DynamicDNS=1[/b]
  90. Schedules your Dynamic DNS update URL to be called every 4 hrs.
  91. [b]Transmission=1[/b]
  92. Configures Transmission, the tool that will actually download stuff. Needs to be installed first via MyOSMC!
  93. [b]FlexGet=1[/b]
  94. This is the magic and complex tool that will check your Trakt account, find series, season packs, episodes and movies, get them for you in the right quality, organise them neatly on your USB drive and triggers Kodi to scan all files. Setting this to 1 will install Flexget and required components and it will install this Flexget config https://github.com/zilexa/flexget_config
  95. [b]Spotify=0[/b]
  96. Installs Spotify Connect (Premium users only). This allows you to use Spotify on your phone/pc but playback on this device!
  97. [b]OpenVPN=0 [/b]
  98. Simply installs OpenVPN, nothing else. I would like to configure it in such a way, Flexget & Transmission will always run via VPN, all other things will have direct access to the internet. But this is too complex so it just installs OpenVPN. You can configure it yourself.
  99. [b]SyncThing=0 [/b]
  100. installs SyncThing, nothing else. Nothing will be configured. Handy as personal cloud to sync your smartphone photos to your device or autobackup documents from your computer! https://syncthing.net/.
  101. [b]AddMediaToKodi=1 [/b]
  102. the folders containing your media will be added as library sources. You can do this in Kodi but now you don't have to, just run a library scan.
  103. [b]DisableLEDS=1 [/b]
  104. Disables the annoying blinking leds on the RPI3 and also the powerled on the RPI2 (powerled of RPI3 cannot be disabled).
  105.  
  106. .
  107. [b][i]REQUIRED USER-SPECIFIC SETTINGS[/i][/b]
  108. [b]Location of your connected USB drive.[/b]
  109. Connect it to your laptop to figure out it's name. Make sure you create the following folders: TVshows, Movies, Music, Pictures. The first two are required and case sensitive!
  110. Example: My harddrive label when I connect it to a Windows laptop shows in My Computer as "MyDrive". MyDrive contains the mentioned folders.
  111.  
  112. [b]DYNDNS url[/b]
  113. Want to access files/see download progress or manually download when not at home? you can create a nice domain (like zilexa.funstuff.com) otherwise you need to know your IP address given by your ISP. Go to https://freedns.afraid.org/, register for free and go to the DynamicDNS. Create a nice domain name and then get the url by electing 'cron example'.
  114.  
  115. [b]TRAKT username[/b]
  116. For the system to know what series and movies you want to watch, you need a free account on trakt.tv. Go to trakt.tv, create an account, go to your profile, create a list called "TVshows".
  117. Now search the tvshows you like to watch and add them to the "TVshows" list.
  118. Search for movies and add them to the "watchlist".
  119.  
  120. [b]TRANSMISSION personal user and password: [/b]
  121. By default user/password is osmc/osmc. That's not very safe. Fill in a desired user/password. This will then be set for you.
  122.  
  123. [b]SPOTIFY CONNECT device name[/b]
  124. Your device will show up in the Spotify app when you are connected to your home network. You can playback music on the device!
  125. All you have to do is choose a name for your device. This is how the device will appear on your phone or tablets Spotify app.
Advertisement
Add Comment
Please, Sign In to add comment