Kodi Community Forum
Release XBMC LCDproc Python addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Release XBMC LCDproc Python addon (/showthread.php?tid=143912)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


RE: XBMC LCDproc Python addon (testing needed) - herrnst - 2012-11-01

(2012-11-01, 19:58)jardes69 Wrote: Thanks for a quick response. I have downloaded and installed the addon just this morning.
I checked the code, corrections from 377b7d5 are there.

btw: Dimming on screensaver works OK
Ah, now I got it - suspending the whole application. Yeah thats yet not handled, need to check how to best do this.

Thanks for the feedback on the dimming Smile



RE: XBMC LCDproc Python addon (testing needed) - jardes69 - 2012-11-01

Yes, that's it!

I think it just need to check some kind of XBMC "suspend request" flag.


RE: XBMC LCDproc Python addon (testing needed) - herrnst - 2012-11-01

Hm...

@XBMC-Devs: Does anything like "xbmc.abortRequested" exists for this, like "xbmc.suspendRequest"?


RE: XBMC LCDproc Python addon (testing needed) - jardes69 - 2012-11-01

I found this:

### check if XBMC is shutting down
if xbmc.abortRequested:
log('XBMC abort requested, aborting')




RE: XBMC LCDproc Python addon (testing needed) - Martijn - 2012-11-01

(2012-11-01, 20:28)herrnst Wrote: Hm...

@XBMC-Devs: Does anything like "xbmc.abortRequested" exists for this, like "xbmc.suspendRequest"?

nope. not judging from the docs. guess you could make it a feature request for post-Frodo. Not sure how it is handled internally


RE: XBMC LCDproc Python addon (testing needed) - jardes69 - 2012-11-01

I do not know python, but can it be done like this?:

#main loop
while not xbmc.abortRequested:
settings_setup()
process_lcd() #lcd loop

g_lcdproc.SetBackLight(0)


RE: XBMC LCDproc Python addon (testing needed) - herrnst - 2012-11-01

(2012-11-01, 20:54)Martijn Wrote:
(2012-11-01, 20:28)herrnst Wrote: Hm...

@XBMC-Devs: Does anything like "xbmc.abortRequested" exists for this, like "xbmc.suspendRequest"?

nope. not judging from the docs. guess you could make it a feature request for post-Frodo. Not sure how it is handled internally

Ok, thanks for clearing. Guess this will get another option "Dim on Suspend/Shutdown" or so. Due to the extrastuff feature, some post-shutdown handling is required anyways, to clear things set by "option" LCDproc commands - currently, icons stay at their last state when unloading the addon Angel


RE: XBMC LCDproc Python addon (testing needed) - herrnst - 2012-11-02

@jardes69:

Can you please try to update to latest GIT master, then set "Dim on Shutdown" in the GUI settings to true, and then retry the suspend thing?

The addon now at least does shutdown handling, but am not sure if this has any effect on suspend operations. If it doesn't, according to Martijn something like that probably needs to be implemented in XBMCs addon interface first.

Edit: You also should see a "Shutting down" NOTICE originating from the addon in xbmc.log.


RE: XBMC LCDproc Python addon (testing needed) - jardes69 - 2012-11-02

Excellent, I will let you know!


RE: XBMC LCDproc Python addon (testing needed) - herrnst - 2012-11-05

@sphere: Thanks for your pointer to "xbmcgui.getCurrentWindowId()", works like a charm (even if for readability I had to self-define some interesting window ids Cool ).

@jardes69: Did you check the suspend stuff already?

@all: Please check if everything still works like it should since my last commits (2279eee, as I did some bigger rework on the InfoLabel retrieval stuff to make the code more readable.

@iMON/mdm166a users: Please check if especially the codec icons setting still works, as I implemented some pseudo-caching for this to save a bit on CPU cycles (don't determine icon/codec match if nothing changed). Still curious if mdm166a works at all Wink BTW: Extrastuff handling as implemented like in Ticket#8981 is now complete Blush

Regards,
Daniel


RE: XBMC LCDproc Python addon (testing needed) - jardes69 - 2012-11-05

Daniel, I did not have time to check it yet, maybe tonight, I will definitelly let you know.


RE: XBMC LCDproc Python addon (testing needed) - jardes69 - 2012-11-09

I have just checked it. It does not dim the display when XBMC suspends.
The core LCD functionality does this though. Looks like it can not be done by a service addon.


RE: XBMC LCDproc Python addon (testing needed) - herrnst - 2012-11-10

Thanks for checking that! Honestly, I had that feeling it wouldn't work as intended Wink I've posted a Feature Request on this in the Feature Request forum, maybe suspend handling can be done one day.

However, as a workaround, you might handle this on system level. IIRC, when the system is put to sleep, some events are triggered or scripts executed from some /etc/suspend.d dir (I personally do not use this, so someone else needs to provide correct directions on this). You could put a LCDproc unload/load handler there and configure LCDproc to turn off the display on unload, or even a script that connects to LCDproc, sets up a screen with higher priority and turns off the backlight afterwards. On resume, vice-versa needs to be done of course.

HTH,
Daniel




RE: XBMC LCDproc Python addon (testing needed) - jardes69 - 2012-11-12

Thanks for you reply. I have Lcdproc script for unloading/loading, but it does not switch the panel off. It's a good point, but I need to do some research. It's another option in my mind - if your script can check the keyboard, I can send a keypress in a sequence before the suspend command.

Jaro


RE: XBMC LCDproc Python addon (testing needed) - herrnst - 2012-11-12

Maybe you can also try:
  • put "Backlight=on" into your LCDd.conf (probably replacing Backlight=auto) - as a side effect this will disable backlight control from clients
  • On suspend, do a "LCDd stop" via the system. This should turn off the light.
  • On resume, do "LCDd start", again via the system. That should re-light the display. The LCDproc addon will reconnect after approx. 10 seconds.