[Linux/All] - "Unified ACPI" (wakeup/poweroff/suspend timer)
#1
Lightbulb 
hello all,

i'd like to propose a feature for xbmc which could collect certain aspects of acpi necessary for a xbmc based htpc. maybe the title wants some more as stated below, but i just thought it sounds nice, while it just picks some features of acpi.
further proposals are welcome, let's brainstorm this feature: Smile

what we've got now:
- shutdown timer
- start playlist at startup

what we need in addition:

MAIN FEATURES:

- suspend timer:
  1. for both s2ram and hibernate. although i assume most people will use s2ram
  2. allows the user to set a certain date to shutdown/suspend the htpc. single events or periodically.
=> benefits:
  • flexibility
  • makes it easier to save power
  • makes life easier


- wakeup timer:
  1. allows the user to set a certain date to wakeup the htpc. single events or periodically.
  2. set action after wakeup. e.g. play certain track, playlist, album, cd, tv/epg (in future), etc.
  3. there has to be a difference in setting up an alarmclock or playing something at a user initiated startup/wakeup. each other should not override.
=> benefits:
  • flexibility
  • use xbmc as an alarmclock
  • get instant entertainment
  • makes life easier


- gui:
  1. a dedicated section placed besides the shutdown menu to setup the different timings. maybe an additional button in the shutdown menu, which calls a window, would be enough.
  2. link both, acpi menu and shutdown menu in a certain manner to access quickly related actions
  3. let the user select a track, playlist, video or tv broadcastings and set a timing within the available media sections (music, video, tv (future))
=> benefits:
  • usablility


ADDITIONAL FEATURES:

- local broadcasting/local video on demand/mobile tv:
  1. let the user create his own local tv-station and radio stations based on genre. xbmc could get the the data available within the libraries. afaik duration of tracks and videos are also stored. based on this data xbmc could calculate some kind of random realtime tv program without playing the media if the user is not tuned in. the gui would notify the user about the current broadcastings. as soon as the user selects a channel, xbmc would start to playback the chosen type of media from its current position but also offering the possibility to start the track/video from the beginning or skip to the next track/video.
  2. possibility to stream the channels into the local network.
  3. if the system is powerful enough to reencode the stream, it could also get broadcasted to mobile devices outside the local network.
=> benefits:
  • nonstop entertainment, without raising a finger.
  • mobile entertainment


- gui:
  1. extension to offer the user a guide for available broadcastings notifing her/him about queued tracks/videos. also a kind of epg, the lets him browse and schedule upcoming broadcastings.
=> benefits:
  • usablility



how would the acpi based stuff work?
well basically i'm doing this, i'm talking about the wakeup feature right now, with echoing certain parameters to /sys/class/rtc/rtc0/wakeup. for an example:
Code:
echo `date '+%s' -d '+ 2 minutes'` > /sys/class/rtc/rtc0/wakealarm

afterwards i could check the settings via:
Code:
cat /sys/class/rtc/rtc0/wakealarm

in addition it is necessary to sync the hwclock:
Code:
hwclock --systohc
it's important to set the clock to utc or gmt, but not localtime, otherwise wakeup would not work.

after the wakeup was processed, the settings are gone again. downside is that someone has to have root access to fire these commands. but i'm sure there is a way to do this as a user. sudo would be a solution but i guess that's not really suitable for this task. maybe policykit in conjunction with hald and dbus would give us needed privileges? what about crond?
i know that mythtv and vdr use the above to wakeup the system to record a scheduled tv broadcasting. maybe xbmc could use their approach as a cheatsheet. Wink
what i can not judge is, whether this feature would be realizeable for all operating systems or not. but as far as i can tell, there are tools for these goals on all systems.
what do you people think about that idea? hot or not?

cheers,
einhänder

NOTE: i will update this post with further brainfarts regarding this topic. ^^
NOTE: now on trac: http://trac.xbmc.org/ticket/7739
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux/All] - "Unified ACPI" (wakeup/poweroff/suspend timer)0