Jump to content


Photo

One proc file for detecting the MACHINE in all enigma2 images.


  • Please log in to reply
747 replies to this topic

Re: One proc file for detecting the MACHINE in all enigma2 images. #41 Huevos

  • PLi® Contributor
  • 3,016 posts

+126
Excellent

Posted 16 July 2020 - 00:47

API is just presentation... and sorry if I disappoint you...

 

My question to you is if you don't want the data to come from the build, where is it going to come from?



Re: One proc file for detecting the MACHINE in all enigma2 images. #42 Huevos

  • PLi® Contributor
  • 3,016 posts

+126
Excellent

Posted 16 July 2020 - 01:05

If anyone can send in PR's that anyone can accept, and we don't have any say it in, anyone can completely break OpenPLi at any point in time, it is not indepdent, and that is unacceptable.

 

Is that so hard to understand?

Yes it is really difficult to understand when most of the stuff that makes up what you build at the moment you already have no control over. Literally hundreds of files in sources.



Re: One proc file for detecting the MACHINE in all enigma2 images. #43 WanWizard

  • PLi® Core member
  • 57,290 posts

+1,213
Excellent

Posted 16 July 2020 - 04:33

API is just presentation... and sorry if I disappoint you..

 
No, the API is a definition, something external components can rely on. Like a C++ method or a Python function, all you need to know is the API (what are the parameters, what type are they, what input is required, what does the method return, which exceptions does it throw, etc), how it is implemented is not relevant.
 
If we want plugins to be compatible across images, this is very important. It should not be maintained one-sided by one team. If that team decides to make a backward incompatible change, they will break all other images, and that is unacceptable. And we know that will happen, as that is the entire reason of the existence of OE-A.
 

My question to you is if you don't want the data to come from the build, where is it going to come from?

 

We can decide ourselfs how to do that. It cloud be hardcoded (which would reduce the code considerably and make it faster), it could come from a file (either at compile time or runtime), etc.

 

But again, not relevant for this discussion. All that is relevant is that every team uses the same API, so that any plugin that calls a boxbranding method can depend on getting a result back.

 

So we can finally stop duplicating effort on multiple versions of plugins.


Currently in use: VU+Duo 4K (2xFBC S2), Amiko Viper T2C (T2+fallback), Octagon SF8008 (S2+T2), Zgemma H9.2H (T2+fallback)

Many answers to your question can be found in our new and improved wiki.

Because to health reasons, I will not be active online very often anymore.


Re: One proc file for detecting the MACHINE in all enigma2 images. #44 littlesat

  • PLi® Core member
  • 52,780 posts

+608
Excellent

Posted 16 July 2020 - 06:45

Implementation != API... I understand Huevos. I know it is difficult to forget about an implementation you think that is perfect and therefore forgot the ‘helicopter’ view...
Btw for the box name we e2 had already an api as far I now via About.py.
First I think we should start with a question: Why do plugins need a branding module? And maybe also a question how can we solve it differently?.... maybe we do not need a branding module at all for plugins?!

Edited by littlesat, 16 July 2020 - 07:03.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: One proc file for detecting the MACHINE in all enigma2 images. #45 Taapat

  • PLi® Core member
  • 1,987 posts

+93
Good

Posted 16 July 2020 - 07:12

If we talked only about the API for the box name, then of course it doesn't matter what result the API gets, because it's just the name in the text.
But I think we need such API for all box specific things.
And in that case, for a universal plugin, it is important to get the same result from the API regardless of the image.
Of course the implementation can vary in each image, but not only the API but also the API response should be the same in all images.


Re: One proc file for detecting the MACHINE in all enigma2 images. #46 Taapat

  • PLi® Core member
  • 1,987 posts

+93
Good

Posted 16 July 2020 - 07:30

I can imagine where it is necessary to use a box name not just as text. This is a specific manufacturer specific bug (for example in drivers) that not exist on another manufacturer's same hardware box.
In that case, you need an exception for a specific box.
By the way, SystemInfo has many such box-specific exceptions, which is renamed as hardware-specific things.
But regardless of the name, they are still box-specific exceptions because they are derived from the box name.

Edited by Taapat, 16 July 2020 - 07:31.


