View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: IR Transmitter?
PostPosted: Wed May 13, 2009 5:05 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
Hello,

I may be in over my head, so I wanted to post to get a few ideas. First, I am currently using lirc (downloaded version 0.8.4a) with an ATI All-in-Wonder II. The kernel driver doesn't allow all buttons, so I have to use lirc for this remote. I really like the remote and setup, so I am not looking ot change this.

I would like to add an IR transmitter (for two targets: projector and AV receiver). I have a USB-UIRT, but would not be adverse to purchasing something else if it would be easier.

So my questions:

1) Will it be difficult getting a second lirc device configured? Or is it fairly straight forward?
2) What IR transmitter should I use? I have been reading scary stuff about getting the USB-UIRT device working in Linux, so I am not sure it is the best option for me. I could use a stick-on transmitter for the receiver, but would probably need a broadcast (for lack of a better term) transmitter for the projector. They are on opposite sides of the room, facing opposite directions.

Thanks,

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 16, 2009 10:27 am 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
Version 3

First of all, the projector and av receiver what do they do? I presume you already have a working (can record shows) setup. How is it set up? I assume that you run video out of a set top box into a video capture input on this PVR-150 card? Is the av receiver going to be a additional new capture input? On the same PVR-150 card or on a new card? What do you want the projector to do and how does it fit into the system? Need complete details of what you have, how it is plugged in, what you want it to do, how you currently control it, what is already configured and working properly.

Sound may be a stumbling block, for what I believe you want to do (run both video sources into the single PVR-150) unless you run both sounds into the same input and then have the each of two channel change scripts you will develop unmute and change the channel on it's input AND MUTE THE OTHER INPUT. Mute is usually a toggle, so that whole thing will work but is a bit dicey if it ever gets out of sync...

In my experience, it is only ever necessary to get a single IR transmitter. It is just like using several different remotes from the same chair, each device will only recognize it's own signals. Even if you have two of the same brand of something, like two satellite dishes, one can be configured to be device 1 and the other to be device 2, and then your two remotes can be configured to be device 1 and device 2. That way, they act just like they were different brands, receiver 1 only responds to remote 1, etc.

The next thing to know is that you can get IR transmitters that have the IR sender LED's on long wires, so you just place a sender in front of each thing to be controlled.

The next thing to know is that when you press buttons on your remote, it doesn't automatically send anything to your set top box. You may just be scrolling around in a program listing and telling it to record something in the future. When the future gets here, then it sends something to the set top box. This means that your need to debug receiving separate from transmitting.

It sounds like you have a serial lirc receiver working but not a transmitter. I would suggest that you get a simple serial (not USB, at least not the USB from IguanaWorks) IR combined transmitter/receiver and not try to use separate lirc transmitters and receivers. If you already have a working serial lirc you should be able to just plug this in in place of your current hardware and have it "just work". I have personally set up 3 of the serial IR transceivers from Iguanaworks, but all serial transceivers should be equal if you want to get a different brand. Don't let them talk you into the USB version. Even following exact instructions found on knoppmythwiki, the Iguanaworks USB version does not work. Get a unit with all the transmitters (IR LED's) on long wires or be prepared to unsolder the IR LED and solder some long wires on for it/them. You can take an old remote apart to get more IR LED's to solder on wires to make more "transmitting heads" for your IR transmitter. Be aware that you need a series resister in line with each IR sender LED. Personally, what I would do is take the series resister out of the transmitter circuit and if I had three transmitting heads, I would use a resistor three times the value of the one I took out for each head. This makes the signal weaker, but you will be putting a sending IR LED in front of and close to each thing to be controlled anyway. The wires to the sender LEDs all get soldered on in parallel (each soldered to the same place on the transmitter rather than soldered in serial which would be "daisy chained").

