Author Topic: New Commands Emby Theater  (Read 5211 times)

0 Members and 1 Guest are viewing this topic.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
New Commands Emby Theater
« on: May 21, 2015, 05:15:17 PM »
I added the following to VC. The commands are working well but any improvement to my approach would be welcomed.

Play Live TV Revised June 6, 2015

Music Playlists

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.5-->
<commandGroup open="False" name="MB3 Playlists" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="145" name="Play playlists" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{}({RIGHT}{RIGHT})</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>1000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>MB3.GeneralCommand</cmdType>
      <params>
        <param>MoveDown</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>MB3.GeneralCommand</cmdType>
      <params>
        <param>MoveDown</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>200</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>MB3.GeneralCommand</cmdType>
      <params>
        <param>Select</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>1000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>MB3.GeneralCommand</cmdType>
      <params>
        <param>Select</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Play playlists</phrase>
  </command>
</commandGroup>


Browse Live TV Channels

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.5-->
<command id="1226" name="Browse LiveTV Channels" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>InputKeys.Send</cmdType>
    <params>
      <param>{}({RIGHT}{RIGHT}{RIGHT}{RIGHT})</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>1000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>MB3.GeneralCommand</cmdType>
    <params>
      <param>MoveDown</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>200</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>MB3.GeneralCommand</cmdType>
    <params>
      <param>Select</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>go to, browse, browse to</phrase>
  <phrase optional="true">my</phrase>
  <phrase>Live TV  Stations, Live tee vee channels</phrase>
  <phrase optional="true">shows, series</phrase>
</command>

Play Live TV

This requires a payload XML. I obtained the info for the payload as follows:
Value: placing cursor over Channel name in Emby Server shows the required id
Phrase: Name of Channel

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.5-->
<commandGroup open="False" name="Play Live TV" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1257" name="Find/Play/Resume live TV {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>Selecting Channel {PF.2}</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>MB3.PlayItem</cmdType>
      <params>
        <param>{2}</param>
        <param>Play</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>2000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>........Selecting Channel {PF.2}.........</param>
        <param>7000</param>
        <param>125</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>Selecting Channel {PF.2}</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <payloadList>Display, Play, Find, Switch To, Feature, Go To</payloadList>
    <phrase>Live TV, Channel</phrase>
    <phrase optional="true">channel</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">MB3Payloads\Live TvChannels.xml</payloadFromXML>
  </command>
  <command id="1259" name="What channel is this" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>MB3.GetnowPlaying</cmdType>
      <params>
        <param>This is Channel: {Name}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
        <param />
        <param>125</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>What channel is this</phrase>
  </command>
</commandGroup>
« Last Edit: June 06, 2015, 02:32:26 PM by lja »

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: New Commands Emby Theater
« Reply #1 on: May 24, 2015, 02:02:37 PM »
VC:2.145
Windows 7

In EMBY dashboard under Live TV-Tuners, there are buttons to reset the Tuners.

https://dl.dropboxusercontent.com/u/19298307/tuners.JPG

Goal: To create a command to reset the Tuners and add it to the Live TV group

If this is possible, any guidance would be appreciated.
« Last Edit: June 05, 2015, 09:44:11 PM by lja »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: New Commands Emby Theater
« Reply #2 on: May 24, 2015, 02:22:28 PM »
Hi lja,

Thanks for posting your Emby solutions.

Unfortunately we do not have live TV here so it's difficult for James or I to assist with these types of commands. Maybe some other Emby users will have some ideas though.

One thing I am curious about is why you need to close Theater and re-open it in order to play a particular channel. Maybe you can explain more about that.

In general, I have some concerns about how commands that rely on keyboard emulation will translate to other users' needs.

My impression is that the commands you've posted so far may expect that users are always trying to execute them from the Emby Theater home page. Is that correct, or do they work no matter what screen you're on?

If not, you may at least want to add an action that takes that into account.

For the command in which you're closing and then re-launching Theater -- one concern there is that users might have multiple programs open, and Alt-F4 will close whichever program is focused. So if it's really necessary to do that, you should probably add a Windows.Focus action to that command before trying to close the program.

That said, ideally we wouldn't want to close and re-launch, so maybe that's something we can help find another solution for if you can explain more about that.

- Naomi
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: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: New Commands Emby Theater
« Reply #3 on: May 24, 2015, 02:52:26 PM »
Also, it seems like you are using a combination of keyboard emulation and Emby commands to move up, down, left, and right, and to select items.

Would it not be better (if possible) to ether use only keyboard emulation, or only Emby actions to move around?

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: New Commands Emby Theater
« Reply #4 on: May 24, 2015, 03:16:43 PM »
@nime5ter
@jitterjames

Thanks for your comments. Will review and respond.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: New Commands Emby Theater
« Reply #5 on: May 24, 2015, 05:46:00 PM »
Maybe I should indicate what I was trying to achieve. I am using OTA for live TV.

Goal: To play Live TV in Emby Theater

There would be four commands: Play Live TV, Show Live TV Guide from the Emby dashboard in full screen and Close Live TV Guide

The use ALT+F4 was to close Live TV Guide full screen before playing channel

Closing and reopening was not intended and is not necessary.

Based on your comments, maybe I should remove the posts above while I continue to further work on it including not using a combination of keyboard emulation and Emby commands.


nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: New Commands Emby Theater
« Reply #6 on: May 24, 2015, 06:12:10 PM »
I see. I didn't process that the Alt-F4 was specifically for the guide. Good to know.

I think it's fine to leave the XML you posted for now. You can always edit the post above to replace the commands if/when the time comes.

It wouldn't be the first time we've done that. I usually include a "date revised" note in my posts when I fix my own previously posted xml.
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)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: New Commands Emby Theater
« Reply #7 on: June 05, 2015, 09:55:21 PM »
Hi lja,

