Connecting EyeTV to DirectTV, Dish Network, Sky and Other Set Top Boxes
If you are looking to connect your Mac’s EyeTV application to a set top box such as Directv, Dish Network, Sky Boxes or virtually any other box there are several low cost options that make it easy.
If you have Directv you have two options
1. SerialChannel. SerialChannel provides a reliable and clean installation. It works through a serial connection that connects to the usb or data port of your Directv box.
2. SerialChannelIR. SerialChannelIR is an Universal IR blaster solution for the mac. It uses USB-UIRT and an IR blaster cable connected to the front of your box to mimic your box’s remote to change channels.
Which ever one you choose will provide a seamless channel change from EyeTV to your box.
If you have Dish Network or virtually any other box use SerialChannelIR.
If you have a standard Sky digibox, Sky+, Sky HD, Foxtel iQ (but not Foxtel iQ2) or Foxtel Pace 420 you also have two options.
1. SerialChannelSky. SerialChannelSky provides a reliable and clean installation. It works with Dusky-control hardware to change the channels on your box.
2. SerialChannelIR.
See www.coolDVR.com to get more info.
Mythv and Pretty File Names For Recordings
When you record something on mythtv it creates a entry in the database and names the resulting recorded file. However, if you were to look in the recordings directory you would see that the given name is a bit hard to figure out. In this post I will show you how to create a directory that holds links to these files with user friendly names. In Mythbuntu there is a script which does most of the work for us. We’ll then share that directory on a network via SAMBA and NFS
1. On your myth box open a terminal window (or ssh into the myth box).
2. Change directory to /home/mythtv and create a directory called readable-recordings.
prompt$ cd /home/mythtv
prompt$ sudo mkdir readable-recordings
3. Change directory to /usr/share/doc/mythtv-backend/contrib and locate the file named mythrename.pl.gz.
prompt$ cd /usr/share/doc/mythtv-backend/contrib
Unzip the file:
prompt$ sudo gunzip /usr/local/bin/mythrename.pl.gz
Make the file executable:
prompt$ sudo chmod a+x /usr/local/bin/mythrename.pl
Move the file decompressed file to /usr/local/bin:
prompt$ sudo mv /usr/share/doc/mythtv-backend/contrib/mythrename.pl /usr/local/bin
4. Run the script with the –link option:
prompt$ /usr/local/bin/mythrename.pl –link /home/mythtv/readable-recordingsThe files in the readable-recordings directory should be easy to read with the proper episode name and title of the recording.
5. Setup the script to run automatically. This script works great but does not run automatically so we need to schedule it with cron to do this hourly.
prompt$ sudo nano /etc/crontabCreate the following entry to run the script every hour:
0 * * * * /usr/local/bin/mythrename.pl --link /home/mythtv/readable-recordings
5. Sharing the readable-recordings. From the MythUbuntu Control Center select services from the right side menu. You should see options to enable NFS and SAMBA sharing directory. Then go to the desktop Applications –>System–>Shared Folders. The shared folders application will appear with functions locked. Click on the unlock button to allow editing. Create an entry for the readable-recordings directory for SAMBA and one for NFS. **Note if you are going to NFS share with a OS X box you will need to edit the /etc/exports file to include the insecure option.
Restart Samba:
prompt$ sudo /etc/init.d/samba restartRestart NFS
prompt$ sudo /etc/init.d/nfs-kernel-server restart
You should now be able to mount the shared file system from the network
SerialChannelSky Eyetv solution for Sky boxes ready to go.
For many of you who have emailed me to have SerialChannel support the Sky boxes, SerialChannelSky is almost complete and will be on www.cooldvr.com soon. SerialChannelSky uses a usb dusky-control box to control the Sky box. I would like to thank the developer of dusky-control (dusky-control.com) for his support in making this software possible. It is his hardware that SerialChannelSky relies on to make the magic happen. If you have any questions feel free to email me at tomhoh@mac.com
LibUSB on Mac OS X 10.5.x
Lately I have been working on two projects to integrate USB hardware with my SerialChannel software. Both of these pieces of hardware have drivers written against libusb. Libusb was born into Linux and provides a portable usb api accross multiple platforms including Windows. On OS X however, it has been a moving target over the years with no central project to keep it going. This has been true until I recently discovered that the folks that maintain the SANE port for various platforms including OS X have also maintained a libusb port as part of their software. The best part is they provide it in a nice and neat SDK package for the various versions of OS X to include Leopard. It takes very little effort to get it going and working in an OS X project. If you are developing software for a usb device that is recognized by the system as an HID device it will be necessary to create a dummy kext file to prevent OS X HID driver from capturing the device. When creating the info.plist file do not use IOProbeScore in USB …. EVER or you will get error 2c7. The libusb download link is here. Remember to set environment variable
prompt$ export DYLD_LIBRARY_PATH=”usr/include/lib:$DYLD_LIBRARY_PATH”Finding the right Mouse
I have never been a connoisseur of input devices. However, recently I had to spend time trying to find something more acceptable. Over the years I have used whatever Apple supplied with their systems. My last few purchases have come with the wireless mighty mouse and I have to say it does not live up to the Apple standard. I currently own three of them and I can say the quality of the mighty mouse is not up to par. In fact one of the mice the middle track ball does not scroll downward (and it is not a preference setting). The mice seem clunky and sluggish and they are very picky about the surface they track on. As a programmer this is very frustrating. I typically have a desk full of opened reference books as well as other items which i use as a mouse pad for which the mighty mouse simply will not track on. I am forced to clean a spot off some where so that the mouse will work. The battery usage on this mouse is also ridiculous. It eats batteries like crazy. This problem is not isolated to only one of them. After dealing with this for well over a year I finally had enough. I recently purchased a logitech mx60 wireless mouse and it is worlds above the mighty mouse. It has a very comfortable feel and tracks on any surface. There is very little lag when it tracks. It also sports a very long battery life enhanced with a small power button of the bottom to make it last even longer. Most reviews for this mouse has been very positive. If you are looking for a good mouse for your mac give this one a try. See the link below.
Serial Port Programming in Cocoa
I am currently working an a sprinkler controller program that controls a relay board to turn a lawn sprinkler system zones on and off at specific time schedules. One of the interesting things I have learned is serial programming on the Mac. Unlike previous programs I have written I decided to use pure cocoa to communicate with the relay board. The board is 8 output 4 input serial board with an RS232 connection. So, the question is how do I communicate with this board from the mac since there is not a rs232 port on the mac and where is the device file?. On unix system the serial port appears as a device file in the /dev directory. Since the mac does not contain an RS232 port, I am using a usb converter specifically one which provides a virtual com driver for OS X. This driver makes the usb port appear as a serial port and places a device file in the /dev directory. A usb adapter with an FTDI chipset is a perfect example and the one which I am using. As you may or may not know there is not a Apple supplied cocoa classes for accessing the serial port. For a couple of programs I have written, I used the Carbon and C Unix calls to access and use the serial port. However, this is a time consuming task, and would be better suited for my program if I could use or make a cocoa solution. When researching how best to do this in cocoa, I ran across a AMSerialPort. AMSerialPort is a collection of cocoa classes for accessing and doing just about anything with a serial port. It is avaiable here. It also comes with a test application to give you a feel for how to use it. It works really well. The classes also provide a method for accessing a list of available serial ports on the system as well as monitoring the port for incoming data. If you are going to do extensive work in this area The following book provides a good source of information on serial ports.
Didn't find what you were looking for?
Product search
...or click here to see similar items.
SerialChannel 2.1
Well, it has been a little while since I worked on this application. SerialChannel is a small application I wrote about 1 and 1/2 years ago. It allows Eyetv users to change the channel on a Directv box. The application makes use of a serial cable that connects from the computer to the box (much the same way mythtv works). SerialChannel up to this point required editing 3 settings in the internal perl script to match the users setup. After many request from users to provide a graphical configuration to SerialChannel, I have done so. SerialChannel 2.1 now provides a configuration preferences window which provides a list of serial devices detected, baud rate, and Directv Box for the user to choose and set. I also decided since I was going this far I may as well give trouble shooting a boost as well by providing feedback of errors in the main window. I initially resisted doing this because I wanted to keep the program as simple as possible. I think it is kind of a waste to have a full blown GUI for configuring especially when this is only done once -set it and forget it. Editing the pearl script was really not hard, but in the end I understand everyone has different skill sets. If you have a look at my website for SerialChannel you will see my lack of skills in designing web pages. So if you use Eyetv and Directv give SerialChannel 2.1 a try. It is available at www.coolDVR.com.
Cocoa(R) Programming for Mac(R) OS X (3rd Edition)
Quartz Composer
Recently I began writing an application for my toddler that uses compositions created with quartz composer. I am very impressed with Quartz composer, this is an application that I was unsure of it value in Tiger. QC makes it extremely easy to write and test 2d graphics, especially for kids educational software. QC still has a few short comings but it is progressing along nicely. One of the things I had to work around was QC’s inability to play a sound file. I recently completed writing a audio plugin renderer so that I can play a sound with my composition. One fascinating thing about Qc is that it is possible to write entire games in QC. I have run across asteroids and pong composed entirely in a QC composition.
NSXML Event Parser vs NSXML Tree Parser
This writing is along the lines of Soap services. This is another question I see a lot floating around the net. When is it best to use NSXML event parser or Apple’s newer NSXML Tree Based XML Parser? The answer depends on the number of times you will need to get information from the xml document. In other words, will the software require multiple queries of the file to get information or is all of the information in the file going to be presented to the user at one time. The answer here is critical because the NSXML Tree parser can be very memory intensive as the entire XML is read into memory to form the tree to query. The NSML Event parser does not load the file into memory it simply reads the file line by line and sends event notifications to a delegate so that something can be done with the information. I learned this back when I created my TV listings app. The Tree based parser was really slooooow. Querying the XML document by Xpath or Xquery took a long time. One thing I realized is that my app did not need to make multiple queries to the document. It was much easier and much more memory efficient to use the Event parser to gather data and place into containers for later retrieval by the software. What kind of difference did this make. Well it went from 2 to 3 minutes to construct the data and present it to the user with NSXML Tree to 10 to 15 seconds with the event parser. If anyone needs any help with this area please feel free to email me.
Shortcut to Learning WebServicesCore
If you are wanting some info on Web services and xml in cocoa have a look at Todd Ditchendorf’s blog. He has been very very generous in open sourcing some terrific tools for just such a need.