Saturday, December 14, 2013

Transform an RSS Feed to Images for XBMC Picture Slideshow

Lets say you want to read your favorite RSS feed while lounging on your couch. That is what my XBMC RSS to Images web app will provide. It will transform the text from an RSS feed into images so you can use the XBMC Picture Slideshow feature to read your feed on your TV.

This is an example URL that you would add as a picture source in XBMC. http://xbmc-rocks.com/TextFeed2Images/go?q=http://feeds.reuters.com/reuters/topNews

Below is a video demonstration.

Source code is here: https://github.com/pla1/TextFeed2Images

Sunday, October 20, 2013

Ubuntu Unity Launcher to Mute XBMC

Because you can never have too many ways to mute the TV when a prescription drug commercial begins.

The text for the desktop file is shown below. Change your IP address and port accordingly.

[Desktop Entry]
Name=Mute XBMC 
Type=Application
# I put the icon file in ~/.local/share/icons
Icon=mute.png
Exec=curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "Application.SetMute", "params": {"mute":"toggle"}, "id": 1}' http://192.168.1.20:8080/jsonrpc

Sunday, August 4, 2013

Sun Ray Thin Client Replacement



Oracle killed the Sun Ray thin client. We have dozens of Sun Ray thin clients at work. While they will continue to serve us for many years the search has begun for a replacement. We don't want to return to a personal computer at every desk. The benefit of centralized management is too great to go backwards.

I have deployed 5 diskless Linux workstations as a possible replacement for our Sun Ray thin clients. The trial has been going well so far and this could be our next client computing environment for 90% of our employees.

Today our employees have a Payflex card that they insert in to a Sun Ray and their Windows Terminal Server or virtual machine (VM) desktop is displayed. Tomorrow our employees may log-in to a diskless Linux workstation using their Windows Active Directory credentials and the same Windows Terminal Server or VM desktop that the Sun Ray provided will be displayed. If the user prefers they can back out of Windows and work on the Ubuntu Linux desktop. 4 out of the 5 testers are doing just that. The majority of our employees won't be abandoning Windows though. There are too many Windows-only applications in use. 

The Sun Ray has one weak spot and it is multimedia playback. The diskless workstation solves that issue. The Intel i3 dual core processor with the HD4000 GPU has no trouble playing video. If an  employee needs to watch a video, which is rare, they can back out of Windows with a keystroke and watch the video from the Ubuntu desktop. 

