Kodi specific services to call Kodi API methods #2635
Conversation
- Doc for new service: `kodi_execute_addon` to run a Kodi Addon with optional parameters. Results of the Kodi API call, if any, are redirected in a Home Assistant event: `kodi_execute_addon_result`. - Doc for new service: `kodi_run_method` to run a Kodi JSONRPC API method with optional parameters. Results of the Kodi API call are redirected in a Home Assistant event: `kodi_run_method_result`. - Add `timeout` parameter to yaml config (needed to make slow queries to the JSONRPC API, default timeout is set to 5s). - Examples for using the new services: one simple yaml example to call `kodi_execute_addon`and turn on the TV attached to Kodi; and other, more complex, to query the Kodi library and make a dynamic input select.
|
|
||
| A more complex example, to configure a `input_select` that can play in Kodi the latest entries added when selecting them. | ||
|
|
||
| It consists of 3 scripts that query the Kodi API to return the contents of the Kodi library, and an AppDaemon app with which the events are heard with the results of the API queries. |
There was a problem hiding this comment.
Love the changes but I'm unsure if this last part should be in the component documentation.
I would prefer it being in the ecosystem section.
@fabaff what to you think?
There was a problem hiding this comment.
You mean the complex example, right? Where and how do you think it would be more convenient to place it?
(I've removed the kodi_execute_addon service, as discussed in the home-assistant/core#7603)
There was a problem hiding this comment.
Agree with @Landrash myself. I like having the simple example, but the big one I'd prefer elsewhere. Maybe in the cookbook with a link here?
Landrash
left a comment
There was a problem hiding this comment.
Looks good and can be merged when parent PR is merged.
| - script.get_pvr_channels | ||
| ``` | ||
|
|
||
| The AppDaemon app: |
There was a problem hiding this comment.
Could you add in some more about the application and maybe some filler text about how to install it?
Not needed but considering this can be the first exposure to AppDaemon for the reader.
There was a problem hiding this comment.
This would be good, but it can come in a follow-up PR. Please link it to this PR if you can add some more text.
Description:
Documentation and examples for new Kodi-specific services, including:
Doc for new service:kodi_execute_addonto run a Kodi Addon with optional parameters. Results of the Kodi API call, if any, are redirected in a Home Assistant event:kodi_execute_addon_result.kodi_run_methodto run a Kodi JSONRPC API method with optional parameters. Results of the Kodi API call are redirected in a Home Assistant event:kodi_run_method_result.timeoutparameter to yaml config (needed to make slow queries to the JSONRPC API, default timeout is set to 5s).Pull request in home-assistant (if applicable): home-assistant/core#7603