Call webhooks > assign keymap

  • I assumed that either LE or Kodi would have the built-in ability to call a webhook and then be able to map a key to trigger external actions. If there is, I haven't been able to find it so far.

    I did find a post on here that did exactly what I was planning on putting in place. But he went as far as creating a custom addon. Not sure about going there just yet so I thought I would ask around first.

    I'm wondering if there is any built-in way or an addon already out there that I can put in my local webhook URLs, and then be able to map them to remote keys.

    I hope so!

  • You can implement a custom keymap that maps a button to the "RunScript(script.scriptname)" action which will execute the same name Python(3) script. I forget what the correct path is, but probably /storage/.kodi/userdata/Scripts/scriptname.py (note Scripts not scripts) and from the script you can drive whatever webhook things you like. If you're looking to monitor Kodi activity and drive actions automagically, i.e. press play and fire something to a webhook, that should be possible using the JSON-API, but to ensure that runs all the time you're probably heading down the custom add-on route. I'm not aware of anyone creating a webhook add-on and I can't point you to any specific guides on how to build things, but if anyone already trod the same path there's probably useful info in the Kodi forums (more than here).