View Single Post
Old 06-15-2013, 02:20 PM   #52
z000ao8q
Connoisseur
z000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toysz000ao8q shares his or her toys
 
Posts: 51
Karma: 5942
Join Date: May 2013
Device: kobo mini
Hello,
just a happy update. It seems to work for me - even so I still need to run it for several days to test stability and runtime.

Basic idea:
  • wakeup every hour
  • execute Cron (at 1 min after the hour) to update display
  • send to sleep until next full hour
As the cron is only executed between 7am and 8pm on my side, I had to go a little extra way. basically I am dividing the timestamp by 3600 seconds to geht the last full hour and then up to the next execution...
this is how my update.sh looks like (which is executed by cron)

Quote:
sh /mnt/onboard/wifiup.sh

....update display...

sh /mnt/onboard/wifidn.sh

h=`date +%H`
timestp=$((`date +%s`/3600))
if [ "$h" -ge 20 ]; then
multi=24-$h
let timestp+=7
let timestp+=$multi
elif [ "$h" -lt 7 ]; then
multi=7-$h
let timestp+=$multi
else
let timestp+=1
fi
timestp=$((timestp * 3600))
/mnt/onboard/busybox_kobo rtcwake -t $timestp

Last edited by z000ao8q; 06-16-2013 at 01:42 PM.
z000ao8q is offline   Reply With Quote