Author Topic: XML Payload Help PVR  (Read 4945 times)

0 Members and 1 Guest are viewing this topic.

eugekiller

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 0
    • View Profile
XML Payload Help PVR
« on: January 30, 2016, 07:00:32 PM »
Ok so i use this as the xml to open up the channels.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<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>


My payload looks like this:


<value>Первый канал (Европа)</value>

<phrase>B Two </phrase>

</payload>


-<payload>

<value>Первый канал</value>

<phrase>B Three </phrase>

</payload>


-<payload>

<value>Первый канал (+6)</value>

<phrase>B Four </phrase>

</payload>


-<payload>

<value>Первый канал (СНГ)</value>

<phrase>B Five </phrase>

</payload>


-<payload>

<value>Россия 1 (+6)</value>

<phrase>B Six </phrase>

</payload>

any way to make it switch up or down depending on the order?

So example if i am on "Первый канал" and i say channel up it will go to "Первый канал (+6)"

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XML Payload Help PVR
« Reply #1 on: January 31, 2016, 07:59:17 AM »
We already provided you with channel up and channel down commands. Starting another thread to ask a question that has already been asked and answered just makes a mess out of the forum so I will now delete this crosspost.

eugekiller

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 0
    • View Profile
Re: XML Payload Help PVR
« Reply #2 on: January 31, 2016, 11:23:09 AM »
The channel up and down doesnt wok it throws me in to the main screen of kodi. It only works if the live tv (APP or what ever you want to call it) is actually open. In my case it is never actually open but it just goes straight to kodi player for that channel. Then also as you can see in my thread i dont need channel up or down from the original payload that is generated. I am using a translation of the original payload. And would like to know if its possible to switch channels up or down in the translation payload.

I hope that explains it a bit better. If you look at the code that i posted you might see what i mean. I also pasted a brief translation payload.

eugekiller

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 0
    • View Profile
Re: XML Payload Help PVR
« Reply #3 on: January 31, 2016, 11:30:53 AM »
]This code switches the channel for me but it uses the original payload that sql generates but i would like to use the translation payload.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<command id="753" 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>

So its king of hard to explain lol

lets say original payload has: 1, 2, 3, 4, 5, 6, 7, 8, 9
my translation has: 1 as 5 from original payload, 2 as 8 from original payload, 3 as 2 from original payload
so if i am on channel 2 of the translation payload and i say next channel it goes to channel 9 of the original payload.
« Last Edit: January 31, 2016, 11:38:16 AM by eugekiller »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XML Payload Help PVR
« Reply #4 on: January 31, 2016, 12:28:22 PM »
Yes, there's almost always a solution, but more information would be helpful.

1. Do you use methods other than VoxCommando to change TV channels in Kodi (e.g. with a handheld remote), or do you always use voice commands to switch the channels?

2. Can you please enable logging in VoxCommando, then change the channels a few times, and then upload your log here. If you use other methods apart from voice commands to change the channels, then:

a. change channels using all the methods (both with voice commands and the other methods)
b. keep track of what you've done, and the order you did it in, and explain exactly what you did when you post your log.

Once I have the above information I can probably help you, but it will involve making some edits to your special Channel_translations.xml file.
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: XML Payload Help PVR
« Reply #5 on: January 31, 2016, 11:53:17 PM »
I only use VOX to go to channels.

So i opened channel B Five using VOX (B Five is from the translation payload). Then i said next channel it changed to next channel but not from the translation payload it used the original payload.

I hope that explains it.