The rest here is general instructions for setting up to control multiple IR controlled set top boxes (your av receiver may fall into this category, your unmentioned set top box may be another):
- back up your config files, that would be everything in /etc/lirc, /etc/irblaster, and the single file /home/mythtv/.mythtv/lircrc
- learn about /etc/lirc/lircd.conf (it has one section with a list of all buttons on your remote, and another section for each receiving device with a list of each thing you need to do on each receiver that may be as simple as digits 0-9 and enter)
- make sure that you have the info from /etc/lirc/lircd.conf in the file /etc/irblaster/lrblasterd.conf (copy or link it)
- learn about /home/mythtv/.mythtv/lircrc (it is a translation from remote buttons to what you want that button to do for each program you will be controlling)
- learn about and use "irsend device receiver button" for testing and while changing config files. It finds "receiver" in /etc/irblaster/irblasterd.conf and then finds the "button" in that section and then sends the code for that button out from that "device" (IR transmitter),
- learn about mode2 (reads raw codes from your remote to see if the hardware is working) then irw (reads and decodes and tells you what button you just pressed on your remote (you must configure all buttons in /etc/lirc/lircd.conf).
- play with your IR transmitter and get it working with each device, one at a time, and then combine all into a single lircd.conf (irblasterd.conf)
- when setting up to receive from a new remote (not your situation) you may have to use irrecord if you can't find and download a proper lircd.conf

buy and setup hardware, use "/usr/local/bin/irblaster.sh" to setup the transmitter (sends to you set top boxes) receiver should work as is if you are replacing a serial lirc receiver with a different brand.

Then add "buttons" for your set top boxes in /etc/lirc/lircd.conf and copy it to /etc/irblasterd.conf and test with irsend.

Then copy /usr/local/bin/change-channel-lirc.sh several times to /etc/irblaster with a different name each time. Each different name will be use for each different set top box, so name them that way. Modify each one differently so that they will each talk to their respective set top boxes.

If your capture card has two different capture inputs you need to configure a currently unused "input connection" (the one that you hook the av receiver to) in mythtv-setup. The full path name to each of these different modified change-channel-lirc.sh scripts goes in mythtv-setup "input connection" -> each of two different input connections -> "external channel change command"

With this setup there will probably be conflicts when it tries to record from both inputs at the same time as I assume:
1) you are trying to use 2 capture inputs on your 1 capture card
2) your capture card cannot capture 2 streams from 1 input at the same time

I only come to knoppmyth.net once every few months, so if you have digested this and need more, email cliffsjunk at earthlink.net


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 18, 2009 11:36 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
OK,

Thanks for the detailed reply. I spent the weekend playing around with lirc and its various config files. After getting everything working individually, I came to the conclusion (accurate or not) that I couldn't use the /etc/init.d/lirc script to start all of my equipment with the single hardware.conf. Maybe that is where the irblaster.sh would come into play.

Anyway, what I wound up doing was just create a script (copied, actually) that will start two instances of lirc: one for my ATI remote, and one for my USB-UIRT transceiver.

Additionally, it seems that any prior problems with the USB-UIRT and lirc have since been resolved, as I did not have any issues getting it to work just using the usb_uirt_raw driver.

So, in closing, I now have my ATI All-in-Wonder II remote controlling my MythTV frontend, along with controlling features of my projector and my receiver. Bringing my remote needs down to the single AiW II remote.

Yeah!

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 19, 2009 9:52 am 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
Opel70,
Sounds like the script I have in http://knoppmyth.net/phpBB2/viewtopic.p ... c3baf939ba

This takes the definitions in hardware.conf and applies the receiver and transmitter generically.

In my case, I have to merge two receivers so I use the transmitter field to do this.

If the script works well in your case too then perhaps we should look to have it as the base script in R6. If you can confirm, I will open up an appropriate ticket in flyspray.

C


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 19, 2009 10:15 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
Mine was nothing fancy, just a straight forward, hard coded shell script that manually starts the two instances of lircd. While I would have like to make it more configurable, this gets the job done for me.

Code:
start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
sleep 2
/usr/sbin/lircd --driver=default --device=/dev/lirc0 --pidfile=/var/run/lircd.ati.pid --listen  --logfile=/var/log/lircd.ati.log /home/mythtv/.mythtv/lircd.conf.ati
/usr/sbin/lircd --driver=usb_uirt_raw --device=/dev/ttyUSB0 --pidfile=/var/run/lircd.usbuirt.pid --connect=localhost --logfile=/var/log/lircd.usbuirt.log /home/mythtv/.mythtv/lircd.conf.usbuirt

And I just manually added a reference to this script to the bootmisc.sh script. Purely a quick and dirty way to get it working.

Then I launch irexec and irxevent from the mythtv/.fluxbox/apps. Again, nothing fancy, but it is working. There's probably a much easier way to do it, since I never even looked at the irblaster conffig to see if that was what I needed to use to get the USB-UIRT working. But now that it's done, I probably won't spend any time checking until I need to change KM (or should I say LHES) versions.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu