Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Results 1 to 10 of 10

Thread: Enigma2 Python Plugin select a Satellite TV Channel

  1. #1
    Oliver.M.

    Enigma2 Python Plugin select a Satellite TV Channel

    Hi All,

    I have a Technomate TM-Nano-SE M2 Plus running OpenPLi. I have managed to create a basic plugin in Python that just shows GUI with a label and a list.

    I would like to be able to select TV channels (Which would be displayed in this list). I have read a bit about the self.session.nav.playService() function however i'm not sure how to use it. What python module is this function from and what arguments does it take?

    For now I just want to be able to pass this function a channel number but in the future would be looking to have access to the list of channels stored on the receiver so that i can display them in the list.

    Any help would be very much appreciated.

    All the best,

    Oliver

  2. #2
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    OpenPLi do not make images for the Technomates. You are most probably using a 4D image. OpenVision would be a better image to use if you want PLi Enigma2.

    Not too sure what you want to achieve differently to existing functions within Enigma2. The bouquets show the list of channels based on how you have set them. You just need to display them, no need for a separate program. The numbering in Enigma2 is cumulative and based on settings.

    Have a look at channelselection.py for more details.

    If you want to interact with the receiver from a different device, maybe the functions within openwebif will achieve what you want.

    Leshay also has a program for Windows to set timers etc.

  3. #3
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,573
    Thanks
    2,004
    Thanked 4,925 Times in 3,259 Posts
    PlayService() takes a service reference, not a channel number.
    Help keep OpenViX servers online.Please donate!

  4. #4
    Oliver.M.
    Hi all, Thank you for your replies!

    abu baniaz, Thank you for your reply, I have come across the ChannelSelection library a few times while looking for information on what I would like to achieve. Would you be able to provide me with some example code showing how I would go about using this library to select channels or even retrieve channel information (assuming the module is capable of such tasks). I have had a brief look into the module but cannot see a lot of documentation for it...

    Huevos, Thank you for your reply. Is there a way of obtaining a list of service references within Python? If possible could you provide me with a piece of example code showing how to import the libraries that contain the PlayService() function? This is probably something I could code myself however the lack of documentation means I'm struggling a bit.

    All the best,

    Oliver

  5. #5
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    I am afraid I don't know what you want to achieve. So can't help. Moreover, I'm a tester, not a coder. However, we can point you in the right direction.

    Deatils you need to provide to help your project...
    How are you making your bouquets?
    What services you have?
    What is interacting with the receiver?

  6. #6
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    As most external processes use the openwebif to interact with Enigma2, some information

    Code:
    https://github.com/E2OpenPlugins/e2openplugin-OpenWebif/wiki/OpenWebif-API-documentation
    Code:
    https://dream.reichholf.net/wiki/Enigma2:WebInterface

  7. #7
    Oliver.M.
    Hello!

    So basically I would like to build a plugin that will present the user with a very locked down list of channels (Lets say just BBC services as an example, no ITV etc.). The user will then be able to select the service that they want to view. This is to prevent the user from accessing certain services and to provide a layer of abstraction to the box and make it easier to use.

    Currently I haven't actually made any bouquets but will probably use the Auto Bouquet Maker tool then filter out the unwanted services in the Python plugin.

    Services include just the free to air channels.

    And it will be the user that interacts with the receiver using the provided remote control.

    Thank you for your help,

    Oliver

  8. #8
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    On OpenVix, pressing the TV button shows the bouquets. OpenPLI does not have this.

    In all versions of Enigma2, you can set it so that the list of bouquets is shown and not default of contents of the active one.

    If you want to lock down the menus, you can use the parental controls and then lock some screens. The community frowns on locking down boxes as that is what payservers try to do. So there is a deliberate backdoor to overcome locks.

    I would recommend you try OpenVix instead of the 4D image.
    Have a look at these threads

    https://www.world-of-satellite.com/s...s-and-Bouquets

    https://www.world-of-satellite.com/s...and-Navigation

    https://www.world-of-satellite.com/s...-using-OpenViX

    https://www.world-of-satellite.com/s...ader-28-2-only

  9. #9
    Oliver.M.
    Thank you for your reply. Ill have a look through these links this evening and see what I can do.

    All the best,

    Oliver.

  10. #10
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    Just to reiterate, you don't need a plugin to display a list of channels/services.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.