Wednesday, May 28, 2008

Eyegalsses - The big ripoff (and how to save hundreds of dollars) Shattering the Eyeglasses Scam
The time has come once again where my eye care coverage has reached its two year anniversary, which means my wife and I are in the market for new eye wear.

My work health plan insurance covers 90% of the cost up to $300, including up to $130 for the eye exam itself, leaving $170 to go towards a pair of eyeglasses. (same coverage for my wife.)

So I head out to scout the regular outlets, Lenscrafters, Hakim, and a few "no name" outlets, recalling from previous years that this was going to be an exercise in frustration trying to get a decent pair of specs that only cost me a couple of hundred dollars out of pocket.

The usual "run around" consists of picking out a set of frames for $150 - $200 (unless I want to pick a real ugly $99 set from the bargain bins,) listening to a speech about all the lenses options and coatings, trying to explain to them that I just want the very basics and can't afford all the fancy coatings, and in the end still being handed a bill for over $400.

Of course, insurance will pay $170 of that, but still, after both myself and my wife are finally fitted, I'm stuck with an "out of pocket" bill of over $500 for two sets of less than desirable glasses.

Well, after two weekends of hitting the optical outlets and not seeing anything that looked like a decent bargain, I decided to do a little searching on the Internet, hoping to find that maybe there would be a discount outlet in the area where I could at least buy a set of decent frames for a reasonable price and have the lenses installed by some optician and maybe save $100 or so ... well, I didn't find any local discount outlets, but I did find what seems to be a much better solution.

After a few minutes of googling I came across a site called " Shattering the Eyeglasses Scam". Exactly what the doctor ordered (or more exactly, what the eyeglass doctor hoped you would never find out.)

At Glassy Eyes you'll find reviews, comments, and helpful hints for purchasing eye wear online, as well as links to several online eye glass outlets where you can find decent prescription glasses (even bifocal progressives) for under $100, if you can find frames that suit your sense of style, and there are lots of selection, so everyone should be able to find something they like.

Of course you can go higher than $100 if you wish, and as a quick comparison I took a pair of frames that were obviously better than my current frames on my progressive bifocals (which I paid near $500, frame and lenses, about 4 years ago) and added my prescription (and a pair of clip on sunglasses as my original glasses came with a set) and the cost came to $147 .... I added all the special coatings and made the lenses "high index" (thin lenses) and the price still only came to $235 .

At these prices, if I pick reasonable frames, without the unnecessary coatings and tints, I could probably get two or three sets (a progressive bi-focal set for every day usage, a reading set for computer work, and a single vision "myoptic" set for playing sports and such ) and still come close to staying within the cost that my health plan will cover.

I haven't actually ordered anything as yet, but I do plan on doing so in the next couple of weeks (after I get an eye exam and get me latest prescription,) so look for updates on my on-line optical experiences.

Note: I called my health plan insurance company and they say they will cover the costs as long as the glasses are dispensed by a licensed Optician, I called a few places and most of them do have a licensed Optician so that should not be a problem.

Another issue could be whether the insurance covered purchases done outside of Canada ... I had originally had the idea that as my wife was heading overseas to visit her family this summer, that we would purchase the frames in Canada and get the lenses installed overseas where the prices are quite similar to what I more recently found online. A couple of weeks ago I had contacted my insurance company to see if they would still cover the me if I bought the frames and lenses separately and in different countries, and they said as long as everything was dispensed by a licensed Optician there would be no problem.

Of course, not all health care plans have the same coverage, and yours may have more restrictive rules, so if you have eye care coverage on your health insurance plan you should definitely contact them before ordering your own glasses to make sure you are covered. Even if you''re not covered for on-line eyeglass purchases, it may still be more cost effective to take the full hit of the cheap online purchase rather than paying "retail" at a "brick and mortar" outlet and getting insurance to reimburse some of the money. In my case, for example, I get covered for $300. After a $130 eye exam that leaves me with $170 to cover my glasses. If I buy online I can get the equivalent of my current glasses for about $150. If I go to Lenscrafters they charge me about $400 (closer to $500, but let's give them the benefit of the doubt,) $170 of which insurance will cover. That still leaves me out of pocket at least $230 (of course since my insurance covers the online purchase anyway then there's no question as to which way I will go ... 3 pairs for free, or 1 pair for $230 ... hummm, what a hard choice!!)