lets say original payload has: 1, 2, 3, 4, 5, 6, 7, 8, 9
my translation has: 1 as 5 from original payload, 2 as 8 from original payload, 3 as 2 from original payload
so if i am on channel 2 of the translation payload and i say next channel it goes to channel 9 of the original payload.
« Last Edit: January 31, 2016, 11:56:48 PM by eugekiller »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XML Payload Help PVR
« Reply #6 on: February 01, 2016, 11:30:56 AM »
OK. You will need to delete any existing "Live TV" channel commands in your Command Tree that select or switch the channels, and replace them with the following command group:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="True" name="New TV channel group for eugekiller" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="723" 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>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>XJson.Raw</cmdType>
          <params>
            <param>Player.Open</param>
            <param>"item" : {"channelid" : {LastResult}}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PayloadXML.GetPhrase</cmdType>
          <params>
            <param>payloads\Channel_translations.xml</param>
            <param>{1}</param>
            <param>First</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>curChannel</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Sorry. {1} does not appear in the Kodi channel list.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <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>
    <event>channelSwitch</event>
  </command>
  <command id="142" name="channel up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result = {var.curChannel}+1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>curChannel</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>payloads\Channel_translations.xml</param>
        <param>{var.curChannel}</param>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>channelSwitch</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Sorry, it looks like you're already on the highest channel.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result = {var.curChannel}-1</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>curChannel</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>channel up</phrase>
  </command>
  <command id="160" name="channel down" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result = {var.curChannel}-1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>curChannel</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>payloads\Channel_translations.xml</param>
        <param>{var.curChannel}</param>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>channelSwitch</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Sorry, you're already on the lowest channel</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result = {var.curChannel}+1</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>curChannel</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>channel down</phrase>
  </command>
</commandGroup>

EDIT: You also need to enable the Python (PY) plugin, if it is not yet enabled in your configuration.

And, you need to replace your existing Channel_translations.xml file in your payloads folder with the one attached to this post.

The difference is that all of the channels in the new file have an additional, incremented "dummy payload number," so that VC can figure out what channel is up or down from the current channel.

The new command group has three commands:
1. Switch to/start/go to channel X
2. Channel up
3. Channel down

When you first want to watch your TV channels, you will first need to use Command 1. After that, the channel up and down commands should work at any point.

If you use some other method to first load a channel, channel up or down will not know what channel you're currently on so they won't work.

Note: I have compared your channel translations payload xml file to the xbmcTVchannels payload xml file. There are a lot of channels in your translations file that don't exist in the Kodi channel list, and vice versa. I don't know if that matters to you or not. My commands above compensate for this somewhat, and will let you know if you've chosen a channel that Kodi cannot find.
« Last Edit: February 01, 2016, 12:26:38 PM by nime5ter »
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: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XML Payload Help PVR
« Reply #7 on: February 01, 2016, 11:39:59 AM »
so if i am on channel 2 of the translation payload and i say next channel it goes to channel 9 of the original payload.

I understand why you think this is the case, but if you're using the "next channel" command I provided for you a few weeks ago, that is not what is happening.

If you take a look at the macro for that command, you'll see that it uses the action PayloadXML.GetRandomP. This means that it will retrieve a random phrase from the xbmcTvChannels payload xml file. It then looks up the channel ID associated with that phrase, and switches to that channel.

So, it is not really getting the "next" channel in the list sequentially. It is just randomly setting your Kodi TV to a different channel.

That is why, when I originally posted the command, I asked whether you cared if the channel was really the "next" channel or whether you just wanted a way to switch channels in order to browse through the channels. I don't think you answered at that time.

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: XML Payload Help PVR
« Reply #8 on: February 03, 2016, 01:28:38 PM »
Ok so the channel up and channel down seems to crash kodi. I attached the log below. I go to channel B five it goes just fine when i say channel up crashes to main screen of kodi. Then i go to B Five again say channel down crashes to main screen of kodi.

« Last Edit: February 03, 2016, 01:34:15 PM by eugekiller »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XML Payload Help PVR
« Reply #9 on: February 03, 2016, 01:34:53 PM »
The log file appears to be empty. Is logging enabled?
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: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XML Payload Help PVR
« Reply #10 on: February 03, 2016, 02:15:12 PM »
Also: Did you delete the old commands that use the same phrases as the new commands that I provided above?

A few days ago, you said:
Quote
The channel up and down doesnt wok it throws me in to the main screen of kodi.

It sounds like that is what you are again experiencing, which makes me suspect that the old commands are still in your tree, and are being executed instead of the new ones that I provided.

You should not have different commands in your tree that are triggered by the exact same phrasing. The old commands need to be deleted.

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: XML Payload Help PVR
« Reply #11 on: February 03, 2016, 03:17:25 PM »
Yes i erased all the old commands for live tv. 