Re: One proc file for detecting the MACHINE in all enigma2 images. #47 littlesat

  • PLi® Core member
  • 52,780 posts

+608
Excellent

Posted 16 July 2020 - 07:50

Yes years ago I moved all box specific things to SystemInfo.py and tried to go for a feature driven system.... so SystemInfo.py was the only place with if box x then do y.... but actually we should totally get rid of this somehow as well... and likely this should also be involved in the api we try to define maybe we can also remove the global dict that way...

Edited by littlesat, 16 July 2020 - 07:52.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: One proc file for detecting the MACHINE in all enigma2 images. #48 Persian Prince

  • Senior Member
  • 1,945 posts

+245
Excellent

Posted 16 July 2020 - 10:24

https://github.com/O...e-core/pull/842 will do it for PLi if you're up for it.


Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #49 littlesat

  • PLi® Core member
  • 52,780 posts

+608
Excellent

Posted 16 July 2020 - 10:30

This puts just the machine name in a proc.... if we go that way why not put all stuff we are doing now in systeminfo.py + more in one ‘thing’?

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: One proc file for detecting the MACHINE in all enigma2 images. #50 Persian Prince

  • Senior Member
  • 1,945 posts

+245
Excellent

Posted 16 July 2020 - 10:37

This puts just the machine name in a proc.... if we go that way why not put all stuff we are doing now in systeminfo.py + more in one ‘thing’?

Yes exactly that's what I suggest, something not so complicated :)

 

If we agree to use

/proc/stb/info/enigma2model

and more like

/proc/stb/info/enigma2brand
/proc/stb/info/enigma2type

we could get rid of all

/proc/stb/info/hwmodel
/proc/stb/info/gbmodel
/proc/stb/info/boxtype
/proc/stb/info/vumodel
/proc/stb/info/azmodel

then reduce the checks and use it everywhere we want as we could check it inside Python, C and Shell so easy.

 

Each team could provide their desired info but at least we use the same path ;)

 

MACHINE name is the best to provide and check instead of relying on a proc file provided by manufacturers.


Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #51 littlesat

  • PLi® Core member
  • 52,780 posts

+608
Excellent

Posted 16 July 2020 - 11:12

If you do it this way why multiple procs while you can give all in one proc string?


Edited by littlesat, 16 July 2020 - 11:15.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: One proc file for detecting the MACHINE in all enigma2 images. #52 WanWizard

  • PLi® Core member
  • 57,290 posts

+1,213
Excellent

Posted 16 July 2020 - 11:20

If we talked only about the API for the box name, then of course it doesn't matter what result the API gets, because it's just the name in the text.

But I think we need such API for all box specific things.
And in that case, for a universal plugin, it is important to get the same result from the API regardless of the image.
Of course the implementation can vary in each image, but not only the API but also the API response should be the same in all images.

 

Exactly. Finally someone who understands it. :)


Currently in use: VU+Duo 4K (2xFBC S2), Amiko Viper T2C (T2+fallback), Octagon SF8008 (S2+T2), Zgemma H9.2H (T2+fallback)

Many answers to your question can be found in our new and improved wiki.

Because to health reasons, I will not be active online very often anymore.


Re: One proc file for detecting the MACHINE in all enigma2 images. #53 WanWizard

  • PLi® Core member
  • 57,290 posts

+1,213
Excellent

Posted 16 July 2020 - 11:22

If you do it this way why multiple procs while you can give all in one proc string?

 

Please read, as that  is EXACTLY what he is proposing.

 

p.s. if we have a universal solution for boxbranding, then backupsuite can also use that, and a new proc node is no longer needed ( = a typical example of why we need it, and why it needs to be universal! )


Currently in use: VU+Duo 4K (2xFBC S2), Amiko Viper T2C (T2+fallback), Octagon SF8008 (S2+T2), Zgemma H9.2H (T2+fallback)

Many answers to your question can be found in our new and improved wiki.

Because to health reasons, I will not be active online very often anymore.


Re: One proc file for detecting the MACHINE in all enigma2 images. #54 Huevos

  • PLi® Contributor
  • 3,016 posts

+126
Excellent

Posted 16 July 2020 - 16:02

 

This puts just the machine name in a proc.... if we go that way why not put all stuff we are doing now in systeminfo.py + more in one ‘thing’?

