Failure of python select.select() call on LibreElec

  • vpeter:

    I currently have a Kodi python addon that uses GPIO input to select which video to play. To make for seamless transitions, I concatenate 4 videos into a single .mp4, and use the GPIO to select what section of the video to seek to, play it, and return to the beginning.

    I want to change this to be a touchpanel control.

    My main video section will display 4 or more square zones on the screen. When I read a touch event, I will determine which zone is selected and then seek to that part of the video, play it, and return to the main video section.

    Python seemed to be the easiest way to implement the kodi addon.

    Does your touch daemon/addon really run while Kodi is running?
    Like I said, I understand how one could create a daemon that autoruns before Kodi starts to exclusively grab the touchpanel.

    Or do you kill Kodi and relaunch it, as I think I saw in your code?

    Hias:

    The documentation for LIBINPUT_IGNORE_DEVICE indicates that the device will not be set up by libinput. I can see why that would prevent Kodi from grabbing it. But won't that also prevent an open and read in python?


    Thanks,

    -Jeff

  • The documentation for LIBINPUT_IGNORE_DEVICE indicates that the device will not be set up by libinput. I can see why that would prevent Kodi from grabbing it. But won't that also prevent an open and read in python?

    No, accessing the kernel input event device will work fine.

    so long,

    Hias

  • Does your touch daemon/addon really run while Kodi is running?

    In my case touch addon starts before Kodi. This way it gets exclusive access to input. Didn't know for LIBINPUT_IGNORE_DEVICE at that time.

    Few years back I helped one guy who used 40" TV with touchscreen in a museum. He made custom fullscreen skin with only few buttons which represents which video to play. Something similar what you are doing :)

  • OK. I'll poke through your touch addon code some more to see if I can use this approach. You've helped me identify the basic problem, and given me some things to try. Thanks again.

  • Make yourself some simple Kodi addon in Python which shows you some buttons/images and when you tap on it it plays file associated with it. Should be simple enough.

  • I did a little more research about connecting a touchscreen to an RPi. Using the DSI port is the official way to connect one, and it's approved to work with LE. To make an USB touchscreen work, you need high speed USB to transfer display data, but your Rock64 doesn't have it. The fact that it works on Armbian is because it's not optimized for media output.

    Get some DSI touchscreens, and you will make it until Halloween.

  • First he need to test the touchscreen with evtest program if he get correct (or any) data or not. If touchscreen doesn't work with evtest then he can think of better options.