SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-02-2023, 10:09 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Are IR commands accessible in the SageTV API?

Is there any way to send commands to an STB from within SageTV? Technically I am looking to send Firewire commands rather than IR, but presumably it is somewhat the same from Sage's perspective.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #2  
Old 02-02-2023, 03:51 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Does this help?

TransmitCommandUsingInfraredTuningPlugin

http://sagetv.com/api/sage/api/Global.html

On second look, I don't think that will help for firewire as it looks like the PlayCommand function in the native firewire code is empty.

https://github.com/google/sagetv/blo...irewireTuner.c
__________________
Windows Installer

Last edited by wnjj; 02-02-2023 at 03:56 PM.
Reply With Quote
  #3  
Old 02-02-2023, 05:12 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
That might work, but I have to figure out what parameters to use. Is there another command like "GetIRTuners"? I don't see one. I am not sure what to use for Tuning Plugin, etc. Or even command name? Is it VolUp, Volume Up?

And then how would I invoke it from within SageTV


Code:
TransmitCommandUsingInfraredTuningPlugin
public void TransmitCommandUsingInfraredTuningPlugin​(java.lang.String TuningPlugin, int TuningPluginPort, java.lang.String RemoteName, java.lang.String CommandName, int RepeatFactor)
Causes SageTV to instruct the specified tuning plugin to send a command
Parameters:
TuningPlugin - the name of the tuning plugin that should send the command
TuningPluginPort - the name of the port the specified tuning plugin is on
RemoteName - the name of the 'Remote Control' that should be used to send the command
CommandName - the name of the command to be sent
RepeatFactor - the 'repeat factor' to use for sending the infrared command, 2 is the default
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #4  
Old 02-02-2023, 05:27 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by wnjj View Post
On second look, I don't think that will help for firewire as it looks like the PlayCommand function in the native firewire code is empty.

https://github.com/google/sagetv/blo...irewireTuner.c
The Firewire functionality works very well within Linux,and it is even way easier to do then it was in Windows. It just works automagically without any external config, unlike Windows where you had to use other programs for tuning control and had to edit the registry. You just have to figure out the correct Firewire device, and that is it. For my system I have two STBs and two Firewire tuning devices - for example one of them is "Firewire Tuner Firewire STB 00223A17BEE40000". The second device just has a different hex number.

But one issue is that there may not be mapping for volume commands, just the number digits, power and enter.

So I might need a way to do this from a CLI command, and do that when the docker starts up. But the issue is how to find the commands. I have been googling and I can't find anything. Much of the stuff you find regarding Linux and Firewire is for MythTV.

When I look at that code I see:
Code:
remote *LoadRemotes(const char *pszPathName) {
  DebugLogging("LoadRemotes\n");
  remote *head = NULL;
  if (pszPathName) {
    DebugLogging("LoadRemotes %s\n", pszPathName);
    AddRemote(CreateRemote(newstr((char *)pszPathName)), &head);
    AddCommand(CreateCommand(newstr("0")), &(head->command));
    AddCommand(CreateCommand(newstr("1")), &(head->command));
    AddCommand(CreateCommand(newstr("2")), &(head->command));
    AddCommand(CreateCommand(newstr("3")), &(head->command));
    AddCommand(CreateCommand(newstr("4")), &(head->command));
    AddCommand(CreateCommand(newstr("5")), &(head->command));
    AddCommand(CreateCommand(newstr("6")), &(head->command));
    AddCommand(CreateCommand(newstr("7")), &(head->command));
    AddCommand(CreateCommand(newstr("8")), &(head->command));
    AddCommand(CreateCommand(newstr("9")), &(head->command));
    AddCommand(CreateCommand(newstr("POWER")), &(head->command));
    AddCommand(CreateCommand(newstr("ENTER")), &(head->command));
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #5  
Old 02-03-2023, 12:17 AM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Disclaimer: I know nothing about IEEE1394.

The stuff on https://www.mythtv.org/wiki/6200ch seems to line up with the SageTV code.

In the SageTV FirewireTuner.c setChannel function, I see calls with AVC1394_PANEL_COMMAND_PASS_THROUGH that use 0x67 as the argument. According to that mythtv code, 0x67 is kAVCPanelKeyTuneFunction which makes sense for a direct channel change. From that same page you can find volume up/down as 0x41/0x42. These also agree with the include file from Linux (https://github.com/jwilk-mirrors/lib...1394/avc1394.h) that list AVC1394_PANEL_OPERATION_VOLUME_UP/AVC1394_PANEL_OPERATION_VOLUME_DOWN as 0x41/0x42.

So I think you'd need some custom C code following the SageTV FirewireTuner.c example and instead send 0x41 (or several of them depending upon what volume up step size is). I assume you'd also need the press/release calls with/without the 0x80 in there. You can also consider modifying FirewireTuner.c yourself if you can compile the .so file and make yourself a custom one with volume up in it.
__________________
Windows Installer
Reply With Quote
  #6  
Old 02-03-2023, 07:56 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Thanks. That looks useful. My boxes are SA/Cisco, but I may be able to adapt this or find a SA version of this.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #7  
Old 02-03-2023, 10:04 AM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by wayner View Post
Thanks. That looks useful. My boxes are SA/Cisco, but I may be able to adapt this or find a SA version of this.
It looks to me like the command parts are generic. If the existing SageTV channel change code works for your box I think all you need is the 0x41 code.
__________________
Windows Installer
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to send commands to my STB from SageTV? wayner SageTV for unRAID/Docker 15 04-02-2023 11:37 PM
Using SageTV 'Custom' commands Dargason SageTV Software 4 02-19-2013 07:53 PM
SageTV only responds to 2 remote commands Reefkeeper Hardware Support 4 08-07-2011 08:22 PM
Getting Girder to send commands to SageTV always mattsm General Discussion 4 08-30-2005 06:07 PM
SageTV ignoring keyboard commands hamptonhills SageTV Beta Test Software 6 01-26-2004 08:35 AM


All times are GMT -6. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.