For those looking to stay within Canada for their ordering you can try They also have a licensed Optician and do contact lenses as well.

Update Oct 8th, 2008:

So eventually I got around to ordering a pair of glasses for myself (progressives) and the wife (2 pair; a single vision for near sightedness, and a pair of reading glasses.)

I has previously gone to the optometrist to get an updated prescription, which took about $90 from my bi-annual $300 eye care insurance limit. The wife already had her's done recently over seas for maybe $10 cdn, so she had her full $300 to use. My glasses cost around the full $210 I had left, and the wife's 2 pairs cost about $210 or so, so she still can get another pair of cheap glasses if she wants.

We ended up using as they had the styles we were looking for (ok, the styles the wife was looking for ... what do I know about "style"?)

The glasses arrived in about 3 weeks, which is the time frame they originally gave me, and kept me up to date on the status with several emails through out the process.

So far so good. We've been wearing these new specs for about 2 weeks now with no problems.

Wednesday, March 19, 2008

Mythdora - Setting up a USB IR-Blaster

Finally got around to ordering an IR-Blaster to use with my Mythdora installation.

The specific one I purchased can be found at I actually ordered it on-line from NCIX (Vancouver Canada source) on Monday afternoon, and I had it in my hands (Toronto) on Wednesday.

What I wanted to do was to use the IR-Blaster to give me the ability to first; have the Mythtv front-end be controlled by one of my many remote controls, instead of my wireless keyboard; and then to also change the channels on my STB as controlled from MythTV.

So, here's what I had to work with: My MythTV box, the USB IR-Blaster, My STB, the remote for my STB, and for now the remote for my MediaMVP box.

First thing I did was read, read, and read some more, and got myself totally confused ... that is until I read somewhere that the USB-UIRT was directly supported bu lirc 8.2 ... brillaint, because that's exactly what Mythdora comes with.

So I take the first big step; I plug the USB IR-Blaster into the USB port of my MythDora box ... suddenly I see some new device files in my /dev directly, the most important one being /dev/ttyUSB0 which it turns out is the recognized USB IR-Blaster.

Next, as a test I run the "irrecord" command ... first time through it doesn't work, but luckily I make a type on the driver argument, and it obligingly responds with a list of valid drivers, one of them being the "usb_uirt_raw"driver (I was trying to use some other driver, but types it in wrong, which was lucky, as had I typde it in correctly it just would have failed and I would have probably spent hurs more trying to google the reasons and corrections.)

Anyway, after I realize my mistake I correct it and type:

irrecord -H usb_uirt_raw -d /dev/ttyUSB0 myremote.conf

This brings up some information and a few prompts, and asks me to start hitting keys on my remote, which the program starts to recognize. so I know that I am getting somewhere with this little project.

So, let's step back a little bit here now that I've got the basics up and running, and do a quick overview of the steps that are going to be needed in order to accomplish what I want to do.

Step1: Get MythDora to recognize the USB IR-Blaster hardware.

Step 2: Create an lirc configuration file of the remote I want to use so the lirc system can both recognize and simulate these devices.

Step 3: Merge these files into one file and place it in the /etc/lircd.conf file.

Step 4: Configure the lircd to start properly and to start on a reboot.

Step 5: Configure MythTV to recognize the output from the lirc system

Step 6: Configure MythTV to send the proper IR codes out to the IR-Blaster to simulate the STB's remote control.

So, let's put some detail on some of those steps.

