In this release

Two new ObservationFunction subclasses were added: AverageObservationFunction and DeltaValueFunction, and new endpoints that allow you to manually set edge status of a Device/Sensor/Actuator. Please note that this release includes breaking changes to the GET /json/actuator/{id}/observations and GET /actuator/{id}/observations endpoints, which now have the “nextPageToken” feature, same as sensor endpoint.

Also a couple of new preview endpoints to retrieve edge status of Logical devices.

New functionality

Observation Function – Average Observation

AverageObservationFunction – AverageObservationFunction calculates the average value over the observed sensors’ values over a configurable time period. If during the configured period any of the observed sensors didn’t provide any observation, the average value will not be calculated. (Sensors with AverageObservationFunction should observe at least 2 sensors).

AverageValueFunction json schema:

{
    “class”: “AverageObservationFunction”,
    “ownedBy”: “0a357a4f-053f-453f-ad5d-62f626f183e3”,
    “recalculationPeriod”: “PT1H”

}

In order to set up recalculationPeriod’ ISO 8606 Duration format should be used, the example above is for a period of 1 hour.

Observation Function – Delta Value

DeltaValueFunction – DeltaValueFunction calculates the delta value between the previous and the new observation value. The function excludes zero values (which are considered noise/invalid). Sensors with DeltaValueFunction should observe only 1 other sensor.

DeltaValueFunction json schema:

{
    “class”: DeltaValueFunction”,
    “ownedBy”: “0a357a4f-053f-453f-ad5d-62f626f183e3”

}

Endpoint to set edge status of Device/Sensor/Actuator

If it is expected for devices to not send any telemetry, you can set its edge status to DECOMMISSIONED, EXPECTED_OFFLINE or NOT_STARTED, using these new endpoints.

  • PUT /json/devices/edgestatus
  • PUT /json/device/{id}/edgestatus
  • PUT /json/sensors/edgestatus
  • PUT /json/sensor/{id}/edgestatus
  • PUT /json/actuators/edgestatus
  • PUT /json/actuator/{id}/edgestatus

Devices can be in ERROR even if it is expected for them to not send observations. Because devices and system edge status is based on the edge status of the sensors, this can cause whole systems to enter into Error state, even if they are OK, except for a few sensors that are intended to be offline. Because of this, sensors, actuators and devices can now be manually set to DECOMMISSIONED, EXPECTED_OFFLINE or NOT_STARTED.

Preview endpoint to retrieve Logical Device edge status

As you may already know, all of our edge connectors are sending their state to ProptrechOS, it can be OK, WARNING or ERROR with additional descriptions and timestamp when message was received, e.g.

Unset

{
   “time”: “2024-06-27T13:52:18.743823Z”,
   “status”: “OK”,
   “message”: “Edge module successfully started;”
}

To retrieve those messages two new endpoints in Preview API are introduced:

  • GET /preview/json/logicaldevice/{id}/edgestatus/latest
  • GET /preview/json/logicaldevice/{id}/edgestatuses

Breaking changes

Improved endpoint to fetch actuator observations

The endpoint for retrieving an actuator’s observations was improved with the “nextPageToken” feature. Previously the endpoint returned the list of objects with observation time and value, but with this improvement, it will be covered with more data.

  • GET /json/actuator/{id}/observations
  • GET /actuator/{id}/observations

The response is paginated, and a unique token (“next page token”) is generated and returned in a response to let the client make subsequent requests for the next page – until the final page (and all observations) have been returned.

The request parameters are:

  • idsensor unique identifier from where to get the observations
  • startTime ISO 8601 dateTime in UTC (Zulu)
    • “now” if empty
  • endTime ISO 8601 dateTime in UTC (Zulu)
    • 24 hours if empty
  • sizethe page size to be returned. 15 000 observations per page as the maximum amount.
    • 1000 if empty
  • nextPageTokena token used to fetch a particular page. The response will include a token for fetching the next page if there are subsequent pages.
    • if empty – the first page will be returned

For example:

Request:
GET /json/actuator/{id}/observations?size=3
Response:

{

   “last”: false,
   “size”: 5,
    “nextPageToken”: “g58x-Mc_6snrXRFRCJ8JOAd60-5OENR-RIh_ukuL_rvzDcwOFgVx9koseaR7bjzTj6NsTZpxdjPSQ3ZfsBjWrg==”,
      “previousPageToken”: null,
      “content”: [
        {
        “observationTime”: “2023-04-02T15:25:43.686447Z”,
         “value”: 24,
        },
        {
        “observationTime”: “2023-04-02T15:30:43.890864Z”,
        “value”: 18,
        },
        {
        “observationTime”: “2023-04-02T15:35:43.987534Z”,
        “value”: 19,
        }
    ]
}

Fixes and minor upgrades

New connectors:

  • Yolink

Added edge management support for the connector types:

  • Metry stream

Improvements:

  • API will regulate its load based on throttle tokens number. By default each agent will be allowed to obtain 100 throttle token number, and they will be refreshed each minute (PLAT-4444)
  • Added new ‘super_buildingcomponent_ids’ filter to GET `/json/asset` endpoint (PLAT-4478)

Comma-separated list of super building component UUIDs for building component where asset located in.

– GET /json/asset?super_buildingcomponent_ids=37eea9e7-dfa7-43f8-9a2e-5cbc790b586f&page=0&size=50

  • Added “alias_ns_ids” filter to “/json/twins” endpoint (PLAT-4278)

Comma-separated list of alias namespace UUIDs

– GET /json/twin?alias_ns_ids=37eea9e7-dfa7-43f8-9a2e-5cbc790b586f&only_common_fields=true&page=0&size=50

  • Renamed operations in history snapshots from ‘DELETE’ to ‘ARCHIVE’ where it is needed (PLAT-4470)
  • Device EdgeAlias will be set automatically based on correct Sensor alias (PLAT-2720)

Defect fixes:

  • For non-vm logical server rmi ports will not be generated (PLAT-4418)
  • For collections returned via ‘/twin’ endpoint ‘locatedInBuilding’ property is fixed (PLAT-4512)
  • Added ‘address_ids’ query parameter added to ‘/address’ endpoint (PLAT-4516)

Per Karlberg

Per Karlberg, a distinguished technology executive, demonstrates deep expertise in the nexus of real estate, technology, and ESG. Holding advanced degrees from Lund University, and with key roles as CEO of our company and Co-Founder of ProptechOS, he has shaped the proptech field through significant contributions to real estate technology advancements. His instrumental work in co-authoring “The realestatecore ontology” has facilitated digital transformation and ESG breakthroughs in the real estate sector.

Read his full bio and information here.