Skip to content

Kodi specific services to call Kodi API methods

#2635

Merged
emlove merged 5 commits into
home-assistant:nextfrom
azogue:new-kodi-services
May 17, 2017
Merged

Kodi specific services to call Kodi API methods

#2635
emlove merged 5 commits into
home-assistant:nextfrom
azogue:new-kodi-services

Conversation

@azogue
Copy link
Copy Markdown
Member

@azogue azogue commented May 15, 2017

Description:
Documentation and examples for new Kodi-specific services, including:

  • 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 turn on the TV attached to Kodi; and other, more complex, to query the Kodi library and make a dynamic input select.

Pull request in home-assistant (if applicable): home-assistant/core#7603

 - 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Landrash , @armills
I have moved the complex example to the cookbook, but I'm not sure about metadata, links and so on, what do you think?

@Landrash Landrash added the new-feature This PR adds documentation for a new Home Assistant feature to an existing integration label May 15, 2017
Copy link
Copy Markdown
Contributor

@Landrash Landrash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and can be merged when parent PR is merged.

- script.get_pvr_channels
```

The AppDaemon app:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@emlove emlove merged commit 1bb8aec into home-assistant:next May 17, 2017
@azogue azogue deleted the new-kodi-services branch June 10, 2017 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature This PR adds documentation for a new Home Assistant feature to an existing integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants