status.json issues

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
sdust
Posts: 177
Joined: Sat Jun 05, 2021 3:39 am
x 5

status.json issues

Post by sdust »

It seems the NetworkRate as reported by /status.json is very different from /tuner<n>/debug in net: bps=

Shouldn't they be the same?

Quoting Claude:
NetworkRate should be a rate (bytes/sec since last poll, or over a rolling window), not a counter that resets on an internal ~1s tick independent of poll timing.

jasonl
Silicondust
Posts: 17873
Joined: Sun Oct 28, 2007 9:23 pm
x 116

Re: status.json issues

Post by jasonl »

Just playing with it a bit, the debug number seems to be averaged over a longer period of time while the status.json is closer to instant, so the status one swings around more on channels encoded using variable bitrate.

sdust
Posts: 177
Joined: Sat Jun 05, 2021 3:39 am
x 5

Re: status.json issues

Post by sdust »

The status.json number is not an instant at all. Read the message from Claude. It displays a seesaw pattern because of the counter reset about every second.

Code: Select all

$ while :; do rate=$(curl -sS $TUNERIP/status.json |
  jq -r '.[] | select(.Resource == "tuner3") | .NetworkRate') && printf '%s %s\n' "$(date '+%H:%M:%S.%N')" "$rate"; done

22:41:13.466718888 6260480
22:41:13.514835181 0
22:41:13.562710155 397120
22:41:13.610510158 654080
22:41:13.661371822 1027840
22:41:13.709505775 1319840
22:41:13.757526974 1588480
22:41:13.804259962 2008960
22:41:13.851135452 2265920
22:41:13.897823617 2663040
22:41:13.944709055 2943360
22:41:13.991481555 3258720
22:41:14.038848599 3667520
22:41:14.086229030 3947840
22:41:14.134052646 4216480
22:41:14.181100908 4613600
22:41:14.227994018 4870560
22:41:14.275748878 5232640
22:41:14.323188507 5477920
22:41:14.370442508 5734880
22:41:14.418042844 6096960
22:41:14.467310603 6353920
22:41:14.514141940 128480
22:41:14.561604200 373760
22:41:14.609389439 630720
22:41:14.657992562 1016160
22:41:14.704834528 1284800
22:41:14.751599058 1693600
22:41:14.799013413 1973920
22:41:14.845806024 2242560
22:41:14.892806031 2663040
22:41:14.942648981 2931680
22:41:14.989716712 3293760
22:41:15.036788831 3644160
22:41:15.084442150 3936160
22:41:15.133576401 4344960
22:41:15.180441298 4613600
22:41:15.227292066 4999040
22:41:15.274956166 5267680
22:41:15.322185152 5548000
22:41:15.372798714 5945120
22:41:15.420112693 6213760

Image

nickk
Silicondust
Posts: 21128
Joined: Tue Jan 13, 2004 9:39 am
x 431

Re: status.json issues

Post by nickk »

They should be the same number. The status.json number doesn't look right... we will get it fixed.

Nick

Post Reply