this is all i have for live tv:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<groupCollection open="True" name="Kodi LiveTV">
  <commandGroup open="True" name="Kodi Live TV" enabled="True" prefix="" priority="0" requiredProcess="" description="">
    <command id="727" 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>
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>LastActionSuccess</ifType>
        <ifParams>&amp;&amp;</ifParams>
        <then>
          <action>
            <cmdType>XJson.Raw</cmdType>
            <params>
              <param>Player.Open</param>
              <param>"item" : {"channelid" : {LastResult}}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>PayloadXML.GetPhrase</cmdType>
            <params>
              <param>payloads\Channel_translations.xml</param>
              <param>{1}</param>
              <param>First</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>curChannel</param>
              <param>{LastResult}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>OSD.ShowText</cmdType>
            <params>
              <param>Sorry. {1} does not appear in the Kodi channel list.</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <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>
      <event>channelSwitch</event>
    </command>
    <command id="150" name="channel up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>result = {var.curChannel}+1</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>curChannel</param>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>PayloadXML.GetValue</cmdType>
        <params>
          <param>payloads\Channel_translations.xml</param>
          <param>{var.curChannel}</param>
          <param>True</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>LastActionSuccess</ifType>
        <ifParams>&amp;&amp;</ifParams>
        <then>
          <action>
            <cmdType>VC.TriggerEvent</cmdType>
            <params>
              <param>channelSwitch</param>
              <param>{LastResult}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>OSD.ShowText</cmdType>
            <params>
              <param>Sorry, it looks like you're already on the highest channel.</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>PY.ExecString</cmdType>
            <params>
              <param>result = {var.curChannel}-1</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>curChannel</param>
              <param>{LastResult}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <phrase>channel up</phrase>
    </command>
    <command id="169" name="channel down" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>result = {var.curChannel}-1</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>curChannel</param>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>PayloadXML.GetValue</cmdType>
        <params>
          <param>payloads\Channel_translations.xml</param>
          <param>{var.curChannel}</param>
          <param>True</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <if ifBlockDisabled="False" ifNot="False">
        <ifType>LastActionSuccess</ifType>
        <ifParams>&amp;&amp;</ifParams>
        <then>
          <action>
            <cmdType>VC.TriggerEvent</cmdType>
            <params>
              <param>channelSwitch</param>
              <param>{LastResult}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </then>
        <else>
          <action>
            <cmdType>OSD.ShowText</cmdType>
            <params>
              <param>Sorry, you're already on the lowest channel</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>PY.ExecString</cmdType>
            <params>
              <param>result = {var.curChannel}+1</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
          <action>
            <cmdType>Results.SetVar</cmdType>
            <params>
              <param>curChannel</param>
              <param>{LastResult}</param>
            </params>
            <cmdRepeat>1</cmdRepeat>
          </action>
        </else>
      </if>
      <phrase>channel down</phrase>
    </command>
    <command id="166" 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>Show all T V channels</phrase>
    </command>
    <command id="763" 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>
  <commandGroup open="True" name="Groups" enabled="True" prefix="" priority="0" requiredProcess="" description="">
    <command id="246" name="Entertainment Group" 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": "video", "parameters": [ "pvr://channels/tv/Развлекательные/" ]</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <phrase>Entertainment Group</phrase>
    </command>
    <command id="259" name="Mans Group" 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": "video", "parameters": [ "pvr://channels/tv/мужские/" ]</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <phrase>Mans Group</phrase>
    </command>
    <command id="273" name="Music Group" 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": "video", "parameters": [ "pvr://channels/tv/Музыка/" ]</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <phrase>Music Group</phrase>
    </command>
    <command id="244" name="Kids Group" 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": "video", "parameters": [ "pvr://channels/tv/Детские/" ]</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <phrase>Kids Group</phrase>
    </command>
  </commandGroup>
</groupCollection>

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XML Payload Help PVR
« Reply #12 on: February 03, 2016, 03:37:20 PM »
It looks like you didn't replace your payloads\Channel_translations.xml file with the one I posted above.

Even if you think you did, try downloading it again, and be sure that it replaces your original Channel_translations.xml file in your payloads folder.
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: XML Payload Help PVR
« Reply #13 on: February 03, 2016, 04:20:57 PM »
OMG IT WORK THANK YOU SO MUCH :)....

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XML Payload Help PVR
« Reply #14 on: February 03, 2016, 04:22:43 PM »
You're welcome.
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)