SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-02-2018, 01:41 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Is there an innocuous way to test a sage/sagex URL?

I have written an IP driver for SageTV for my Control4 Home Automation system that uses the same URL calls as used by the SageTV Web Remote Control. So
Code:
http://sage:frey@192.168.1.99:7070/sage/SageCommand?context=001d6a4cf499&command=Play
will be the same as pressing the Play key on the remote.

But there are a lot of fields to be entered by the user, username, password, Server IP and Extender MAC address, so it is very possible to make a user. So I want a way to test the URL.

Is there a good command to issue that is innocuous in that it won't affect playback? Right now I am using the Home command, but that throws you back to the Main Menu screen.
__________________
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 01-02-2018, 02:11 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wayner View Post
I have written an IP driver for SageTV for my Control4 Home Automation system that uses the same URL calls as used by the SageTV Web Remote Control. So
Code:
http://sage:frey@192.168.1.99:7070/sage/SageCommand?context=001d6a4cf499&command=Play
will be the same as pressing the Play key on the remote.

But there are a lot of fields to be entered by the user, username, password, Server IP and Extender MAC address, so it is very possible to make a user. So I want a way to test the URL.

Is there a good command to issue that is innocuous in that it won't affect playback? Right now I am using the Home command, but that throws you back to the Main Menu screen.
I usually use command=GetServerAddress

http://download.sage.tv/api/sage/api...ServerAddress()

It's a pretty simple call that just returns the IP address of the server, so I use that when I need to test a URL.
Reply With Quote
  #3  
Old 01-02-2018, 02:40 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Thanks, Sean that appears to work.

One further question that you would be best to answer - is there any way to remotely get an AndroidTV device to activate the SageTV app? With an extender you can telnet in and send a "killall waitpower" command - is there anything analogous for AndroidTV? I am guessing not as this would be kind of a security risk.
__________________
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 01-02-2018, 02:48 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wayner View Post
Thanks, Sean that appears to work.

One further question that you would be best to answer - is there any way to remotely get an AndroidTV device to activate the SageTV app? With an extender you can telnet in and send a "killall waitpower" command - is there anything analogous for AndroidTV? I am guessing not as this would be kind of a security risk.
Out of the box, no. You'd need to write some kind of service on android that listens for a conection request and then uses an Intent to start the miniclient, but even then, the miniclient would not directly connect to a server unless you had it set to auto connect.
Reply With Quote
  #5  
Old 01-03-2018, 12:04 PM
thopkin1 thopkin1 is offline
Sage User
 
Join Date: Sep 2010
Location: Cleveland, OH
Posts: 31
While stuckless is correct that you need to program the mini-client with the server address for terms of automation you can use android adb to connect to an AndroidTV device and start an app with the following command (I think):
adb shell am start -n com.package.name/com.package.name.ActivityName
you will need to know/figure out the package name and update accordingly.
Reply With Quote
  #6  
Old 01-03-2018, 12:18 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I don't know much about Android but don't you have to root your Android device to install adb?
__________________
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 01-03-2018, 12:32 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wayner View Post
I don't know much about Android but don't you have to root your Android device to install adb?
No, but you'll need to enable the development mode on the device and then grant access to it over the network when you connect (the first time).

You can then start an app, but, you can't control it... just start it.
Reply With Quote
  #8  
Old 01-03-2018, 12:49 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Ok cool. Looking into this a bit more - according to a Reddit thread you may have to connect via USB and enable port 5555.
Quote:
After doing some more digging, apparently port 5555 on the mi box is closed by default which is needed for wifi adb.

So to open port 5555, you need to use adb over usb first with an A to A usb cable, connect with adb usb and type adb tcpip 5555
__________________
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
  #9  
Old 01-03-2018, 12:56 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wayner View Post
Ok cool. Looking into this a bit more - according to a Reddit thread you may have to connect via USB and enable port 5555.
Yeah, on the NVidia shield, you'll be ok. On the MiBox, not sure, and the google nexus box, yes, you'll need to connect via usb first.

To be honest, while this process works, it is not trivial. Although once you have it working, once, it should be ok.
Reply With Quote
  #10  
Old 01-03-2018, 01:17 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by stuckless View Post
To be honest, while this process works, it is not trivial. Although once you have it working, once, it should be ok.
Is there really much to it once you have the USB connection up?

Does this still look like the process to follow?
https://www.howtogeek.com/125769/how...ridge-utility/

Brings me back to my original DVR hacking days - hacking a Series1 TiVo to allow it to be used in Canada back in about 2002. That required a bit of work and a hacked-together ethernet connector for the TiVo called a TiVonet (later Turbonet). I think some of the recorded TV files that I still have in SageTV were recorded on one of those TiVos and then transferred to my PC.
__________________
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
  #11  
Old 01-07-2018, 04:15 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I played around with adb on my MiBox but it seems like more of a pain than anything else. You have to turn it on by connecting with a USB cable and enabling port 5555 for adb but it appears to me that you have to keep USB debugging enabled, even if you want to use adb over the LAN. That means that you can't use a USB-ethernet adapter. It also seems that it may reset all of this after a reboot of the device.
__________________
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
  #12  
Old 01-08-2018, 06:01 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wayner View Post
I played around with adb on my MiBox but it seems like more of a pain than anything else. You have to turn it on by connecting with a USB cable and enabling port 5555 for adb but it appears to me that you have to keep USB debugging enabled, even if you want to use adb over the LAN. That means that you can't use a USB-ethernet adapter. It also seems that it may reset all of this after a reboot of the device.
Yeah, it's meant as a development aid/tool, so it's not really intended for this type of purpose. Unless you need to run in development mode, I would not turn it on.
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
Looking to test the Sage waters gacevich SageTV Software 57 07-02-2015 04:36 AM
sagex-api Plugin MISSING: sagex-api-FAILED http://ubuntone.com/5NNCHGlywxvXBgRw8B3nMr antplugger SageTV v7 Customizations 10 06-10-2014 01:34 AM
Tivo user looking to test out Sage wolverines General Discussion 16 12-29-2008 05:11 PM
Test Sage through GraphEdit UFGrayMatter SageTV Software 0 02-14-2008 10:42 PM
Sage - Related Beta Test Apps available Xleon General Discussion 5 02-08-2006 04:44 PM


All times are GMT -6. The time now is 05:41 PM.


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