That said, ideally we wouldn't want to close and re-launch, so maybe that's something we can help find another solution for if you can explain more about that.

- Naomi

@nime5ter: I have revised the Play Live TV as indicated in the first post. Can you help me with the issue of the close and relaunch? I would like to be able to change the channel without having to go back to the home screen. Thanks for any help.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: New Commands Emby Theater
« Reply #8 on: June 06, 2015, 12:02:05 PM »
I do not have live tv so it's hard to know how to test your channel selection issue. When I have time I will see whether Emby has any kind of documentation that 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)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: New Commands Emby Theater
« Reply #9 on: June 06, 2015, 01:21:35 PM »
I would like to be able to change the channel without having to go back to the home screen. Thanks for any help.

Are you implying here that the MB3.PlayItem -> ChannelID action that you use in your Play Live TV command only successfully tunes to a TV channel if you issue the command while on the home screen, but that it doesn't allow you to tune in to a different channel when you're already watching a channel?

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)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: New Commands Emby Theater
« Reply #10 on: June 06, 2015, 02:14:06 PM »
Are you implying here that the MB3.PlayItem -> ChannelID action that you use in your Play Live TV command only successfully tunes to a TV channel if you issue the command while on the home screen, but that it doesn't allow you to tune in to a different channel when you're already watching a channel?

From the home screen the command plays the selected channel. While it will play the next channel selected, it returns to the home screen and then to the new channel. What i am trying to do is to get it to play the new channel without returning to the home screen. That is from channel to channel.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: New Commands Emby Theater
« Reply #11 on: June 06, 2015, 03:14:29 PM »
From the home screen the command plays the selected channel. While it will play the next channel selected, it returns to the home screen and then to the new channel. What i am trying to do is to get it to play the new channel without returning to the home screen. That is from channel to channel.

This appears to be how Emby works.  You are only using a single action to play an item so whatever you are seeing happen is due to the way Emby is handling it.  If you feel there is a problem with it going to the home screen before playing the new channel you should ask about it on the Emby forum.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: New Commands Emby Theater
« Reply #12 on: June 06, 2015, 03:18:23 PM »
This appears to be how Emby works.  You are only using a single action to play an item so whatever you are seeing happen is due to the way Emby is handling it.  If you feel there is a problem with it going to the home screen before playing the new channel you should ask about it on the Emby forum.

Thanks.