Thank you for your donation!


IR Remote Control with Lirc
#41
(04-16-2019, 10:19 AM)rikardo1979 Wrote: So the solution was very simple at the end :Big Grin

There is a change in latest 4.19.x kernel 

All what's needed after all is todo a change in /boot/config.txt

from original
Code:
dtoverlay=lirc-rpi,gpio_in_pin=4


to
Code:
dtoverlay=gpio-ir,gpio_pin=4


This is related to my lirc use on my RaspDAC Mini streamer

Hope this helps to others

Hi. It helped. I managed to install LIRC on moode 5 thanks to your tip.
Remy
Reply
#42
(04-19-2019, 06:22 PM)remy1961 Wrote:
(04-16-2019, 10:19 AM)rikardo1979 Wrote: So the solution was very simple at the end :Big Grin

There is a change in latest 4.19.x kernel 

All what's needed after all is todo a change in /boot/config.txt

from original
Code:
dtoverlay=lirc-rpi,gpio_in_pin=4


to
Code:
dtoverlay=gpio-ir,gpio_pin=4


This is related to my lirc use on my RaspDAC Mini streamer

Hope this helps to others

Hi. It helped. I managed to install LIRC on moode 5 thanks to your tip.
Remy

Nice one. I am glad I could help. Enjoy your music
Reply
#43
Hi all, after quite some effort, I am so close to having IR working!

I'm ssh'd in.

irw is reporting all the correct keys of my remote in the console!

I can type "mpc next" in the console, and moOde will skip to the next song!

BUT, for whatever reason, moOde isn't picking up the remote signals even though irw can...

I read that this mapping is done in the /etc/lirc/irexec.lircrc file.  I configured all the keys and associated mpc commands.  Here is an example entry:

begin
prog = irexec
button = KEY_FORWARD
config = mpc next
end

But none are working.

I know I'm close!  Surely something about the irexec service, but I'm not real familiar with service management via systemctl.  Any pointers for a beginner are very appreciated.

Best,
  Chris
Reply
#44
Hi,

Did you try with config = /usr/bin/mpc next instead ?
Reply
#45
Hi guys!
Help organize the volume up or down with /var/www/vol.sh, while the button on the remote control is pressed. Repeat in .lircrc does not work correctly - jumps up and down.


Found the answer in here
Reply
#46
Sad 
Hey there guys!

As already mentioned with the new kernel the operation of lirc has changed (gpio-ir). If a remote has already been configered, this seems not to be any problem. There only has to be done the change with gpio-ir.

My problem is, I've installed moode newly and haven't connected any remote yet via lirc. Moreover my remote isn't listed in the configurations list provided by lirc where setups could be derrived. I therefore have to use irrecord.
The command:
Code:
sudo irrecord -n -d /dev/lirc0 ~/lircd.conf
is my problem. At first, key presses are detected (dots are coming up at the terminal) until it says specify a key name and press it.
Here's the problem. There is always coming up a signal length of 0 which does not take me any further. Someone on the internet mentioned that a protocol has changed here, leading to a non working irrecord..

Is there any way to successfully record new remotes?
Reply
#47
(04-04-2020, 12:24 PM)burph Wrote: Hey there guys!

As already mentioned with the new kernel the operation of lirc has changed (gpio-ir). If a remote has already been configered, this seems not to be any problem. There only has to be done the change with gpio-ir.

My problem is, I've installed moode newly and haven't connected any remote yet via lirc. Moreover my remote isn't listed in the configurations list provided by lirc where setups could be derrived. I therefore have to use irrecord.
The command:
Code:
sudo irrecord -n -d /dev/lirc0 ~/lircd.conf
is my problem. At first, key presses are detected (dots are coming up at the terminal) until it says specify a key name and press it.
Here's the problem. There is always coming up a signal length of 0 which does not take me any further. Someone on the internet mentioned that a protocol has changed here, leading to a non working irrecord..

Is there any way to successfully record new remotes?

I had the same problem. irrecord isn't working properly with gpio-ir.

I managed to set up a new remote using irrecord after following these steps (buster):
https://www.raspberrypi.org/forums/viewt...p?t=235256
Reply
#48
Now that the Moode 6.5.0 is released and I had to reinstall lirc, I thought I'd share an up-to-date guide.
At the time of writing the current lirc version is 0.10.1

1. Install lirc:

Code:
sudo apt-get update
sudo apt-get install -y lirc

You'll get some errors, it's fine

2. Remove .dist suffix from lirc files:

Code:
cd /etc/lirc
sudo mv lirc_options.conf.dist lirc_options.conf
sudo mv lircd.conf.dist lircd.conf
sudo mv irexec.lircrc.dist irexec.lircrc

You might as well disable the default remote configuration file:

Code:
sudo mv ./lircd.conf.d/devinput.lircd.conf ./lircd.conf.d/devinput.lircd.conf.dist

3. Complete the lirc installation:

Code:
sudo apt-get install -y lirc

4. Set up the hardware

Open lirc_options.conf:

Code:
sudo nano lirc_options.conf

And replace

Code:
driver          = devinput
device          = auto

with

Code:
driver          = default
device          = /dev/lirc0

Then open /boot/config.txt:

Code:
sudo nano /boot/config.txt

And add this line at the end (replace 25 with whichever gpio pin you use):

Code:
dtoverlay=gpio-ir,gpio_pin=25

5. Set up the irexec service to start on boot:

Code:
sudo systemctl enable irexec

6. Reboot


Usage

Add your "*.conf" remote configuration files to /etc/lirc/lircd.conf.d/, then restart lirc and irexec services:

Code:
sudo systemctl restart lircd
sudo systemctl restart irexec

Use /etc/lirc/irexec.lircrc to set actions for your remote keys, refer to The lircrc file format.

Restart the service after you made changes:

Code:
sudo systemctl restart irexec

You can get configuration files from the remotes database, or you create them manually using the irrecord utility:

1a. Apply the fix mentioned in the post above (I haven't tested it personally) and skip step 1b.

1b. Alternatively, you can find a remote that uses the same protocol as yours in the remotes database. Your best bet is a remote from the same manufacturer and from the same era that looks similarly.
Download the config file, put it in /home/pi and delete the part between "begin codes" and "end codes".

2. Stop the lircd service:

Code:
sudo systemctl stop lircd

3. Run irrecord and follow the instructions, the generated file will be saved to /home/pi/*.lircd.conf.
If you went with step 1b instead of 1a, replace "ircd.conf" with the config file you downloaded:

Code:
irrecord -n -d /dev/lirc0 ~/lircd.conf
Reply


Forum Jump: