Feature #2616

show oscam reader status

Added by Pim Zandbergen almost 3 years ago. Updated 5 months ago.

Status:FixedStart date:2015-01-12
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:Descrambling
Target version:4.2

Description

I would love it if Tvheadend were able to show the name of the currently active reader and its EMM delay, retrieved from Oscam.
The new Oscam net protocol might be extendable for this purpose.
Ideally, this data would also be viewable in the XBMC/Kodi OSD.

screenshot078.png (1.82 MB) piotr galek, 2017-06-06 20:17

Associated revisions

Revision 1aa7dddb
Added by Jaroslav Kysela about 2 years ago

descrambler/htsp server: add descramble info message, fixes #2616

The sources are capmt (oscam's DVBAPI) ECM INFO and cwc (newcamd) client.
The latest DVBAPI network protocol should be used to get this info.

Revision dc6cd964
Added by Jaroslav Kysela about 2 years ago

WEBUI: Add descrambler info to the subscriptions grid, fixes #2616

History

#1 Updated by Sam Stenvall almost 3 years ago

I've never understood some peoples fascination with displaying all kinds of technical data about the CA system. If you want technical details, just log in to oscam? I doubt this kind of data will be integrated into Kodi since most PVR addons won't be able to supply this information.

#2 Updated by Pim Zandbergen almost 3 years ago

Sam Stenvall wrote:

If you want technical details, just log in to oscam?

It's so much easier to press "o" on my remote then to get my laptop up and running.
And it's sometimes hard to see which oscam details are related to the channel I'm viewing.
I don't need to see everything, just which cardreader is currenty supplying the EMM's, and its delay.

I doubt this kind of data will be integrated into Kodi since most PVR addons won't be able to supply this information.

Why not? Kodi already shows PVR-supplied stuff like signal strength and CA type in the codecinfo screen.

#3 Updated by Rafal Kupiec almost 3 years ago

It already shows which encyption is used (eg. Nagra) and there is CAID supplied in the parenthesis.
Unfortunately I have noticed that the showe CAID is not the same used by OSCam. So maybe this should be fixed?

#4 Updated by Pim Zandbergen almost 3 years ago

Rafal Kupiec wrote:

It already shows which encryption is used (eg. Nagra) and there is CAID supplied in the parenthesis.

I don't mean the CAID which is already there.
The CAID can be determined from the DVB signal by Tvheadend itself.

I mean, show the name of the name of the reader as labeled in oscam that is used to descramble the current channel.
A reader label could signify a local card or a remote server.
Oscam can have multiple readers, I'd like to see which one is currently being used.
As a plus, show the EMM delay, ie how long did it take the reader to produce the requested EMM.

#5 Updated by Rafal Kupiec almost 3 years ago

First of all you are misunderstanding what EMM is. I think you are talking about ECM.
This is what OSCam is responsible for and i agree you should launch `tail -F` on you oscam log file.

Finally, XBMC / Kodi is showing CAID, what is determined by Tvheadend itself, but its value doesn't show truth.
I noticed that oscam is frequently using different CAID that showed in client software. I think this could be fixed.

#6 Updated by Jaroslav Kysela almost 3 years ago

Rafal Kupiec wrote:

Finally, XBMC / Kodi is showing CAID, what is determined by Tvheadend itself, but its value doesn't show truth.
I noticed that oscam is frequently using different CAID that showed in client software. I think this could be fixed.

The interface is totaly bogus and CAID in HTSP only means that the channel is encrypted for services with more than one CAID, because only first CAID is passed to the HTSP client.

#7 Updated by Pim Zandbergen almost 3 years ago

yes please read ecm for every mention of emm

#8 Updated by Pim Zandbergen almost 3 years ago

I know how to use the Oscam web interface and logfiles.
I was merely suggesting it would be totally cool if relevant data could be shown within tvh and specifically within the Kodi codecinfo screen.

The new Oscam interface introduced in revision 10087 is an extendable protocol which might allow to pass this data.

Another possible extension would be if tvh were to pass the channel name to oscam, so oscam can show the channel name from tvh rather than the one in oscam.srvid.

#9 Updated by Pim Zandbergen over 2 years ago

I see the first important step being taken:
http://www.streamboard.tv/oscam/changeset/10652

Cool, Manio!

#10 Updated by Pim Zandbergen over 2 years ago

It seems VDR is going to be the first application that will be able to show Oscam status using the v2 network protocol
https://github.com/manio/vdr-plugin-dvbapi/commit/6ac4bcda63b21ec47c7d97ab8c6adec332dc60b3

#11 Updated by Mariusz Białończyk over 2 years ago

@Pim
I can see you just implemented proto v2 in tvh.
Thanks :)

My inspiration regarding tvh/kodi was this:
http://skyboo.net/xbmc/screenshot304.png

This extenstion is a step towards it, but I'd love that kodi PVR API would also implement obtaining other channel data like frequency, DVB standard, SR, SID and the others. It was some thread about it in the kodi forum but I don't know if something came out from it.
I know it is technical data, but DVB geeks like that kind of info :)
It is then up to the skinners if they will show it or not.
A skin like above could work without any hacks using plain Kodi API :)

#12 Updated by Pim Zandbergen over 2 years ago

@manio
You're welcome!

I wasn't shure whether you were working on this too, but I went out to do it anyway.
Of course I used your vdr dvbapi plugin source as an example.

