MythTV DVB udev rules

April 1, 2014

Recently my tuner cards have been swapping the IDs assigned to them by udev which has caused MythTV to miss some recordings (it was attempting to record HD content on an SD card)  This is easy to solve using udev rules to create symlinked adapaters that I could use in MythTV instead.  Info on how to do this can be found at http://www.mythtv.org/wiki/Device_Filenames_and_udev#Example_DVB_udev_Rules_file

 

My udev file is repeated below, I have a Nova-T SD tuner card and a TBS 6280 Dual Freeview HD, for some reason it would not work with and underscore between adapater and tbs1 in /dev/dvb/adapter-tbs1/

 
# /etc/udev/rules.d/10-dvb.rules
#
# To Identify serial nos etc for a Device call
# udevadm info -a -p $(udevadm info -q path -n /dev/dvb/adapter0/frontend0)
#
# use the following to test
#
# udevadm control --log-priority="debug-verbose"
# udevadm test /class/dvb/dvb0.frontend0
#
# http://www.mythtv.org/wiki/Device_Filenames_and_udev
# Create a symlink for single tuner Nova T device
SUBSYSTEM=="dvb", ATTRS{vendor}=="0x14f1", ATTRS{device}=="0x8802", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter_nova-t1/%%s $${K#*.}'", SYMLINK+="%c"
# Create a symlinks for both tuners of TBS device
SUBSYSTEM=="dvb", ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7160", PROGRAM="/bin/sh -c 'set -xv ; K=%k; K=$${K#dvb}; N=$${K#*.}; if [ ! -e /dev/dvb/adapter-tbs1/$N ] ; then printf dvb/adapter-tbs1/%%s $${K#*.}; else printf dvb/adapter-tbs2/%%s $${K#*.}; fi ; exit 0'", SYMLINK+="%c"

During the summer I took the opportunity to play with the Sonos music system in a local hi-fi store.  I was very impressed with the idea of been able to play back my collection of digital music in various rooms of my house, either synchronized together in a ‘Party’ mode, or simply different music in different rooms.  Added to this the ability to connect to Napster, Spotify, Internet radio and it’s simple interface which I felt non technical users would easily be at home with.

However I was struck with two concerns.

1.)    Why do I need yet another remote sitting around at home when I could pick up a small tablet or use my phone as the remote. (Sonos have since released an Andorid controller alongside the existing IOS version)

2.)    Since I already make use of MythTV I already have a computer that is always turned on in the lounge, can’t I just make use of that instead?

So I set about seeing if there was a software client for the Sonos system and drew a blank.  They don’t provide one for any OS and expect you to buy hardware for each room at ~£280 for a standalone box to feed into an amp.

So the next task was to look into other products which had a similar functionality set where I came across the Logitech squeezebox system.  This works by running a Squeeze server on your NAS (with support from NAS providers) which your various clients connect to.  These clients can either be hardware clients or software clients.  Softsqueeze is an open source java client which I have been using for a couple of months on my MythTV frontend without a problem.  Logitech have also provide free of charge an Android controller which is able to control the various clients located on your network.

Whereas the Sonos appears to be aimed at the audiophiles, the squeezebox system appeals to the more general consumer, and thus has a lower price point of ~£100 for a standalone box (Logitech Squeezebox Duet wireless media receiver).  In addition they also sell hardware which consists of a built in digital amp coupled with speakers (Boom and Radio).

After using the two software clients in my house I am very impressed with the functionality and ease of use of the product, it fills the various requirements I had of been able to make use of my digital collection around the house and been an easy to use solution. I’m currently unable to comment on the hardware available from Logitech however I fully intend on purchasing the Boom or Radio for use within my kitchen.

Android remote for Banshee

August 19, 2011

Ever since I got my Android phone I’ve been looking at ways for it to control my Ubuntu based HTPC and my Yamaha AV reciever.  My current setup uses Mythtv on Ubuntu, however I have issues with Mythmusic so have been using Rhythmbox.  Controlling MythTV is nice and simple using MythRemote and it works without any problems for MythTV features, however what I was missing was an easy way to select music without the TV turned on.

After a few hours searching and playing with a few applications I settled on using Banshee as my music player and making use of Banshee Remote along with a small extension for Banshee to allow it to be controlled.  Initial use has been positive, the features are a bit limited at the moment in that it doesn’t support Internet radio and playlists for instance but lets see if I can find some time to improve it a bit.

I had a need at home to convert some out VHS movies to digital so I purchased myself a WinTV-PVR-150 MCE.  This would enable me to play video from a VCR, outputting via a SCART cable which split into composite video and audio.  Hardware encoding of the analogue signal enabled the captured input to easily be transfered to a digital file (mpeg2).  As usual from Hauppauge linux support is excellent with the card fully supported out of the box with Hardy.

