Posts by alftheelf

    I don't know. My idea was to remove <one> and <three> from all devices at Lircmap.xml.

    Different approach: Remove remote.xml, and just use this Lircmap.xml:

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <lircmap>
        <remote device="devinput">
            <one>seek(-15)</one>
            <three>seek(15)</three>
        </remote>
    </lircmap>

    Thanks for your reply. And for keeping suggesting things I can try. Neither of those methods worked. Removing the lines from the complete Lircmap.xml had no change. But removing the remote.xml and replacing it with your suggested code, made the buttons function only as Numeric 1 and JumpSMS3, and did not do the seeking action.

    I just don't get it. Where do the default actions come from? When I enter the IR keys for the up down left and right buttons in /storage/.config/rc_keymaps/samsung_remote, what tells it what KEY_LEFT or KEY_OK should do?

    As you can see at /usr/share/kodi/system/Lircmap.xml, there is more than just one device tag.

    I suggest to copy that complete Lircmap.xml into /storage/.kodi/userdata.

    Then edit content inside different device tags, and check the results. Maybe device tags other than "devinput" also have effects.

    I created a Lircmap.xml which was a complete copy of the original. Then I edited the tags for everything other than devinput by appending 'NULL'. First like this: <one>KEY_1_NULL</one> and then the other way <one_NULL>KEY_1<one_NULL> . Nothing changed. Should this have worked if it was using other device tags?

    OK. Remove your Lircmap.xml. This is an overwrite / customization of the default version at system folder.

    Already did that too today. I even created an empty xml like this <lircmap></lircmap> and rebooted in case it needed to forcibly be reset.

    I've also seen in the Lircmap.xml there is both KEY_1 and KEY_NUMERIC_1, I mapped both of these in my rc_keybinds file and it didn't fix it.

    At the moment I have a remote.xml but no Lircmap.xml (so hopefully I'm just using the default). What I've noticed is that it seems to be only the numeric keys that have this problem. When I have bind IR codes to red/green/yellow/blue buttons but leave the remote.xml for them empty they do shortcuts to pictures/videos in the file manager, but when I map them in remote.xml the do exactly what I want and don't have this alternating between two functions; it seems the number keys are the only ones that do this.

    Also, KEY_3 changed and now does JumpSMS3 and not Number3 in the log. So I have no idea what it's doing.

    I've even made a fresh install on a new microSD card and the same thing happens. Number1 and JumpSMS3 is what they alternate between there.

    I tried to make a new Lircmap.xml and try a universal remote setup, and that didn't work. Nothing in when I ran irw and pressed buttons. I assume I'm meant to use the key names I gave in the Lircmap and put them with the IR codes in my rc_keymaps file? I wasn't sure.

    I'm guessing maybe this problem is because I'm using an IR sensor as my TV doesn't have CEC. The tutorials I've found don't actually explain how I input the codes. But I think I'm doing it right because, as I say, it works until I try to map the numeric keys to something. Then it does both alternately.

    I'm trying to map a some extra buttons using the XML keymap method, but it's not working correctly.

    I'm running LibreELEC 19.5 on a Raspberry Pi 3B.

    I'm starting with just trying to get two buttons working. I want the 1 and 3 on my IR remote to do a seek(-15) and seek(15) respectively. I have managed to achieve this, but every alternate button press it registers as a Number1 or Number3 action, so you have to press the button twice each time. And I can't find where this is coming from. When I mapped button 4 whilst I've been testing this all day, it alternated that one with JumpSMS action. Maybe that can help diagnose what's causing this to happen.

    I know for this example, I probably can do this in a simpler way. But this is only a simple test for me to learn how to do it. I eventually want to map more complex keymaps which will require this keymapping method.

    I'm using an IR receiver which might be where my issue stems from.

    To begin, I've set up my IR and have my IR codes mapped in /storage/.config/rc_keymaps/samsung_remote and looks like this:

    Code
    # table samsung_remote, type: nec
    
    0x70704 KEY_1
    0x70706 KEY_3

    I'm leaving out the other key binds that work fine. The problem is caused by what I must have done incorrectly later.

    Then I created Lircmap.xml in ~/.kodi/userdata which looks like so:

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <lircmap>
      <remote device="devinput">
        <one>KEY_1</one>
        <three>KEY_3</three>
      </remote>
    </lircmap>

    And I also create a file called remote.xml in ~/.kodi/userdata/keymaps which looks like this:

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
      <global>
        <remote>
          <one>seek(-15)</one>
          <three>seek(15)</three>
        </remote>
      </global>
    </keymap>

    I rebooted to apply the changes.

    When I run irw I get

    2 0 KEY_1 devinput

    4 0 KEY_3 devinput

    for the two keys.

    I have my kodi in debug mode and can see when I press the 1 button, I get:

    2023-02-03 02:20:32.936 T:625     DEBUG <general>: LIRC: - NEW 2 0 KEY_1 devinput (KEY_1)

    2023-02-03 02:20:32.943 T:614     DEBUG <general>: HandleKey: 206 (0xce, obc49) pressed, action is Number1

    2023-02-03 02:20:33.409 T:625     DEBUG <general>: LIRC: - NEW 2 0 KEY_1 devinput (KEY_1)

    2023-02-03 02:20:33.410 T:614     DEBUG <general>: HandleKey: 206 (0xce, obc49) pressed, action is seek(-15)


    And for the 3 button:

    2023-02-03 02:11:30.639 T:625     DEBUG <general>: LIRC: - NEW 4 0 KEY_3 devinput (KEY_3)

    2023-02-03 02:11:30.643 T:614     DEBUG <general>: HandleKey: 204 (0xcc, obc51) pressed, action is Number3

    2023-02-03 02:11:31.186 T:625     DEBUG <general>: LIRC: - NEW 4 0 KEY_3 devinput (KEY_3)

    2023-02-03 02:11:31.193 T:614     DEBUG <general>: HandleKey: 204 (0xcc, obc51) pressed, action is seek(15)

    As you can see the button alternates between the two actions. But I can't understand what's mapping it to Number 1 or Number 3.

    I have Keybind Editor installed and the ~/.kodi/userdata/keymaps/gen.xml looks like this:

    So I'm sure it's not coming from there. Those are the 'exit' and 'red' buttons on my remote.

    As a final test, I've removed both the remote.xml and the Lircmap.xml and the action is only the Number 1 / Number 3. So it must be coming from somewhere else. I don't really know why I explained everything I did because maybe I didn't do anything wrong in what I added, I just need to find what I didn't change that I should have.

    There is the Lircmap.xml in /usr/share/kodi/system but this is unwritable and I thought that creating the one I created was meant to override that one. I don't know why I'm suggesting things, I haven't got a clue.

    What is causing the two actions to be mapped to same key?

    If anyone knows how I can fix this, that would be much appreciated.

    Use a better power supply (the official RPi one is highly recommended) and/or a powered USB hub or USB drive.

    I was using a 2A USB adapter at first. When I use it with Raspberry Pi OS, it shows the lighting bolt symbol. After seeing the "under-voltage detected" message I switched to use my iPad's 2.1A adapter and still got the "under-voltage detected" message.

    Why does it say under-voltage, and not low current? I can trust my iPad charger is outputting 5.1V. Would this message appear if they current is too low. You think I need the 2.5A to work with my hard drive?

    I'm running LibreELEC 19.5 on my raspberry pi 3.

    When I shutdown/reboot I get errors:

    Failed to unmount /flash: Device or resource busy

    systemd-shutdown[1]: Failed to finalize file systems, loop devices, ignoring.

    9053-img-6031-jpg

    It seems to only do this when my main 1TB hard drive is connected. If there is no drive attached it's fine, and when I connected another usb drive it didn't cause errors either.

    Because it says Failed to unmount /flash, I thought this was probably to do with the fact I've added support for an IR controller. In doing so, I had to mount -o remount,rw /flash, edit the config.txt and then mount -o remount,ro /flash. However I took another identical microSD card and started fresh with a new image of LibreELEC without configuring the IR, using only a usb keyboard, and the same errors happened when I shutdown.

    When I try to unmount the hard drive with umount /dev/sda1 it still produces the errors until I physically pull it out of the usb port. Then it shuts down ok.

    If I run df -h, I can see that /dev/mmcblk0p1 is mounted on /flash. When I try to unmount it, I get umount: can't unmount /flash: Device or resource busy.

    What's could be this to not shutdown correctly?

    I'm following a tutorial on YouTube, and to summarise, it is basically this. I have the remote working when I run ir-keytable -c -w /storage/.config/rc_keymaps/myRemote manually. But I obviously want it to run on startup.

    The tutorial says to add the command in .config/autostart.sh but this location doesn't exist for me. I'm guessing it's old. I found a thread on here where someone wanted to mount a samba drive on startup and they were told the autostart.sh hack wasn't really a sensible idea.

    Anyway, I've tried to run this command as a cron job, it didn't work. I didn't even get any errors in the log file I told it to make. I made it a script which I made executable with chmod.

    I played around with systemd but it didn't work, and also I didn't really know what I was doing anyway. So that could be me why it wasn't working.

    What's the best way to do this?

    I want to use a remote with LibreELEC, I have the original TV remote for the TV but I don't think it's compatible with CEC; It's not working anyway. I ideally want to use my Amazon Fire Stick remote anyway (it's the 4K Fire Stick, by the way). I have a Raspberry Pi 3B, and it's LibreELEC version 9.2.6; Kodi 18.9.

    I found YouTube videos where people connect various bluetooth devices, that seem to just work; but none were Fire Stick remotes. I found this comment with instructions how to do it with a Fire Stick Remote. But it's still not working for me. They are answering about a Raspberry Pi 4, so maybe it's that?

    I've managed to pair the remote successfully (I also tried deleting the connection and retrying by selecting 'Trust and Connect' in case that was somehow different to 'Pair'). The comment then said to go to 'Game Addons' and select 'TV Remote'. When I did that; there was no option to install 'TV Remote'. I had 'Default Controller' and 'SNES Controller'.

    Instead, I went to Settings > System > Input > Configure attached controllers, and then I clicked 'Get more...' and I was able to install the option for 'TV Remote' there. I now have 'TV Remote' in Game Addons.

    I've rebooted, but remote isn't working.

    Am I meant to do something else to get it to work?

    Any help would be greatly appreciated. Having to control Kodi with a PC keyboard is a dealbreaker for me using it at all unfortunately.


    UPDATE: SOLVED

    I eventually came this thread on The Kodi forum, which had exactly the same issue as I had; connecting but no button functionality. On that thread there is a link to this comment on discoure.osmc.tv, which uses bluetoothctl to connect the remote.

    I didn't need to install bluez, I think it comes as default now I guess. Instead I just SSHed into the libreELEC and typed bluetoothctl to enter the environment. Then:

    Code
    pair <Fire Stick MAC address>
    trust <Fire Stick MAC address>
    connect <Fire Stick MAC address>
    disconnect <Fire Stick MAC address>
    connect <Fire Stick MAC address>

    This got the remote working and didn't require Keymap Editor. I also tested it after rebooting and it reconnected automatically.