Welcome to Animus Talk

This is where users of Animus Heart can share ideas,
solve problems and inspire fellow enthusiasts.

Animus Heart?

404 on get property?

I’'m playing around with the API but get 404 on all calls to get property data. Anyone knows why? Did I miss anything in the docs?

Tested on Z-wave switch and Telldus thermometer, 404 on both.

Example url:
http://10.79.3.25/rest/functions/com.animushome.heart.packages.zwave.devices.0060-6:f-0.37/data

Request headers: (tested without non-mandatory headers without any difference)

Content-Type: application/json
Authorization: Bearer ***
User-Agent: PostmanRuntime/7.28.1
Accept: */*
Postman-Token: 814cda5f-1170-41d1-9e24-ed45f17e3d3a
Host: 10.79.3.25
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

Snippet from Z-wave function:

{
        "serviceProperties": {
            "UID": "com.animushome.heart.packages.zwave.devices.0060-6:f-0.37",
            "operation_names": [
                "inverse",
                "setFalse",
                "setTrue",
                "getData",
                "setData"
            ],
            "device_UID": "com.animushome.heart.packages.zwave.devices.0060-6",
            "property_names": [
                "data"
            ],
            //...
        },
        "functionProperties": {
            "data": {
                "metadata": {
                    "clazz": "com.animushome.heart.service.dal.functions.data.BooleanData",
                    "property_access": 7
                },
                "value": {
                    "value": true,
                    "metadata": {},
                    "timestamp": 1626190814000
                }
            }
        },
        "functionOperations": {
            // ...
        }
}

There seems to be an error in the API references. The example states:

curl "$host/rest/functions/com.animushome.heart.device.led-1:switch/data"
  -H "Authorization: Bearer mysmarthomekey" -H "Content-Type: application/json"

I think “functionProperties” is missing from the command. It should read;

curl "$host/rest/functions/com.animushome.heart.device.led-1:switch/functionProperties/data"
  -H "Authorization: Bearer mysmarthomekey" -H "Content-Type: application/json"

It returns the correct property for me, at least.

/Peter

Thanks!

I solved it another way. The data is included in the /functions endpoint so I parsed it from that result instead.