warwolf7
Posts: 6
Joined: Wed Dec 23, 2015 8:41 pm

LIRC SEND_START only send one command

Sun Dec 27, 2015 2:34 am

Hi,

I'm currently building myself a touchscreen universal remote in python
I want to be able to send a command (volume up / down) repeatedly as long as the button is pressed.
If I call the "irsend SEND_ONCE device command" in a loop,and call it 20times a second, LIRC seems to refuse to send the command more than 2-3times a second.

Currently, I can work but, its long before the volume gets to the desired value with this code
self.timeout_id= GLib.timeout_add(15, SEND_IR_CLASS(device_name, device_button)

If I call irsend SEND_START device command" it does seems to happen at a faster rate.
I wouldn't mind using the SEND_START fonction and SEND_STOP

1 - if I could get the delay to work because I would like to start with a longer delay and decrease it as time goes
ie : "irsend SEND_START devicename deviceButton ; delay 1s"
is doing the same thing as "delay 10s" or "delay 1m" or without the delay portion. Am I writting this wrong?

2 - if SEND_START would work with every device I have

in the attached configuration file(I can't attach a .conf or .txt file...) https://www.dropbox.com/s/ulh5ohoui0ecw ... .conf?dl=0
SEND_START works with the device UMC-1 : KEY_VOLUMEDOWN and KEY_VOLUMEUP but not with RCA1 : KEY_VOLUMEUP and KEY_VOLUMEDOWN.

I don't know if those behavior are only on the Rpi version or it's the same on standard Linux distribution.
I have version 0.9.0-prel and on LIRC.org it seems that 0.9.3 is available. but "sudo apt-get install lirc" says I'm up to date.

If any of you have a solution or if anyone sees a error in the way I'm doing this, please let me know :D
Thanks

mattmiller
Posts: 2168
Joined: Thu Feb 05, 2015 11:25 pm

Re: LIRC SEND_START only send one command

Sun Dec 27, 2015 6:01 am

An IR command takes time to actually send so there is a limit of how fast you can repeat (plus time overheads of the LIRC routines that do it)

So your just going to have to play around to see how fast it works on your setup

Matthew

warwolf7
Posts: 6
Joined: Wed Dec 23, 2015 8:41 pm

Re: LIRC SEND_START only send one command

Sun Dec 27, 2015 7:16 am

mattmiller wrote:An IR command takes time to actually send so there is a limit of how fast you can repeat (plus time overheads of the LIRC routines that do it)

So your just going to have to play around to see how fast it works on your setup

Matthew
Hi thanks for your time. But could you help me with those questions.
1 - why I can't use SEND_START with with device RCA1 (it only send one commande) while it works with UMC-1 device.
2 - Why the sleep function doesn't work on the RPI. Is it specific to the version on the RPI? or is it the same on a standard Linux distribution like debian. Do I need to do something special to make this work?
3 - why can't I get the latest version? 0.9.2? is it because that's the latest version for the RPI? or I'm doing something wrong?
4 - how to implement a way to send SEND_ONCE faster than 2-3times a seconds.
is it impossible because when using SEND_ONCE it has to send the header each time and when using SEND_START it send the header once, then repeat the instruction, thus saving time by not having to repeat the header?

I don't write a lot on forums because : I usualy find answer, And believe me, I have read a lot on this forum and on LIRC and on adafruit and stackoverflow. If I ask a question, I have tried all I could think of.

Thank you for your time. If possible to get a answer for any of those questions, it could really help me go forward with my project
-Matt

mattmiller
Posts: 2168
Joined: Thu Feb 05, 2015 11:25 pm

Re: LIRC SEND_START only send one command

Sun Dec 27, 2015 7:43 am

Woosh over my head :)
I've only used LIRC recently to control RGB lamps and I only send commands out once every 5 seconds so my experience is limited

The only question I can answer is 4 - and that is to say I can understand why it doesn't work faster than 3 times/sec because of the timing limits you mention

There's not a lot of Pi people using LIRC just yet :)

Maybe you need a different approach and try out joan's method?
viewtopic.php?f=63&t=126919

I've not had time to try it yet

Matthew

warwolf7
Posts: 6
Joined: Wed Dec 23, 2015 8:41 pm

Re: LIRC SEND_START only send one command

Sun Dec 27, 2015 6:03 pm

mattmiller wrote:
Maybe you need a different approach and try out joan's method?
viewtopic.php?f=63&t=126919

I've not had time to try it yet

Matthew
I might give this a try to see what I can do with it. If I can send those IR commands repeatedly fast enough I might replace the LIRC with his work! I'll take a look at this very soon

Thank you.

Return to “Troubleshooting”