Author Topic: Kodi Live TV Help  (Read 6053 times)

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Kodi Live TV Help
« Reply #15 on: January 09, 2016, 03:26:01 PM »
Or you can try "channel up" and "channel down" :

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<command id="931" name="Channel {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Based on keymap actions for Kodi found here: http://kodi.wiki/view/Keymap#Commands">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Input.ExecuteAction</param>
      <param>"action":"channel{1}"</param>
    </params>
    <cmdRepeat>{1}</cmdRepeat>
  </action>
  <phrase>Channel</phrase>
  <payloadList>up,down</payloadList>
</command>

These are based on Kodi's PVR keymap actions: http://kodi.wiki/view/Keymap#Commands

If these work, you could explore the list and try creating other commands using other keymap actions for PVR or TV navigation, based on this example.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

eugekiller

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 0
    • View Profile
Re: Kodi Live TV Help
« Reply #16 on: January 09, 2016, 05:37:13 PM »
Is there a way to get the current channel that on?

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Kodi Live TV Help
« Reply #17 on: January 10, 2016, 11:13:46 AM »
Apart from all of the various things I explained and suggested that you can experiment with above, you can also browse the 5-page thread that already exists about controlling XBMC/Kodi Live TV to see if any commands meet your needs.

http://voxcommando.com/forum/index.php?topic=1074.0
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

eugekiller

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 0
    • View Profile
Re: Kodi Live TV Help
« Reply #18 on: January 10, 2016, 12:18:56 PM »
I have been on that page its mostly tv guide info.. Not tv guide with my channels so those commands dont really work i did use some from those areas.

But no where in there have i seen for TTS to say what channel you are on. The tv guide part just tells what show which it gets the info from a web site. As you remember my channels are in Russian and all mixed the hell up. And using not the original payload but a translation of the original payload.

All i want is for it to tell me what channel i am on. And maybe show through the vox addon the channel name also.
The next channel code that you gave me before also dont work cause i am not using the original payload but the translation one so no values there.

This is what i got so far for my Live TV

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<commandGroup open="True" name="Kodi Live TV" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="711" name="Switch to channel short cut {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>XbmcPayloads\xbmcTvChannels.xml</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>Player.Open</param>
        <param>"item" : {"channelid" : {LastResult}}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Switch to, Go to, Start</phrase>
    <phrase>Channel</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\Channel_translations.xml</payloadFromXML>
  </command>
  <command id="122" name="List TV channels" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window" : "tvchannels"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>List TV channels</phrase>
  </command>
  <command id="769" name="Next channel" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PayloadXML.GetRandomP</cmdType>
      <params>
        <param>XbmcPayloads\xbmcTvChannels.xml</param>
        <param>2</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>(A)==(B)</ifType>
      <ifParams>{Match.1}&amp;&amp;{var.channel}</ifParams>
      <then>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Switching to channel: {Match.1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PayloadXML.GetValue</cmdType>
          <params>
            <param>XbmcPayloads\xbmcTvChannels.xml</param>
            <param>{Match.1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.Raw</cmdType>
          <params>
            <param>Player.Open</param>
            <param>"item" : {"channelid" : {LastResult}}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>channel</param>
            <param>{Match.1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Switching to channel: {Match.2}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PayloadXML.GetValue</cmdType>
          <params>
            <param>XbmcPayloads\xbmcTvChannels.xml</param>
            <param>{Match.2}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.Raw</cmdType>
          <params>
            <param>Player.Open</param>
            <param>"item" : {"channelid" : {LastResult}}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>channel</param>
            <param>{Match.2}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Next channel</phrase>
  </command>
</commandGroup>

I have figured out a lot for now with your and james's help. But still missing the next channel previous chanel. And what channel is this.  The list tv channels doesnt list the tv channels from my translation but the 477 channels from kodi.
« Last Edit: January 10, 2016, 12:24:09 PM by eugekiller »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Kodi Live TV Help
« Reply #19 on: January 10, 2016, 12:59:32 PM »
To be clear: Your commands still use the original XbmcTvChannels.xml payload XML file.

If you look at the command itself, you can see that within the command it's still using the XbmcTvChannels.xml file. The other file is just for you, not for Kodi.

There is, I'm sure, a way to get information about the channel you are watching. But as I said before, I don't have live TV so I have no way to figure this out.

I gave you links to 2 different Kodi pages that list a large number of different commands you can use with Kodi. It's Kodi that determines what you can ask for, and what kind of information is returned, not VoxCommando.

I suggested that you go look at the keymaps web page and see if any of the listed actions would be of use to you. Did you try that?

For example, one of them is the "info" key. The Kodi web page describes it as:
Quote
Show the information about the currently highlighted item, or currently playing item.

Maybe that "Info" will show you the channel number and channel name -- I have no idea.

If it doesn't, then you can go ask on the Kodi forums what kind of querying you would need to do to find a channel number -- if it's so important to have the channel number. Or whatever information it is that you want.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Kodi Live TV Help
« Reply #20 on: January 10, 2016, 01:03:06 PM »
The next channel code that you gave me before also dont work cause i am not using the original payload but the translation one so no values there.

I have figured out a lot for now with your and james's help. But still missing the next channel previous chanel. And what channel is this.  The list tv channels doesnt list the tv channels from my translation but the 477 channels from kodi.

As I keep saying, you *are* still using the original payload, if you're using the commands I gave you.

What about the "channel up" "channel down" key map command that I provided yesterday? Does that work? If it does not work, that has nothing to do with the fact that you have an extra payload XML file that translates the channel names. That command doesn't even use those payload XML files.

So, if the channel up / channel down command doesn't work, you should look in your history window or log to see what kind of error message is generated (if any), and let us know what errors you are receiving. That's the only way we can help.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi Live TV Help
« Reply #21 on: January 10, 2016, 03:40:50 PM »
Or you can try "channel up" and "channel down" :

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<command id="931" name="Channel {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Based on keymap actions for Kodi found here: http://kodi.wiki/view/Keymap#Commands">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Input.ExecuteAction</param>
      <param>"action":"channel{1}"</param>
    </params>
    <cmdRepeat>{1}</cmdRepeat>
  </action>
  <phrase>Channel</phrase>
  <payloadList>up,down</payloadList>
</command>

These are based on Kodi's PVR keymap actions: http://kodi.wiki/view/Keymap#Commands

If these work, you could explore the list and try creating other commands using other keymap actions for PVR or TV navigation, based on this example.

These commands work perfectly.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi Live TV Help
« Reply #22 on: January 12, 2016, 10:07:21 AM »
All i want is for it to tell me what channel i am on.

You should be able to get the current channel name using the same method that is used to ask what song is playing, what movie you are watching etc.

This should work:

It also shows the channel ID although I'm not sure what use that would be.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.5-->
<command id="544" name="What channel is this" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Player.GetItem</param>
      <param>"playerid":1</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>You are watching {item.label}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>You are watching {item.label} (ID: {item.id})</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>What channel is this</phrase>
</command>