Hi chill, as with most things I do, my approach is a bit hacky but it's
working pretty well.  The basic operation (ignoring the mechanics of
generating the image) is:

- Have jivelite configured to use image viewer as the screen saver,
configuring the delay times as desired
- I have separate http server running on my LMS server for other things
already so I'm used that to serve the image list file and image(s)
- Point jivelite to the url of the image list file
(http://10.0.0.10/res/photos/photos.lst)
- I have just a single entry in the image list file
(http://10.0.0.10/res/photos/wx.png)
- The wx.png file is actually a symlink to the real file which is in ram
instead of on disk:
wx.png -> /dev/shm/wxd/png/wx.png
- I have a cron job on the server which runs every minute to regenerate
the wx.png, every run it:
updates the time
updates the current temperature 3 times an hour on minutes 20,40, and
00
updates the 5 hour forecast at the bottom once an hour on minute 00

I'm pulling the weather data from a couple weather.gov sites (US) the
forecast is json and the currect observation is a METAR text file.

I was concerned that having a single file in the image list would result
in image viewer just downloading it once and never updating it, but it
looks like based on my server log, that image viewer downloads the list
file and then runs through the list until it gets to the end and then
starts again by starting the process over - so since my list only has
the single entry, my log shows alternating requests, first for the list
file, then for the image, then the list file, then the image, etc. over
and over.  And since jivelite does a bit of a fade between images, the
minute changing actually looks pretty cool.

I've still got some improvements I want to make to the image generation
script, sort of thinking about rewriting it altogether to get rid of
some of the heavier tools I'm using, like jq for the json file parsing.


------------------------------------------------------------------------
sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057
View this thread: http://forums.slimdevices.com/showthread.php?t=111488

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to