Step 1: This step is actually very simple, as mentioned above. Ignore everything you read about setting up other kinds of IR Blasters on other version of lirc, simply make sure you have lirc 8.2 and plug the IR Blaster into your USB port (note: use "rpm -qa |grep lirc" to determine if you have lirc 8.2 ... and if you don't I would assume a command such as "yum install lirc" would quickly fix this problem ... but, as I stated already, MythDora should already come with this software.)

Step 2: This is where the "irrecord" command comes in. You run this command with the proper parameters, and it prompts you to start hitting keys on the remote, gives these keys some names, and it automatically builds the lirc configuration file for you.

For example, to create the lircd configuration file for my Hauppauge MediaMVP remote control I used the following command:

"irrecord -H usb_uirt_raw -d /dev/ttyUSB0 hauppauge"

The program walked me through the process where I hit all the keys on my remote, gave them some names, and it did all the work in creating the following file:

# Please make this file available to others
# by sending it to
# this config file was automatically generated
# using lirc-0.8.2-CVS(usb_uirt_raw) on Thu Mar 20 15:55:56 2008
# contributed by
# brand: hauppauge
# model no. of remote control:
# devices being controlled by this remote:

begin remote

name hauppauge
bits 13
eps 30
aeps 100

one 917 775
zero 917 775
plead 961
gap 109396
min_repeat 1
toggle_bit_mask 0x800

begin codes
1 0x1781
2 0x1782
3 0x1783
4 0x1784
5 0x1785
6 0x1786
7 0x1787
8 0x1788
9 0x1789
0 0x1780
Text 0x178A
Sub/CC 0x178E
Red 0x178B
Green 0x17AE
Yellow 0x17B8
Blue 0x17A9
Skip- 0x17A4
Pause 0x17B0
Skip+ 0x179E
Rewind 0x17B2
Play 0x17B5
Forward 0x17B4
Record 0x17B7
Pause 0x17B6
Vol- 0x1791
Vol+ 0x1790
Mute 0x178F
Previous 0x1792
CH- 0x17A1
Ch+ 0x17A0
Exit 0x179F
Down 0x1795
Menu 0x178D
Left 0x1796
Right 0x1797
Up 0x1794
Guide 0x179B
Radio 0x178C
TV 0x179C
Videos 0x1798
Music 0x1799
Pictures 0x179A
Power 0x17BD
OK 0x17A5
Go 0x17BB
end codes

end remote
Step 3: I also did the same thing with my STB's remote control, merged the two files ("cat file1 >> file2") and copied that merged file to /etc/lircd.conf.

I then had a file that allows the lirc system to both recognize and simulate both of those remote controls.

Note: I have several older remotes, especially a couple of RCA universal remotes, but neither of these remotes were properly recognized by the irrecord program ... so be warned, not all remotes are created euqally, so YMMV.

Step 4: Next we want to set up the licrd program to start properly, and to start up automatically on reboot.

First we need to edit the /etc/sysconfig/licrd file to contain the line:

LIRCD_OPTIONS="--driver=usb_uirt_raw --device=/dev/ttyUSB0"
This will you to start the lircd deamon using the command:

/etc/rc.d/init.d/lircd start
In order to make sure the lircd program starts up after a system reboot you can enter the following command:

chkconfig lircd on
Step 5: Mythtv doesn't actually do the recognizing of the remote control codes ... lircd does that and then looks up what to do with these codes in your /home/mythtv/.mythtv/lircrc file (also "soft linked" to /home/mythtv/.lircrc, so if you edit one of them you actually edit both.)

The lircrc file format (along with other useful information about the lirc system) can be found here.

To understand better what's goin gon here, let's step through a basic key press from my MediaMVP remote control and trace what happens from the actual key press to the action on the screen within MythTV.

OK, so let's say I press the "menu" button on my MediaMVP remote.

The IR-Blaster receives the IR signal "0x178D" and passes it on to the lircd program.

The lircd program checks in the /etc/litcd.conf file and finds the "0x178D" code (see bolded code above) in the hauppauge section of the file, which tells it that this code corresponds to the "menu" button of the hauppauge remote control.

So, now the lircd knows that the "menu" button on the hauppauge remote was pressed .. now what does it do whit it?

First thing the lircd does is to check what program has the "focus" of the system ... in this case since we are supposedly running MythTV, the lircd program finds that "mythtv" has the focus.

Lircd now looks in the /home/mythtv/.mythtv/lircrc file.

It looks through all the file for any entry that refers to the "hauppauge" remote, for a program called "mythtv", and a reference to a "menu" button .

In doing so it finds something like this:

prog = mythtv
button = Menu
repeat = 3
config = M

This tells the lircd that as the "mythtv" program has focus, and the "Menu" button was pressed, then send the key-press "M" to the mythtv program.

A key-press of "M", assuming you're watching live TV, will bring up the live tv menu.

The only hard part about this whole process is that you will have to go through each entry in the /home/mythtv/.mythtv/lircrc file and make sure the "button" entry matches what you have listed in the /etc/lircd file (for both "remote" and "button" at least ... also "repeat" and "delay" might need to be adjusted for your particular system needs.)

Step 6: So now we have MythTV recognizing the signals from your remote control, now we need to have Mythtv send out the proper remote codes when it wants to change the channel, so that the STB thinks the codes are coming from it's own remote control.

Again, let's step through a sample case. Let's say you are watching a show on channel 100 and want to change to channel 200 ... so you enter "2-0-0" and hit "ok" on the remote.

Mythtv recognizes these remote control signals just as it would in Step 5 above ... but this time, since it is a string of numbers and an "ok", it interprets this as a request to change the channel (and rightfully so.)

When MythTV recognizes a channel change request it can do one of two things; If you have an internal cable or satellite card installed, it sends that request directly to the card and lets the card handle the channel change process. If you are using an external Set Top Box (STB) then you need to configure MythTV to use an "external channel change command".

You config this in the MythTV setup program under "Input connections".

Run "MythTV Setup", go to the "Input connections" section and select the appropriate connection ... in my case it's the "[MPEG : /dev/video0 ] (Composite 1)" connection as I have my composite output from my STB connected to the composite input of my hauppauge PVR-150 card.

In this Connection I have entered "/usr/local/bin/" into the filed called "External channel change commands:".

This tells MythTV that when ever a channel change is requested (by entering "###ok" on your remote, or via an automated request from the recording system) to take all the numbers and send them as parameters to a program called in the /etc/local/bin directory.

So, since as we stated abve we are changing from channel 100 to channel 200 by entering "200ok" on the remote, MythTV automatically runs the Linux command:

"/usr/local/bin/ 200"
Next let's have a look at the /usr/local/bin/ shell script:

for digit in $(echo $1 | sed -e 's/./& /g'); do
irsend SEND_ONCE $REMOTE_NAME $digit
sleep 0.2 # note, you may have to tweak the interdigit delay up a bit
The most important parts of the script are the "irsend" commands. This is the lirc command that tells the ir blaster to send an ir signal out to some other device.

You'll need to understand a little bit of shell scripting to figure out the details of this script, but essentially it takes the channel number passed to it by Mythtv, let's say 200, and takes each individual digit of that number, looks up the proper remote code in the /etc/lircd.conf file, and sends it individually out the ir port of the ir blaster ... repeats for each digit, and then finally sends an "OK" ir signal for that remote.

You will have to modify this script to suit your own remote and the signals it requires:

You will find your remote name in the /etc/lircd.conf file in the "name" section of the remote that controls your STB.

You may also have to change the "
line as well to change "OK" to whatever you called the button that your remote uses to signal that you've stopped entering digits and to take whatever number you've entered as the complete channel number you are attempting to change to.

And that should be it .... you may need to restart MythTV, or even reboot your system (I'd recommend a complete reboot to make sure everything starts as it should.

My Mythtv now is controlled by my old MediaMVP remote control, and when I enter a channel number (or Mythtv automatically tries to change channels; for a recording for example) it sends the channel number to the lirc system which emulates the IR Remote of my set top box.

My next little project is to modify the /usr/local/bin/ to look for special numbers, which I will then cause to run other scripts to kick off and send other ir codes that will automatically configure all my A/V equipment ... for example let's say I enter the channel number "99966" (9-9-9-o-n) that could be recognized by the script, which would then run another script that uses irsend to send ir codes to the TV, HTS, & STB to turn them all on and set them to the proper volumn levels, inputs and outputs. 999644 (9-9-9-o-f-f) could trigger a scrpt that turns everything off.

First though I need to figure out how to get the proper licrd.conf file for my RCA remote that came with y old HTS, as while it is an RCA universal remote, it doesn't seem to be like any official RCA universal remote.

For those attempting this project, I would first look in to see if your remote already has an lircd.conf file ... if not, then you're going to have to use the lirc tools such as irrecord, mode2, and such to try and build your own ... good luck.