[mythtv-users] Way to check the status of a tuner from command line
Raymond Wagner
raymond at wagnerrp.com
Wed Sep 2 02:54:17 UTC 2009
Eric A. Boney wrote:
> So since I haven't been able to figure out the cause of my tuner going
> "off line" on my slave server I was hoping for a quicker fix for now.
> Seems that once this tuner goes unconnected, the only way to fix it is
> to reboot the server entirely. Even restarting the backend or stopping
> and then starting it again still won't bring the tuner back to a
> connected status on the master backend.
>
>
> So is there anyway I can test the status of this tuner from the
> command line so that I can setup a simple script to to reboot the
> system if the tuner is in a non-connected status?
Check the Python bindings.
from MythTV import MythTV
myth = MythTV()
myth.getRecorderList()
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
If the tuners are accessible and not in use, they will be 'free':
myth.getFreeRecorderList()
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
If they are not accessible, they will not be in the list:
myth.getFreeRecorderList()
[0]
If the tuner is not recording, it is 'offline':
myth.isRecording(1)
False
More information about the mythtv-users
mailing list