Changes to status.json response during channel playback

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
simora
Posts: 5
Joined: Tue Dec 31, 2019 8:57 am

Changes to status.json response during channel playback

Post by simora »

I have the HDHR3-CC and built a python script to poll my tuners for status information such as what channel is being tuned. That information was going to telegraf to be put into influxdb and used for graphing usage in Grafana. Slick right?

Then I decided to upgrade and my world fell apart. I went from 20180817 to 20190621 and now status.json reports tuned channels as frequencies rather than VctNumber. I upgraded another tuner from 20180817 to 20190417 and identified the change was made between those 2 versions. This would be fine if the change had been done in a thought out manner such that lineup.json reported frequencies for their VctNumber listed channels. So here I am with a broken script that reports channels as frequencies and no way to correlate that with the lineup.json to get meaningful information about what channels are being tuned.

Silicondust development team BUGFIX request:

Add VctNumber and VctName back to the status.json response during tuned channel state and add frequency to lineup.json. Then you will have proper correlation between the lineup.json and status.json responses. Please do so as soon as possible since I have no means to rollback to a working version.

simora
Posts: 5
Joined: Tue Dec 31, 2019 8:57 am

Re: Changes to status.json response during channel playback

Post by simora »

Further inspection of lineup.json shows that the appropriate entries to be added to status.json should be GuideNumber and GuideName and Frequency to be added to lineup.json.

signcarver
Expert
Posts: 8915
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 131B34B7 13231F92 1070A18E 1073ED6F 15300C36

Re: Changes to status.json response during channel playback

Post by signcarver »

FYI I was able to replicate with a prime... I'm curious if before you were using ota tuners and/or if the prime is/was not using a tuning adapter as I know with certain things when a TA is involved things become different.

When I use a quatro I get (status.json)

Code: Select all

  [
{
Resource: "tuner0",
VctNumber: "10.3",
VctName: "Heroes",
Frequency: 195000000,
SignalStrengthPercent: 100,
SignalQualityPercent: 85,
SymbolQualityPercent: 100,
TargetIP: "192.168.0.211"
},
{
. . .
]
But when I use a prime it is (status.json)

Code: Select all

[
{
Resource: "tuner0",
Frequency: 567000000,
SignalStrengthPercent: 100,
SignalQualityPercent: 100,
SymbolQualityPercent: 100,
TargetIP: "169.254.5.77"
},
. . .
]
by the way you may have shown me a network issue/quirk/engine bug as my prime seems to be streaming to my servio for live using apipa address though both have real private addresses

if you are not using a TA you can get frequency by adding ?tuning to the end of the request for lineup.json (I typically use <ip-of-tuner>/lineup.json?show=all&tuning but in this case it would be & rather than ? as only the first parameter gets ?)

With the quatro results would be (using same entry as above and adding ?tuning)

Code: Select all

{
GuideNumber: "10.3",
GuideName: "Heroes",
TransportStreamID: 193,
Modulation: "8vsb",
Frequency: 195000000,
ProgramNumber: 4,
VideoCodec: "MPEG2",
AudioCodec: "AC3",
URL: "http://192.168.0.16:5004/auto/v10.3"
}

and prime without TA

Code: Select all

{
GuideNumber: "12",
GuideName: "NBCHD",
Modulation: "auto",
Frequency: 567000000,
ProgramNumber: 2,
VideoCodec: "MPEG2",
AudioCodec: "AC3",
HD: 1,
URL: "http://192.168.0.17:5004/auto/v12"
}
prime with TA

Code: Select all

{
GuideNumber: "12",
GuideName: "NBCHD",
VideoCodec: "MPEG2",
AudioCodec: "AC3",
HD: 1,
URL: "http://192.168.0.17:5004/auto/v12"
}
I would disagree that they would need to change vct to guide between the different requests... I also disagree it would be fine for such reported frequency as you would still need the program id as well, so it would probably be nice if status.json showed program id as well.

simora
Posts: 5
Joined: Tue Dec 31, 2019 8:57 am

Re: Changes to status.json response during channel playback

Post by simora »

I didn't know about lineup.json?show=all&tuning. Consistency however it be is better than WAG as to which fields match which other fields.

Also no TA and no change to devices, path, topology... etc. Simply upgraded my Prime from 2018 to 2019* firmware and change to status.json output.

nickk
Silicondust
Posts: 15908
Joined: Tue Jan 13, 2004 9:39 am

Re: Changes to status.json response during channel playback

Post by nickk »

Problem confirmed and fixed.

Beta release should be out later this week.

Nick

simora
Posts: 5
Joined: Tue Dec 31, 2019 8:57 am

Re: Changes to status.json response during channel playback

Post by simora »

Well i look forward to installing that. Beta firmware is available via the forums or is there a program i have to register for?

jasonl
Expert
Posts: 15246
Joined: Sun Oct 28, 2007 9:23 pm

Re: Changes to status.json response during channel playback

Post by jasonl »

You can subscribe to the changelog thread at viewtopic.php?f=126&t=32339 to get a notification of updates, and download from viewtopic.php?f=126&t=20613.

nickk
Silicondust
Posts: 15908
Joined: Tue Jan 13, 2004 9:39 am

Re: Changes to status.json response during channel playback

Post by nickk »

Beta release: viewtopic.php?f=126&t=20613

Nick

simora
Posts: 5
Joined: Tue Dec 31, 2019 8:57 am

Re: Changes to status.json response during channel playback

Post by simora »

The firmware looks good. Restored the previous behavior. Thank you very much for your teams fast resolution.

Post Reply