[mythtv-users] APC PowerChute

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Dec 6 02:23:03 UTC 2015


On Fri, 4 Dec 2015 17:50:52 -0600, you wrote:

>This has been bugging me for quite some time.  It appears that the Frontend Services API runs on TCP port 6547.  Coincidentally this is also an APC registered port that the web services for PowerChute Network Shutdown (PCNS) uses.  
>
>So when the power goes out, I can’t use PCNS to shutdown the frontend before the battery dies.  Is there anything that can be changed on the frontend side to allow for this?

I took a look at the source code for 0.27-fixes, and the value for
that port does seem to have a setting in the settings table, but it is
also hard coded in the Python and PHP bindings, so changing it is
probably not a good idea.

Here are all the relevant references in the source code that I found:

mythtv/programs/mythfrontend/mediarenderer.cpp:    int nPort =
g_pConfig->GetValue( "UPnP/MythFrontend/ServicePort", 6547 );
mythtv/programs/mythfrontend/main.cpp:        int port =
gCoreContext->GetNumSetting("UPnP/MythFrontend/ServicePort", 6547);
mythtv/bindings/php/MythFrontend.php:    private $port_http = 6547;
mythtv/bindings/python/build/lib.linux-x86_64-2.7/MythTV/methodheap.py:
fd = urlopen('http://%s:6547/MythFE/GetScreenShot' % self.host)
mythtv/bindings/python/MythTV/methodheap.py:        fd =
urlopen('http://%s:6547/MythFE/GetScreenShot' % self.host)


Does the APC software have the ability to change its port number?


More information about the mythtv-users mailing list