hello,
my first post here ! yeah !
i just got my Rpi 2 and of course i switched from Raspbmc to OSMC. look really good ! i love the installer background…
and system seem to be fast !
Ok, i wanted to know if i can use my Rpi GPIO on the new Rpi2 with OSMC ? i don’t know if it use the same pins on GPIO and found no infos about that…
So if someone have some infos about that… and the pins i must use… it’ll be great.
Again, it’s a really good job SAM. i’m happy to follow and support (even if it’s just a little) you since some years now.
I just migrated from raspbmc on my old raspberry pi B to OSMC on my new raspberry pi 2. I copied the lircd.conf file from my raspbmc installation to home/osmc on my new OSMC setup and hooked up the gpio pins as they were on the old pi. I enabled it in the settings app, but the remote doesn’t work.
Hello Guys,
In the weekend I’ve managed to make the GPIO receiver work with the RPi 2.
Here’s how:
First, you do the steps described here until you manage to teach the remote control.
You don’t need to do the stuff at the beginning, lircd is able to load the kernel module, but if not, you can add it manually to /etc/modules, as described there.
Make sure you get the pulses and spaces (to assure the IR receiver HW is working) when you issue the
mode2 -d /dev/lirc0 command.
Then teach the remote as usual, and generate the config file lircd.conf.
Now, i’ve placed mine in /etc/lirc/lircd.conf. Make sure there are no other lircd.conf files hanging around in /home/osmc or /root/ homefolder, as the lircd script file searches for them.
Then open the /etc/lircd/hardware.conf file and make sure
LOAD_MODULES=true is set. This way, the script will try to load the appropriate kernel module.
Then, make sure the DRIVER=default is set, MODULES=“lirc_rpi” and DEVICE=“/dev/lirc0”.
Also, you can specify here the LIRCD_CONF file’s path (like LIRCD_CONF=“/etc/lirc/lircd.conf”
If this is done, restart the lircd server (/etc/init.d/lirc restart) and if you made no mistakes, the LIRC part shall be done.
To verify, issue the irw command and start pressing the keys on the remote. It should display the ids of the keys you’ve pressed.
Next, it’s time to configure kodi to use the remote keycodes.
You will need to configure a Lircmap.xml file and place it in /home/osmc/.kodi/userdata folder.
If there is none avaialable there, take the default one from here
/usr/share/xbmc/system/
and modify it.
Keep only one entry and make sure that the LIRC button names are correct (keep onet hat has KEY_LEFT, KEY_RIGHT, etc. in it).
Make sure you use the same name for the remote device name with the one configured in /etc/lirc/lircd.conf (if it’s generated, the name is the path where it was created. Feel free to rename it to something more handy, like ‘myremote’)
More info here: http://kodi.wiki/view/Userdata/lircmap.xml
Place the edited Lircmap.xml file in the /home/osmc/.kodi/userdata/Lircmap.xml and then restart kodi (or the RPi).
Your remote should work now.
If not, start debugging from the beginning. Make sure the spaces pulses are received, then make sure irw is displaying the keycode, then make sure the xml file is correct.
You can issue a ps -aux | grep lirc to check if the lirc daemon is running correctly and that the pid file is available.
EDIT: It looks like eventlircd is messing up somehow the config, as after starting / restarting eventlircd/pi , the lircd was not transmitting keys. Neither was ‘irw’ command working. I’ve tried digging the /etc/eventlirc.d files without success. In the end, i’ve disable enventlircd (service disable eventlircd.service) and then everything was working again. It seems kodi work well without eventlircd.
Maybe somebody know why it’s useful to have this process :).
nice @trex_daemon !! i’ll try as soon as possible. i have an harmony one, will config it as an MCE remote like on raspbmc. it’ll be a good idea to share our conf file between users, as people will pick the ones they want. whta do you think about this ? @sam_nazarko do you think it’s a good idea ? it’ll help ya in some way ?
In the last 24 hours we have replaced lircd with a different version and overhauled the whole remote subsystem, so what you describe above is no longer necessary and is probably not valid now. There is still a bit more work to be done but in short:
Make sure you check for and install updates so the latest lirc and eventlircd packages are installed.
Save your lircd.conf at /home/osmc/lircd.conf
If you have a Pi 1 enable GPIO IR remote support in hardware in the OSMC Settings addon, then reboot.
Your remote should now work, but be aware that your lircd.conf key names should adhere to linux-input-layer naming conventions - such as KEY_OK, KEY_UP and so on. (For an example look at /etc/lirc/osmc-remote-lircd.conf)
Currently loading the GPIO module from the hardware support option in the Settings addon is not working on the Pi 2 - but should be working for Alpha 5.
For a quick and dirty hack to load the lirc_rpi module on boot for a Pi 2 you can add the following to /etc/rc.local just before the exit 0 line:
@DBMandrake, The above steps are not working for me on the RPi 1.
I checked for and installed the updates.
I copied the rc6-mce-lircd.conf file to /home/osmc and renamed it lircd.conf
I enabled GPIO IR remote support.
I’m using a Harmony and I programmed it to match the rc6-mce. It worked perfectly in RaspBMC on the same Pi.
The lircd.conf file is a copy of /etc/lircd/rc6-mce-lircd.conf. I’m pretty sure that’s what I did with RaspBMC, but can’t go back and check because I overwrote that SD card.
osmc@osmc:~$ sudo systemctl status lircd_helper@lirc0
* lircd_helper@lirc0.service - lircd remote support
Loaded: loaded (/lib/systemd/system/lircd_helper@.service; static)
Active: active (running) since Thu 1970-01-01 00:00:12 UTC; 45 years 1 months ago
Process: 191 ExecStart=/bin/sh -c /var/run/lirc/lircd-%I.sh (code=exited, status=0/SUCCESS)
Main PID: 275 (lircd)
CGroup: /system.slice/system-lircd_helper.slice/lircd_helper@lirc0.service
`-275 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinpu...
Jan 01 00:00:12 osmc sh[191]: lircd: could not open config file '/etc/lirc/...f'
Jan 01 00:00:12 osmc sh[191]: lircd: No such device
Hint: Some lines were ellipsized, use -l to show in full.
dpgk:
osmc@osmc:~$ dpkg -l | grep lirc
rc liblircclient0 0.9.0~pre1-1.2 armhf infra-red remote control support - client library
rc lirc 0.9.0~pre1-1.2 armhf infra-red remote control support
ii rbp-eventlircd-osmc 1.0.13 armhf eventlircd for OSMC
ii rbp-lirc-osmc 0.9.0-4 armhf lirc for osmc
ii rbp-remote-osmc 1.0.7 armhf Remote support for OSMC, achieved with lirc and eventlircd
Nothing is returned while pressing buttons with:
irw /var/run/lircd/lircd-lirc0
This is what I get with:
osmc@osmc:~$ irw /var/run/lircd
connect: No such file or directory
That was the clue I needed! I’m using an NFS mount (in /etc/fstab) for /home/osmc (to try and keep read/writes on the SD card to a minimum) and I’m wondering if lircd was trying to start before the mount. I could read the conf file via /etc/lirc/lircd.conf after the boot, but I guess it couldn’t read it when starting?
I removed the sym link for /etc/lirc/lircd.conf and replaced it with my real conf file and now the remote works!