# Cannot get devices from local API

**URL:** <https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295>\
**Category:** BETA API\
**Created:** [March 9, 2019, 1:28am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295 "2019-03-09T01:28:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnmtbr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/dnmtbr/32/83_2.png) [@dnmtbr](https://forum.bondhome.io/u/dnmtbr)\
**Post date:** [March 9, 2019, 1:28am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/1 "2019-03-09T01:28:41Z")

</div>

I have a brand new ZZ Bond running 2.5.2. I have been able to get the token, but when requesting the devices, I am getting:

> curl: (52) Empty reply from server.

Here is the command I am running:

> curl -X “BOND-Token: xxxxxxx” -i [http://x.x.x.x/v2/devices](http://x.x.x.x/v2/devices)

---

<div class="post-metadata">

**Author:** ![fracai](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/fracai/32/84_2.png) [@fracai](https://forum.bondhome.io/u/fracai)\
**Post date:** [March 9, 2019, 3:21am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/2 "2019-03-09T03:21:47Z")

</div>

Ditto. Well, it’s a BB running v2.5.1-44-g9d5c43d-jacob-uglydb

---

<div class="post-metadata">

**Author:** ![residualimages](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/residualimages/32/74_2.png) [@residualimages](https://forum.bondhome.io/u/residualimages)\
**Post date:** [March 9, 2019, 4:38am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/3 "2019-03-09T04:38:14Z")

</div>

Remember you are trying to send the BOND-Token in the header, and the action type for this command is a GET, so try this syntax:

curl -i -H “BOND-Token: xxxxxxxxxxxxxxxx” [http://ZZxxxxxxx.local/v2/devices](http://ZZxxxxxxx.local/v2/devices)  
or  
curl -i -H “BOND-Token: xxxxxxxxxxxxxxxx” [http://x.x.x.x/v2/devices](http://x.x.x.x/v2/devices)

I have been able to get a list of devices and traverse each node within the list of devices on both BD and ZZ revision BONDs.

---

<div class="post-metadata">

**Author:** ![fracai](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/fracai/32/84_2.png) [@fracai](https://forum.bondhome.io/u/fracai)\
**Post date:** [March 9, 2019, 6:21am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/4 "2019-03-09T06:21:10Z")

</div>

Thanks much. This is working with “-H”.  
The documentation currently states that “-X” should be used.

---

<div class="post-metadata">

**Author:** ![residualimages](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/residualimages/32/74_2.png) [@residualimages](https://forum.bondhome.io/u/residualimages)\
**Post date:** [March 9, 2019, 6:45am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/5 "2019-03-09T06:45:30Z")

</div>

> [@fracai](#):
>
> documentation currently states that “-X” should be used

Oh I see what you mean - those screenshots show it with -X.

I was relying on a part earlier in the document when it says “Copy the token and use it with a `BOND-Token` header in subsequent requests”.

There are also some pretty good quick 'n dirty examples in the [video I shared from Chris](https://forum.bondhome.io/t/bond-local-api-beta-sign-up/250/23) in the Beta sign up thread.

---

<div class="post-metadata">

**Author:** ![fracai](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/fracai/32/84_2.png) [@fracai](https://forum.bondhome.io/u/fracai)\
**Post date:** [March 9, 2019, 6:46am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/6 "2019-03-09T06:46:54Z")

</div>

Thanks. I’ll take a look at the video.

---

<div class="post-metadata">

**Author:** ![dnmtbr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/dnmtbr/32/83_2.png) [@dnmtbr](https://forum.bondhome.io/u/dnmtbr)\
**Post date:** [March 9, 2019, 4:31pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/7 "2019-03-09T16:31:07Z")

</div>

Ah, many thanks. I’ve got it working now.

---

<div class="post-metadata">

**Author:** ![danmandle](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/danmandle/32/80_2.png) [@danmandle](https://forum.bondhome.io/u/danmandle)\
**Post date:** [March 14, 2019, 3:18pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/8 "2019-03-14T15:18:37Z")

</div>

Following the above conversation, I am unable to get devices from the BOND bridge:

```
$ curl -H "BOND-Token: 890XXXXXXXXa4460" -i http://10.0.0.245/v2/devices
HTTP/1.1 200 OK
Content-Length: 18
Content-Type: application/json; charset=utf-8

{"_":"615e7200"}

```

In the app, it shows two devices:

 ![Screenshot_20190314-091540_Bond](https://us1.discourse-cdn.com/flex019/uploads/bond1/original/1X/1661936f62df46eaa74566e8041835b29a2a3b02.jpeg)

---

<div class="post-metadata">

**Author:** ![residualimages](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/residualimages/32/74_2.png) [@residualimages](https://forum.bondhome.io/u/residualimages)\
**Post date:** [March 14, 2019, 4:45pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/9 "2019-03-14T16:45:13Z")

</div>

Out of curiosity, are these fairly high tech remotes with screens and such?  
I saw Chris Merck mention in one of the threads that a fan was stored in the cloud and unavailable to the local API, but I don’t know the specifics around that. I just assumed that a more complicated remote would maybe be the one stored in the cloud.  
([BOND Local API BETA Sign-Up](https://forum.bondhome.io/t/bond-local-api-beta-sign-up/250/30))

---

<div class="post-metadata">

**Author:** ![danmandle](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/danmandle/32/80_2.png) [@danmandle](https://forum.bondhome.io/u/danmandle)\
**Post date:** [March 14, 2019, 4:48pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/10 "2019-03-14T16:48:33Z")

</div>

The remotes don’t have displays. When I [reverse engineered the cloud API](https://github.com/danmandle/bond) it showed the fans for my old BOND. I have the newer hardware revision now (ZZ) which supports the local API. I would think that it should at least return the devices associated with the bridge.

---

<div class="post-metadata">

**Author:** ![residualimages](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/residualimages/32/74_2.png) [@residualimages](https://forum.bondhome.io/u/residualimages)\
**Post date:** [March 14, 2019, 4:58pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/11 "2019-03-14T16:58:31Z")

</div>

Ah, you’re _that_ guy! I followed the reverse engineering you did but was holding out hope for the official API.

I re-read the post about a cloud device. Seems like it’s backwards from what I remembered. There was a user that was missing 3 out of 4 devices, and Chris said “The 1 device that remains is because it is stored on the Cloud. Those devices are not currently available via the Local API. I know this is not evident from the current UI, and we are planning on straightening that out.”

So I feel like I’m barking up the wrong tree. Have to wait for Chris or others to actually help you since I don’t really see an answer.

---

<div class="post-metadata">

**Author:** ![danmandle](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/danmandle/32/80_2.png) [@danmandle](https://forum.bondhome.io/u/danmandle)\
**Post date:** [March 14, 2019, 5:03pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/12 "2019-03-14T17:03:24Z")

</div>

Yup, that’s me! Official docs are much cleaner than anything I was able to put together. Thrilled that it’s a local API too!

---

<div class="post-metadata">

**Author:** ![merck](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/merck/32/1238_2.png) [@merck](https://forum.bondhome.io/u/merck)\
**Post date:** [March 15, 2019, 2:11am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/13 "2019-03-15T02:11:20Z")

</div>

I may have gotten my subtraction wrong @residualimages 😕

We do have two different types of devices internally: “legacy devices” and “cloud devices”. The “cloud devices” are currently only stored in the cloud and do not actually have any record on the BOND’s database, so, sadly they are not available via the Local API. — They will be available via the Cloud API when that is released.

We do plan to migrate the current “cloud devices” offline, at least for newly-recorded devices, once support for these more sophisticated protocols is there in the firmware.

So, for the time-being, you may see what @danmandle is seeing, and have missing devices on the Local API.

---

<div class="post-metadata">

**Author:** ![dnmtbr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/dnmtbr/32/83_2.png) [@dnmtbr](https://forum.bondhome.io/u/dnmtbr)\
**Post date:** [March 15, 2019, 5:08pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/14 "2019-03-15T17:08:09Z")

</div>

So how do we know which devices will be cloud only for the time being?

---

<div class="post-metadata">

**Author:** ![merck](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/merck/32/1238_2.png) [@merck](https://forum.bondhome.io/u/merck)\
**Post date:** [March 15, 2019, 10:24pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/15 "2019-03-15T22:24:53Z")

</div>

For now, there’s no way to tell until you check on the local API. We consider it a temporary issue that the devices are not accessible via local API, and are working on making all devices work offline.

---

<div class="post-metadata">

**Author:** ![danmandle](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/danmandle/32/80_2.png) [@danmandle](https://forum.bondhome.io/u/danmandle)\
**Post date:** [May 7, 2019, 2:48pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/16 "2019-05-07T14:48:11Z")

</div>

@merck any updates on “cloud devices” being moved to the local API?

---

<div class="post-metadata">

**Author:** ![merck](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/merck/32/1238_2.png) [@merck](https://forum.bondhome.io/u/merck)\
**Post date:** [May 7, 2019, 3:10pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/17 "2019-05-07T15:10:17Z")

</div>

It’s probably the toughest technical challenge that we have attempted, but with big community upside… Will be attacking this after fully rolling out the V2 firmware.

---

<div class="post-metadata">

**Author:** ![danmandle](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/danmandle/32/80_2.png) [@danmandle](https://forum.bondhome.io/u/danmandle)\
**Post date:** [May 7, 2019, 4:03pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/18 "2019-05-07T16:03:13Z")

</div>

Where is that in the queue vs exposing the cloud API? Just trying to figure out if/where I can control my fans via any API before the height of summer.

---

<div class="post-metadata">

**Author:** ![merck](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/merck/32/1238_2.png) [@merck](https://forum.bondhome.io/u/merck)\
**Post date:** [May 7, 2019, 4:14pm UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/19 "2019-05-07T16:14:55Z")

</div>

Cloud API first for sure. 🔜 @joaoricardo will announce it!

---

<div class="post-metadata">

**Author:** ![cmhaagen](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@cmhaagen](https://forum.bondhome.io/u/cmhaagen)\
**Post date:** [June 2, 2019, 12:04am UTC](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295/20 "2019-06-02T00:04:59Z")

</div>

I just updated the firmware to 2.6.21-beta on a snowbird device:

```
{
    "target": "snowbird",
    "fw_ver": "v2.6.21-beta",
    "fw_date": "Fri May 24 21:31:07 UTC 2019",
    "uptime_s": 599,
    "upgrade_http": true,
    "api": 2,
    "_": "2523894a"
}

```

However, when I list devices, this is what I get:

```
http://x.x.x.x/v2/devices

{
    "_": "f4e91b3d"
}

```

I think that means that only the hash value of the devices object was returned, with no devices? That is unfortunate, because I actually have two devices configured: a fan and a fireplace. I assume that they must be cloud devices? @merck: Is there any way to confirm the device type for the devices attached to my BOND bridge (BD23512)? Thanks!

[Next page](https://forum.bondhome.io/t/cannot-get-devices-from-local-api/295.md?page=2)
