Kodi Community Forum
Linux [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: Linux [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend (/showthread.php?tid=115758)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - b4cksl4sh - 2017-02-20

Thanks for the great add-on! This is exactly what i've been looking for.

Just one question: Is this add-on supposed to work with the latest LibreELEC Beta v7.95.3? For me it doesn't seem to work and from the add-on readme it seems there are no manual steps needed to make this add-on work on LibreELEC.

Since I am a Linux noob, I don't know where to start nailing down the potential issue(s).

Thanks in advance for any hints that might help me nailing down the problem!


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - Turok777 - 2017-03-09

version 0.3.20 works great ( LibreElec v. 8.0.0 ) ........ thank you very much


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - kurai - 2017-03-15

Hi _BJ1

Many thanks for making this addon - it's description seems to fit my needs exactly ... except I can't get it to behave entirely properly in one function Confused

It won't re-suspend the machine, after an unattended recording, no matter what I do or what combination of settings I use.

PC is an x86 Zotac running LibreELEC 8.0 (Kodi 17, Krypton) with TVHeadend service 4.1.2415 controlling a dual DVB tuner & Service.TVH.Manager 0.3.20

Using service.tvh.manager with Shutdown Performed By: XBMC/Kodi everything goes well at first - Notification of next recording time, setting of ACPI RTC wakeup, suspend, wake at right time, start & complete recording task ... but the PC then stays powered on forever. (obviously I'm making sure I give it no input from USB infrared remote or keyboard or web-interface or PC power buttons etc.)

I then tried using Shutdown Performed By: Operating System ... but that causes the PC to go into full G3 cold shutdown & poweroff, instead of suspend ... which means the USB ports are powered off so no IR remote sensor or keyboard is active & machine has to be turned on for next use by pressing physical PC power button.
As an experiment I altered shutdown.sh to use "systemctl suspend" instead of "shutdown -h now" . Machine now goes into suspend mode S3 properly, but after timer-wakeup/record steps there's still no return to suspend, same as with Performed by: XBMC/Kodi.

Looking at the debug logs I can see [service.tvh.manager] being triggered at all the right points with appropriate actions, but after a recording has finished I can't see any further entries for it at all, so it doesn't seem to be a case of it activating but failing somehow.


Please let me know if I'm missing something terribly obvious, or what further diagnsosis & reporting I can do Blush


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - _BJ1 - 2017-03-15

Hi,

I guess if your PC is starting for recording the connected TV is offline? Do you get a picture if you turn on the tv after starting your PC? If not (in that case you get a black screen) the HDMI handshake has failed and kodi doesn't start properly - and the addon too.

Could you provide a log file?


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - kurai - 2017-03-16

HDMI behaviour seems fine. The HTPC HDMI is connected to an A/V Receiver instead of directly to TV and Kodi starts and displays properly whether the Receiver & TV are on or off when HTPC/Kodi starts up.

http://sprunge.us/TLfG (dmesg/kodi debug log/service.tvheadend42 log/keymap.xml/service.tvh.manager settings)

The above logs cover :-

Setting a recording for 23:40, duration 40 minutes, then set debugging to on, rebooting for fresh logs.

[23:28] - Clean boot
[23:29] - Suspend HTPC via remote (also Receiver/TV)
[23:34] - HTPC powers up automatically from RTC alarm
[23:39] - TVHeadend starts recording
[00:22] - TVHeadend ends recording
[00:51] - HTPC still on, Power up Receiver/TV to retrieve logs

If there are any other settings/logs you might find helpful please let me know.


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - _BJ1 - 2017-03-16

Hmm, the addon doesn't start at the second run (23:39) for some reason, so it couldn't manage the record. I don't know why. Is the log a complete log (especially the second run after 23:39)?


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - kurai - 2017-03-16

(2017-03-16, 14:27)_BJ1 Wrote: Hmm, the addon doesn't start at the second run (23:39) for some reason, so it couldn't manage the record. I don't know why. Is the log a complete log (especially the second run after 23:39)?
Yeah - I can see it finishing its shutdown loop @ [23.29], but no indication that its init is triggered again after RTC poweron @ [23:34] so the monitoring/checking stuff in Main Loop doesn't appear to be happening.

Log is complete until [00:51] where you can see I'm pressing keys on the remote to go to the button in LibreELEC settings that automatically bundles up logs and sends them to the Sprunge.us URL link shortening site.

What's the Kodi mechanism/method that the service relies on to start it up again after a suspend/wake cycle ? That would seem to be the primary fail point.


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - _BJ1 - 2017-03-17

Yes, it seems the only way is not to break the main loop even on shutdown (except on user activity). I investigate on this next week. Maybe we find a solution.


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - kurai - 2017-03-18

(2017-03-17, 17:51)_BJ1 Wrote: Yes, it seems the only way is not to break the main loop even on shutdown (except on user activity). I investigate on this next week. Maybe we find a solution.

Thanks for looking in to this.

The 'auto-suspend_after_recording_if_no_user-input_detected' part definitely does what I need Wink

I saw it in operation by manually inputting a wakealarm time into shutdown.sh that was 1 second *after* the recording was supposed to start, instead of using the variables passed from the service. Kodi resumed and TVHeadend started recording instantly so that by the time service.tvh.manager got around to looking at status.xml it saw the <status>Recording</status>, polled till it was finished then executed the return to suspend just as I was hoping.

For the time being I've stuck a dumb time.sleep() into default.py so that by the time it's expired the TVH Recording is active and the manager service is "forced" into the polling/wait/suspend loop instead of finding nothing to do and exiting.

It's rather an amateurish method but it'll do as a temporary solution Tongue


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - Codinger - 2017-06-15

Hello _BJ1,

luckily I found your add on in order to solve my wakeup issue for automated recordings in Libreelec. Unfortunately I am not able to get it to work properly.

I got a MSI A75A-G35 mainboard, in the Bios I disabled HPET. ACPI is S3, controlled by OS.
I have installed LibreELEC v8.0.2 with tvheadend 4.2 and your addon.

When I press the power Button after setting a recording timer there is no screen message, it takes about 20 sec then the system is shutting down. But It refuses to wakeup.
This is my log: http://sprunge.us/hihE.

I would be very happy about your help. Thanks in advance.


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - _BJ1 - 2017-06-15

Hello Codinger,

Logfile looks good, no issues. Check your BIOS settings (ACPI). You must enable 'wakeup by RTC' - other options are not needed. If you want to see the shutdown messages again, you have to update to 0.3.22. I'm sorry that I've forgotten to update the kodi repository. Try the version from my repo (see signature) or wait for an update soon.


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - Codinger - 2017-06-15

Hello _BJ1,

thank you for the very quick reply. I will give it a try. I my BIOS it is call "resume by RTC"

Waiting for wakeup at 14:25


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - Codinger - 2017-06-15

Hello _BJ1,

14:25 did not work and also 14:37 see my log: http://sprunge.us/FdeQ


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - _BJ1 - 2017-06-15

Hmm, apart from the fact that the addon has started several times (you use the 'rewind' key as power key?), it looks good. Could you take a look to the permissions of shutdown.sh (/storage/.kodi/addons/service.tvh.manager/resources/lib/shutdown.sh)? This should have execute rights normally and this would be set at first start of the addon.

Also, it seems you are from germany so I invite you to the german kodinerds forum (www.kodinerds.net). This is also the home of this and other adons of mine.
Look here: https://www.kodinerds.net/index.php/Thread/18168-TVHeadend-Powermanagement-f%C3%BCr-XBMC-Live-XBMCbuntu-11-04-12-04/


RE: [RELEASE]Plugin for Timer- and Powermanagement in XBMC/Kodi and TVHeadend - Codinger - 2017-06-15

Hello _BJ1,
the permissions are as follows:
-rwxr--r-- 1 root root

Powerkey is "N"

You are right I am a German user. Thank you for the invitation. I will create a user "Codinger" in the kodinerds form and we can continue there.