IR Install Problem

Hi everyone!
I try to install the IR plugin for my remote. I’m not using justboom remote but I thought I could intall the plugin, then change GPIO pin info(I can’t use another pin than pin 17) and then try to configure my remote buttons(this one: https://nuxii.fr/accueil/71-nuxii-telecommande-infrarouge-nec-38khz-pour-raspberry-pi-arduino-.html with this Receiver: nuxii.fr/modules-d-extensions/9 … duino.html).
My problem is that the IR plugin doesn’t finish install. It arrives at: ign http://archive.volumio.org jessie/ui Translation-en
And then it doesn’t do anything else.
It’s the second time I try to install it but with no result. Now I have to stop manually Volumio because my screen doesn’t display UI but the waiting wheel and ssh access doesn’t work at this moment too. Then I have to Manually uninstall plugin because uninstall option doesn’t work after restart.
Is it a problem with the volumio version? Because I tried to install it with another version(now it’s 2.599) and it worked…
Anyone to give me a hand?

The plugin should work with 2.599 (does here :wink:).

Are you able to reach Volumio with a browser and connect via SSH after restarting? If so, you may open a SSH session and delete the plugin by sudo rm -r /data/plugins/accessory/ir_controller
and a plugin config which might have been created by sudo rm -r /data/configuration/accessory/ir_controller
Also open /data/configuration/plugins.json and remove the entry for ir_controller which should look something like this (values for “enabled” and “status” will probably differ): "accessory": { "ir_controller": { "enabled": { "type": "boolean", "value": true }, "status": { "type": "string", "value": "STARTED" } } }
I would then do a reboot or execute volumio vrestart before installing the plugin from the plugin store again.

To watch what happens during installation you can open a second SSH session and run sudo journalctl -f
Regarding using GPIO pin 17:
You could either modify lines 232 and 248 of the index.js of the plugin:

exec('/usr/bin/sudo /usr/bin/dtoverlay lirc-rpi gpio_in_pin=17', { uid: 1000, gid: 1000 }, respectively

exec('/usr/bin/sudo /usr/bin/dtoverlay gpio-ir gpio_pin=17', { uid: 1000, gid: 1000 },

Or add the following line to /boot/config.txt:

dtoverlay=gpio-ir,gpio_pin=17

After that a reboot is required.

Note that modifications to the plugin’s index.js will be overwritten when you reinstall or update the plugin. The /boot/config.txt will have to be modified after each Volumio update.

Thank you very much gvolt for your help (again :blush: :laughing: )!
So the plugin is installed properly now. I changed the gpio pin in the index.js.
So everything should be ok to make a new config file for my remote, but when I try to do that:

irrecord -n -d /dev/lirc0 ~/lircd.conf irrecord: no data for 10 secs, aborting irrecord: gap not found, can't continue
Nothing happens…
Yes the remote’s batery is charged :smiley: . What I’m thinking is maybe I have to configure the IR Receiver with:

modprobe lirc_XXXX

With XXXX is the “Required LIRC kernel setup” according to the Config lirc ubuntu wiki(https://doc.ubuntu-fr.org/tutoriel/creer_fichier_lircd.conf) and which vary in fonction of the receiver module. If it is the problem I don’t know how to find the good module name. There is nothing on the nuxii website(where I bought the receiver and the remote).
Is there a way to list the name of the devices connected to gpio?
Or… I’m completely dumped and that’s absolutely not the problem :blush: :laughing: :smiley:

:smiley:

Make sure you disabled the plugin before running irrecord.

After you have finished recording the lircd.conf file create an appropriate folder under /data/plugins/accessory/ir_controller/configurations, e.g. called nuxii mkdir /data/plugins/accessory/ir_controller/configurations/nuxii and copy or move the lircd.conf into it cp ~/lircd.conf /data/plugins/accessory/ir_controller/configurations/nuxii/
Don’t forget to also create the necessary lircrc file in /data/plugins/accessory/ir_controller/configurations/nuxii.

After that enable the plugin again and select the new profile from the plugin’s configuration page.

Thanks but I still can’t make a new config file even if the plugin is disabled:

irrecord: no data for 10 secs, aborting irrecord: gap not found, can't continue
I tried to disable it and rebut volumio but the terminal tells me this:

[code]irrecord - application for recording IR-codes for usage with lirc

Copyright © 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)

irrecord: could not get file information for /dev/lirc0
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)[/code]
I really think my Receiver isn’t detected by the Pi…

Ok, please double check the connection of the IR receiver (GPIO pin 17 is not physical pin 17, see https://pinout.xyz/pinout/pin11_gpio17#).

If the connection is OK, please post the result of ls -al /dev/lirc*
To make sure no lirc process is running execute killall lirc before you start irrecord.

You could also try mode2 -d /dev/lirc0 to check if a signal is detected when you press keys on your remote control.

Some further questions:
Did you a reboot after changing the index.js file of the plugin?
Did you try the modification of /boot/config.txt, too?

Ok I’m gonna do that.

What I can Say for now :

Yes.

No. Can I try the 2 options at the same time?

Yes

Hi gvolt!

Checked: It IS! There’s just one detail I just realized that I didn’t specify:the receiver is connected to the Pi through my Allo Boss DAC. I was really sure I notified it. Really sorry :blush: Here you have the Boss DAC tech details https://www.amazon.com/clouddrive/share/KigTwkJLrzfZlgVQsjE4rXEl6HaQCU0hGFp0B4DPsdV?_encoding=UTF8&Version=1&entries=0&mgh=1 And the IR TSOP IS plugged to pin 8 of J19 which corresponds to GPIO17 on eleventh pin of the Pi.

Result:

ls -al /dev/lirc* ls: cannot access /dev/lirc*: No such file or directory
So I went to “/dev”: no lirc files existed:

. loop3 ram5 tty20 tty49 vcs2 .. loop4 ram6 tty21 tty5 vcs3 autofs loop5 ram7 tty22 tty50 vcs4 block loop6 ram8 tty23 tty51 vcs5 bsg loop7 ram9 tty24 tty52 vcs6 btrfs-control mapper random tty25 tty53 vcsa bus mem raw tty26 tty54 vcsa1 cachefiles memory_bandwidth rfkill tty27 tty55 vcsa2 char mmcblk0 sda tty28 tty56 vcsa3 console mmcblk0p1 sda1 tty29 tty57 vcsa4 cpu_dma_latency mmcblk0p2 serial1 tty3 tty58 vcsa5 cuse mmcblk0p3 sg0 tty30 tty59 vcsa6 disk mqueue shm tty31 tty6 vcsm fb0 net snd tty32 tty60 vcsm-cma fd network_latency stderr tty33 tty61 vcsu full network_throughput stdin tty34 tty62 vcsu1 fuse null stdout tty35 tty63 vcsu2 gpiochip0 ppp tty tty36 tty7 vcsu3 gpiochip1 ptmx tty0 tty37 tty8 vcsu4 gpiomem pts tty1 tty38 tty9 vcsu5 hidraw0 ram0 tty10 tty39 ttyAMA0 vcsu6 hwrng ram1 tty11 tty4 ttyprintk vhci i2c-1 ram10 tty12 tty40 uhid video10 initctl ram11 tty13 tty41 uinput video11 input ram12 tty14 tty42 urandom video12 kmsg ram13 tty15 tty43 v4l watchdog log ram14 tty16 tty44 vc-mem watchdog0 loop-control ram15 tty17 tty45 vchiq zero loop0 ram2 tty18 tty46 vcio loop1 ram3 tty19 tty47 vcs loop2 ram4 tty2 tty48 vcs1
I tried to enable the plugin and at this moment I had this in “/dev”

. loop1 ram3 tty19 tty47 vcs .. loop2 ram4 tty2 tty48 vcs1 autofs loop3 ram5 tty20 tty49 vcs2 block loop4 ram6 tty21 tty5 vcs3 bsg loop5 ram7 tty22 tty50 vcs4 btrfs-control loop6 ram8 tty23 tty51 vcs5 bus loop7 ram9 tty24 tty52 vcs6 cachefiles mapper random tty25 tty53 vcsa char mem raw tty26 tty54 vcsa1 console memory_bandwidth rfkill tty27 tty55 vcsa2 cpu_dma_latency mmcblk0 sda tty28 tty56 vcsa3 cuse mmcblk0p1 sda1 tty29 tty57 vcsa4 disk mmcblk0p2 serial1 tty3 tty58 vcsa5 fb0 mmcblk0p3 sg0 tty30 tty59 vcsa6 fd mqueue shm tty31 tty6 vcsm full net snd tty32 tty60 vcsm-cma fuse network_latency stderr tty33 tty61 vcsu gpiochip0 network_throughput stdin tty34 tty62 vcsu1 gpiochip1 null stdout tty35 tty63 vcsu2 gpiomem ppp tty tty36 tty7 vcsu3 hidraw0 ptmx tty0 tty37 tty8 vcsu4 hwrng pts tty1 tty38 tty9 vcsu5 i2c-1 ram0 tty10 tty39 ttyAMA0 vcsu6 initctl ram1 tty11 tty4 ttyprintk vhci input ram10 tty12 tty40 uhid video10 kmsg ram11 tty13 tty41 uinput video11 lirc0 ram12 tty14 tty42 urandom video12 lircd ram13 tty15 tty43 v4l watchdog log ram14 tty16 tty44 vc-mem watchdog0 loop-control ram15 tty17 tty45 vchiq zero loop0 ram2 tty18 tty46 vcio
But when I tiped the command you asked for, I got the same error message.
So I decided to re-install the plugin. I uninstalled it via the plugin page. I checked that all the files where deleted and I did a reboot.
I installed it again, changed the “pin infos” in index.js AND in the config.txt.

I did a new irrecord after a new reboot and I didn’t get any signal again.
Same thing with killall lirc and mode2 -d /dev/lirc0

root@mikhifi:/home/volumio# ls -al /dev/lirc* crw-rw---- 1 root video 252, 0 Aug 25 10:37 /dev/lirc0
EDIT: I don’t have a lircd file in “/dev” but as I didn’t activate the plugin for now, it seems to me logical…

If you do not use the entry in /boot/config.txt but change the index.js, the gpio-ir overlay gets loaded not until you enable the plugin respectively the enabled plugin gets started after Volumio has booted. Therefore lirc0 and lircd appear in /dev after that.

After you mentioned using a Boss DAC I remembered this previous thread: https://forum.volumio.org/totally-standalone-player-the-making-t10714.html. As already asked there, did you test the IR receiver without the DAC on your new system and - additionally - with another remote control, too? Did you also buy a new IR receiver after the PSU fried your former system? If not, do you have a chance to get another IR receiver to rule out it is damaged?

Ok.
I did not test it without the DAC, BUT: I have a fan connected on these pins(3v3 and GND). I tried the two 3v3 pins with the fan and it worked/works perfectly(each module is connected to its own 3v3 and GND pin). Currently I also go through these pins to power my Raspberry (time to find the best cable to connect to the micro usb port) and everything seems to be ok. So it would be really strange that the pin used for the receiver were the only which doesn’t work. I can test it if you insist but it seems to me a bit useless.
Unfortunately I can’t make tests with another remote but I can order a new receiver: at this price it is not a problem.

Thanks again for your help. As I said I’m a beginner and it is clear that I do not always ask myself the right questions.

Of course I don’t insist on testing the IR receiver without the DAC - it’s just to rule out possibilities. I for one would also disconnect every other hardware like the fan and reduce the hardware configuration to the minimum of components required to run a basic system. Regularly it is the fastest way to narrow down the cause of a problem. Too often the reason for non-/misfunctions are things that seem to be obviously not responsible (thinking of cables broken or not connected, cold / broken soldering points … all unlikey to happen, but still they happen). In your case the GPIO pin 17 is not (directly) connected to your Raspberry but to J19 of the DAC and I agree with you if you say that this should be no problem, but…

Regarding testing with another remote control: If you have a remote for TV try that just to see if you can detect any signal when using mode2 or irrecord - no need to build a lircd.conf etc.

P.S. Here is a simple method to test the IR receiver without the Raspberry: https://thepihut.com/blogs/raspberry-pi-tutorials/raspberry-pis-remotes-ir-receivers You would need a LED and an appropriate resistor though. Probably you can simply connect the output of the Nuxii IR receiver (normally going to GPIO pin 17 of the Raspberry) to one of the LED pins on this Nuxii board (https://nuxii.fr/modules-d-extensions/93-nuii-module-infrarouge-led-pour-raspberry-piarduino.html).

OK. Today I get what make a good big power cable for the raspberry that will support(I hope) more than 3A to be able to feed it directly through the micro-usb port, rather than going through the J19 port of the DAC.
I’m going to take advantage of the fact that the case is open to try all this. Unfortunately, I don’t have a remote to test with anything other than the one I have, but I really don’t think it’s responsible.
I’ll be back when I have something new.
Thanks a lot gvolt.

Ok, but please consider to test the IR receiver using your Nuxii remote without the Raspberry as described in the link I posted above.

Hi gvolt,
So I tested the receiver and… It was broken. So I ordered a new one, plugged it, installed IR plugin, wrote pin 17 correspondance in config.txt and tested the remote and receiver with:

mode2 -d /dev/lirc0

And I get some code in the terminal.
So Great! I can make my config file!
I ran irrecord and I got this:

[code] (…) Now start pressing buttons on your remote control.

It is very important that you press many different buttons and hold them
down for approximately one second. Each button should generate at least one
dot but in no case more than ten dots of output.
Don’t stop pressing buttons until two lines of dots (2x80) have been
generated.

Press RETURN now to start recording.

Found gap: 123451
Please keep on pressing buttons like described above.
irrecord: no data for 10 secs, aborting
Creating config file in raw mode.
Now enter the names for the buttons.

Please enter the name for the next button (press to finish recording)
KEY_BACK

Now hold down button “KEY_BACK”.
Got it.
Signal length is 0
That’s weird because the signal length must be odd!
Try again.
Got it.
Signal length is 0
That’s weird because the signal length must be odd!
Try again.
[/code]
Again and again for all the remote buttons…
From there I decided to do my own installation based on this thread:
https://forum.volumio.org/how-installed-lirc-with-receiver-and-remote-volumio-t360.html
But I got the same result.

So I uninstalled lirc. Checked that all files were deleted and installed again the plugin.
Now I’m blocked because I can’t use irrecord:

irrecord -n -d /dev/lirc0 ~/lircd.conf irrecord: file "/root/lircd.conf" does not contain valid data
I had the same issue just before uninstalling lirc…

I tried:

killall lirc lirc: no process found
and:

sudo /etc/init.d/lirc stop [ ok ] Stopping lirc (via systemctl): lirc.service.
But irrecord doesn’t work now :imp: :imp: :imp:
So: I can’t make my config file AND I can’t try anything else because irrecord doesn’t want to work for now: I’m starting to think that maybe I’m a little bit jinxed…
The thing which is strange is that the index.js file is empty… Totally :open_mouth:
Can you help me find the solution? Every time I step forward I find myself with a new problem on my hands. It starts to make me… :angry: :angry: :angry:

Well, that’s some progress at least…

Sadly it seems irrecord (and mode2 and irw as well) is not compatible with the gpio-ir module. :cry: You can read something on it regarding Stretch and Buster here (https://www.raspberrypi.org/forums/viewtopic.php?t=235256), but I think it is the same problem we are facing here.

Bugs have already been reported with patches for Lirc 0.9.4c-9 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930485) and 0.10.1-5.2 (bugs.debian.org/cgi-bin/bugrepo … bug=931078)… but we are on Jessie and that means Lirc 0.9.0~pre1-1.2 and I guess there will be no patches for this version.

So, for a short-term solution it would probably be necessary to build your lircd.conf on a another system where irrecord (still) works.

Ok… Not sure to understand all the things you said :confused:

Notice: it is not the nuxii receiver it is a simple receiver directly plugged to the GPIO. I bought the most common I could find: a TSOP4838 at 38Khz.

I did new tests yesterday(after having simply deleted “lircd.conf” file I saw it was possible to create a new one) and I got something a bit different:
After I made the first manipulations(pressing buttons to get 2 lines of dots) it told me: “lengt(?) blablabla is 75 but no header found. No trail pulse found. Repeat code has header, but no header found”. After that I got the same result: “Signal length is 0. That’s weird because the signal length must be odd! Try again.”
(EDIT: I tried in force mode too: same problem.)

Why not… It means installing raspbian on a different sd card, finding a keyboard… It would be possible…
I wonder I could try something else before:
What if I plug the receiver to a different pin? I can use GPIO: 17, 22, 23, 24, 26 or 27(because of I do not have LEDS with this receiver anymore).
And what if I try lircd.conf files from lirc remotes database? My remote is a NEC model and there is a lot of NEC remotes with at least the same number of buttons… http://lirc-remotes.sourceforge.net/remotes-table.html
AND in the worst case, what if I change the remote?.. Maybe the problem comes from the couple “Remote/receiver” ?..

EDIT2: I tried to install ir-keytable instead of lirc. It found the receiver:

Found /sys/class/rc/rc0/ (/dev/input/event0) with: Driver gpio_ir_recv, table rc-rc6-mce Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC RC-5-SZ SHARP XMP other Enabled protocols: RC-6 LIRC Name: gpio_ir_recv bus: 25, vendor/product: 0001:0001, version: 0x0100 Repeat delay = 500 ms, repeat period = 125 ms
But it dosen’t detect the remote.

ir-keytable -t --sysdev rc0 Testing events. Please, press CTRL-C to abort. ^C
Maybe these infos could help to find the proper config file… There is some NEC RC-XX series…

I fear, these are symptoms of irrecord not working correctly with gpio-ir, too.

I wouldn’t expect that to change anything, but…

Yes, it would of course be an option to try out already existing lircd.conf files from the database … or to get another remote either listed in the lirc remotes database or one of the remotes that are selectable in the plugin. Though a risk will remain that the remote will not work because the remote’s specs did change (if I remember correctly, one/some Apple remote(s) where to known for this).

I can’t say for sure but I don’t think that the problem you see with irrecord originates from the combination of your remote with the (new) IR receiver.

(Did you see the 2nd EDIT on my previous post?)

Ok. Suppose I use a remote officially recognized by volumio (like the justboom remote), it should work even if the “gpio in pin” is not the same, no?
If not sure, what kind of remote system can I use to get basic controls(volume, change track and why not power off). Waveshare 5" display is really not easy to use. Touch has bad precision. Not a great solution tu control volumio… (I want it to give me track info with the bonus of having the cover art (in comparaison of LCD Displays): that’s enough for me.) And I’m not necessarily convinced by the use of the phone. There will always be a latency when waking up the phone, and I don’t like having the Wi-Fi continuously activated (that’s extra waves in the apartment and it consumes battery).

Anyway thanks for your help and your patience :smiley:

Not before I answered. :wink:
I have only glanced over ir-keytable up to now; didn’t have time to dig deeper.

The gpio_in_pin depends from the pin your IR receiver is connected to and has to be set to the correct value. In that regard it is irrelevant what remote you use.

If you should consider buying a “known” remote I would probably go for one of the models the plugin already has a profile for.