Kodi Remote

It is worth checking the UI integrations first as the update might have imported your kodi integration already.

Either way delete the kodi integration yaml and restart. Then add the kodi integration back using the UI or edit the one that is already there to remove any _2 from entity ids.

Ok, will do as soon as I am back at home, then give you the result.
Tanks Tom_i

kodi remote not working anymore on HA 0.115

Read 4 posts above yours.

yeah i deleted the configuration from yaml and configure it through the integration , but it didnt work …

Done.
Kodi remote scripts works again.
But now, all my UI config has been deleted?

What UI config?

Changing the integration can have no effect on Lovelace (other than entities being renamed and showing up as yellow error bars).

Sorry, the lovelace UI…
Seems I have to restart create it from scratch…

As I said, the integration cannot have an effect on Lovelace. Something else has happened.

Of course something else has happened but… what ?
Didn’t do anything else than deleting the kodi configuration yaml…
And as I’m running homeassistant on a docker (NAS), I’m… lost !

Last update 0.115.1 should fix your issue: https://github.com/home-assistant/core/pull/40236

Thanks to all who contributed to this remote. I read through the posts multiple times to wrap my head around it, and eventually just started copying and pasting things, often incorrectly, until I was able to have 3 working remotes for my 3 Kodi installs. I toyed with the idea of implementing a selection box as suggested by @myle above, but for now I’ve basically just copied and pasted @tom_l’s code 3 times.

My Kodi instances are named “basement,” “bedroom,” and “firetv.” My configuration.yaml has this for scripts: script: !include scripts.yaml

I copied @tom_l’s code as edited by @GooseGoose to include the new kodi calls. I essentially pasted it 3 times into Notepad++. Then I used search and replace “lounge” to “basement” on the first set, as well as “media_player.kodi” to “media_player.kodi_basement” for the first set. The second and third sets were similar.

Then I pasted all 3 sets of script code into my previously empty scripts.yaml file. No need to have “script:” at the top as this is already accomplished in configuration.yaml. After saving and then Configuration > Server Controls > Reload Scripts, I showed numerous scripts available for the various Kodi instances.

I used HACS to install the button-card and hui-element mentioned above, and then restarted HA.

In my Lovelace Media dashboard, I opened the raw editor and pasted @tom_l’s button templates above. I copied @tom_l’s lovelace text into Notepad++ and created three versions, one for each Kodi instance. Then I created 3 entities cards, used the code editor, and pasted in the code for each one. I also added three media player cards. After some fiddling with the up/down buttons in the card editor, I was able to line it up so that each media player had its corresponding remote below it.

1 Like

is there a way to start a kodi addon via home assistant?

Is there a command so that one button opens the download subtitle screen?

First of all thank you to everyone that helped on this as it is a great addition to an already great program.

Having gotten this to work I now am trying to make a couple of minor changes and was hoping someone here maybe could point me in the right direction as what I have tried didn’t work as intended.

  1. I use Kodi as my main source of live TV and as such use the EPG (TV Guide) often. It would therefore be nice to have a button dedicated to that on the remote. I’m not sure what the right call is but tried EPGNow and SendText with “e” as the parameter but neither worked. Anyone else by chance implemented this?

  2. Currently “smallforward” and “bigforward” skips 30 sec and 10 min respectively. I would like to fix the skip to match the label (10 and 30 sec) Is there preset values for the other skip intervals? I tried sending ‘Seconds = 10’ in the value tag but it didn’t work .

Thanks

Thoughts id share hope this helps someone.

