Posts by Kema

    I just noted something odd.
    CEC remotes are supposed to use the regular master keymap for remotes.
    The "OK" button on my "TV-remote" will automagically have the PlayPause function when playing music.
    Now, my other RPi is using a IR remote that I force into being seen as a keyboard using keboard.xml.
    Here comes the funny behavior. If I remap the ok (return) button on my IR remote to PlayPause, it looses the "select" function and can't start any music or anything.
    Looking at the master remote.xml
    - Play is mapped as PlayPause
    - Select as Select
    - enter as fullscreen
    Looking at the master keyboard.xml
    - return is mapped as Select

    It would seem Select for a remote vs Select for a keyboard is not the same Select?
    Or PlayPause is different comparing remote vs keyboard?

    I'm running LE8.0.1 and the Confluence Skin btw.
    It would be nice if I could find a way to make my ir remote behave as the tv-remote but mostly this is just a bizarre behavior that made med go "huh"?
    Has anyone else noticed this or is it just me?

    How do I check if the remote presses show up as keyboard events?
    So far I haven't seen button presses showing up in the kodi.log? Is there some setting I need to add? The only way that I've been able to see the codes for button presses have been by stopping eventlircd and stopping kodi. With kodi and eventlircd running I haven't been able to find any way to see the code for buttons pressed?
    I started with a clean install of LE8.0.1. Have installed Exodus and the stuff that came with that, LCDproc and XBMC LCDproc. No more and no less, perhaps I'm missing some diagnostic tools?
    My advancedsettings.xml is currently empty since I'm still working with the basics.
    [hr]
    These are the log posts I can find containing keyboard.xml

    Code
    17:33:11.655 T:1961762816    INFO: Loading special://xbmc/system/keymaps/keyboard.xml
    17:33:11.733 T:1961762816    INFO: Loading special://masterprofile/keymaps/keyboard.xml


    And I found some buttonpresses as well.


    13:46:41.448 is showing the longpress for the enter button ("ok" button named KEY_ENTER in justboom)
    Notice the longpress is actually logged as long-return?
    And the KEY_ENTER is recorded as return?
    Could this be the problem? In my custom keyboard.xml I've been using <enter> and <enter mod="longpress">. Should it be <return> and <return mod="longpress"> instead?
    And here are the error logs I could find.

    Code
    17:33:09.440 T:1961762816   ERROR: DBus: Error org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files


    Only one error entry in total.
    [hr]
    Success! Using <return mod="longpress"> in the custom keyboard.xml file solved the issue. :D
    Thank you for all the help, you're a true hero.

    There is a certain amount of irony connected to this.
    I to get the longpress to work following your instructions using the default keyboard.xml.
    However, it refuses to let me remap the function...
    (/storage/.kodi/userdata/keymaps/keyboard.xml)

    Code
    <keymap>
       <global>
          <keyboard>
             <enter>Select</enter>
             <enter mod="longpress">Stop</enter>
          </keyboard>
       </global>
    </keymap>


    is not getting the job done.

    Ok, something is not adding up here. I'm using a rc-5 remote. Trying to get "longpress" working.
    I created an empty "/storage/.config/udev.rules.d/98-eventlircd.rules" to disable eventlircd.
    I have a custom rc_keymap "/storage/.config/rc_keymaps/justboom"
    I have also a custom kodi keymap "/storage/.kodi/userdata/keymaps/remote.xml" I also tried renaming this to keyboard.xml.

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
       <global>
          <keyboard>
             <enter mod="longpress">Stop</enter>
          </keyboard>
       </global>
    </keymap>


    Still, it doesn't work.
    I have confirmed that changing the key name in the rc_keymap changes what key is being pressed.
    I tried manually stopping eventlircd using "systemctl stop lircd".
    using "ir-keytable -c -w /storage/.config/rc_keymaps/justboom -t" I looked at the output from pressing the key. It records multiple KEY_DOWN (and finished with a KEY_UPand shows the same scancode used for a single press.
    It seems it's counting KEY_DOWN in fours.

    Code
    1494239079.299725: event type EV_KEY(0x01) key_down: KEY_ENTER(0x0001)
    1494239079.299725: event type EV_SYN(0x00).
    1494239079.413589: event type EV_MSC(0x04): scancode = 0x1015
    1494239079.413589: event type EV_SYN(0x00).
    1494239079.527475: event type EV_MSC(0x04): scancode = 0x1015
    1494239079.527475: event type EV_SYN(0x00).
    1494239079.601347: event type EV_MSC(0x04): scancode = 0x1015
    1494239079.601347: event type EV_SYN(0x00).
    1494239079.755245: event type EV_MSC(0x04): scancode = 0x1015


    I don't know if this actually means anything useful?
    Regardless, I'm kind of out of ideas at the moment. :/

    Edit.
    It would seem remapping a key works but longpress does not?

    Thanks, that explains things. They say hindsight is always 20/20 and I realized that not having a specific stop button on the remote makes it really awkward.
    Is it possible to have the buttons meaning different things depending on other processes? Like if playing something...

    I have a Raspberry Pi 3 (RPi3) with LE8.0.1 and I'm trying to hook up a Winstar EH1602 display. (16x2 HD44780)
    So far I've installed LCDproc from the LE addon repository, edited the config files to use HD44780 and Raspberrypi 4bit GPIO to the best of my abilities but it's not working.
    The display lights up but is only displaying gibberish. A completely random set of letters, graphics and symbols. It doesn't change if I move around in the kodi menus. It only changes when I initiate a shutdown. I suspect it initially displays a welcome message?

    Is there anyone that can help me? What should I do? I'm used to computers and electronics but a n0ob with RPi, LE and Linux.

    Instead of me just posting random code snippets, just tell me what you need in order to help me and I'll do my best to make it happen. :)
    [hr]
    Update.
    For some reason, when I turned on the Pi a minute ago it's suddenly showing the welcome message. So far only the welcome message though...

    Houston, we have a problem...
    I'm a Linux/LE n0ob but I'm doing my best to figure this out.
    Hardware: RPi3
    OS: LE8.0.1 (Kodi 17.1)
    Display: 16x2 HD44780 compatible
    GPIO 4-bit interface
    Installed LCDproc from the LE repo.

    I have managed to get the display to turn on but I'm only getting the welcome message and the shutdown message. It seems LCD.xml isn't being read or something?
    The path is "/storage/.kodi/userdata/LCD.xml"
    Should this be entered somewhere in LCDd.conf or something? I don't understand what I'm doing wrong? I've tried following the tutorials that I've found?

    Hi.
    I'm a n0ob with LibreELEC and Linux but I have a fair amount of experience with computers, programming and electronics. Currently I'm trying to get a IR remote working by hooking up a IR receiver through GPIO. (Using TSOP32338)
    I've connected OUT (data) to GPIO 18, Vs to 3V3 and GND to GND.
    I've added device_tree_overlay=lirc-rpi to the last line of config.txt.

    Code
    NewPi:~ # dmesg | grep lirc_rpi
    [    3.547124] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
    [    4.498173] lirc_rpi: auto-detected active high receiver on GPIO pin 18
    [    4.498392] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
    [    4.498395] lirc_rpi: driver registered!


    I'm not sure that the TSOP32338 is actually active high, it might be active low? Det datasheet isn't really super clear on that and this is my first experiment with a IR receiver.

    Code
    NewPi:~ # ps | grep lirc
      269 root       0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
      421 root       0:00 {kodi.sh} /bin/sh /usr/lib/kodi/kodi.sh --standalone -fs --lircdev /run/lirc/lircd
      425 root       0:26 /usr/lib/kodi/kodi.bin --standalone -fs --lircdev /run/lirc/lircd
      527 root       0:00 grep lirc


    Code
    NewPi:~ # ls -l /dev/lirc0
    crw-------    1 root     root      243,   0 Feb 26 16:33 /dev/lirc0
    NewPi:~ # lsmod | grep lirc
    lirc_rpi                5930  0
    lirc_dev                7013  1 lirc_rpi
    rc_core                16649  1 lirc_dev


    Code
    NewPi:~ # irw /var/run/lirc/lircd-lirc0
    Cannot connect to socket /var/run/lirc/lircd-lirc0: No such file or directory


    Trying irrecord only get's me a no input detected and terminating after 10s.
    For some reason the Pi isn't recording any input from the remote control?
    Can someone please help me? I have no clue how to get this working and nothing that I've found through googling has helped.
    Am I missing some processes that should be running? Should I be adding a pullup or pulldown setting on GPIO 18?
    Adding a IR receiver is supposed to be easy but this is just driving me nuts.
    Please help! :huh:
    [hr]
    Ok, I've made some progress.
    Using irrecord I've successfully recorded the buttons on my remote.
    The irw command still isn't working.
    Where is the lircd.conf file supposed to be located? I placed it .config but that didn't work.

    Edit. Disabled CEC in the GUI (System>Settings>System>Input>Peripherals>;) and made an addition in Lircmap.xml. (.kodi/userdata/)

    Code
    <lircmap>
    <remote device="devinput">
    <start>KEY_HOME</start>
    </remote>
    </lircmap>


    No change, still doesn't work.

    Edit 2. Somehow lirc had been disabled, reenabling it again, the remote works at least to some degree. Laggy and somewhat unresponsive to the buttons but it works. :)