[Swansea Hackspace] Raspberry Pi - kiosk mode

Emyr Morris em at preseli.com
Sat Jan 24 22:23:40 GMT 2015


Thank you all, lots of ideas to think about.

I'm also considering adding buttons to each pi connected to GPIO to trigger
reboot or shutdown.

Now if websockets connected to IFTTT....

On Saturday, January 24, 2015, Iain Menzies-Runciman <ming at gwndwn.org.uk>
wrote:

> Another option would be to use WebSockets
>
> Create a WebSocket Server (I am using
> https://pypi.python.org/pypi/websockets for one of my projects)
>
> Then create a WebSocket call from within the Web Page.
>
> Your server could then not only supply any changes dynamically, it could
> then also act as a watchdog timer on the requests from the client - e.g. if
> it has not been asked for a information refresh in X minutes, then it is a
> fair guess that there is something wrong.
>
> If want more details about how it could work, let me know.
>
> Regards,
> Ming
>
> On 23 Jan 2015, at 21:54, Emyr Morris <em at preseli.com
> <javascript:_e(%7B%7D,'cvml','em at preseli.com');>> wrote:
>
> yessss.... ajax - I was hoping to avoid ajax
>
> Just as I pushed the send button on my initial email JS and AJAX came to
> my mind.
>
> the project started off easy, I was going to just supply JPEGs on a memory
> stick plugged into the tellies
>
> Then he said about turning things on and off... changing prices on a
> weekly basis, and then wanting it controlled from his ipad
>
> that is when it became a client server setup
>
> that was the point I should have jacked the price up significantly to push
> him back to keeping it simple, but I am a sucker for a challenge.
>
> It is all databased so AJAX isn't a problem
>
> I have really optimised all the files so a refresh isn't at all bad, the
> nice HD background is the slowest thing loading.
>
> what is scary though is if it loses connection to the server and the
> customers don't have a menu to look at. There a JS solution would be much
> better as it could cache data until it gets a new connection
>
> I had thought of doing a cron job to detect if it had lost the server
> connection, and if so it would simply pipe a pre-defined screen capture to
> /dev/fb0
>
>
>
> On 23 January 2015 at 21:41, Justin Mitchell <justin at discordia.org.uk
> <javascript:_e(%7B%7D,'cvml','justin at discordia.org.uk');>> wrote:
>
>> On Fri, 2015-01-23 at 20:28 +0000, Emyr Morris wrote:
>>
>> > I was hoping to have something monitor chromium and if it detected
>> > that the browser had frozen / stopped responding or hadn't refreshed
>> > for a certain period of time, it would close the browser and re-open
>> > it
>> >
>> >
>> > I thought I had found an example a few months ago and bookmarked it,
>> > but I can not for the life of me find the example again.
>> >
>> >
>> > for example, I have a web page that is refreshed every 5 mins, if
>> > chromium has not refreshed in 10 mins it needs to be restarted.
>> >
>> >
>> > currently I am using a very simple
>> > <meta http-equiv="refresh" content="120">
>> > to reload the page,
>> > I would value advice. Thanks
>>
>> If there is a webserver on the pi have some javascript polling a simple
>> cgi script (a bash script would do) via ajax, so it isnt disturbing the
>> main page.
>>
>> its easy enough to check that a process is still running from a shell
>> script, but thats no indication that the page involved is still
>> running/reloading.
>>
>> Whilst there may be some cache and status files that belong to the
>> browser, i dont imagine that it would be a terribly reliable indication
>> of anything.
>>
>> as an aside, those kind of page reloads are awefully klunky and
>> disruptive, if you need any guidance on ajax, jquery, and other more
>> modern stuff I or one of the others will gladly help i'm sure.
>>
>>
>>
>> _______________________________________________
>> Hackspace mailing list
>> Hackspace at swansea.hackspace.org.uk
>> <javascript:_e(%7B%7D,'cvml','Hackspace at swansea.hackspace.org.uk');>
>> http://swansea.hackspace.org.uk/mailman/listinfo/hackspace
>>
>
>
>
> --
> This e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they are
> addressed.
>
> Mae'r e-bost hwn ac unrhyw ffeiliau a drosglwyddir gydag ef yn gyfrinachol
> ac at ddefnydd yr unigolyn neu'r corff y cyfeiriwyd hwy atynt yn unig.
>  _______________________________________________
> Hackspace mailing list
> Hackspace at swansea.hackspace.org.uk
> <javascript:_e(%7B%7D,'cvml','Hackspace at swansea.hackspace.org.uk');>
> http://swansea.hackspace.org.uk/mailman/listinfo/hackspace
>
>
>

-- 
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.

Mae'r e-bost hwn ac unrhyw ffeiliau a drosglwyddir gydag ef yn gyfrinachol
ac at ddefnydd yr unigolyn neu'r corff y cyfeiriwyd hwy atynt yn unig.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://swansea.hackspace.org.uk/pipermail/hackspace/attachments/20150124/2103514a/attachment.html>


More information about the Hackspace mailing list