Ok so I have been playing with myth for some about 3 weeks. It is fantastic and has changed the way I watch TV.
It is so nice and the front end seemed really easy to add my own menus.
Since about 88 I have been using X10 light controls and have been in about 4 apartments. After getting myth stable and messing around a bit I decided to marry the two. I looked into a few packages for controlling X10 thru Linux and settled on Heyu (
http://heyu.tanj.com/heyu2/). I checked out all the man pages and purchased a CM11A from ebay for about $22 this unit connects up to your serial port and allows you to Control your lights from the computer. I have always been one to use Open source and Now want to give back a bit. So here is a semi step by step of how I used MythTV to control my lights.
--Log into the system.
--change to super user (Root)
su
--Down loaded heyu2 and installed using there instructions
--I then set up a group for heyu and added mythtv to the group
addgroup heyu
vi /etc/group
--add users you want to be able to control lights
heyu:x:1003:mythtv,otheruser,yetanotheruser
--change owner of the file to heyu group
chown -c :heyu /usr/local/bin/heyu2
--I also did the same for /etc/heyu/x10.conf
--I edited the config file to add some scenes
vi /etc/heyu/x10.conf
--Ok so I added some Alias to the config so I can use the names in the future.
--notlr not so exciting but is all the lights that are not my living room.
ALIAS hall A1
ALIAS kitchen A2
ALIAS living A3
ALIAS bedroom A4
ALIAS notlr A1,2,4
--I then set up my Scene for movie Lighting.
--the dimb brings the light to full power then dimbs it down to the proper setting.
-- So this movie scene turns down all the lights in my apartment to levels I like.
-- I got to these settings by playing with the command line heyu2 commands.
-- the dim level can be between 1 and 22
-- So my living room is a bit brighter then the rest of my apartment.
SCENE movie dimb notlr 15;dimb living 14
--I also added these lines(You can skip this if you want)
SCRIPT_MODE SCRIPTS
SCRIPT a5 on :: movie.sh
--this is a bit more complex Heyu has a daemon (This requires you to build init.d files) that can run and watch the X10 for a "Trigger"
--What this tells the computer is if I push a5 on any X10 controller run the script movie.sh
--this script is a linux script in /usr/local/bin/movie.sh that sends "heyu2 movie" to launch the scene.
--This allows me to launch this scene from any of my x10 controllers.
--Ok so now we have a config and scenes test the scene by typing heyu2 movie you should see the lights take the "Scene"
--There may be a slight delay for all the commands to go (no more than 5 seconds)
heyu2 movie
--now to build our new script
vi /usr/local/bin/movie.sh
--save this file (This is a simple script here I have a bit more happening but did not want to complicate this.)
chmod -x /usr/local/bin/movie.sh
--This tells the OS this is a executable script.
--we will need to now build our new menu
vi /usr/share/mythtv/lights.xml
<lightsmenu name="Lights Menu">
<button>
<type>Movie</type>
<text>Movie Lights</text>
<action>EXEC /usr/local/bin/movie.sh</action>
</button>
</lightsmenu>
--save this file
--now to attach our new menu
vi /usr/share/mythtv/mainmenu.xml
<button>
<type>Lights</type>
<text>Lights</text>
<action>MENU lights.xml</action>
</button>
--save this file and you should be off and running.
This is a simple example I have given but you can take this and really run with it.
If you have any questions feel free to ask. I may post the Init.d file I created it there is any real interest in this with this system. This was a really quick and rough telling of the tale but It worked fine for me.
Dave.