DifficultySchwierigkeitsgrad: expertExperte
Inhalt
Table of Contents | ||||
---|---|---|---|---|
|
Learning Objectives
After reading this article, you’ll be able to:
Identify which data types are supported by Spacewell Workplace
Configure webhook & authorization token to connect your external data sources to Workplace
Suppose there are already sensors collecting data in the building and you want to include its data into the Workplace IOT platform. Spacewell provides a generic endpoint (using webhooks) for most of its sensor data types, to integrate, process and store sensor data from 3rd party platforms.
title | External Data Sources for beginners - an analogy |
---|
Since you’re on this page: looks like the sensors, that are in scope of sending data to the Workplace platform, are sending data to a platform or database that is not connected to Workplace. Working your way down this page, we’ll make sure that there is a connection set up between the platforms, that the data is send is a format that Workplace can work with and knows how to identify.
Setting up External Data Sources and sending data from an external database to the Workplace platform can be compared to “A car arrives at a gate. The car is known to the gate keeper, and the person in the car has a badge, because he told his contact person up front that he was coming.”
We want the external platform to send data to Workplace, which is why we use webhook with HTTP method “post”. This means the data gets pushed by the other system, and Workplace will not have to pull it from somewhere.
By creating an External Data Source in the tenant, you create a door or gate towards the Workplace platform: the Webhook URL. You’ll also receive the code to open the gate: the Authorization Token. Providing this information to the owners of the database, they are now able to reach the door.
But they need to present us the data in a way that we can consume! So they need to adhere to some rules:
the data they send us must be meaningful: Workplace needs to be able to do something with that data (for example present them on a live floor plan or in a dashboard). So the External Data Source needs to provide the data in any of the 10+ supported data types.
it’s not enough that they would just throw some data at us. In order to correctly interpret that data, it needs to adhere to a specific (payload) format. In this way, we know which part of the information to interpret as the device ID, which part as the value we need to store in the Workplace database etc.
For Spacewell to know where we need to store the data in our database, the sensor needs to be known on our end, and linked to a location. This is why the device needs to be registered in Studio. To register the device in Workplace Platform, you need:
Device Type, which actually contains a preset of data types (per chosen DeviceType, a default set of channels is enabled).
Device ID, which needs to be unique.
In order to make this ID unique across all tenants, the device ID format includes the tenant ID
In order to make this ID unique within the tenant, the device ID format includes the External Data Source ID
Location information. If a sensor is not linked to a location, data is not stored in the Spacewell database.
|
Lernziele
Nach der Lektüre dieses Artikels werden Sie in der Lage sein:
Identifizieren Sie, welche Datentypen von Spacewell Workplace unterstützt werden
Konfigurieren Sie Webhook & Autorisierungstoken, um Ihre externen Datenquellen mit Workplace zu verbinden
Angenommen, es gibt bereits Sensoren, die Daten im Gebäude sammeln, und Sie möchten deren Daten in die Workplace IOT-Plattform einbinden. Spacewell bietet eine generischer Endpunkt (mit Webhooks) für den größten Teil seiner Sensordatentypenzur Integration, Verarbeitung und Speicherung von Sensordaten aus Plattformen von Drittanbietern.
Expand | ||
---|---|---|
| ||
Da Sie sich auf dieser Seite befinden: Es sieht so aus, als ob die Sensoren, die Daten an die Workplace-Plattform senden, Daten an eine Plattform oder Datenbank senden, die nicht mit Workplace verbunden ist. Auf dieser Seite stellen wir sicher, dass eine Verbindung zwischen den Plattformen besteht und dass die Daten in einem Format gesendet werden, mit dem Workplace arbeiten kann und weiß, wie sie zu identifizieren sind. Das Einrichten von externen Datenquellen und das Senden von Daten aus einer externen Datenbank an die Workplace-Plattform ist vergleichbar mit "Ein Auto kommt an einem Tor an. Das Auto ist dem Pförtner bekannt, und die Person im Auto hat einen Ausweis, weil sie ihrer Kontaktperson im Vorfeld gesagt hat, dass sie kommt."
Spacewell-Berater, die mehr darüber erfahren möchten, wie Spacewell die eingehenden Daten verarbeitet, können sich hier informieren /wiki/spaces/WM/pages/492237 |
The sensor vendor needs to comply with the Spacewell webhook, supported data types & payloadDer Sensorhersteller muss den Spacewell Webhook, die unterstützten Datentypen und die Nutzdaten einhalten.
Info |
---|
Within 1 vendor ID, sensor IDs need to be unique and prepended with the vendor ID. |
How to set up this connection?
Steps described on this page:
In the external (customer or 3rd party) database: Configure data payload
Configure the connection between External Data Source and Workplace
Go to database and fill in URL and token, make sure to test the connection
Devices send data to Workplace platform
Configure Data Payload
Webhooks
Webhooks provide a fast and secure way to reliably stream sensor data through from other systems.
The sensor provider is expected to post updates to the Spacewell endpoint.
The webhook endpoint expects a single HTTP request which represent a distinct message from the sensor.
Innerhalb einer Anbieter-ID müssen die Sensor-IDs eindeutig sein und die Anbieter-ID vorangestellt werden. |
Wie stellt man diese Verbindung her?
Die auf dieser Seite beschriebenen Schritte:
In der externen Datenbank (Kunde oder Drittanbieter): Konfigurieren Sie die Daten-Nutzlast
Konfigurieren Sie die Verbindung zwischen externer Datenquelle und Workplace
Gehen Sie zur Datenbank und geben Sie URL und Token ein, testen Sie die Verbindung
Geräte senden Daten an Workplace-Plattform
Daten-Nutzlast konfigurieren
Webhaken
Webhooks bieten eine schnelle und sichere Möglichkeit, Sensordaten von anderen Systemen zuverlässig zu übertragen.
Es wird erwartet, dass der Sensoranbieter Aktualisierungen an den Spacewell-Endpunkt sendet.
Der Webhook-Endpunkt erwartet eine einzelne HTTP-Anfrage, die eine bestimmte Nachricht vom Sensor darstellt.
Die Webhook-URL:
Verwendete HTTP method used-Methode: POST
HTTP headers-Header:
AuthorizationAutorisierung: Bearer <token> Überbringer <Token>
ContentInhalt-TypeTyp: applicationanwendung/json
Supported data types & payload
For all data types, it makes sense to verify if data will be send regularly or not; seeUnterstützte Datentypen & Nutzdaten
Bei allen Datentypen ist es sinnvoll, zu überprüfen, ob die Daten regelmäßig gesendet werden oder nicht; siehe https://spacewell.atlassian.net/wiki/spaces/KB/pages/5242896/External+Data+Sources#FAQ
Space occupancy related data types:Raumbelegungsbezogene Datentypen:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
If your headcount device is able to track multiple count areas, you can send us the data of the individual count areas by replacing "<uniqueWenn Ihr Zählgerät in der Lage ist, mehrere Zählbereiche zu erfassen, können Sie uns die Daten der einzelnen Zählbereiche übermitteln, indem Sie "<unique_device_id>" through durch "<unique_area_id>" ersetzen. |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
* Depending on the reliability of the sensor, space occupancy data may only contain data confirming “movement” (presence, headcount, footfall in one or the other direction etc), not the absence of movement… To tackle this in the Workplace platform, a decay feature has been introduced, which allows to visualize occupancy/headcount on the live (end user facing) floor plans for longer than what the data really tells us.For an example on how Decay works, see Je nach Zuverlässigkeit des Sensors enthalten die Raumbelegungsdaten möglicherweise nur Daten Bestätigung von "Bewegung" (Anwesenheit, Anzahl der Personen, Schritte in die eine oder andere Richtung usw.), nicht die Abwesenheit Um dieses Problem in der Workplace-Plattform zu lösen, wurde eine Verfallsfunktion eingeführt, die es ermöglicht, die Belegung/Personenzahl auf den Live-Grundrissen (mit Blick auf den Endbenutzer) länger zu visualisieren, als es die Daten tatsächlich aussagen.
Ein Beispiel dafür, wie Decay funktioniert, finden Sie unter https://spacewell.atlassian.net/wiki/spaces/KB/pages/491737/Motion+sensor#How-is-Motion-sensor-data-reflected-in-Workplace-Live-Views%3F
For a potential solution for data gaps in the dashboards (copy data in time slots), see Eine mögliche Lösung für Datenlücken in den Dashboards (Kopieren von Daten in Zeitfenstern) finden Sie unter https://spacewell.atlassian.net/wiki/spaces/KB/pages/5242896/External+Data+Sources#FAQ
Comfort related data typesKomfortbezogene Datentypen:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Indoor Air Quality related data typesInnenraumluftqualitätsbezogene Datentypen:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | ||
---|---|---|
| ||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Info |
---|
Best practice is to test this in a sandbox environment locally first |
Configure the connection between External Data Source and Workplace
How to access
Go toAm besten ist es, dies zunächst in einer lokalen Sandbox-Umgebung zu testen. |
Konfigurieren Sie die Verbindung zwischen externer Datenquelle und Workplace
Wie man Zugang erhält
Gehen Sie zu https://studio.cobundu.com/
Login with your credentials
Select Integrations > External Data Sources in the Anmeldung mit Ihren Anmeldedaten
Wählen Sie Integrationen > Externe Datenquellen in der Studio 2.0 interface
Select “Add New”
Tenant ID will be filled in based on the environment that you logged in to
Fill in Source ID with a unique name, referring to your external data source
Note |
---|
In Source ID field, only use alphanumeric values. The Source ID will later be used as a component of the device IDs. |
(Optional) Fill in a description, detailing what kind of data will come through the external data source
Copy the provided webhook URL + Authorization token to create the webhook in the external data source towards Spacewell Workplace
Make sure to enable your setup in Workplace
Info |
---|
It’s possible to refresh the Authorization Token in Studio. Remember that this new token now also needs to be updated in the 3rd party platform. |
Test your setup
Once the webhook is created in the 3rd party database with above provided URL and token, make sure to test the connection.
This step is to be performed by the party that wants to send data to Spacewell Workplace.
Verify in a tool like Postman if your setup works:
In case request is not successful, the endpoint returns 4xx-5xx status codes depending on the occurred issue.
In case of successful request, the endpoint returns 200 status code with an empty body.
Check below chapter “Troubleshooting” in case of doubts.
Next steps
To create custom Device Types and configure your third party sensors in Workplace, see-Schnittstelle
Wählen Sie "Neu hinzufügen".
Die Mieter-ID wird auf der Grundlage der Umgebung ausgefüllt, in der Sie sich angemeldet haben.
Geben Sie in Source ID einen eindeutigen Namen ein, der sich auf Ihre externe Datenquelle bezieht.
Note |
---|
Verwenden Sie im Feld Quell-ID nur alphanumerische Werte. Die Quell-ID wird später als Bestandteil der Geräte-IDs verwendet. |
(Optional) Geben Sie eine Beschreibung ein, in der Sie angeben, welche Art von Daten über die externe Datenquelle übertragen werden sollen.
Kopieren Sie die bereitgestellte Webhook-URL + Autorisierungs-Token, um den Webhook in der externen Datenquelle zu Spacewell Workplace zu erstellen
Vergewissern Sie sich, dass Sie Ihre Einrichtung in Workplace aktivieren
Info |
---|
Es ist möglich, das Autorisierungs-Token in Studio zu aktualisieren. Denken Sie daran, dass dieses neue Token nun auch in der 3rd-Party-Plattform aktualisiert werden muss. |
Testen Sie Ihre Einrichtung
Sobald der Webhook in der Datenbank des Drittanbieters mit der oben angegebenen URL und dem Token erstellt wurde, stellen Sie sicher, dass Sie die Verbindung testen.
Dieser Schritt muss von der Partei durchgeführt werden, die Daten an Spacewell Workplace senden möchte.
Überprüfen Sie mit einem Tool wie Postman, ob Ihre Einrichtung funktioniert:
Falls die Anfrage nicht erfolgreich ist, gibt der Endpunkt zurück 4xx-5xx Statuscodes je nach dem aufgetretenen Problem.
Im Falle einer erfolgreichen Anfrage gibt der Endpunkt zurück 200 status code mit einem leeren Körper.
Im Zweifelsfall lesen Sie bitte das Kapitel "Fehlersuche".
Nächste Schritte
Um benutzerdefinierte Gerätetypen zu erstellen und Ihre Sensoren von Drittanbietern in Workplace zu konfigurieren, siehe Custom Device Types
FAQ
Expand | ||
---|---|---|
Expand | ||
| ||
| ||
Depending on the kind of sensor, they might not send heartbeats or data regularly. If they send data and then only send a message upon value change, you might find yourself with bits and pieces of data (eg 1 time slot of 15 minutes with data about temperature, and nothing the rest of the day), which would cause confusion when you try to read the dashboards. To work around this, you can opt to have Spacewell copy the data, per generic endpoint / device type level for any desired amount of time. For example for the sensor type "Generic PIR" we could set a "copy in further time slots" and this value would be valid for all Generic PIR sensor values, which come to us for your tenant. Of course, the data is only copied until new data comes in again. So if a value comes in on Monday at 9am, and the configuration says "copy for 7 days", and on Wednesday at 8am a new value comes in, then from Wednesday at 8am the new value is taken for 7 days, or until a new value comes in.
Reach out to your Account Manager to set this up. |
Expand | ||
---|---|---|
| ||
It's possible to re-use the external data source information (Authentication token + URL). So if devices have the same behavior, but are linked to different external data sources, it’s possible to only set up 1 endpoint in Studio, and have the 2 external data source send data to that same Workplace endpoint.
|
Expand | ||
---|---|---|
| ||
Technically, Workplace can accept data with timestamps from 5 years in the past and 1 year in the future. But of course this data will not be included in any calculations or live data view. Only time slots for the previous day are calculated. So, even we store the data, it will not be visible anywhere. So best practice is to just send data with a (near) real time timestamp. |
Expand | ||
---|---|---|
| ||
In Workplace, it’s possible to disable an External Data Source, but you can’t delete. Deletion would impact devices that have a link with this External Data Source. |
Troubleshooting
Expand | ||
---|---|---|
| ||
Make sure the following configuration is in place:
|
| ||
Je nach Art des Sensors senden sie möglicherweise nicht regelmäßig Herzschläge oder Daten. Wenn sie Daten senden und dann nur bei einer Wertänderung eine Nachricht senden, kann es sein, dass Sie nur Bruchstücke von Daten erhalten (z. B. ein Zeitfenster von 15 Minuten mit Daten über die Temperatur und den Rest des Tages nichts), was zu Verwirrung führen würde, wenn Sie versuchen, die Dashboards zu lesen. Um dies zu umgehen, können Sie Spacewell veranlassen, die Daten pro generischer Endpunkt-/Gerätetyp-Ebene für eine beliebige Zeitspanne zu kopieren. Zum Beispiel könnten wir für den Sensortyp "Generic PIR" ein "copy in further time slots" einstellen und dieser Wert würde für alle Generic PIR Sensorwerte gelten, die bei uns für Ihren Mieter eingehen. Natürlich werden die Daten nur so lange kopiert, bis wieder neue Daten eintreffen. Wenn also am Montag um 9 Uhr ein Wert eintrifft und die Konfiguration sagt "Kopie für 7 Tage", und am Mittwoch um 8 Uhr ein neuer Wert eintrifft, dann wird ab Mittwoch um 8 Uhr der neue Wert für 7 Tage übernommen, oder bis ein neuer Wert eintrifft.
Wenden Sie sich an Ihren Kundenbetreuer, um dies einzurichten. |
Expand | ||
---|---|---|
| ||
Es ist möglich, die Informationen der externen Datenquelle (Authentifizierungstoken + URL) wiederzuverwenden. Wenn also Geräte dasselbe Verhalten aufweisen, aber mit verschiedenen externen Datenquellen verknüpft sind, ist es möglich, nur einen Endpunkt in Studio einzurichten und die beiden externen Datenquellen Daten an denselben Workplace-Endpunkt senden zu lassen.
|
Expand | ||
---|---|---|
| ||
Technisch gesehen, kann Workplace Daten mit Zeitstempeln von 5 Jahren in der Vergangenheit und 1 Jahr in der Zukunft akzeptieren. Aber natürlich werden diese Daten nicht in die Berechnungen oder die Live-Datenansicht einbezogen. Es werden nur Zeitfenster für den vorherigen Tag berechnet. Selbst wenn wir die Daten speichern, werden sie also nirgendwo sichtbar sein. Am besten ist es also, die Daten mit einem Zeitstempel (fast) in Echtzeit zu senden. |
Expand | ||
---|---|---|
| ||
In Workplace ist es möglich, eine externe Datenquelle zu deaktivieren, aber Sie können sie nicht löschen. Das Löschen würde sich auf Geräte auswirken, die mit dieser externen Datenquelle verknüpft sind. |
Fehlersuche
Expand | ||
---|---|---|
| ||
Stellen Sie sicher, dass die folgende Konfiguration vorhanden ist:
|
Expand | ||
---|---|---|
| ||
Stellen Sie sicher, dass die folgende Konfiguration vorhanden ist:
|
Expand | ||||
---|---|---|---|---|
| See “Legacy
| |||
Siehe Kapitel "Legacy Generic End-Point Set-up” chapter belowup" unten |
Expand | ||||
---|---|---|---|---|
| For security reasons: If a user logs in with a multi-tenant account, they are not able to make any changes to any external data sources
| |||
Aus Sicherheitsgründen: Wenn sich ein Benutzer mit einem mandantenfähigen Konto anmeldet, kann er keine Änderungen an externen Datenquellen vornehmen. |
Legacy Generic End-Point
Set-upIn the past, some external data sources were connected to Spacewell through a slightly different format. Because of that, there is a limitation only for the legacy / old generic endpoints:
The old / legacy Generic Endpoints will be shown in Studio with the labelEinrichtung
In der Vergangenheit wurden einige externe Datenquellen über ein etwas anderes Format mit Spacewell verbunden. Aus diesem Grund gibt es eine Einschränkung nur für die alten / generischen Endpunkte:
Die alten/veralteten generischen Endpunkte werden in Studio mit der Bezeichnung 'Created by Spacewell'
User will not be take actions (Refresh Authorization token, Enable / Disable will all be greyed out)
User can only View, and Copy URL / Authorization token.
angezeigt.
Der Benutzer kann keine Aktionen ausführen (Autorisierungs-Token aktualisieren, Aktivieren/Deaktivieren werden alle ausgegraut)
Der Benutzer kann nur die URL / das Autorisierungs-Token anzeigen und kopieren.
Zum Aktivieren/Deaktivieren oder Aktualisieren des Autorisierungstokens wenden Sie sich bitte an Ihren Account Manager.
Search
Suche
Live Search |
---|