1

What would be the best way to manage multiple raspberry Pi in kiosk mode? I was thinking on pointing them to a website that has the information they need to display. But I don't know if there's anything or I need to build something to be able to remote edit those raspberry pi kiosk to point to a different website. (Not all the raspberry pi will point to the same url).

I was thinking on searching Raspberry Pi in the network with something like this: Find Raspberry PI address on local network But then I don't know if they will be in the same network or not. So it's better if I assume that will need WAN access.

So to make it short: - Multiple Raspberry pi in Kiosk mode pointing to a url (can be different for different Pi) - Wan access to modify the url they are pointing to or restart it. - Will only display a website each of those Pi

SERPRO
  • 113
  • 6
  • Your question has too many unknown variables to be answerable. What kind of content is being displayed on each screen? Is it updated in real time, or every 6 months? Are all of the Pi's working on the same local network, or do they require WAN access? Can you narrow down the parameters at all? – goobering Feb 12 '16 at 14:20
  • well I specify that they will display a website. I'll update the question further. Thanks – SERPRO Feb 12 '16 at 14:26
  • have a look at http://blogs.wcode.org/2013/09/howto-boot-your-raspberry-pi-into-a-fullscreen-browser-kiosk/ - I guess you could use this as a starting point and go on from there (like expanding the xinitrc script to point to different URLs) – pastacool Feb 12 '16 at 15:15
  • If they are not on the same LAN you'll need to do port assignments or something via a gateway router. Note that general networking is off-topic here. As goobering implies, right now this sounds like you are just brainstorming with yourself. You need to think and make notes or whatever until you have a coherent question, then find the appropriate place to ask it. Not everything involving a pi requires expertise with the hardware, just like not everything done on an Acer laptop is best explained by other users of the same laptop. – goldilocks Feb 12 '16 at 15:17
  • 1
    Put another way: Asking other people for advice online is not the *first* step you should take in organizing a project. You should come up with some ideas, research them to clarify -- there are literally millions of pages available online already for this purpose -- then ask specific, detailed questions about things you are uncertain about, or have tried and failed to accomplish. – goldilocks Feb 12 '16 at 15:20
  • thanks @goldilocks, but this question is not my first step to solve my issue. I'm asking as open to any possible solution that might be out there, so this question could be relevant to other people in the future that might (or not) have the same requirements. – SERPRO Feb 12 '16 at 15:33
  • To be blunt: How the questions reads is that you do not perceive the scenario you are contemplating very well, so the most help it could be for you and others is if someone wrote a long explanation of the various concepts involved so that you can actually detail the requirements properly. However, this is not a discussion forum and there is no point to regurgitating textbooks. – goldilocks Feb 12 '16 at 15:44
  • 1
    The only way you are going to get anywhere is to pick a place to jump in and do it, then alternate between doing, researching, and asking questions when necessary. This is not some simple task you just have to plug in some cables one afternoon with two paragraphs of instructions. You are going to learn some things doing this. *You are going to have to struggle and try.* There is no silver bullet anyone can provide at this point. If this is beyond you you need paid help. – goldilocks Feb 12 '16 at 15:44
  • I appreciate that @goldilocks. Do you think the question could be save with some editing or should I remove it? – SERPRO Feb 12 '16 at 15:53
  • You don't have to deleted it, my own opinion is stuff like this still serves as a (sort of negative) example of something. I think the system will automatically deleted it after 30 days *if* there are no answers (there can't be now), it is not a duplicate, and there are no upvotes (?). Since you have an upvote it will probably be left alone. WRT another question, I would start from scratch, and *focus on an issue*. The "big picture" is yours to deal with yourself. – goldilocks Feb 12 '16 at 16:41
  • I have a basic solution script that could help you but the question is locked. @goldilocks any way to unlock it? – EDP Feb 12 '16 at 23:36
  • @EDP Okay, fair enough. Beware the **not a LAN** stipulation. This is not just a matter of getting/setting some local IPs or hostnames. These are potentially in separate subnets. – goldilocks Feb 12 '16 at 23:39
  • @goldilocks indeed the question is broad and rather vague. But IMHO he's searching for a solution from the wrong vantage point. My answer is *my* interpretation of his question - could be the wrong one. If it's **Kiosk** I always love to answer :-) – EDP Feb 13 '16 at 07:31

1 Answers1

1

I'd try a a different angle. All raspberries are somehow identifiable in a couple of ways:

  • via a separate URL (hard coded solution)
  • the WAN IP (dynamic solution but probably not fixed and not useable for setups with multiple raspberries behind the same router)
  • their MAC address or their Serial number. (also dynamic, needs some minor scripting to extract it)

If you do a request to an external webpage, you can use this identifiers to redirect you to the desired page.

The solution below will allow you to setup your raspberries without needing to know where they need to point at beforehand. It logs the requests in http://yourserver/kiosk.log so you can identify new raspberries more easily. The scripts on both sides probably will need some fine tuning, but I hope it helps you to get started.

It obviously requires an external webserver with PHP.

On the Pi side: (example for use in bash)

wget http://yourwebserver/kiosk.php?id=`awk '/^Serial\s*:\s/{print $3}' /proc/cpuinfo`

If you're using X to display your pages you'll need to find a way to get this serial number pasted correctly. I cannot help you with that, I suggest you open a separate new question to get answers on how to do this.

On webserver/kios.php

<?
// redirect url for when ID is given but not found in the serial list
$default_unknown_id = 'http://google.com';

// redirect url for when no ID is given at all
$default_no_id = 'http://stackexchange.com';

// list your raspberry serial numbers with their redirects
$serial['0000001234000001'] = 'http://yourserver/url1';
$serial['0000001234000002'] = 'http://anotherserver/url2';
$serial['0000001234000003'] = 'http://example.org/';
$serial['0000001234000004'] = 'http://yourserver/url4';
$serial['0000001234000005'] = 'http://yourserver/url5';

if (@$_REQUEST['id'])
{
    $request = $_REQUEST['id'];
    if (array_key_exists($request, $serial))
    {
        $url = $serial[$request];
    }
    else
    {
        $url = $default_unknown_id;
    }
    $log[] = date('Y-m-d H:i:s');
    $log[] = $_SERVER['REMOTE_ADDR'];
    $log[] = $request;
    file_put_contents('kiosk.log', implode("\t",$log)."\n",FILE_APPEND);
}
else
{
    $url = $default_no_id;
}
echo '<html><head><META http-equiv="refresh" content="1;URL='.$url.'"></head>';
?>
EDP
  • 1,661
  • 1
  • 13
  • 24