Thursday 24 March 2016

Access a Samba (SMB) share using Windows 7/10 from Open Media Vault (OMV) on Raspberry PI

Using the above combination you will run into these problems and be glad for the often unintuative and infuriating solutions they have:

Problem: Windows Samba usage is too restrictive out of the box and you have to do black magic to get Windows to do the right thing.
I wouldnt even start messing with Samba on Windows until you have done whats on this page linked to from the OMV forum discussion:

Basically put the following chunk in a .reg file, double click on it to run it and get on with your life:
       
Windows Registry Editor Version 5.00
; Reference: http://wiki.samba.org/index.php/Windows7
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters]
"DNSNameResolutionRequired"=dword:00000000
"DomainCompatibilityMode"=dword:00000001
; Reference: http://www.tannerwilliamson.com/2009/09/windows-7-seven-network-file-sharing-fix-samba-smb/
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"LmCompatibilityLevel"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0]
"NtlmMinClientSec"=dword:00000000
"NtlmMinServerSec"=dword:00000000

       
 

Problem: If you want your server's name to appear in the Workgroup list on the left pane in explorer you have to do a frickin' song and dance every so often to get it to appear again.

The solution is to go into OMV web interface and in the network settings, rename Host Name, Save and apply and then rename it back to what you actually want it to be, save and apply. In the process the FTP service threw an error and would not restart so I had to revert the changes, disable the ftp service, change the host name, change it back and enable the ftp service again. Phew!

Who knows why this happens. Even the regulars at the OMV forum don't know why it happens here is a thread on it anyway where they don't come to a solution.

Problem: For unknown reasons everything will work until one day windows will give an error indicating "You need permissions from Unix user xxx to make changes"
The solution is to ssh into your OMV server cd into the Samba shares and run
Thanks for the solution found here (again on the OMV forums).

       
chmod -R a+w /media/uuid/sharedfolder
       
 

