Homey Community Forum

[Unsupported] Homey v2 REST API


#21

Solved
The error was on my side. I’ve got one Homey but two Homeys registered on my account. When I selected the active one and looked for the bearer I got the correct one.


#22

Anyone already figured out of it’s possible to read and/or update variables from the Logic functionality?


#23

Did you check out https://developer.athom.com/docs/api/HomeyAPI.ManagerLogic.html?


#24

I’m trying to get the measure_temperature value from a sensor. I would figure it would be indeed something like this:

GET: http://<HomeyIP>/api/manager/devices/device/<device_id>/capability/measure_temperature

Unfortunately this does not work, anyone any idea how to do this?

[EDIT]
It looks like there is no getCapabilityValue method under the device class. You will need to get it from the result of the device itself which holds a capabilities object.


#25

Anyone an idea as to why there isn’t any official REST API?
There used to be one on V1 so I don’t understand why there isn’t any on V2…


#26

You could parse the output of the api call https://<HomeyIP>/api/manager/devices/device/<device_id> for “capabilitiesObj/measure_temperature/value”

I don’t know if you already looked into it?

    "capabilitiesObj": {
      "measure_temperature": {
        "value": 17.1,
        "lastUpdated": "2019-02-16T14:06:48.855Z",
        "type": "number",
        "getable": true,
        "setable": false,
        "title": "Temperature",
        "desc": null,
        "units": "°C",
        "decimals": 2,
        "chartType": "spline",
        "id": "measure_temperature",
        "options": {}
      }

#27

Yes, but thanx anyway.