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
<marquee behavior="alternate" scrolldelay=150
~~~~>>>Please always follow rules and read before you post<<<~~~~

</marquee>
Reply
#43
Hi,

Did you try with config = /usr/bin/mpc next instead ?
Reply
#44
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
#45
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
#46
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
#47
Working perfectly fine on new build v7
Reply
#48
Hi,

I did try the steps proposed by Waffle, but it lacks explanation about how to map received keys towards mpc commands. I found in Drone7 post the explanations.

Thank you both for your precious explanations. I managed to use the MSL Digital Remote Pi with a Rega Appollo-R cd player :-).

Greg
Reply
#49
> I'm struggling to get this to work on a new 7 build and an apple A1294. I get output with mode 2 and the services look to be running, but nothing when I run irw.
Any suggestions?

Same here. Tried at least 10 fresh installs of moode audio v7 and couldn't get irw or irexec to detect keys and I'm pretty confident that I followed properly the lircrc and lircd configuration set up and the patch :/
Reply
#50
@KmPan could you please share with us exactly which steps you took Smile ?
as mentioned above I couldn't get irexec or irw to work but everything else is working fine, I was able to generate the configuration.
thanks in advance
Reply


Forum Jump: