Hi all,
This week or so I have been working on a web interface for the OSD. It
uses Lua for the server-side scripting.
The Lua scripts are executed by Luaetta, a FastCGI program developed
by a friend and I. lighttpd will hand the request to Luaetta for
processing whenever a .lua file is requested, Luaetta runs as a
seperate process, listening on a local socket.
Once I had Luaetta running, I set to work on the Lua scripts for the
interface. I so far have 3 (experimental) things:
Channel changer (channel.lua)
Change the channel via the IR blaster. Uses greyback's 'channel'
utility (included).
Scheduled Recordings (index.lua, editrecording.lua)
View and modify the scheduled recordings. To set the path to the
.recordings file you need to edit index.lua (search for
"samplerecordings") and editrecordings.lua (just at the top). I
recommend you play with a copy of your .recordings file for now.
After modifying the scheduled recordings the OSD will need to be
rebooted (or 'killall desktop' in telnet I hear). A nice solution for
this is being worked on.
watch.lua
A simple 30 second script, I was playing with embedding videos in a
page. Syntax: /web/watch.lua?file=osd.mp4 Not currently very useful.
Screenshots are here:
http://matthewwild.co.uk/projects/Neuros/OSD_schedule_list.png
and here: http://matthewwild.co.uk/projects/Neuros/OSD_schedule_edit.png
You can download a package containing it all here:
http://matthewwild.co.uk/projects/Neuros/luaetta_0.tar
Copy the tar file to a place on the OSD, telnet in, and cd to the
directory, then:
tar xf luaetta_0.tar
./luaetta.sh install
./luaetta.sh
(Whereever you run this from, it should always be run from the same
place in the future)
You will be left with a directory 'web' which contains all the current
scripts, etc. You can place this anywhere under /media to access from
HTTP.
Have fun, and remember this is really really a work in progress, so be careful!
Matthew
Keep in mind the the version of lighttpd on the OSD is vulnerable to
CVE-2007-4727 which can lead to remote code execution when FastCGI
support is enabled. It shouldn't affect normal OSDs because mod_fastcgi
isn't supplied, but it might affect you.
>>> Dan
Guess I should update it then huh?
Also, Matt can you supply a patch for how you got lua to build as a .so?
Good work.
One other thing that can be useful can be a "Record now on channel X
for Y minutes".
I like the idea of embeded video,
I didn't bother raising a bug because FastCGI support isn't supported in
the OSD release, but if people are adding it themselves like this, that's
probably a good idea.
>>> Dan
--
http://www.MoveAnnouncer.com The web change of address service
Let webmasters know that your web site has moved