Steam Controller

  • Is there any manual in subject of this add-on. I've install it from repo, but ... that's all what actually happens. I have RPi 3, with LE "Extended" from escalade. Dongle plugged into RPi3 and add-on installed. Can't make my SC working. Where I can find some help in this matter?

  • Already checked this, and my SC isn't there on the list.

    PS. I should mention that SC is working "OK" on usb wire. But no luck on wireless with Valve's dongle.

    Edited once, last by RShT (January 6, 2017 at 8:11 PM).

  • Although I don't have the controller itself, I installed the Steam Controller service addon to see if there's anything obvious and there is:

    Python
    # python /storage/.kodi/addons/driver.steamcontroller/bin/sc-xbox.py start
    Traceback (most recent call last):
      File "/storage/.kodi/addons/driver.steamcontroller/bin/sc-xbox.py", line 31, in <module>
        from steamcontroller import \
      File "build.LibreELEC-Generic.x86_64-8.0.0/addons/steamcontroller/driver.steamcontroller/lib/steamcontroller/__init__.py", line 24, in <module>
    ImportError: cannot import name IntEnum
  • escalade: I should mentioned this earlier, but I've got the same error while trying to manually start python's script (sc-xbox.py) to emulate xbox pad. So now you know why I did asked you for enum34 and pip in your LE build.

    lrusak: I know SC is recognised as a usb keyboard/mouse while being plugged by a wire. But honestly this isn't good for me. What is the point of using wires when you buy a wireless pad? :)

    Edited once, last by RShT (January 6, 2017 at 9:54 PM).


  • lrusak: I know SC is recognised as a usb keyboard/mouse while being plugged by a wire. But honestly this isn't good for me. What is the point of using wires when you buy a wireless pad? :)

    Read again what I wrote then go and try it.

    I wrote the addon, and it works fine with my steam controller.

    You have to map the controller using the controller configuration gui. You have to map it to the "Kodi" controller (looks like an xbox 360 controller).

  • I did read what wrote. I tried to do this, but without any luck. All of this was done while being plugged by wire. Any attempt to change mapping ends up without any result. When I try to map f.e. "A" button, after pushing A on SC to start mapping, the pad configurator in Kodi asks to push button in controller, so I push "A" button, and It gets back to showing "A" as it nothing happens. In this case actually it should behave this way, but, please keep reading. After this I've tried to map any button in my SC to this "A" in Kodi app, but this doesn't work either. It constantly gets back to showing "A" in Kodi controller app.

    Buttons that works (in Kodi but not in this pad mapping app) are: A, B buttons. Mouse TruckPad work, "d-pad" works. Joystick works. Both triggers also works. Thing s that doesn't work are: both "shoulder" buttons and X and Y. But as I mentioned before, I've read that SC is recognised as HID mouse/keyboard while being plugged by wire. So this isn't a surprise for me that I can actually use it. Also. This was checked with and without your plug-in. But still no luck with wireless SC. Maybe this thing that escalade mentioned before have to do sth with SC doesn't working properly?


  • Although I don't have the controller itself, I installed the Steam Controller service addon to see if there's anything obvious and there is:

    Python
    # python /storage/.kodi/addons/driver.steamcontroller/bin/sc-xbox.py start
    Traceback (most recent call last):
      File "/storage/.kodi/addons/driver.steamcontroller/bin/sc-xbox.py", line 31, in <module>
        from steamcontroller import \
      File "build.LibreELEC-Generic.x86_64-8.0.0/addons/steamcontroller/driver.steamcontroller/lib/steamcontroller/__init__.py", line 24, in <module>
    ImportError: cannot import name IntEnum

    I don't get this error. Do you have something else in your path that could be pulling in enum from elsewhere?

    Code
    >>> import sys
    >>> sys.path
    ['', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/gtk-2.0']

    also, check if this works

    Python
    >>> import sys
    >>> sys.path.append('/storage/.kodi/addons/driver.steamcontroller/lib')
    >>> from enum import IntEnum

  • also, check if this works

    Python
    >>> from enum import IntEnum

    This last one gave me this error:

    Code
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: cannot import name IntEnum

    And also after exiting python, this sys.path added by this command ">>> sys.path.append('/storage/.kodi/addons/driver.steamcontroller/lib')", disapears. from sys.path variable.

    Edited once, last by RShT (January 8, 2017 at 10:04 AM).

  • Aha, I do include enum 0.4.6 from pypi.org as a dependency to cryptography and the OP is using my build. Do you know if enum34 is compatible and could be used as a replacement?

    EDIT: It seems like it is compatible, I will use it instead.

    RShT

    For now you can use this hack as a workaround:

    Code
    # cp -a /usr/lib/python2.7/site-packages /storage/.site-packages ; rm -rf /storage/.site-packages/enum* ; mount --bind /storage/.site-packages /usr/lib/python2.7/site-packages


    With this the steamcontroller service is starting correctly:

    Code
    Jan 08 12:14:28 Tronsmart systemd[1]: Starting a standalone userland driver for the steam controller...
    Jan 08 12:14:29 Tronsmart sc-xbox.py[3223]: sc-xbox.py: started
    Jan 08 12:14:29 Tronsmart kernel: input: Microsoft X-Box 360 pad as /devices/virtual/input/input7
    Jan 08 12:14:29 Tronsmart kernel: input: Steam Controller Keyboard as /devices/virtual/input/input8
    Jan 08 12:14:29 Tronsmart kernel: input: Steam Controller Mouse as /devices/virtual/input/input9
    Jan 08 12:14:29 Tronsmart systemd[1]: driver.steamcontroller.service: Supervising process 3223 which is not our child. We'll most likely not notice when it exits.
    Jan 08 12:14:29 Tronsmart systemd[1]: Started a standalone userland driver for the steam controller.

    You can put the commands in /storage/.config/autostart.sh to have them executed on startup.

    Edited once, last by escalade (January 8, 2017 at 12:50 PM).

  • Finlly I am able to use my SC! This hack works but only in Kodi. In Moonlight streaming Big Picture from my PC to TV just joystick works. Eh. Same as with PS4 controller.

    Another thing. from command line, running sc-dump.py gives:

    Python
    LibreELEC:~/.kodi/addons/driver.steamcontroller/bin # python sc-dump.py
    Traceback (most recent call last):
      File "sc-dump.py", line 28, in <module>
        from steamcontroller import SteamController
    ImportError: No module named steamcontroller

    Edited once, last by RShT (January 8, 2017 at 6:19 PM).

  • RShT

    I've uploaded new builds that fixes it so you don't need the hack anymore. Also I've uploaded lrusak's updated version (PR1147) that fixes the 100% cpu usage when no controller is detected.


  • RShT

    I've uploaded new builds that fixes it so you don't need the hack anymore. Also I've uploaded lrusak's updated version (PR1147) that fixes the 100% cpu usage when no controller is detected.

    Thanks for this.
    Using your Extended build, The controller works in Kodi but not in Emulastation. Is there a way to get the Shield Controller to work?