OMV is a powerful feature rich NAS and is quite simply amazing!
At some point I will write a guide on how to set up a NAS on a raspberry PI using OMV with all the juicy goodies it provides like Sickbeard, Couch Potato, and automatic torrent downloading with Tranmission (not to mention the fact its an awsome stable NAS you can plug an external USB hard drive into and centralise your media storage!

I hope this page helps someone to save some time.

Cheers

Robert

Saturday 12 March 2016

Raspberry PI 2 + OSMC + RetroPie

Why?


You want one device that plays movies and TV shows from a variety of sources off the internet and over your home network through your TV/Projector and also allows you to play games from old consoles or arcade machines.

Purchases


  • Raspberry pi
  • A micro USB power supply.
  • An HDMI cable
  • USB Keyboard or a keyboard mouse combo like logitech  k400r
  • A micro card (as large as possible)
  • A (cat5) ethernet network cable
This guide assumes you have a computer capable of writing to a micro SD card and a router with an Ethernet port through which you can connect to the internet. You also need an TV with an HDMI cable.

Guide


Get OSMC running on the raspberry pi


  • Download OSMC raspberry pi installer using a Desktop or Laptop computer.
  • Connect the micro SD card to the computer.
  • Run the installer and install OSMC onto the micro SD card.
  • Plug the SD card into the raspberry pi
  • connect the pi to the tv with the hdmi cable
  • plug in the usb keyboard and or mouse
  • connect the device to your internet router with the cat5 ethernet cable
  • plug in the micro usb power suply and plug that into your pi
  • set your TV source to the HDMI you plugged the pi into.

From this point forward I am assuming you have OSMC up and running. When you plug the power into the pi and the TV source is set to the pi you should see OSMC appear on the screen.

Install RetroPi


Exit OSMC to the command line:


  • Navigate to the power icon in Kodi
  • Select Exit
  • Press ESC on your keyboard (may need several tries)
  • Login to your device. username: osmc password osmc
The following is a paraphrase of this guide
On the mostly black screen (console) enter these magic commands on your keyboard that download and install retropi from the internet and install it.
  • cd /home/osmc
  • wget https://raw.githubusercontent.com/mcobit/retrosmc/master/install-retrosmc.sh
  • chmod +x install-retrosmc.sh
  • ./install-retrosmc.sh
You will see a menu that you can navigate with te arrow and enter keys on your board. You will need to run the Install Retrosmc option and return here later to run the Install Launcher Addon Option:
  • Select install retro SMC 
  • Select Binary based installation on the sub menu that comes up.
A (very) long install process will run. For anything relating to Bios or data that comes up just press enter.
    When the install is done you should return back to the menu where the option to Install the Launcher Addon is.
    • Select Install the Launcher Addon.
    • Exit the menu back to the console.
    • Reboot the pi by entering: sudo reboot 
    This will restart your pi and boot you back into OSMC if it doesnt just unplug the pi and plug it in again.
    • Navigate to the programs menu and there should be an option to Launch retropie
    • Add games and setup your controllers to your retropi by following the retropie documentation.

    So many Caveats :)


    • The retropi instructions were stolen by me from here -this script is still in beta.
    • For me raspberry pi kodi/OSMC/retropie is still a hobby pass time. Its very cool if you can get it working but even then it can be quite brittle and have had very limited usability testing. 
    • Fixing even seemingly small problems with the raspberry pi can take a long time. Don't even bother with this unless you are happy to invest time learning what is going on and searching for solutions for problems
    • There are much much easier ways to get back media player with retro gaming working through your TV. Try getting a chrome/android box and the ride might be easier and not much more expensive. You can also try a laptop or PC with KODI and connect that to your TV.

    Additions and improvements


    • Install the SuperRepo this will allow you to stream movies in KODI from more sources but this may or may not be legal in your country.
    • Use OSMC menu to overclock your pi for better performance when retro gaming. The games run smoother and the pi probably wont crash (much :)). Better yet get a raspberry pi 3 :)
    • OSMC is brilliant for getting KODI installed but you may want to navigate the setup menus and enable the KODI default skin because the plugins will appear on screen a lot better.
    • If you want to be able to use a browser to view youtube etc then this is not possible at the time of writing with OSMC. You must install KODI on top of raspbian or noobs.
    • You can play games from Steam on your PC over your network if you have a Geforce graphics card! Look up moonlight for KODI.
    • Get some more hardware to make things a lot nicer for yourself namely:
      • A Playstation/XBox controller. Otherwise youll be playing your games on the keyboard. The cheap ps3 knockoffs work too.
      • A bluetooth adaptor so you dont have to plug in your playstation controller.
      • A really decent 2A+ power supply to prevent the pi rainbow occurring in the top right when overclocking.
      • A really big SD card (not one that is just big enough) because over time your roms will grow in size and SD cards fail over time and a bigger card will take longer to fail because it has more redundancy. If you dont believe me look it up
      • A USB pen drive for the option of copying roms directly to the pi rather than over the network to the pi. (although I have found this to be very unreliable and easily gets corrupted)
      • A wifi adaptor to use instead of the ethernet cable.
      • A wireless keyboard
      • A USB infrared receiver to use a remote controller with the PI or a TV that supports HDMI remote forwarding this will let you control the pi with your standard TV remote.
      • A case for your pi doesn't sound important because its mainly aesthetic but it stops the pi getting dusty and makes things look a lot neater











    Getting TCM 238558 Working with DAV-S400 in absence of original RM-SS400

    So I had an old TCM 238558 universal remote control lying around and a SONY DAV-S400 without its original RM-SS400 controller that I am  using as a 5.1 surround amp.

    I found a site (in German) that included the instructions for programming the universal remote and a link to some of its codes.

    On the codes page in SONY section for similar universal remotes Tevion MD81302/TCM 231456 we have a selection of codes.

    The only one that worked was 0986

    For the lazy:

    1. Hold the setup button for 3 seconds
    2. Press the category you want to program for example the "dvd" button at the top. An led will indicate that it is selected.
    3. Enter the code 0986
    4. All lights will go out. Pressing the power button should now power on the device.


    Buttons that work regarding sound control:

    • Green button- change information displayed on the front of the dvd player between sound mode and input selected
    • Volume up/Down
    • AV selects the sound inputs


    Unfortunately sound function modes are not selectable: There is no button to select between Normal surround, virtual surround and the many other modes but the device seems to remember the last one selected anyway.

    If you want play DVDs many other buttons will probably work (for example I found the play button to change mode to DVD and attempt to play the disk)

    Leave a comment if you find any other code combos that work.

    Enjoy!