Posts by Skripo
-
-
Verified working with 10.0.1
Introduction
After 6 years of using cheap boxes I decided to explore other hardware options. I was shocked at the price of Shields and some higher end boxes based on Amlogic S922X chips. After some pondering I ended up getting a Raspberry Pi 4 for it's price to power ratio. I realize that it may not be better or even equivalent to the aforementioned solutions, but it certainly beats my limping 905X based boxes.
Using a RPI4 is definitely not for the plug and play hardware crowd but it is not that hard either, until you get to the IR part. There is no easy solution other than Flirc. Unfortunately your IR sensor is in the back, and even more insulting, it costs 1/2 the price of the PI4 itself! I also looked at using CEC which can be a good solution for people using their TV remote, but one of my main requirements was a solid universal remote.
I have a rather complex audio setup and I value simplicity above all else, which is why I insist on an affordable, durable, and easy to use remote like the Harmony 650. To me the 650 is the ideal remote and more importantly, it's survived about 8 years so far, which is a testament to its great design. As a dyed in the wool gadgeteer, I originally bought their more expensive model but my family managed to break the screen within 3 months. And let's face it, how often do you really need a touch screen?
After struggling with outdated and spread out information I was fortunate enough to get help from ghtester and HiassofT to configure my install. This guide is my attempt to pay it forward.
Please note:
- This guide does not try to explain the why of the subject, rather the how which is why I cannot give support. Please direct your questions to the forum experts.
- I put this together from a few sources so I may have mis-remembered a few things. Please do the forum a favour and let me know if I need to change, correct, or amend this guide.
Hardware Used
- Raspberry Pi 4B 2GB
- RPI4 enclosure that allows infrared signals to pass through the front. I am partial to this one but you do need to carefully align the sensor.It's pretty cool looking and includes the power supply, fan, and heatsinks fro $21 CAD. Pretty good deal if you ask me.
- TSOP38238 IR receiver - Installed on GPIO 18 as per this article.
- Harmony 650
Files needed
- LibreELEC USB-SD Creator app
- mecool rc_keymap in the files.zip file attached to this post
- rc_maps.cfg in the files.zip file attached to this post
Setup
- Install the IR TSOP as per this guide. It's very easy, only 1 component and 3 wires. Do not install in an enclosure until you confirm proper operation.
- Install the Mecool KIII Pro device on your remote using the Harmony software.
- Downloaded the LibreELEC USB-SD Creator and use it to select the latest LE RPI4 image and burn it to an SD card.
- Plug in a USB mouse. A keyboard, while not strictly necessary may be useful to ease text entry.
- Put the SD card in your RPI4 and boot. Kodi's wizard will walk you through the initial setup:
- Enable SSH
- Change the default name from Libreelec to whatever you want, or leave as is
- Configure your network
- Set wait for network before booting. I set a 20 second maximum wait time use whatever works for you
- Disable CEC in Kodi: System -> Settings -> Input -> Peripherals -> CEC Adapter -> Disable
- Reboot to make sure it reconnects to your network with the proper name, default is Libreelec.
- In OS X Finder, you should see Network under the locations section in the left panel.
- Click on it and then on Libreelec, or whatever name you used when you initially set up Kodi. It will now appear in the side panel of connected network devices.
- Open the Configfiles folder and drag in the rc_maps.cfg file attached to this post. Please note that many guides will walk you through terminal to do this. Fortunately, some very forward thinking developer designed it so that the normally hidden .config directory is automatically mounted as Configfiles, making it much easier to accomplish these tasks from a computer.
- Open the rc_keymaps folder and drag in the mecool file attached to this post.
- Now we need to ssh into the RPI4. Open Terminal in OS X or Putty in Windows:
- Connect to the RPI4 by entering: ssh root@libreelec (or ssh root@nameyougaveit)
- When prompted for password, enter it. The default is: libreelec
- We need to remount the /flash directory as read/write to modify a file: mount -o remount,rw /flash
- We now need to edit the file using the built in text editor, Nano: nano /flash/config.txt
- Add the following text to config.text. just above the End of Default Configuration text. (pin # = pin you used, default is 18 for most people 23 is for Argon One). dtoverlay=gpio-ir,gpio_pin=18Save changes with CTRL O
- Exit nano with CTRL X
- To finish, remount /flash as read only: mount -o remount,r /flash
- After making any changes to the rc_maps file you need to make it permanent. Enter the following:
- systemctl stop kodi (The system may seem like it crashed but be patient, it can take almost a minute)
- systemctl stop eventlircd
- ir-keytable -a /storage/.config/rc_maps.cfg -s rc0
- systemctl start eventlircd
- systemctl start kodi
- Reboot to apply changes: reboot
- When rebooted, ssh back into the box to test your work:
- ssh root@libreelec (or ssh root@nameyougaveit)
- Enter: irw
- Push the buttons on your remote to test. Each button should be properly labeled. If you need to remap buttons, do it in the Harmony software to avoid complications.
- Use CTRL C to exit the testing routine
- Close your ssh session with exit and open your beverage of choice!
Let me know if I need to make changes to the guide.
-
-
I believe this thread should be marked as Resolved as you are asking off-topic quiestions here which you should perhaps ask in your another - original thread... But hopefully you can finish what you need if you follow instructions already published here: RE: LibreELEC 9.2.6 Raspberry 4 and IrDA Dongle Do not disable anything, do not use -c parameter, just make the config files properly ( use some of example / default mapping files from the /usr/lib/udev/rc_keymaps folder as template, which is most similar to your remote control - the first line is important ), put them to override folders and use commands mentioned in the linked thread and that's all...
Maybe a small tip - search the default mapping files for a protocol that you are looking for, for example:
grep -rn '/usr/lib/udev/rc_keymaps/' -e 'rc6'
It will list the files that might be interesting for you.
Agree on marking resolved, I should have started another thread.
One of the most frustrating things abut the whole process is that the guides that people constantly point to are incomplete, outdated, or written for programmers. It's been a very frustrating experience.
Thank you VERY MUCH for your help, everything works now!
Your mecool file uses DOS line endings, that won't work, you have to save it with unix line endings. Also KEY_APP and KEY_DTV aren't valid keys.
In your rc_maps.cfg you use a wrong driver name, you have to use "gpio_ir_recv", not "gpio-rc-recv" - see the output of ir-keytable.
so long,
Hias
Thank you very much for taking the time to look through my file. I was struggling with the gpio-rc-recv vs gpio_ir_recv. I clearly saw the latter driver name while testing but the sample file was configured differently so I followed that, as I was being constantly told to follow that.
I had no idea about the line endings and used Atom to convert them and BAM it worked. On a side note, I tried using the a few included files, notably minix-neo, and it had the same issue.
Thank you very much for your help, I will create a guide from all the help I received on this forum.
-
So I know my remote responds to the nec protocol and that my PI4 sees it and reports events. Thats all good.
After hooking up my gpio IR and testing to make sure it responds with my Harmony set to mecool device I did the following:
- Copied my rc_maps.cfg to /storage/.config/
- Copied my mecool table to /storage/.config/rc_keymaps
- Added dtoverlay=gpio-ir,gpio_pin=18 to /fash/config.txt
- and finally remounted flash with mount -o remount,rw /flash
I am not sure which driver to use so I copied from the rc_maps.cfg.sample file and ended up with this in my rc_maps.cg:
When I try to run the table manually using ir-keytable -c -w /storage/.config/rc_keymaps/mecool,I get the following error:
CodeInvalid parameter on line 1 of /storage/.config/rc_keymaps/mecool ir-keytable: Failed to read table file /storage/.config/rc_keymaps/mecool
Any words of wisdom? I attached my files in case that helps.
By the way, the wiki states:
"LibreELEC still ships with LIRC so IR remotes with non-standard protocols and rather special setups can be supported. In general, keep LIRC disabled (in LibreELEC Settings → Services) and only enable it for exceptional cases where you actually need it."
I can't find the setting anywhere. Do I still need to disable lirc?
-
-
ghtester I used Terminal (like putty but built in to osx) to SSH in no problem
nsst I already set the overlay and the Pi detects key presses just fine. I just need to make the nec protocol the default but can't reveal the hidden files. I already see non-writable files without remounting but tried anyway, no difference.
Here is my file structure without hidden files:
Why does the config directory exist? It seems identical to the one that is supposed to be hidden?
Thanks!
-
-
Got IR key presses to be detected! Woohoo!
-
So any resolution? I want to set up my Harmony 650 but can't get GPIO to work. Using a regular android box remote to test.
-
Please note:
This information in this post is no longer helpful. Please refer to the guide created from it.
Ok so CEC is not for me so I went with GPIO. So far I can detect remote pulse no problem. Here is what I did so far:Installed TSOP38238 IR receiver on GPIO 18 as per this articleInstalled Mecool KIII Pro device on Harmony 650. You can use another device, I just wanted to use my fully customized keymap from an install on an Amlogic box)Downloaded Libreelec image for RPI4 from this sites download sectionBurned to flash using Balena (you can use Rufus as well)Booted and enabled SSH, configured network and paired BT keyboardDisabled CEC in Kodi -> Settings -> Peripherals -> CEC, GPIO IR to workConnected to RPI4 using terminal on OS X (Use Putty for PC) to edit config.txt:Connect by entering: ssh root@libreelecRemount as RW: mount -o remount,rw /flashEdit the file using Nano: nano /flash/config.txtAdd the following text to config.text (pin # = pin you used): dtoverlay=gpio-ir,gpio_pin=18Save changes by pressing CTRL OExit nano: CTRL XRemount as R only: mount -o remount,ro /flashReboot to apply changes: reboot
Opened terminal SSH'd into box and ran the following commands:systemctl stop kodisystemctl stop eventlircdir-keytable -p nec -tRan ir-keytable to make sure protocol was properly loadedPush remote button -to make sure IR events are detected.
The final step is to make the change permanent by modifying the remote config file. Will update when finalized.
Questions:The nec IR protocol seems to work for the Harmony 650 with Meccol KIII Pro, is that the one I should be using?I tried a few windows MCE but the Harmony software keeps saying I need an IR adapter and I need to enter the exact model. I ended up using Mecool KIII Pro because I created a custom map for another device. What is the best device to use on the Harmony 650?What is the recommended or closest key map I can use?
I feel close to my goal, just need to finalize the config.Thanks!
-
Good news, what keymap should I use?
-
I don't remember much about this. I have a remote conf file, which uses the Pivos xdios profile from harmony. You might be able to modify it.
Just realized my old tv supports CEC. From what I understand this is the easiest way to go correct?
What setup do I need for harmony remote? Is it all the same? From what I gather the HDMI CEC just passes on TV's IR signal to the pi?
-
I checked out the wiki but could not identify a harmony 650 remote map. I had made my own years ago for a 905 box but would like to avoid that if possible.
Does anyone have a recommendation or have a key may I can use? DO I need to do anything with LIRC?
Thanks!
-
In general, it's easy to make the IR receiver working on RPi 4B using GPIO and IR sensor.
At first, you need to enable it - put this line to /flash/config.txt file (read only by default, remount as RW before edit):
dtoverlay=gpio-ir,gpio_pin=18
You may change the GPIO pin, GPIO 18 is a default when not specified.
Then connect the IR sensor's data pin to GPIO18, reboot the RPi and use ir-keytable to configure / map keys as described here: Infra-Red Remotes - LibreELEC.wiki
I already connected the sensor some time ago. I just didn't know about the config, which is now added.
Thanks!
-
I am rooting around trying to understand how to add IR to my RP4 so I can use my Harmony IR Remote. I soldered in an IR receiver and was hoping it would work with the right config. Am I dreaming in technicolor? Do I absolutely need a Flirc to use my Harmony remote?
-
I am a little confused as what build to use for my Beelink 905 box. What is happening, is Libreelec dead on this box?
-
Quick tip I got from one of the forums long ago that should be added to remote config file creation tutorial.
Rebooting the box every time you want to test the remote gets real old real fast. Type this into your SSH terminal window every time you saved and are ready to test:
remotecfg /storage/.config/nameofyourremotefile.conf
In my case it was called test remote so I typed in remotecfg /storage/.config/testremote.conf