Pförtner is a fully digital door label.
-
It utilizes a tablet outside an office room to display information about the office occupants. The occupants inside the office can control the door label via a smartphone app.
-
Each occupant can display their current status and their office hours along with a picture.
-
A status for the whole room can be set along with a name for the room.
-
Additionally, Pförtner utilizes the tablets' camera from the smartphone application to take a peek at who is outside the door.
-
People outside the office can use Pförtner to arrange appointments. The selected occupant will get a notification on their smartphone and should the occupant accept the appointment, it will be added to their Google calendar. The creator of the appointments is notified via email.
The following picture shows the communication between the different components of Pförtner.
For a detailed overview of Pförtners architecture take a look at the technical documentation.
- At least 2 Android devices with Android 8.0 or higher.
- The recommended configuration is 1 tablet as the door label and 1 smartphone per person working in the office.
Android studio needs to create the .apks for the clients from their corresponding projects:
PfoertnerAdmin for the smartphone and PfoertnerPanel for the table\label.
Both clients need the address where the server is hosted before the .apks are created. For this, Config.java needs to be edited.
The server is deployed via docker. First follow the instructions in this section to set up all config files, then build the docker image. The server needs to either be accessible from the internet or all devices need to be on the same network.
To build your own instance of the Pfoertner service, we will need to add a few secret files to this project in the following steps.
Hence, you should first make sure, your downstream clone/fork of this repository is private.
This guide follows https://firebase.google.com/docs/android/setup#console
-
Create a Firebase project at https://console.firebase.google.com/ You will need a Google account for this.
-
Open your project.
-
Register the admin app. For this, click on the Android icon.
-
Enter the following package name:
de.tu_darmstadt.epool.pfoertneradmin
-
Enter some app nickname. E.g.
PfoertnerAdmin
-
Download the
google-services.json
file offered to you. Place it at the following path in your clone of the project:PfoertnerAdmin/app/
We will now repeat the above steps with minor changes to setup the PfortnerPanel app:
-
Create a Firebase project at https://console.firebase.google.com/
-
Open your project.
-
Register the panel app. For this, click on the Android icon.
-
Enter the following package name:
de.tu_darmstadt.epool.pfoertnerpanel
-
Enter some app nickname. E.g.
PfoertnerPanel
-
Download the
google-services.json
file offered to you. Place it at the following path in your clone of the project:PfoertnerPanel/app/
The backend server of Pfoertner needs a private key to access the Firebase project. In this step, we will create it and provide it to the backend.
We will roughly follow the steps described here: https://firebase.google.com/docs/admin/setup#initialize-sdk
-
Go to https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk and open the Pfoertner project.
-
Generate a new private key in the displayed dialog. Download the file and save it as
PfoertnerServer/firebase/firebase-secret.json
This section roughly follows https://developers.google.com/workspace/guides/create-credentials
-
Create a Google Cloud Console project: Go to https://console.cloud.google.com/projectcreate and enter a project name
-
Set up your project:
- Go to https://console.cloud.google.com/auth/clients
- Click "Get Started"
- Enter an app name and email
- Under audience you can select external, creating a Google Workspace is not required
-
Create a client (i.e. credentials to authenticate the server as belonging to the project)
- Go to Clients in the side navigation panel and click CREATE CLIENT
- Select Web application under Application type
- You don't need to add any JavaScript origins or redirect URIs
-
Download the client secret
- You will be redirected back to Clients
- There you will see the web client you just created. On the right of the page under actions, click the download button (Download OAuth client)
- Move the file you downloaded to
./PfoertnerServer/client_secret.json
-
Copy the client id into the apps
- Now click on the name of the client you have created
- On the right side, under Additional Information, copy the Client ID ending in apps.googleusercontent.com
- Open the file
./PfoertnerCommon/src/main/java/de/tu_darmstadt/epool/pfoertner/common/Config.java
and change the variableSERVER_CLIENT_ID
to your client id
-
Configure the public-facing URL of your backend in
./PfoertnerServer/.env
.E.g.
PUBLIC_URL="https://myserver.de"
This config example assumes a (reverse) proxy is in place which applies SSL encryption and binds to port 443.
If you do not want to setup a Apache or nginx (reverse) proxy to apply encryption (strongly discouraged!), you can configure the URL like this:
PUBLIC_URL="http://myserver.de:3000"
-
Also configure the URL in the end user app settings. That is, open the file
./PfoertnerCommon/src/main/java/de/tu_darmstadt/epool/pfoertner/common/Config.java
and change the variableSERVER_ADDR
to the same public url as before.That is, the file should look something like this:
package de.tu_darmstadt.epool.pfoertner.common; /** * This class contains global settings */ public class Config { public static final String SERVER_ADDR = "https://myserver.de/"; public static final String SERVER_CLIENT_ID = "my-client-id.apps.googleusercontent.com"; public static final String PREFERENCES_NAME = "MainPrefs"; }
-
Optional: Enter email credentials into the server settings. The server can notify panel users if their appointment request is rejected. If you want to use this feature, simply add credentials for an email account (GMX works) to
./PfoertnerServer/.env
as follows:EMAIL_ADDRESS="your email address" EMAIL_PASSWORD="your email password"
If you want to use a different email provider than GMX, you also need to adjust the settings in
./PfoertnerServer/routes/appointments.js
. -
Build the Docker image
docker build -t pfoertnerserver:1.0 .
And start the container
docker run pfoertnerserver:1.0
You can also manually set up the server using
npm
. Simply navigate into./PfoertnerServer
, then runnpm install
to install dependencies andnpm start
to start the server.
You are now ready to use Pförtner. Open both apps in Android Studio and build APKs, or load the apps onto your smartphone and tablet using USB debugging.
This Project was developed as part of the Internet Praktikum Telekooperaion at Technische Universität Darmstadt.
- Marc Arnold - @m-arnold
- Jonas Belouadi - @potamides
- Anton Haubner - @ahbnr
- David Heck - @heckstrahler
- Martin Kerscher - @maruker
AFFERO GENERAL PUBLIC LICENSE, see LICENSE.md