MythTV power usage

Switching to an eMachines EL1300G computer drastically cut the running power consumption of my MythTV setup, to an average of 45 watts when idle. (The old computer used 141 watts when idle.)

This makes it practical to leave the computer on 24/7. I had set my old computer to shut itself down when not recording, but this required a 2 minute boot-time wait anytime we wanted to watch TV. (When it was not already awake recording a show). Even when the old computer was off, the constant current draw from the other devices (UPS/HDHomeRun/Amplifier) was 17 watts.
Continue reading

eMachines EL1300G-02w – HTPC with MythTV on Linux

Executive Summary: The eMachines EL1300G-02w is a good choice for a low power home theater PC (HTPC) or media computer. Pros: Small form factor, low energy use, low noise with stock fans, DVD-DL R/W +/- optical drive, lots of media card readers. Cons: 160GB stock HD will need to be swapped out for back-end use, VGA video out (only), Analog Audio out (only), minimal expansion capabilities.
Continue reading

Setting up lircd with the hdhomerun and a Tivo series 2 remote

To set up lircd with the hdhomerun to see a tivo series 2 remote control, you should first program the HDHomeRun to send UDP packets to your linux computer with a command such as the following:

hdhomerun_config <device id> set /ir/target "<lircd ip addr>:<port> store"

You can test that this is working by running:

irrecord -H udp -d 5000 "testing"

If you get dots when you press your remote control buttons, the HDHomeRun is sending IR information to your linux box. (remember to unblock UDP port 5000 for incoming transmissions if you are running a firewall!)

Once that is working, just set up your /etc/lirc hardware.conf and lircd.conf files to support the Tivo series 2 remote.
Continue reading

How to move a mythtv database from one machine to another

Backup the database on your source machine. Newer versions of mythtv do this for you automatically. Check out the mythconverg_backup.pl script if you have to do it manually.

Delete any existing database on your destination machine:

$ mysql -u root
mysql> DROP DATABASE IF EXISTS mythconverg;
mysql> quit

Re-create the empty database on your destination machine:

$ mysql -u root < mc.sql
(You may need to use the -p option and enter your root password)

You may also have to set up the mythtv user with the correct password:

$ mysql -u root < mc.sql UPDATE user SET Password=PASSWORD('YOURPASSWORDHERE') WHERE user='mythtv'; FLUSH PRIVILEGES;

After this, run the mythconverg_restore.pl script:

mythconverg_restore.pl --filename mythconverg-1214-20091010150513.sql.gz

You may have to specify hostname, database name and enter the password if you don’t have a mysql.txt file set up in my .mythtv directory. You may also have to specify the fully qualified path to the file if it’s not located in your default backup directory.

How to add XBMC to MythBuntu 9.10 (or Ubuntu 9.10)

Xbox Media Center is no longer for just the XBox. It’s UI is slicker than MythTV’s Frontend for playing music, videos, and showing slideshows of pictures. (It’s weather applet is also much nicer…) If you have an existing Ubuntu 9.10 based system, the PPA:team-xbmc repository makes it dead easy to install xbmc on a ubuntu computer with the following commands:

sudo add-apt-repository ppa:team-xbmc
sudo apt-get update
sudo apt-get install xbmc
sudo apt-get update

MythBuntu doesn’t support AutoIP

MythBuntu (and Ubuntu I assume) don’t support the AutoIP standard.
(Auto IP is basically a way for devices to form ad-hoc networks…if you don’t have a static IP, and are not assigned a dynamic IP via a dhcp server, you try out a random address in the 169.254.x.x network (255.255.0.0 netmask) and as long as ARP doesn’t report a conflict, you now have your IP!)

Windows, and the HDHomeRun devices support this, but MythBuntu 9.10 does not. So, I’m back to using firestarter to easily configure my MythBuntu box to assign the HDHomeRun an IP address via DHCP.

Discovery Error 4001 : Silicon Dust HDHomeRun error

SiliconDust HDHomeRun Discovery error 4001I was in the process of changing out my MythTV backend machine, and when configuring the new machine, I took a look on SiliconDust’s website for a firmware update for my HDHomeRun (HDTV Network tuner box). I hadn’t updated it since late 2008, and sure enough, they were five or six firmware versions farther along. (Up to 20091024 to be specific.) So I upgraded the box using the newest version of the hdhomerun command line utility under linux. Everything went fine until the HDHomeRun rebooted. After that point, the utility said that an error occurred discovering the HDHomeRun! I tried booting into windows to try out the windows software, but it also could not discover the device, and gave me this ominous message:

Discovery Error 4001: Please email support@silicondust.com
Continue reading

Learning Python for programmers – video lectures

In my day job I teach students how to program. Recently, I gave three days of review lectures for my CS 1301 (Introduction to Computation – With Python and Robots) class. These three 50 minute lectures brushed over all of the major topics we covered in class very quickly. They would be very useful to somebody who knows how to program another language (such as Java or C), and wants to learn the basics of python in 2 and a half hours.

If you would like to watch more in-depth video lectures on any of the above topics, find the appropriate day in the class calendar and watch that video.

Ebike Solar Charging

My electric bicycle has a motor that draws up to 450 watts (if I drive it over its nominal 250 watt rating), and the batteries have only 5AH (approx 120 watt hours) total capacity. Keeping in mind that I should only discharge the lead acid batteries to 50% (approx 60 watt hours) this indicates that I can only use the motor at full blast for eight minutes.

But, since I only use the motor to help go up hills and provide extra acceleration, and most of the time it is not drawing the full 450 watts, I actually have a much longer run-time. I deliberately chose to put small batteries on the bike both to keep the weight down, and to allow them to be recharged using solar cells (8 watts) in a reasonable amount of time. Under full sun, hypothetically the solar cells will generate 60 watts of power to recharge the batteries from 50% to 100% charge in 7.5 hours. In actual practice, it takes more like 10 hours of sunlight, usually around two days.

How does this work in actual practice? Here are some examples.
Early Saturday morning I biked a 2.8 mile round trip to the post office, using the motor lightly. I left the bike outside all day and it was recharged by 4pm. On Sunday afternoon I rode the bike to a friends house ( a 2.5 mile round trip). Because it was overcast and raining, no charging occurred before I then rode the bike another 0.9 miles to the Marta station (up hill) and left it all day. (At this point the batteries had been used for 3.4 miles of travel without charging.) When I returned at the end of the day and rode the bike home (another 0.9 miles) it was not fully charged (due to the ride home) but the voltage had gone up significantly. After leaving it out in the sun for another day the batteries were fully charged.

In general usage, I typically only use the bike two or three days a week (rain, schedules matching up, etc) so the two day charging time fulfills my needs. If the bike was my only means of transportation, I’d probably have to supplement the solar charging with a grid tied charger, or install much larger solar panels at a fixed location to charge the bike.

Vacuuform motor cover

plastic bag covering motor

Ever since I mounted an electric motor to the front wheel of my
bicycle I have been keeping a plastic bag over the motor with a clothespin whenever the bike is parked. This does a decent job of keeping rain out of the motor, but the process of uncovering and covering the motor takes extra time. In an effort to make a permanent rain cover for the motor, I built a tool (mold form) out of wood and used a vacuuform machine to shape a piece of plastic over it.
Continue reading