Signal Bar?
#1
Using Kodi Leia on a PI3b+ and a HDTC-2US.

I am noticing that when i am trying to pull up information on a channel, and i move over to section that displays signal quality, i am not getting a reading on the bar.  Any suggestions on this off of the bat?
Reply
#2
Not implemented.
Reply
#3
I should probably elaborate a bit more on why its unimplemented in case anyone else searches in the future.

Currently the addon uses the auto feature of the hdhomerun api, which means we never actually know the tuner that is being used for a stream. We are just given whatever the hdhomerun device chooses, and no info about what it chose is provided.

To implement this, you have 2 options from memory.
1st option is to not use auto, and do the tuner selecting using the libhdhomerun api in the addon itself. The downsides to this is just the complexity added to the code for what could be considered little benefit. I did start to try and implement this at one time for other reasons that escape me right now, and im honestly not sure what stopped me now.

2nd option is to just iterate over the libhdhomerun api and best match to the guessed tuner in use based off assumptions. The downside to this is it would be a guess. If you had two different devices watching the same stream (channel range) you wouldnt know which was which, so if the wrong tuner was closed/changed, you would get incorrect info or worse depending on how the outcome is handled. Ive never bothered to go far down this route to see how kodi/addon would cope with this.
Reply
#4
(2019-05-24, 00:26)Fuzzard Wrote: 2nd option is to just iterate over the libhdhomerun api and best match to the guessed tuner in use based off assumptions. The downside to this is it would be a guess. If you had two different devices watching the same stream (channel range) you wouldnt know which was which, so if the wrong tuner was closed/changed, you would get incorrect info or worse depending on how the outcome is handled. Ive never bothered to go far down this route to see how kodi/addon would cope with this.

If you have multiple tuners on the same box tuned to the same channel (regardless of subchannel), they will show close to the same or exactly the same for signal strength.  Choosing one at random would be sufficient.
Reply
#5
The use case is what happens when device one picks the tuner of device 2, which is changed on device 2? Device two changes to a different channel, or is stopped? How does device one know about the change?
Reply
#6
I don't understand what you're getting at.  So maybe we can figure out what both of us mean, if I am more explicit.

You know which tuner box is in use, because of the URL you've passed back in the stream info.  You can check the tuners on that box to find the program that you have tuned.  For example, I'm watching channel 16.1 on the box with ID 104094d7 right now.  I can hit this with the command-line tool provided by SD to find which tuner it is, as shown below.  The same calls can be made directly with the C api in the hdhomerun library, already linked into the PVR.

$ hdhomerun_config 104094d7 get /tuner0/streaminfo
1: 51.1 Daystar
2: 16.1 Retro
tsid=0x13D3

$ hdhomerun_config 104094d7 get /tuner0/program
2


Between the results of these two calls, it is clear that tuner 0 is providing the stream.  If the results don't match the desired program, go on to tuner1 (and further for a quad box).

Things get a bit harder if you're tuning through the SD Record engine.  The Record engine doesn't tell you what tuner box it is using, so you will need to check all tuner boxes for the channel.  And if you find the program on more than one box, you won't know which one to report.  The values may be different, however, they will probably be quite close to each other in a typical installation.
Reply
#7
Think multiple clients. 2 clients watching same channel (range). How do you know which tuner? You pick one, its the wrong one. The second client stops. Tuner you unknowingly picked no longer tuning anything. Multiple clients all use their own tuner, even if its the same channel with the current implementation.

The complications all stem once multiple clients are involved, which for me personally is more often than not.
Reply
#8
Im not saying it cant be done, but corner cases need to be considered, and for me i just never got around to it, and never really cared that much for the info to pursue it any further
Reply
#9
You're over-thinking this.  Probing for the streaminfo and program doesn't stop the stream.  It's totally safe to do that.  Try it from the command line, and you'll see.

If you pick the wrong tuner on the same box, just report what it says.  If the two tuners are on the same channel, they'll report almost exactly the same values, if not exactly the same values.
Reply
#10
Coming from 2 different directions here. The issue i see isnt from the backend. Its how kodi handles things. I personally dont have the time to look into it, and my assumptions could be completely incorrect, was just providing my thoughts on it.

Again, the above was just my insights when i looked into it a year or whatever ago. I couldnt guarantee correctness for the tuner and the device in a multiple device scenario with the current codebase (using auto tuner), so never bothered to go much further, as at the time i hadnt seen anyone ask or inquire about the feature at all. I had just put it down to not worth my time then.
Reply

Logout Mark Read Team Forum Stats Members Help
Signal Bar?0