In order to send data reading information to third party servers, Hubkit provides a set of API endpoints which can be used to register and receive data readings right when they get processed by Hubkit.

API Endpoints

For all POST request, the expected Body content is a JSON string containing the URL HubKit should try and send data to.

For Example, a request to https://127.0.0.1:29443/readingSubscriber/subscribe should have a Body similar to "http://127.0.0.1:5001/test" and a valid Content-type: application/json; charset=utf-8 header

POST https://hubkitAddress:29443/readingSubscriber/subscribeAPI endpoint to add or reactivate a reading Subscriber

POST https://hubkitAddress:29443/readingSubscriber/unsubscribeAPI endpoint to remove a reading Subscriber

POST https://hubkitAddress:29443/readingSubscriber/isRunningAPI endpoint to check if a reading Subscriber is active or not

Data Reading Format

Format is similar to what you can see in Gravio Studio Data Viewer and has the following structure:

string AreaName - Name of the Area, the sensor is registered in ex: "Area 1"
string LayerName - Name of the Layer, the sensor is registered in ex: "Layer 3"
string DeviceName - Name, custom or default, the sensor is registered as ex: "EnOcean" (default) or "Door Sensor 1" (custom)
string LayerType - Name of the category that reading is ex: "Gravio-Door-JP"
string DataType - Name of the data type that reading is ex: "Contact status"
string SenderId - ID/MAC Address of the sensor ex: "05-00-0A-3D"
object Data - Usually number or string - Parsed data ex: "Contact open" (string) or 24.408 (number)
string Timestamp - ISO 8601 formatted string of the UTC time the reading was received by Hubkit at
string DataId - Unique Uuid of that data reading, for database storage purposes

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment