rasptesting
Posts: 2
Joined: Mon Jul 15, 2019 7:26 am

Connect multiple raspberries to server with a hosted interface on it

Mon Jul 15, 2019 7:43 am

Hey guys, I'm looking for some advice on a particular subject. I want to start a small project with multiple raspberries. I can't really go too much into detail in what it is for, but I can elaborate on the work process. I need some information/guidelines/advice in what the best approach is that i could take for my project and what components I would need/use in order to get this to succeed.

Basically I need to connect multiple raspberry pi's to a server with a GUI hosted on it that will each have a separate login/password so each login will open a different website (or the same website with different login) on startup as it probably fetches this information from a database on the server. All the raspberry has to do is on startup to run a particular website. The requirements are as follows (as I believe the should be):
  • Host a linux server - little experience in this part
  • Host a GUI on the server - (not sure if necessary as it doesn't actually need more functionality than opening a website)
  • Favourably the raspberry is connected on 4g, will need a LTE shield for this. Wifi is reliable, but setting up the wifi each time the network changes is unreliable
  • Raspberry should connect to the server on login and open a page based on the username/connected client
  • Server needs a database that logs the raspberries so they can be monitored
  • it needs to be scalable, as in, if multiple raspberries need to be added to the server, all I would need to do is copy the SD card and make a new login/password on the database that has the macadress of the new raspberry in the table.
I'm probably forgetting a lot of steps, so that's why I need some help/guidelines. What would be the best approach to host a server on which I don't have that much experience, what is the best way to host an interface on the server, and how to connect the raspberries to this server through either login, or automatically each time the raspberry starts.

Or i could forgo the server and have something like teamviewer/vncviewer to access the raspberries individually or create something similar myself to not have it skyrocket in costs.

I'm not sure if raspberry pi is the recommended embedded system in this case, but having it be connected to a screen is mandatory.

I do have a history in computer science, but that's mostly excluded to java/c/haskell and a bit of python.

Thanks in advance!

edit: In the case of using teamviewer/vncviewer, does it matter that a remote raspberry pi with a dongle/sim changes its IP address? Does it have to be static, or is it that it simply connects to the internet and by default has connection to vncviewer? As I remember it, you connect through ssh, and opening ports on ISP's is basically not done. Not sure how that weighs in all of this.

epoch1970
Posts: 3364
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Connect multiple raspberries to server with a hosted interface on it

Mon Jul 15, 2019 9:46 am

Hum. In my crystal ball, I see that more or less as an IoT application.
I would look at cloud-init (for its meaningful name, mostly...) or possibly at designs enabling OTA updating, like Mender or Balena. Among others.
Everybody uses Pi it seems, at least for prototyping. I’d suggest you get 3 units for a start. Complexity starts at three...
Bringing your own network (4g) is an expensive option. Freeloading on some on-premise Internet (Ethernet and/or WiFi) is risky and rough, but it could be worth considering.
BTW, don’t focus on the server. Focus on on the lifecycles of the things and services you want to deploy.

HTH
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

rasptesting
Posts: 2
Joined: Mon Jul 15, 2019 7:26 am

Re: Connect multiple raspberries to server with a hosted interface on it

Mon Jul 15, 2019 10:49 am

epoch1970 wrote:
Mon Jul 15, 2019 9:46 am
Hum. In my crystal ball, I see that more or less as an IoT application.
I would look at cloud-init (for its meaningful name, mostly...) or possibly at designs enabling OTA updating, like Mender or Balena. Among others.
Everybody uses Pi it seems, at least for prototyping. I’d suggest you get 3 units for a start. Complexity starts at three...
Bringing your own network (4g) is an expensive option. Freeloading on some on-premise Internet (Ethernet and/or WiFi) is risky and rough, but it could be worth considering.
BTW, don’t focus on the server. Focus on on the lifecycles of the things and services you want to deploy.

HTH
Hey, thanks for the response, I haven't considered Mender or balena yet, good suggestion.

Currently there is one raspberry pi that's located at a client. It's a raspberry pi 3b+ and it's connected to their wifi. The problem is, offering the raspberry pi to other clients that are all over the country would mean either to program the wifi login before handing over the raspberry. And when the password would change the raspberry won't have access to the internet anymore, so I would have to go over to fix it or call them to make them fix it. In order to avoid that I would want to have them connect to a 4g network (or 3g, but for the long run 4g is more reliable as 3g would stop getting supported in a few years).

I'll check out balena and mender how they handle commercial use in case of 10+ raspberry pi's.

Thanks again!

Return to “Networking and servers”