Results 1 to 17 of 17

Thread: How to write your first enigma2 plugin

  1. #1
    Admin hda5's Avatar
    Join Date
    Dec 2004
    Posts
    1,463
    Thanks
    1,983
    Thanked 8,119 Times in 687 Posts

    Icon14 How to write your first enigma2 plugin

    I found the following information on the net and thought I'd post it here for those who are interested in writing their own Enigma 2 Plugins.

    How to:Write your first enigma2 plugin

    Enigma2 plugins programming is not difficult job and any one with any programming experience can write plugin
    requirement:
    basic knowldge in python programming language
    basic knowldge in how enigma2 working

    learning basic of python programming is not difficult and web is full of tutorials explaining how to start
    start from site for python wiki.python.org/moin/BeginnersGuide/Programmers
    python version used with enigma2 is version 2.6 usually
    no need to know c++ language
    plugin file usually put in this folder in dreambox
    user/lib/enigma2/python/plugins/extensions and the main file is plugin.py

    what you need to write plugin
    text editor like notepad ++
    ftp program
    program dcc can offer both and it is very practical and easy to use

    in the attachment pdf file for step by step to teach plugin programming,also available ipk file to install 10 lessons to your dreambox .
    Attached Files Attached Files

  2. The Following 11 Users Say Thank You to hda5 For This Useful Post:

    catseye (03-01-2017), CokeAddict (28-06-2012), donki (27-06-2012), gally (05-09-2013), Haxer (26-04-2020), hendy autolock (26-10-2018), kaktus (05-03-2013), saintomer1866 (27-06-2012), sonic1 (27-06-2012), stawman (07-11-2012), tintamil (07-03-2016)

  3. #2
    Admin hda5's Avatar
    Join Date
    Dec 2004
    Posts
    1,463
    Thanks
    1,983
    Thanked 8,119 Times in 687 Posts
    More info available here
    _http://al3z77.altervista.org/dokuwiki/doku.php?id=vuplusduo:vuplusduode velopment:start

  4. The Following 2 Users Say Thank You to hda5 For This Useful Post:

    donki (27-06-2012), saintomer1866 (27-06-2012)

  5. #3
    Banned
    Join Date
    Oct 2011
    Posts
    751
    Thanks
    827
    Thanked 362 Times in 244 Posts
    The hardest part for me would be to work out what I'd like to see that isn't already available.

  6. #4
    Super Moderator saintomer1866's Avatar
    Join Date
    Sep 2005
    Posts
    3,516
    Thanks
    4,440
    Thanked 7,747 Times in 2,327 Posts
    thanks hda5,
    you come up trumps as usual planting that seed
    I'll try and start having a look at this at the weekend, hopefully a few others (inc oldfart) will too
    just to point out the usual site formating error, there shouldn't be a gap between the e and v in development in your line above

    St.O

  7. The Following User Says Thank You to saintomer1866 For This Useful Post:

    hda5 (28-06-2012)

  8. #5
    V.I.P oldfart's Avatar
    Join Date
    Oct 2008
    Posts
    1,488
    Thanks
    159
    Thanked 422 Times in 246 Posts
    Had another play with emanuel's (ihad) guide - got the first example working.
    create a directory in
    Code:
    /usr/lib/enigma2/python/Plugins/Extensions
    I used tutorial1 for the directory name

    two files go into the directory
    __init.py__
    and
    plugin.py

    then use the menu & 'restart gui' so the plugins menu picks up the new plugin
    or
    from telnet - init 4 , wait 4 seconds (or so) then init 3
    Last edited by oldfart; 28-06-2012 at 06:17 PM.

  9. The Following User Says Thank You to oldfart For This Useful Post:

    hda5 (29-06-2012)

  10. #6
    V.I.P oldfart's Avatar
    Join Date
    Oct 2008
    Posts
    1,488
    Thanks
    159
    Thanked 422 Times in 246 Posts
    Code:
    # Ihad.tv enigma2-plugin tutorial 2010
    # lesson 01
    # by emanuel
    ###########################################################################
    
    from Screens.Screen import Screen
    from Components.Label import Label
    from Components.ActionMap import ActionMap
    from Plugins.Plugin import PluginDescriptor
    
    ###########################################################################
    
    class HalloWorldScreen(Screen):
        skin = """
            <screen position="130,150" size="460,150" title="Ihad.tv e2-tutorial lesson 1" >
                <widget name="myLabel" position="10,60" size="200,40" font="Regular;20"/>
            </screen>"""
    
        def __init__(self, session, args = None):
            self.session = session
            
            Screen.__init__(self, session)
            self["myLabel"] = Label(_("Hello World ;-)"))
            self["myActionMap"] = ActionMap(["SetupActions"],
            {
                "cancel": self.close # add the RC Command "cancel" to close your Screen
            }, -1)
    
    
    ###########################################################################
    
    def main(session, **kwargs):
        print "\n[Hallo World] start\n"
        
        session.open(HalloWorldScreen)
    
    ###########################################################################
    
    def Plugins(**kwargs):
        return PluginDescriptor(
                name="01 Hallo World",
                description="lesson 1 - Ihad.tv e2-tutorial",
                where = PluginDescriptor.WHERE_PLUGINMENU,
                icon="../ihad_tut.png",
                fnc=main)

  11. The Following User Says Thank You to oldfart For This Useful Post:

    hda5 (29-06-2012)

  12. #7
    V.I.P oldfart's Avatar
    Join Date
    Oct 2008
    Posts
    1,488
    Thanks
    159
    Thanked 422 Times in 246 Posts
    the CODE window isn't big enough!!!!

  13. #8
    Junior Member
    Join Date
    May 2012
    Posts
    6
    Thanks
    5
    Thanked 0 Times in 0 Posts
    im in take me awhile to catch up but wth

  14. #9
    Verified Registered User
    Join Date
    Oct 2008
    Posts
    70
    Thanks
    11
    Thanked 6 Times in 6 Posts
    Hi,
    I have installed Wing IDE 4.1 but now the License is expired. Is it good for developing so I'm redy to buy License if that is good.
    Also I have installed the Python 3.2 but You write that enigma2 is version 2.6 usually. So need I downgrade it?
    Thanks,
    Z

  15. #10
    V Eugenie's Avatar
    Join Date
    Dec 2004
    Posts
    332
    Thanks
    0
    Thanked 4 Times in 3 Posts
    Current Python version in E2 is 2.7.2...so your Python code needs to be compliant with this.



    opendreambox 2.0.0 dm800


    dm800 login: root
    root@dm800:~# python
    Python 2.7.2 (default, May 8 2012, 18:47:29)
    [GCC 4.6.4 20120303 (prerelease)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    ****>
    Last edited by Eugenie; 07-08-2012 at 12:58 PM.

  16. #11
    V.I.P jimrare's Avatar
    Join Date
    Dec 2004
    Posts
    1,086
    Thanks
    66
    Thanked 84 Times in 67 Posts
    Quote Originally Posted by zeros View Post
    I have installed Wing IDE 4.1 but now the License is expired
    You dont need any licenses, if you want to develop from your pc, simply download from the official python website _http://www.python.org/download/ There is some great do***entation as well.

  17. #12
    Verified Registered User
    Join Date
    Oct 2008
    Posts
    70
    Thanks
    11
    Thanked 6 Times in 6 Posts
    Thanks to all!
    I still purchased the license to Wing IDE:
    _http://wingware.com/downloads
    so I'm ready now for trying development. :-)

  18. The Following User Says Thank You to zeros For This Useful Post:

    hda5 (11-08-2012)

  19. #13
    V.I.P oldfart's Avatar
    Join Date
    Oct 2008
    Posts
    1,488
    Thanks
    159
    Thanked 422 Times in 246 Posts
    away you go then ......

  20. #14
    Verified Registered User
    Join Date
    Oct 2008
    Posts
    70
    Thanks
    11
    Thanked 6 Times in 6 Posts
    Does anyone else have these exercises done? If YES then which boxes You are used. I will try with qboxhd and still working on it. :-)
    Thanks to Mr. oldfart for helping us, it has many benefits.
    Last edited by zeros; 14-08-2012 at 05:51 PM.

  21. #15
    Verified Registered User
    Join Date
    Oct 2008
    Posts
    70
    Thanks
    11
    Thanked 6 Times in 6 Posts
    Thanks Eugenie! qboxhd using Python version:

    Welcome to QBoxHD
    root@qboxhd# python
    Python 2.6.1 (r261:67515, Jan 1 2000, 02:33:26)
    [GCC 4.2.3 (snapshot) (STMicroelectronics/Linux Base 4.2.3-43)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    ****>

    Please download Python 2.6.6 instead.
    _http://www.python.org/download/releases/2.6.6/

    So I lowered my Python version to 2.6.6. The tasks are solved in part.

  22. #16
    Verified Registered User
    Join Date
    Oct 2008
    Posts
    70
    Thanks
    11
    Thanked 6 Times in 6 Posts
    Finally I get all lessons working with my qboxhd. Many thanks, all they are very useful. Can I add them to the Estonian unofficial software? Emanuel would probably be necessary to allow that. Does anyone have his contact?
    I will add Estonian language (multilanguage support). Without Emanuel permission, I do not dare to make big changes there.

  23. #17
    Junior Member
    Join Date
    Dec 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi @hda5 I’m interested in making my own plugin to share with everyone on enigma2 devices it’s going to be a streaming plugin which users will be able to watch movies and tv series with URL links from sites. I just need to know which files and folders will I need to get the plugin up and running for this to work ?
    Last edited by sayguy; 05-12-2017 at 02:18 PM.

Similar Threads

  1. Easy enigma2 plugin!!! At last ech!
    By ManikM in forum Plugins
    Replies: 9
    Last Post: 11-06-2013, 01:28 PM
  2. LiveFootBall enigma2 plugin version 3.7
    By ^^COMPASS^^ in forum Plugins
    Replies: 4
    Last Post: 17-08-2012, 10:13 PM
  3. Azbox HD Enigma2 - 7day EPG plugin, how?
    By hfmls in forum AzBox HD E2 Newbie Questions
    Replies: 0
    Last Post: 24-10-2010, 10:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •