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

    Hardware: Asrock J4205-ITX Mainboard, 500GB SSD, Technotrend S2-4200 DVB card, Atric IR wakeup (USB), Atmolight, Harmony 900 remote
    Software: LibreELEC 8.0, TVHeadend 4.2 backend

    Edited once, last by mzurhorst ().

  • Hello!
    There was a bug in Kodi 17 itself (LE8).
    Kodi 17.1 (LE 8.0.1) solved this.


    Take a look here


    Regards


    Nicolas

    Edited once, last by Nicolas ().

  • 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

    Hardware: Asrock J4205-ITX Mainboard, 500GB SSD, Technotrend S2-4200 DVB card, Atric IR wakeup (USB), Atmolight, Harmony 900 remote
    Software: LibreELEC 8.0, TVHeadend 4.2 backend

  • 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?

    Hardware: Asrock J4205-ITX Mainboard, 500GB SSD, Technotrend S2-4200 DVB card, Atric IR wakeup (USB), Atmolight, Harmony 900 remote
    Software: LibreELEC 8.0, TVHeadend 4.2 backend

  • 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

    Hardware: Asrock J4205-ITX Mainboard, 500GB SSD, Technotrend S2-4200 DVB card, Atric IR wakeup (USB), Atmolight, Harmony 900 remote
    Software: LibreELEC 8.0, TVHeadend 4.2 backend

  • 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 ().

  • 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

    Hardware: Asrock J4205-ITX Mainboard, 500GB SSD, Technotrend S2-4200 DVB card, Atric IR wakeup (USB), Atmolight, Harmony 900 remote
    Software: LibreELEC 8.0, TVHeadend 4.2 backend

  • 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 ().