Userland

  • PXE Boot
  • Linux Ubuntu 12.04 LTS
  • Libre Office
  • Chrome browser
  • High performance media playback
  • Joined to Windows Active Directory
  • Dynamic Windows terminal server assignment
  • USB media shared to terminal server
  • CDROM media shared to terminal server
  • Dual monitor support
  • VoIP Mobility enabled (user's phone extension follows them when they change locations)

Administration

  • Single golden image managed centrally on a VM
  • Client images reside on a server with TFTP and NFS configured
  • Client image can be replaced with the golden image in about 20 minutes per client
  • Client image can be updated with the golden image in about 2 minutes per client. Uses rsync.
  • Client images synced with the golden image nightly 
  • User's home directory is a separate directory on the server and is not touched by the update routine. 
  • Simple deployment by adding a DHCP reservation
  • Diskless client hardware build takes less than 15 minutes.

Diskless Client Hardware

Intel Core i3-3220 Dual-Core Processor
123.00
Mini ITX Motherboard
99.00
8GB memory
52.00
M350 Universal Mini-ITX PC enclosure
38.00
Mini-ITX Power Supply picoPSU
44.00
Motherboard Header Cables
12.00
AC Adapter Power Supply
14.00
TOTAL
382.00

Photos

Dual monitor

Top of M350 case

M350 standing on its side 
M350 front
M350 rear
M350 top off overhead view
Pico power supply
M350 top off looking from back
M350 top off side view

Wednesday, July 24, 2013

Multicast HDHomeRun Content with VLC

Below is bash script to tune your HDHomeRun device to a channel and multicast the video with VLC. You can then consume the video throughout your house or business with XBMC clients or VLC clients.

Copy and paste the script into your favorite editor. Update the HDHOMERUN variable with your device's ID. Save the script. I named mine HDHomeRunMulticaster.sh. Make the script executable chmod +x HDHomeRunMulticaster.sh. Execute the script passing the tuner number (0 through 2 for HDHomeRun Prime), the EIA channel number, and the program number. For example: ./HDHomeRunMulticaster.sh 0 73 2.

#!/bin/bash
# Tune HDHomeRun and multicast the video
# Example ./HDHomeRunMulticaster.sh 0 73 2
#
HDHOMERUN="12345678"
TUNER=$1
CHANNEL=$2
PROGRAM=$3
if [[ -z "$TUNER" ]]
then
 echo "Missing the tuner number. Please pass a tuner number."
 exit 1
fi
if [[ -z "$CHANNEL" ]]
then
 echo "Missing a channel. Please pass a channel number."
 exit 1
fi
if [[ -z "$PROGRAM" ]]
then
 echo "Missing program number. Please pass a program number."
 exit 1
fi
echo "Setting HDHomeRun device: $HDHOMERUN to channel: $CHANNEL program: $PROGRAM"
hdhomerun_config $HDHOMERUN set /tuner$TUNER/channel $CHANNEL
hdhomerun_config $HDHOMERUN set /tuner$TUNER/program $PROGRAM
hdhomerun_config $HDHOMERUN save /tuner$TUNER - | cvlc --sout udp:239.255.12.42 -
hdhomerun_config $HDHOMERUN set /tuner$TUNER/channel none

You'll need the HDHomeRun configure command. If running Ubuntu you can get it with: sudo apt-get install hdhomerun-config.

To consume the video using VLC open a network stream to URL: udp://@239.255.12.42. To consume the video using XBMC use steps 1 and 3 from my Multicast Video to XBMC using VLC blog post.

Saturday, July 20, 2013

Multicast Video to XBMC using VLC

XBMC is capable of playing multicast video. It is a simple set-up.

  1. Create a text file called Stream.strm on your XBMC client with this line udp://239.255.12.42:1234
  2. On your server start the multicast with this command cvlc --sout udp:239.255.12.42 /mnt/disk0/mythtv/pretty/Fringe_2013-01-11_9-00_PM_The_Boy_Must_Live.mpg
  3. On your XBMC client go to Videos, Files, Add Videos, Browse and select the text file you created in step 1.

With this set-up you could watch a video on multiple XBMC clients in your home or business.

Saturday, April 20, 2013

Bye Bye Google Reader Hello Rss2Email

Google is shutting down Google Reader. As of this writing I have 406 subscriptions. Since March 26, 2006 I have read a total of 61,413 items. However I have thousands of un-read articles.

I was doing it wrong. I should not have been subscribing to popular feeds that would have crossed my media stream from Twitter or Google Plus. I should have been subscribing to local and unique content instead.

My solution to information overload and the end of Google Reader is Rss2Email. I've added a dozen or so feeds that will be checked for changes twice an hour. I will get an email when changes occur. This should be manageable and convenient.

Monday, February 11, 2013

Home Theater PC Build with an Intel Core i3-3225

I built a small, quiet, and powerful home theater frontend for about 500 US dollars. Below are the parts I used. I purchased the items via Amazon Prime in late January 2013.

ProcessorIntel i3-3225 with HD Graphics 4000$134.99
MotherboardGigabyte LGA 1155 MOBO$104.99
CaseM350 Mini-ITX enclosure$37.85
MemorySamsung 2x4 GB memory$46.98
DiskCrucial m4 128GB SSD$113.79
PowerKinamax AC Adapter 12V 6A$10.73
PowerpicoPSU-160-XT$44.50

My previous frontends were Zotac IONs with nVidia GPU. They are still fine HTPCs but I wanted something with a little more horse power. I am pleased with the performance of the i3 and HD Graphics 4000.

Ubuntu 12.10 is the operating system. I will mostly use XBMC with the PVR Addon for MythTV. I will occasionally use the standard MythTV frontend software instead of XBMC.

Sunday, January 20, 2013

Video Streaming with VLC to 4 Ubuntu PCs

Below is a demo of video streaming to 4 Ubuntu PCs using VLC.

On the server I execute: vlc --sout udp:239.255.12.42

On the clients I execute: vlc udp://@239.255.12.42

Stream: MPEG2 720p video

Software:

  • VLC media player 2.0.5
  • Ubuntu 12.04 and 12.10

Hardware from left to right:

  • Quad core server.
  • Zotac ION HTPC.
  • Lenovo X1 Carbon laptop
  • Asus UX13 laptop

Streamed over wired 1000Mb/s LAN.

Friday, January 18, 2013

Associating myth:// URI scheme with mythavtest

This shows how to associate URI scheme myth:// with mythavtest in Ubuntu 12.04.

Create the desktop file.

sudo nano /usr/share/applications/mythhandler.desktop
Insert the following text in to the desktop file.
[Desktop Entry]
Encoding=UTF-8
Name=Myth protocol handler
Comment=MythTV protocol handler
Exec=/usr/bin/mythavtest %U
Terminal=false
Type=Application
Icon=MythTV
Categories=Application;Utility;Video;
MimeType=video/mpeg;x-scheme-handler/myth;
StartupNotify=true
StartupWMClass=MythTV
Save the file and issue the following command:
sudo update-desktop-database
Now you could run the following command to view a MythTV recording:
xdg-open myth://Default@192.168.1.5:6544/1323_20130118070000.mpg
Or in a node-webkit app you could do this:
var gui = require('nw.gui');
gui.Shell.openExternal("myth://Default@192.168.1.5:6544/1323_20130118070000.mpg");
I use this method in my MythTV Gadget.