![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
|
Online screensaver extension
Online Screensaver version 0.3, updated 2014-03-31 Description The Online Screensaver automatically fetches a new screensaver image from a user-specified URL at a user-specified interval. If a screensaver is shown at download time, the downloaded image will be displayed right away. This extension supports updating the screensaver even when the Kindle is asleep (obviously it won't work if you have really powered the Kindle down by pressing the power button for many seconds). As such, it will use additional battery as it will un-suspend your Kindle at the configured intervals for one or two minutes. The image should be in the correct resolution of your device, otherwise the results may not look so pretty :-) The image also needs to be a "clean" png, as otherwise you may only get a white screen (you can test whether an image is working by calling "eips -f -g image.png" on your Kindle). Possible use cases:
Disclaimer As of version 0.1, this extension has only been tested on a Kindle Paperwhite 2 with WiFi. Support of other devices is unknown, but feedback is appreciated. How this script interacts with 3G models is also unknown. Also unknown is what happens if damaged image files are downloaded. It is recommended to test the extension manually prior to activating auto updates. To do so, connect to your Kindle via SSH (ref. USBNet) and run Code:
/mnt/us/extensions/onlinescreensaver/bin/scheduler.sh & Either way, as usual please be advised that you are using this extension on your own risk. Prerequisites
Installation Unzip the downloaded file into the extensions folder (/mnt/us/extensions when using SSH, otherwise the extensions folder at root of the Kindle volume when connected to your PC). Configuration Edit onlinescreensaver/bin/config.sh, all available options are described here. Note that you MUST use an editor that supports Unix line endings. On Windows, use e.g. the free notepad++ application. Uninstalling It is recommended to disable auto-updates prior to deleting the folder from the extensions directory. Last edited by peterson; 05-05-2014 at 11:58 AM. Reason: add requirement for FW 5.x / PW |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
|
I've uploaded the first version of my script that automatically fetches the weather as screensaver for my Kindle. As it can be used for other types of images as well, I've selected a more generic name. But for me, the primary purpose was to replace the Kindle side of the "weather screensaver" to fetch the latest weather report even if the device is sleeping, and to display it right away.
I hope others will like this kind of functionality. I am looking forward to reports on how it works on devices other than the PW2, and whether you experienced any problems/bugs/catastrophes. Also let me know if you are missing any feature. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Ooh, shiny!
A couple of quick 2AM comments: 1/ KUAL actions: the root fs is ro by default, and unless I completely forgot about a symlink, the upstart jobs live in /etc/upstart, not /etc/init 2/ You'll probably want to default to the correct filename (beware: depends on the target device) for the screensaver, or trigger a re-parse from the screensavers hack, because it won't do anything with a file named 'onlinescreensaver.png' without further action ![]() (That of course gets a bit more complex if the SS hack is in cover mode, but I think we're agreed that the two should be mutually exclusive anyway.) All of that applies to FW 5.x devices, since: 1/ Before that, they used SySV init, not upstart 2/ And they didn't really care about the screensaver filenames (Also, there's a leftover log in bin/stdout in your archive ;p). Last edited by NiLuJe; 03-18-2014 at 09:07 PM. |
![]() |
![]() |
![]() |
#4 | ||||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
|
Quote:
Quote:
I uploaded a fixed version (0.2) where the default screensaver filename is the first one that linkss uses on a PW2. I'm not 100% comfortable, as this will overwrite this file :-/ Do you maybe have a suggestion for a better solution? Do you have an idea how I could handle this situation? I probably could scan the directory and somehow figure out the correct filename for the current device, however I'd rather not overwrite the image. Quote:
![]() Quote:
|
||||
![]() |
![]() |
![]() |
#5 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yup, if you drop it with whatever name you want in /mnt/us/linkss/screensavers, and then call /mnt/us/linkss/bin/shuffless, the script will handle it like at boot up (thus handling it properly for the target device), while preserving the user's content.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
|
Thanks for this pointer. This however leaves the question on how to remove the old downloaded screensaver image
![]() |
![]() |
![]() |
![]() |
#7 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@peterson: Hah! Good point
![]() If there's only one file in the screensavers folder, it's guaranteed to be the one, just renamed. But that would imply duplicating the clearing of the screensavers folder (that shuffles does) from your end, before running shuffles... (ie. clear screensavers folder, copy updated image, run shuffles). Which I guess loses some of the interest of relying on shuffless vs. simply doing everything on your end... ;D |
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
|
Right now I can't think of a good solution. I guess what I have now (user explicitely specifies the filename) is acceptable for now. It probably makes sense to have only one screensaver anyway when it is auto-updated.
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2014
Location: Germany
Device: Kindle Paperwhite 2 WiFi
|
Hello,
Thanks for this great extension!! This actually is what I was waiting for! But I have one question/problem: I use a PW2 WiFi only. auto-update seems to work in standby as the screen flickers for a second in the given intervals. However the screensaver image shown on the screen doesn't update. I have to shortly switch the Kindle on and off by pressing the power button twice to see the updated screensaver image. Any ideas? Seems to be related with the reloading of the freshly downloaded image. Hades. Update: I debugged the update.sh and found out that eips returned an error due to an incompatible png-file (not 8bit grayscale). Obviously my file format is only a problem for eips not for the "normal" screen saver mode. I modified my file and am very happy now! Last edited by Hades77; 03-23-2014 at 06:00 PM. |
![]() |
![]() |
![]() |
#10 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Hades77: Yup, eips is *very* picky about what it'll accept (cf. the cover conversion settings for imagemagick in the screensavers hack).
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2014
Location: Germany
Device: Kindle Paperwhite 2 WiFi
|
Hi again,
I was thinking about how I could modify onlinescreensaver so that it will not update automatically whithin a specified timeframe. My goal is to save battery during nighttime, 'cause my update cycle is set to 5 Minutes and I do not need it while I am sleeping. I now have thought about 2 different approaches to that: 1. modifying onlinescreensaver itself a) specify two veriables in config.sh Code:
# Timeframe within which update is disabled, define same time to always update SLEEPBEGIN=2300 # no update after 23:00 SLEEPEND=0730 # and before 7:00 Code:
# do nothing if in sleep timeframe HOUR=$(date +%H%M) if [ \( $SLEEPBEGIN -gt $SLEEPEND -a \( $HOUR -ge $SLEEPBEGIN -o $HOUR -le $SLEEPEND \) \) -o \ \( $SLEEPBEGIN -lt $SLEEPEND -a \( $HOUR -ge $SLEEPBEGIN -a $HOUR -le $SLEEPEND \) \) ]; then exit fi 2. creating a cronjob that calls the enable.sh / disable.sh at specified times. Code:
00 23 * * * /mnt/us/extensions/onlinescreensaver/bin/disable.sh 00 07 * * * /mnt/us/extensions/onlinescreensaver/bin/enable.sh UPDATE: somehow these cronjobs don't work at all. They do not call the script. Hmm... UPDATE2: works after reboot 3. Maybe it is possible to let enable.sh create the 2 cronjobs if a timeframe is specified and disable.sh delete these cronjobs. But I don't know how to do that. Maybe like that? Code:
mntroot rw echo "00 23 * * * /mnt/us/extensions/onlinescreensaver/bin/disable.sh" >> /etc/crontab/root echo "00 07 * * * /mnt/us/extensions/onlinescreensaver/bin/enable.sh" >> /etc/crontab/root mntroot ro And how does onlinescreensaver then know if auto-update is enabled or disabled?! Any suggestions? I would very much love such a feature! Hades. Last edited by Hades77; 03-27-2014 at 04:17 PM. |
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2014
Location: Germany
Device: Kindle Paperwhite 2 WiFi
|
OK. this is strange:
For testing purposes I have set the following cronjobs: Code:
15 21 * * * /mnt/us/extensions/onlinescreensaver/bin/disable.sh 28 21 * * * /mnt/us/extensions/onlinescreensaver/bin/enable.sh Code:
Thu Mar 27 21:12:28 CEST 2014: Screen saver image updated Thu Mar 27 21:12:28 CEST 2014: Start waiting for timeout (300 minutes) Thu Mar 27 21:12:28 CEST 2014: Starting to wait for timeout to expire Thu Mar 27 21:15:01 CEST 2014: Disabling online screensaver auto-update Thu Mar 27 21:17:29 CEST 2014: Finished waiting Thu Mar 27 21:17:29 CEST 2014: Screen saver image updated Thu Mar 27 21:17:29 CEST 2014: Start waiting for timeout (300 minutes) Thu Mar 27 21:17:29 CEST 2014: Starting to wait for timeout to expire Thu Mar 27 21:22:30 CEST 2014: Finished waiting Thu Mar 27 21:22:34 CEST 2014: Screen saver image updated Thu Mar 27 21:22:34 CEST 2014: Updating image on screen Thu Mar 27 21:22:35 CEST 2014: Start waiting for timeout (300 minutes) Thu Mar 27 21:22:35 CEST 2014: Starting to wait for timeout to expire Thu Mar 27 21:25:12 CEST 2014: Starting to wait for timeout to expire Thu Mar 27 21:27:36 CEST 2014: Finished waiting Thu Mar 27 21:27:36 CEST 2014: Screen saver image updated Thu Mar 27 21:27:36 CEST 2014: Start waiting for timeout (300 minutes) Thu Mar 27 21:27:36 CEST 2014: Starting to wait for timeout to expire Thu Mar 27 21:28:01 CEST 2014: Enabling online screensaver auto-update Thu Mar 27 21:28:02 CEST 2014: Screen saver image updated Thu Mar 27 21:28:02 CEST 2014: Start waiting for timeout (300 minutes) Thu Mar 27 21:28:02 CEST 2014: Starting to wait for timeout to expire Between 21:15 ans 21:28 under KUAL-->onlinescreensaver I can see "enable auto-download" which should tell me that auto-download is currently disabled. Nevertheless auto-download still seems to be running according to the log and the screen I see. Hades. |
![]() |
![]() |
![]() |
#13 | |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2014
Location: Germany
Device: Kindle Paperwhite 2 WiFi
|
I think I found an error in your onlinescreensaver.conf:
Quote:
Hades. |
|
![]() |
![]() |
![]() |
#14 | |||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
|
Quote:
Code:
echo $((0730+0)) Quote:
If you can wait a few days, I can add this to the online screensaver extension. I'm just a bit swamped right now with work. Quote:
Last edited by peterson; 03-27-2014 at 05:53 PM. |
|||
![]() |
![]() |
![]() |
#15 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
AZW3 Extension | fcm52 | Amazon Kindle | 6 | 09-29-2013 06:47 PM |
SSModeSwitcher: An extension to change Screensaver mode | thomass | Kindle Developer's Corner | 13 | 11-04-2012 09:31 PM |
Troubleshooting file extension | gerry7 | Amazon Kindle | 1 | 05-25-2011 06:55 AM |
Will there be another US copyright extension? | pdurrant | General Discussions | 30 | 04-08-2011 10:12 AM |
NO extension, no sugar.... | Greg Anos | Lounge | 7 | 01-16-2010 10:23 AM |