type: grid
cards:
  - type: button
    tap_action:
      action: call-service
      service: script.bose_voldown_gr
      service_data: {}
      target: {}
    name: VolDown
    show_icon: true
    icon: 'mdi:volume-minus'
    show_name: false
  - type: button
    tap_action:
      action: call-service
      service: script.bose_volup_gr
      service_data: {}
      target: {}
    name: VolUp
    icon: 'mdi:volume-plus'
    show_state: false
    show_icon: true
    show_name: false
  - type: button
    tap_action:
      action: call-service
      service: script.bose_power_gr
      service_data: {}
      target: {}
    icon: 'hass:power'
    show_name: false
    hold_action:
      action: call-service
      service: script.roke_power_gr
      service_data: {}
      target: {}
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Home
      target: {}
    icon: 'hass:home'
    show_name: false
    hold_action:
      action: call-service
      service: script.roku_home_gr
      service_data: {}
      target: {}
  - type: button
    tap_action:
      action: call-service
      service: media_player.media_play_pause
      service_data: {}
      target:
        device_id: 59c1323c2a6e602d38370a6fe8501a27
    name: Play
    icon: 'hass:play-pause'
    show_name: false
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Stop
      target: {}
    icon: 'mdi:stop'
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.ContextMenu
      target: {}
    icon: 'mdi:menu'
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Up
      target: {}
    name: Up
    hold_action:
      action: call-service
      service: script.roku_up_gr
      service_data: {}
      target: {}
    icon: 'hass:arrow-up'
    show_name: false
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Info
      target: {}
    icon: 'mdi:information-outline'
    hold_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: VideoLibrary.Scan
      target: {}
    show_state: false
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Left
      target: {}
    name: Left
    hold_action:
      action: call-service
      service: script.roku_left_gr
      service_data: {}
      target: {}
    icon: 'hass:arrow-left'
    show_name: false
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Select
      target: {}
    name: OK
    show_icon: true
    show_name: false
    hold_action:
      action: call-service
      service: script.roku_ok_gr
      service_data: {}
      target: {}
    icon: 'hass:select'
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Right
      target: {}
    name: Right
    hold_action:
      action: call-service
      service: script.roku_right_gr
      service_data: {}
      target: {}
    icon: 'hass:arrow-right'
    show_name: false
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Input.Back
      target: {}
    name: Back
    hold_action:
      action: call-service
      service: script.roku_back_gr
      service_data: {}
      target: {}
    icon: 'mdi:backburger'
    show_name: false
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: light.espixelstick
      target: {}
    show_name: false
    name: Down
    hold_action:
      action: call-service
      service: script.roku_down_gr
      service_data: {}
      target: {}
    icon: 'hass:arrow-down'
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Player.SetSubtitle
        playerid: 1
        subtitle: next
        enable: true
      target: {}
    icon: 'mdi:subtitles-outline'
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Player.Seek
        playerid: 1
        value: smallbackward
      target: {}
    icon: 'hass:rewind'
    hold_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Player.Seek
        playerid: 1
        value: bigbackward
      target: {}
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Player.SetSpeed
        playerid: 1
        speed: increment
      target: {}
    hold_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Player.SetSpeed
        playerid: 1
        speed: decrement
      target: {}
    icon: 'mdi:arrow-left-right-bold-outline'
  - type: button
    tap_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Player.Seek
        playerid: 1
        value: smallforward
      target: {}
    icon: 'hass:fast-forward'
    hold_action:
      action: call-service
      service: kodi.call_method
      service_data:
        entity_id: media_player.libreelec
        method: Player.Seek
        playerid: 1
        value: bigforward
      target: {}

can u share your script file for this remote .
thx

Hey,

Does anyone know how to launch an addon? or the TV guide/recorded episodes? I am using the TVHeadEnd addon on kodi

I have tried and failed at understanding the JSON-RPC API.

Cheers
Danny

You have to edit your Kodi settings, see: how to change how much fast forward and rewind skip?

Locations of the advancedsettings.xml file (you may have to create it) can be found in the table lower down on this page if Kodi is not installed on Windows: https://kodi.wiki/view/HOW-TO:Modify_time_seeking

I just created the advancedsettings.xml file with this inside:

<advancedsettings>
  <video>
    <timeseekforward>10</timeseekforward>  <!-- Time to seek forward in seconds when doing a short seek.  Defaults to 30. -->
    <timeseekbackward>-10</timeseekbackward>  <!-- Time to seek backward in seconds when doing a short seek.  Defaults to -10. -->
    <timeseekforwardbig>30</timeseekforwardbig>  <!-- Time to seek forward in seconds when doing a long seek.  Defaults to 600 (30 minutes). -->
    <timeseekbackwardbig>-30</timeseekbackwardbig>  <!-- Time to seek forward in seconds when doing a long seek.  Defaults to -600 (10 minutes). -->
  </video>
</advancedsettings>

And after a restart of Kodi it works perfectly. +10, -10, +30, and -30 second skips.

Tom,

Thank you for responding.
I now get why my changes to the skipstep under player settings in Kodi had no effect as it was an advanced setting.
Do you have a list of the commands that can be used via scripts?
On my physical remote I used right and left to skip the steps under player settings and it was nice to keep and as of now it doesn’t seem to work via the script.
I have also unsuccessful tried to call sendtext with the value e to get the EPG guide showing up but that doesn’t work.
Any links you might have to the commands would be greatly appreciated.