Currently ecminfo data is obtained and logged in tvh, nothing else.
Next step would be to store the ecminfo data somewhere in the capmt data structure.
I guess you or Jaroslav would a better authority to think of such a data structure.

Then, another step could be to use the ecminfo data for data that already is used
like the caid that is passed to Kodi.

Next, the webui could be enhanced. We could show the ecminfo data under Status->Streams I suppose.

In the end, I'd like to see all the ecminfo data in Kodi.
But it appears the PVR API only supports passing CAID.
Are you saying the screenshot you are referring to is possible using the current Kodi 14 PVR API?

#13 Updated by Mariusz Białończyk over 2 years ago

I see :)
The screenshot is based on XBMC and former anti2k work. Unfortunately he currently decided to make it not public and moved the code from github to bitbucket. He created modified AeonNox skin. It was great and also contained some nice features, like greying out channels which are unavailable - so you can easily see which channel you can switch to (eg because there are recordings on some transponders).

There are some attempts based on his work:
http://forum.kodi.tv/showthread.php?tid=180564
http://forum.kodi.tv/showthread.php?tid=193991

#14 Updated by Rafal Kupiec over 2 years ago

Still I think that tvheadend should tell Kodi the CAID that is really used at the moment. Actually Kodi says 0x1861, while oscam tells me 0x1803 is used.

#15 Updated by Rafal Kupiec over 2 years ago

bump

#16 Updated by Jaroslav Kysela over 2 years ago

Makes sense. The problem is that the passed caid is just a first caid for the service regarless it's used or not. I plan to change this information to 0x0000 (invalid) and as CA name "Scrambled" . Then another extension should be added to the status messages to report the used CAID:PROVIDERID and the key response time.

#17 Updated by Rafal Kupiec over 2 years ago

Jaroslav Kysela wrote:

Makes sense. The problem is that the passed caid is just a first caid for the service regarless it's used or not. I plan to change this information to 0x0000 (invalid) and as CA name "Scrambled" . Then another extension should be added to the status messages to report the used CAID:PROVIDERID and the key response time.

There is no need to chance CA name,because actually it shows correct name of transponder owner. Only wrong CAID is showed.

#18 Updated by Jaroslav Kysela over 2 years ago

  • Target version set to 4.2

#19 Updated by Jaroslav Kysela about 2 years ago

HTSP protocol ver. 24 changes:

"caid" info in service is set to 65535 (FFFF) if service is encrypted (scrambled)
"caname" is set to "Encrypted service"

A new 'descrambleInfo' status message was introduced:

  htsmsg_add_u32(m, "pid", di->pid);
  htsmsg_add_u32(m, "caid", di->caid);
  htsmsg_add_u32(m, "provid", di->provid); 
  htsmsg_add_u32(m, "ecmtime", di->ecmtime);
  htsmsg_add_u32(m, "hops", di->hops);
  htsmsg_add_str(m, "cardsystem", di->cardsystem);
  htsmsg_add_str(m, "reader", di->reader);
  htsmsg_add_str(m, "from", di->from);
  htsmsg_add_str(m, "protocol", di->protocol);

#20 Updated by Jaroslav Kysela about 2 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

#21 Updated by Pim Zandbergen about 2 years ago

Jaroslav Kysela wrote:

Applied in changeset tvheadend|1aa7dddbd457e33947236d0bdd6e953babb24bc8.

Thanks!

I suppose we have to wait for someone to add support for this new HTSP message in a HTSP client (ie kodi/pvr.hts) before we can see this code in action. Is anyone working on that?

Separate from that, would you consider adding descramble info columns in the tvh Status->Screen WebUI, like I suggested previously?

Thanks again,
Pim

#22 Updated by Petar Ivanov about 2 years ago

Yes, i also like to show descramble info in Status in WebUI TVH

#23 Updated by Jaroslav Kysela about 2 years ago

Done (v4.1-602-gdc6cd96).

#24 Updated by Pim Zandbergen about 2 years ago

Jaroslav Kysela wrote:

Done (v4.1-602-gdc6cd96).

Thanks!

But I now realize showing the details of the last succesful ecm is not very interesting, when ecm's are not being received at all. I stopped oscam for a minute, and there's no way to see that shows the webui.

How hard would it be show the actual delay for an ecm when it is too late?
Or keep statistics about the number of times an ecm was late?

Thanks
Pim

#25 Updated by Sam Stenvall about 2 years ago

@Pim Zandbergen follow https://github.com/kodi-pvr/pvr.hts/issues/106 if you're interested in the addon part. Kodi still needs adapting to this as well though so bringing the addon up to speed is only the first step.

#26 Updated by piotr galek 6 months ago

im waiting for adopot, skin ready :)

#27 Updated by piotr galek 6 months ago

#28 Updated by Rafal Kupiec 5 months ago

Which skin? Where to get it?

#29 Updated by Mariusz Białończyk 5 months ago

Rafał, anti2k skin is unfortunately not public :(

#30 Updated by Pim Zandbergen 5 months ago

Last thing I heard, pvr.hts developers are still waiting for an API change in Kodi to allow this functionality.

#31 Updated by Pim Zandbergen 5 months ago

Err, until two weeks ago, it appears.
https://github.com/kodi-pvr/pvr.hts/pull/315

Also available in: Atom PDF