To take the input from the card and save it into a file I simply needed to do:

     cat /dev/video /path/to/file

To switch between the various inputs on the card I need to use the following commands (v4l2-ctl is available in the ivtv-utils package):

     v4l2-ctl -i 0    for the tuner
     v4l2-ctl -i 1    for svideo
     v4l2-ctl -i 2    for composite

All in all I found the card very easy to use for my purpose, and will now be looking to use it within my Mythbuntu installation.

I’ve a small problem with my mythtv-backend in that it will crash once or twice a week without giving a clue as to the problem, even when running it through gdb.  When restarting, it would work fine again therefore there was the need to detect a crash and restart when it happens.

This is currently been worked on for the next version of Mythbuntu through the use of upstart scripts, however I was needing a soultion before then.  This lead to the development of the script below, which checks to see if it’s running, and restart it if it’s not.

The script is limited in that you need to manually start it after the machine has booted.  I run the script within a screen console (so I can detatch it) using watch to run the script every 60 seconds.

So in screen:

sudo watch -n 60 ./keep-myth-server-alive.sh

The script:

#!/bin/bash

# Copyright (C) 2008
#       David Morris (david.morris@greenacre.no-ip.com)
#
# This program is free software; you can
# redistribute it and/or modify it under the terms
# of the GNU General Public License as published by
# the Free Software Foundation, version 2 or later.
#

if [  `ps -ef | grep -c mythbackend` == ‘1’ ];
then
sudo /etc/init.d/mythtv-backend start

fi

iplayer scraper

May 2, 2008

I’ve paid a bit of attention to the iPlayer development that has been occuring for linux over the last few months, with flash and mp4 versions. http://po-ru.com/ provides a ruby download script for the mp4 when passed the PID.

Now I’ve been thinking we can easily make this into a standalone player which users can browse on a desktop through the use of a GTK applications, or as a plugin for mythtv.  To this end, I’ve hacked up a python scraper to generate the iPlayer listings and I’m publishing it here in the hope it’ll be of help to people.

It returns:

  • URL with the PID
  • URL for the thumbnail
  • Title of show
  • Date show was aired
  • Duration of show
  • Synopsis of show

I’ve create the core module and a small script to demonstrate how it can be called.  What you choose to do with the data once it’s returned is left to yourselves.

mythtv Planet

January 17, 2008

There is a new planet in the solar system of OSS, mythtv Planet. If you want your feeds to be added then send an email do Daviey to be added at addme@planetmythtv.com. Alternatively give him a poke on IRC. daviey [on] irc.freenode.net.

Remote Wonder 2 in Mythbuntu

December 10, 2007

I’ve had a few searches for this hitting my blog and seen people having problems with it as well. I just redid mine on Ubuntu Gutsy and this should work the same. Here is what I did

sudo dpkg-reconfigure lirc

I then chose the userspace driver

sudo nano /etc/modprobe.d/lirc

Here I commented out blacklisting of the `lirc_atiusb’ module.

Once this is done you can load it with

sudo modprobe lirc_atiusb

You’ll then need to install the lircrc file to /home/<myth user>/.mythtv/lircrc

Restart and it should all work fine. I’ve attached my config files for you to check against as well. If you need more help post here or find me (davemorris) on irc.freenode.net

irw is a great little program to run in a terminal to see what buttons your pressing and tsee what they are mapped to.
/etc/modprobe.d/lirc

/etc/lirc/lircd.conf

/home/<mythtv user>/.mythtv/lircrc

Mythbuntu is released!

October 22, 2007

The Mythbuntu team and myself are proud to present the first stable release of Mythbuntu. This release is based upon Ubuntu 7.10 (Gutsy Gibbon). We would like to thank everyone that has volunteered to help make Mythbuntu reach where it is today.

Please see the Release Notes for more information on improvements from the unstable releases this cycle.

Downloads & Upgrade instructions are available on the downloads page.

Features

  • Frontend can be run from the live CD
  • Complete installations(Backend, Frontend, Backend/Frontend, etc)
  • Xfce4 Desktop Environment
  • Easily upgrade from Ubuntu Gutsy to Mythbuntu
  • Custom Mythbuntu MythTV theme
  • GUI setup of LIRC
  • Setup MythTV optimizations through MCC

Digg it at http://digg.com/linux_unix/Mythbuntu_7_10_Release_Final

With lirc I’m told this actually appears under ATI/NVidia X10 RF (userspace) even though that refers to the 1st model. If someone is able to try it and let us know that would be grand.