Yes [...] MACHINE name is the best to provide and check instead of relying on a proc file provided by manufacturers.

 

Except MACHINE in OE-A distros contains something totally different to what it does in PLi (which I already explained). That means this can never work cross distro.

 

And if you don't understand this you need to look in the makefile. i.e. the names of the boxes in the PLi build do not correspond with the names of the boxes in the OE-A build. That means this can't be used in common plugins. So what point is there to it?


Edited by Huevos, 16 July 2020 - 16:09.


Re: One proc file for detecting the MACHINE in all enigma2 images. #55 foxbob

  • Senior Member
  • 500 posts

+17
Neutral

Posted 16 July 2020 - 16:37

root@et1x000:~# cat /proc/stb/info/enigma2model
et1x000

root@et1x000:~# cat /proc/stb/info/model
dm800se



Re: One proc file for detecting the MACHINE in all enigma2 images. #56 littlesat

  • PLi® Core member
  • 52,780 posts

+608
Excellent

Posted 16 July 2020 - 16:43

(quote]Please read, as that  is EXACTLY what he is proposing.[/quote]

nope.... two procs wherry suggested. One for brand and one for model....

 

cat /proc/stb/info/branding

model=h9combo

brand=Zgemma

....etc....

 

but again this is implementation....

 

At the end you need a function... and that we already have via /Components/About.py for a long long time... 


Edited by littlesat, 16 July 2020 - 16:47.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: One proc file for detecting the MACHINE in all enigma2 images. #57 Taapat

  • PLi® Core member
  • 1,987 posts

+93
Good

Posted 16 July 2020 - 16:52

Except MACHINE in OE-A distros contains something totally different to what it does in PLi (which I already explained). That means this can never work cross distro.
 
And if you don't understand this you need to look in the makefile. i.e. the names of the boxes in the PLi build do not correspond with the names of the boxes in the OE-A build. That means this can't be used in common plugins. So what point is there to it?

 

I understand this as follows.
If you use a box name to display it in about the screen, it doesn't matter what exactly name is displayed.
If you need a box name to define a hardware-specific case, for example DVB-S support, you need to implement in the API key DVB-S support, and use it instead of the box name.

How you in distro get this DVB-S support key in the API doesn't matter. The API only needs to give the same result in all distros for the DVB-S support key.



Re: One proc file for detecting the MACHINE in all enigma2 images. #58 WanWizard

  • PLi® Core member
  • 57,290 posts

+1,213
Excellent

Posted 16 July 2020 - 17:08

Exactly.


Currently in use: VU+Duo 4K (2xFBC S2), Amiko Viper T2C (T2+fallback), Octagon SF8008 (S2+T2), Zgemma H9.2H (T2+fallback)

Many answers to your question can be found in our new and improved wiki.

Because to health reasons, I will not be active online very often anymore.


Re: One proc file for detecting the MACHINE in all enigma2 images. #59 Persian Prince

  • Senior Member
  • 1,945 posts

+245
Excellent

Posted 16 July 2020 - 17:20

This puts just the machine name in a proc.... if we go that way why not put all stuff we are doing now in systeminfo.py + more in one ‘thing’?

Yes [...] MACHINE name is the best to provide and check instead of relying on a proc file provided by manufacturers.
Except MACHINE in OE-A distros contains something totally different to what it does in PLi (which I already explained). That means this can never work cross distro.
 
And if you don't understand this you need to look in the makefile. i.e. the names of the boxes in the PLi build do not correspond with the names of the boxes in the OE-A build. That means this can't be used in common plugins. So what point is there to it?

It doesn't matter what kind of name you wanna give it as long as we use a same path with some information we need.

Some infornation would be the same some with differences.

Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #60 Persian Prince

  • Senior Member
  • 1,945 posts

+245
Excellent

Posted 16 July 2020 - 17:22

root@et1x000:~# cat /proc/stb/info/enigma2model
et1x000
root@et1x000:~# cat /proc/stb/info/model
dm800se


Most of the times /proc/stb/info/model is fake because stupid companies wanted to cheat DMM locks and at last they became garbage code.

Open Vision sources: https://github.com/OpenVisionE2





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users