logi_craft_sdk icon indicating copy to clipboard operation
logi_craft_sdk copied to clipboard

SDK samples require outdated Logitech Options

Open joshwontknow opened this issue 4 years ago • 8 comments

I couldn't get any of the SDK samples working with Logitech Options 8.10.154, had to downgrade to 7.14.70 before I could get Options to pickup the Craft C# and Craft Python SDK Samples.

Also requires outdated dependencies,

Has the Craft just been left behind with development?

joshwontknow avatar Apr 25 '20 22:04 joshwontknow

Yeah I don't think they care too much about Craft development.

I had an issue getting a custom plugin to work and logged a support ticket with Logitech. After sending them a sample application that they requested, they ignored me for 2 months before finally responding and telling me to log the issue here.

Your issue might have been because the custom plugin folder that Options uses is different from what is in the documentation. Documentation tells you to put custom plugins in ProgramData\Logishrd\LogiOptionsPlugins but i think the newer version of options actually looks in ProgramData\Logishrd\LogiOptions\Plugins . They have either changed the folder and not updated the documentation or the documentation has a typo in it which has never been fixed.

george-murray avatar Apr 28 '20 09:04 george-murray

The SDK samples are still not working in the most recent version (8.20.329). Here is the download link for 7.14.70 directly from Logitech: https://download01.logi.com/web/ftp/pub/techsupport/options/Options_7.14.70.exe

GenuineJakob avatar Aug 03 '20 16:08 GenuineJakob

Good news, I got CraftPython working with a workaround. The problem is the Options custom profile service rejects the websocket handshake offered by the client (craft.exe). But if you change the websocket version to 8, it accepts the handshake and connects.

Easiest hack is to just change VERSION = 13 to VERSION = 8 in Python36\Lib\site-packages\websocket_handshake.py

Or get the most current version of websocket-client (ver .57) pip3 install websocket-client=="0.57.0"

and change the WebSocketApp code in create.py:

  ws = websocket.WebSocketApp("ws://127.0.0.1:10134",
                             on_open = self.on_open,
                             on_message = self.on_message,
                             on_error = self.on_error,
                             on_close = self.on_close,
                             header = {"Sec-WebSocket-Version":"8"} )

update: I tried to repeat it and it's not totally working. 0.57.0 requires some other changes from 0.48.0. but at least it's connecting to the Options service.

So, the easiest way to build a running demo is to

  1. pip3 install websocket-client "0.48.0"
  2. in _handshake.py change to VERSION=8
  3. pyinstaller craft.py
  4. craft.exe in dist\craft folder.

PS: Another way I was able to connect websocket was by suppressing the "Origin:" winsocket handshake header. It's easy to do in 0.57.0 wst = threading.Thread(target=ws.run_forever(suppress_origin=True))

dachNYC avatar Aug 04 '20 06:08 dachNYC

Tried to copy release 0.1 to C:\ProgramData\LogiShrd\LogiOptions\Software\Current\Plugins which seems to have same directory structure, but it does not show up in the profiles. Logitech Options old version have some bugs in Logitech Layer implementation, so I'm not able to downgrade.

cyberluke avatar Apr 01 '21 19:04 cyberluke

At first I installed options 9.x on my win10 21H1 system, the software could not find all SDK profiles, then I downgraded the version to 8.10.84, 7.14.70, 6,90.138, but the result was the same. However, another machine on WIN10 20H2 with Option 8.10.84 installed can run C# and python SDK DEMO normally according to the instructions. I suspect that after installing a higher version of Option, a flag is written in the registry or somewhere, so that the software cannot work normally even if it is downgraded.

euzenlee avatar Oct 28 '21 08:10 euzenlee

I think my steps are wrong. When I compiled the python program on the WIN10 21H2 computer and ran it once, Options can install the profile normally again.

euzenlee avatar Oct 29 '21 03:10 euzenlee

I tried it again, and I can also install the sdk profile of .net and python on 9.40.86 of Options. Everything is done in accordance with the instructions of the logi sdk. The main point is to first run the SDK DEMO program, such as WinFormsCrownSample.exe, so that the application can appear in the "Add application" of Opitons, and then the corresponding profile will suddenly appear.

euzenlee avatar Oct 31 '21 02:10 euzenlee

I tried my best,but it not work,fuck。

wzx84 avatar Aug 10 '22 11:08 wzx84