Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Kodi 18.6 Leia #11

Open
amaia81 opened this issue May 25, 2020 · 4 comments
Open

Kodi 18.6 Leia #11

amaia81 opened this issue May 25, 2020 · 4 comments

Comments

@amaia81
Copy link

amaia81 commented May 25, 2020

Hi. Are there any plans to make it compatible with version 18.6 Leia?
Thanks and kind regards!

@FredrikWendt
Copy link

FredrikWendt commented Jul 19, 2020

I'm curious about this as well. The example JSON payload (GET request) now returns

{
  "error": {
    "code": -32099,
    "message": "Bad client permission."
  },
  "id": 1,
  "jsonrpc": "2.0"
}

(minus the formatting) since GET requests are only allowed to execute ReadOnly types of RPC actions: https://forum.kodi.tv/showthread.php?tid=324598

I got a little bit further by taking these steps:

  • added a hashbang at the start of the script.py
  • added executable flag
  • called Addons.SetEnabledAddon
curl --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","params":{"addonid":"script.json-cec","enabled":true},"id":1}' http://osmc1.local/jsonrpc | jq .
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "OK"
}

Not until I had explicitly called this SetEnabledAddon could I see the script.py being executed. Unfortunately, any logging or print to stdout is swallowed, so I set up logging to a /tmp/mylog file.

After finally searching in System settings and Peripherals, entering the libElect entry, I could select TV under "turn off ...". Then everything started working with 18.7. Fresh install of OSMC on a Raspberry Pi 3.

@jantman
Copy link

jantman commented Dec 24, 2020

@FredrikWendt do you happen to have your final, working modifications somewhere that you could share?

@FredrikWendt
Copy link

@jantman Sure: https://github.com/FredrikWendt/script.json-cec contains my changes to the script.py file, but ... I believe the challenge I had was simply activating the addon (the curl run in my comment above enabled the addon).

@denics
Copy link

denics commented Jan 12, 2021

Thnks @FredrikWendt , @joshjowen is this project still active?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants