MythTV Status doesn't work with MythTV 0.25

Bug #945582 reported by Stefan Lands on 2012-03-03
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
mythtv-status (Ubuntu)
Low
Thomas Mashos

Bug Description

mythtv-status does not work properly. In Ubuntu 12.04 I get the following error message:

buddha@precisetest:~$ mythtv-status
Sorry, failed to fetch http://localhost:6544/xml:
404 Not Found

mythtv-backend is running well.

Thomas Mashos (tgm4883) wrote :

12.04 ships with MythTV 0.25. MythXML has been replaced by the Serivices API in MythTV 0.25. To get the XML, the new link is

http://localhost:6544/Status/GetStatus

Supposedly the author of mythtv-status has a fix for this but it's unknown if it's been released yet (http://www.gossamer-threads.com/lists/mythtv/users/498210#498210). We should probably carry a patch for this if it's not fixed.

Changed in mythtv-status (Ubuntu):
status: New → Confirmed
MarcRandolph (mrand) on 2012-03-03
Changed in mythtv-status (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Andrew Ruthven (andrew-etc) wrote :

Yes, I have a fixed version for this. I haven't released yet because I've been trying to resolve an issue with mythtv-status hanging around waiting to hear back from the MythTV backend.

Mario Limonciello (superm1) wrote :

Whenever you have a fix for this, we should certainly SRU the new version into Ubuntu 12.04.

summary: - mythtv-status fails to fetch from http://localhost:6544/xml:
+ MythTV Status doesn't work with MythTV 0.25
Argenis Tovar (argenis-tovar) wrote :

Here is a temporary solution:

1) backup your current mythtv-status script
    cd /usr/bin
    mv mythtv-status{,.backup}
2) Use vi to create a new blank /usr/sbin/mythtv-status and add the following:

#!/bin/bash
/usr/bin/lynx -dump localhost:6544/Status/GetStatusHTML | grep '\[' | sed 's/\[.*\]//g; s/not$/not recording/; s/^ *Encoder/Encoder/'

This should suffice until the real working version is released.

Stefan Lands (wireded) wrote :

This will do the job indeed. Thank you for this.

Hey..

done #4 and it worked perfect.. hope soon the new mythtv-status is available any compatible with 0.25...

thomi

Andrew Ruthven (andrew-etc) wrote :

I've release version 1.10.1 of mythtv-status (also in Debian Sid) that adds support for MythTV 0.25.

Hans Hellén (hans-hellen) wrote :

A problem with the workaround presented in comment #4 is the output time format, which is not understood by a command line program called date. From http://localhost:6544/Status/GetStatus one perhaps could get ISODate formatted times.

Andrew Ruthven (andrew-etc) wrote :

My recommendation would be to use the latest version of mythtv-status which supports MythTV 0.25.

Hans Hellén (hans-hellen) wrote :

When using the long-term support version 12.04 Precise Pangolin one might find these lines helpful:

# check the status:
if /usr/bin/lynx -dump localhost:6544/Status/GetStatusHTML | grep -e "is watching Live TV" -e "and is recording";
 then echo "Recording Now";
fi

# In this year, 2012, one can use these funny lines to get the time of the next recording in a decent format.
# You have to first do the complete conversion of mythtv-status as instructed in the comment #4 above:
# scheduled next:
mythtv-status | grep " " | (read -n 19 i; echo $i;) | cut -c 12-16 > ~/recordings1-time.txt;
# Day
mythtv-status | grep " " | (read -n 19 i; echo $i;) | cut -c 5-6 > ~/recordings1-dd.txt;
# Month
mythtv-status | grep " " | (read -n 19 i; echo $i;) | cut -c 8-9 > ~/recordings1-mm.txt;
# in the end in a decent format:
echo 2012-$(cat ~/recordings1-mm.txt)-$(cat ~/recordings1-dd.txt) $(cat ~/recordings1-time.txt) > ~/recordings1-date.txt;

Andrew Ruthven (andrew-etc) wrote :

Could someone please provide me the output of http://localhost:6544/Status/GetStatusHTML (either ysuse lynx -dump or wget) and I'll see if I can fix up the date logic in mythtv-status rather than using a hack.

Ben (bzeghers) wrote :
Andrew Ruthven (andrew-etc) wrote :

Thanks Ben, Ah ha that's the HTML version, how about http://localhost:6544/Status/GetStatus ? That is what mythtv-status will attempt to fetch as it is XML.

Andrew Ruthven (andrew-etc) wrote :

Ah, I just clicked what comment #4 is about. The Data format issue in #10 does not affect the real mythtv-status.

Better temporary solution:

edit mythtv-status, search for "http://" and change "xml" on that line to "/Status/GetStatus".

But I'll push out 0.10.2-2 shortly that is a much better fix (and includes a few other bug fixes).

Stefan Lands (wireded) wrote :

Is there any information when 0.10.2-2 will be released? Will it be available through the official updates? Or do I have to add mythbuntu repository to update? If not through the official way, I would prefer a simple .deb package.

Thanks

Andrew Ruthven (andrew-etc) wrote :

Hi, 0.10.2-2 has been released and uploaded to Debian Unstable. I'm not sure when it'll trickle through to Ubuntu.

You can also fetch it from own repo, add this to an apt sources file:

deb http://debian.etc.gen.nz sid main

(See http://www.etc.gen.nz/projects/mythtv/mythtv-status.html for more details)

Stefan Lands (wireded) wrote :

Ah. Thanks Andrew for the quick reply. I tried the deb from quantal and installed it manually using dpkg. Works like a charm.

Thank you very much for this. I hope the maintainers of the universe will add this update to their repository. Still four and a half years to go until next LTS.

Thomas Mashos (tgm4883) wrote :

I've uploaded this to the 0.26 and 0.25 PPA's for precise. Working on getting this into the main precise repositories

Changed in mythtv-status (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Thomas Mashos (tgm4883)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers