Cannot write to /sys/class/rtc/rtc0/wakealarm

  • Hello,

    I am trying to get wakeup of my HTPC set up. Following the exessive guidline from the MythTV wiki, I am already stuck at the first stages.
    It seems that I cannot write to the SysFS file properly, but it does also not yield an error.

    Whatever I want to echo into the wakealarm file, I only see that it updates the alarm_time with a short offset from now:

    The alarm_IRQ is not set, which means the box won't wake up.
    Regardless of which epoch time I echo into the wakealarm file, it is always the same result. I only have a few minutes offset from the rtc_time and no IRQ.

    What would be my next step to investigate?


    Thank you.

    Regards,
    Marcus

    Edited once, last by mzurhorst (April 1, 2017 at 10:22 AM).

  • Hello Nicolas,
    I was just about to answer in your thread, but did not want to scatter the problem.
    It is strange. It is not fixed for me in 8.0.1. Have a look:


    However, the issue is less with the setwakeup.sh script, but more with the "date ..." construct which calculates the time into unix epoch.
    This is broken on my machine.

    I am right now doing this test: date +%s
    This returns the seconds. Then I manually add 300 to this number and echo this into the wakealarm file.
    This is indeed setting the time properly, and the box wakes up. :D
    I am also toggele the alarm interupt on/off when I alternately echo the seconds and 0 into the wakealarm.


    Only don't ask me why it did not work previously when I opened the thread. I assume I have had a typo in my manual calculation and missed a digit.
    Every timepoint in the past is not set, which makes sense. Still need to verify this further.


    Regards,
    Marcus

  • Hello Marcus!

    Great!

    I am using timers only with TVHeadend and tvh manager to boot up the system for a recording timer.

    My system wakes up perfectly with LE8.01.

    But only if HPET is dissabled in BIOS or in LE via autostart.sh. In OE 6 HPET was dissabled by Default in LE7 I had to do this manually.

    Regards
    Nicolas

  • Well, it is not really great as long as the "date ..." construct is not working.
    Or do I not need this?

    How do I tell TVHeadend to call the setwakeup.sh script?

  • Nicolas,

    are there any changes to a script required as described in the readme.pdf document?
    I installed the addon and did a reboot, but I cannot see that a timer is written to the /proc/driver/rtc.

    Thank you for your great support!

    Marcus

  • Hello Marcus!

    For me it is working without any scripting (Power Button).
    Set a recording timer in the epg (use a program which is 20 or 30 minutes or more in the future, depends on your pre-record setting).

    Then shut the box off you should see a reminder that a program is set to be recorded.

    Sometimes 1 or 2 reboots are required till the service runs after first install.

    If you check rtc then the alarm should be set.

    Regards

    Nicolas

    Edited once, last by Nicolas (April 2, 2017 at 12:35 PM).

  • Hi Nicolas,

    the error was sitting in front of the computer.
    Right now, I am still working a lot with the TVH web interface for the basic setup. Not so much from the Kodi GUI.
    I assumed that the Kodi addon would also recognize that I plan recordings directly from the web interface. This was not the case.

    I will probably switch to another shutdown script and embed this as system.d service because I do not want to be limited to Kodi only.
    I like to browse the EPG data from my Android app and define a recording from there. For these ones, the wakeup needs to be set as well.

    A sample recording from Kodi is indeed waking up the computer on time!
    Thanks for the help.

    Regards,
    Marcus

  • Hello Marcus!

    Okay my systems are pure HTPCs nothing more than live TV music and video, no dual boot whatever. I am using the TVHClient on Android for watching tv on mobile devices and to program/delete/watch recordings . Due to the fact TVHeadend don't need to transcode anything, if you have a good player installed it is great!

    Your welcome!

    Regards

    Nicolas

    Edited once, last by Nicolas (April 2, 2017 at 2:58 PM).