Enigma2 Fehler mit StartupToStandby Plugin

  • Hallo,


    das StartupToStandby Plugin produziert bei mir ständig den folgenden Fehler:


    before: 1
    after: 1
    not showing fine-tuning wizard, config variable doesn't exist
    showtestcard is false
    Looking for embedded skin
    allocating new converter!
    reused converter!
    reused converter!
    setValue 45
    Setvolume: 45 45 (raw)
    Setvolume: 35 35 (-1db)
    Traceback (most recent call last):
    File "/usr/lib/enigma2/python/Plugins/Extensions/StartupToStandby/plugin.py", line 21, in <lambda>
    open_standby = lambda: setattr(session.open(Standby),'wasMuted', 0)
    File "/usr/lib/enigma2/python/mytest.py", line 306, in open
    raise RuntimeError("modal open are allowed only from a screen which is modal!")
    RuntimeError: modal open are allowed only from a screen which is modal!
    (PyObject_CallObject(<function <lambda> at 0x1456b70>,()) failed)
    getResolvedKey config.plugins.crashlogautosubmit.sendAnonCrashlog failed !! (Typo??)
    resolve: resolve ${sysconfdir}/enigma2/settings
    resolve: -> /etc/enigma2/settings
    getResolvedKey config.plugins.crashlogautosubmit.addNetwork failed !! (Typo??)
    resolve: resolve ${sysconfdir}/enigma2/settings
    resolve: -> /etc/enigma2/settings
    getResolvedKey config.plugins.crashlogautosubmit.addWlan failed !! (Typo??)
    resolve: resolve ${sysconfdir}/enigma2/settings
    resolve: -> /etc/enigma2/settings
    main thread is non-idle! display spinner!


    Wie kann ich den Fehler beseitigen ?


    Viele Grüße


    Aladin

  • Hi,


    der Fehler scheint ein Timing Problem zu sein. Ich habe das im plugin.py wie folgt beseitigt:


    # -*- coding: iso-8859-1 -*-
    from Plugins.Plugin import PluginDescriptor
    from Components.config import config, ConfigSubsection, ConfigEnableDisable
    from Screens.Standby import Standby
    from StartupToStandbyConfiguration import StartupToStandbyConfiguration
    from enigma import eTimer


    config.plugins.startuptostandby = ConfigSubsection()
    config.plugins.startuptostandby.enabled = ConfigEnableDisable(default = False)


    #Meine Fehlerbeseitigung anfang
    import time
    #Meine Fehlerbeseitigung ende


    timer = eTimer()


    def main(session, **kwargs):
    print "[StartupToStandby] Open Config Screen"
    session.open(StartupToStandbyConfiguration)


    # sessionstart
    def sessionstart(reason, session = None):
    print "[StartupToStandby] autostart"
    #Meine Fehlerbeseitigung anfang
    time.sleep(10)
    #Meine Fehlerbeseitigung ende
    if config.plugins.startuptostandby.enabled.value and reason == 0:
    open_standby = lambda: setattr(session.open(Standby),'wasMuted', 0)
    timer.callback.append(open_standby)


    session.open(Standby)
    # wait 10 seconds before setting standby again -
    # bad hack so we do not only have a blank screen but are actually in standby...
    print "[StartupToStandby] start timer..."
    timer.startLongTimer(10)


    def Plugins(path, **kwargs):
    return [PluginDescriptor(name="StartupToStandby", description="Startup To Standby", where = PluginDescriptor.WHERE_PLUGINMENU,fnc = main),
    PluginDescriptor(name="StartupToStandby", description = "Startup To Standby", where = PluginDescriptor.WHERE_SESSIONSTART,fnc = sessionstart)]


    Mit diesen Änderungen läuft es wieder.


    Es wäre schön, wenn das eingescheckt werden könnte.


    Viele Grüße


    Aladin

  • Ist time.sleep nicht auch unter den "evil functions", die man nicht nutzen sollte.
    Spricht was dagegen, das mit dem bereits vorhandenen Timer zu lösen?

    Homescreen eurer Apple-Geräte noch nicht voll genug?


    dreaMote: Fernbedienung für Dreamboxen
    Mobile WOL: Wake-on-LAN Client für iOS mit optionalem Widget
    My Home Remote: Fernkontrolle für Homematic CCU/CCU2 optimiert für mobile Benutzung

  • Hi,


    ich habe eine saubere Lösung für das StartUpToStandby Pugin. Es wäre schön, daß meine Version geprüft würde und eventuell auch eingescheckt werden könnte.


    Hier nun meine Lösung:


    # -*- coding: iso-8859-1 -*-
    from Plugins.Plugin import PluginDescriptor
    from Components.config import config, ConfigSubsection, ConfigEnableDisable
    from Screens.Standby import Standby
    from StartupToStandbyConfiguration import StartupToStandbyConfiguration
    from enigma import eTimer
    from Tools import Notifications


    config.plugins.startuptostandby = ConfigSubsection()
    config.plugins.startuptostandby.enabled = ConfigEnableDisable(default = False)


    #timer = eTimer()


    def main(session, **kwargs):
    print "[StartupToStandby] Open Config Screen"
    session.open(StartupToStandbyConfiguration)


    # sessionstart
    def sessionstart(reason, session = None):
    print "[StartupToStandby] autostart"
    if config.plugins.startuptostandby.enabled.value and reason == 0:


    #Meine Änderung
    Notifications.AddNotification(Standby)


    #alter Code
    # open_standby = lambda: setattr(session.open(Standby),'wasMuted', 0)
    # timer.callback.append(open_standby)
    #
    # session.open(Standby)
    # # wait 10 seconds before setting standby again -
    # # bad hack so we do not only have a blank screen but are actually in standby...
    # print "[StartupToStandby] start timer..."
    # timer.startLongTimer(10)


    def Plugins(path, **kwargs):
    return [PluginDescriptor(name="StartupToStandby", description="Startup To Standby", where = PluginDescriptor.WHERE_PLUGINMENU,fnc = main),
    PluginDescriptor(name="StartupToStandby", description = "Startup To Standby", where = PluginDescriptor.WHERE_SESSIONSTART,fnc = sessionstart)]

    Einmal editiert, zuletzt von aladin25 ()

  • Hallo,


    für diejenigen, die auch mit dem StartupToStandby-Plugin Probleme haben, habe ich meine Lösung als Packet angehängt.


    Wie gesagt es wäre schön, wenn diese Lösung oder eine andere saubere Lösung eingescheckt wird.


    Viele Grüße


    Aladin


    EDIT: Da meine Lösung in das CVS eingeflossen ist. Habe ich nun den Link zu meinem Paket entfernt.

    Einmal editiert, zuletzt von aladin25 ()

  • Hi,


    das Plugin erzeugt diesen startuptostandby Fehler.


    Einigma2 muß vollständig hochgefahren sein bevor man es in den Standby schicken kann. Ich habe es mit einem eTimer etwas unschön gelöst. Vieleicht gibt es hierfür auch eine ordendliche Lösung. Z.B. mit einem Pluginaufruf (WHERE_AFTERENIGMAISREADY) nachdem Enigma vollständig hochgefahren ist.


    Viele Grüße


    Aladin


    PS.: Im Anhang befindet sich mein angepasstes Paket.