Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List Fans/Capabilities Empty #1

Open
dresslerc opened this issue Oct 17, 2018 · 9 comments
Open

List Fans/Capabilities Empty #1

dresslerc opened this issue Oct 17, 2018 · 9 comments

Comments

@dresslerc
Copy link

I am running the Postman collections, Login and Bond Hubs work fine. However when I try to GET the list of fans/capabilities, all that is returned is [] (status 200).

The URL I am hitting is this:
https://osprey.appbond.com/api/v1/cloud_device/BD22897/

The BD22897 is what is returned from the Bond Hubs request.

From the Bond app, that is the correct bond id and works.

Just to clarify, the Authorization header should be "Bearer " + "key" from the login request correct?

Thanks for your efforts on this!

@danmandle
Copy link
Owner

danmandle commented Oct 17, 2018

Thanks for trying this out! Are you trying to do this in Postman or from code/another tool? Yes, you have the right authorization header. When I had auth issues, it normally returns a 403.

My only guess is that your BOND hub doesn't have any devices attached to it which seems likely.
Can you reply with a screenshot from the bond app like this?
screenshot_20181016-200711

When you get it working, I'd be interested in seeing the output to make sure I can cover more options that just what I have to test with. Just curious, what are you integrating your BOND with? I'm working on a component for Home Assistant.

@dresslerc
Copy link
Author

Here is the screenshots:

image

image

Long story short, a few years ago I reverse engineered a universal fan remote kit from Amazon and built my own transmitter using a Particle Photon and a 303Mhz transmitter chip (see http://www.fanremote.io). The entire thing was built on Firebase with a NodeJS backend that would basically do what Bond Home is doing. Here is the front end I have:

image

I liked this interface better because you can control all your device in 1 go, rather than having to click each room and then controlling it. Plus I had some neat extra stuff built in (scheduling system, Nest Integration (air circulation when heat/ac is running etc).

So what I wanted to do is replace my hardware with Bond Home, but then use my UI and my scheduler/nest integration.

@danmandle
Copy link
Owner

That's a pretty cool project. I'm not sure why you're seeing the issues you're seeing. I tried changing some things on my end to test and I got a 403 anytime I change a param that I think could replicate your result. Maybe you're on a different app server? Don't think that's the case either as there wasn't anything in the API responses to indicate which app server a BOND would be on.

Your best bet would be to do what I did: use Charles to sniff the API traffic to see how the app receives it. I ended up using an older Android tablet because newer versions of Android (7+ I think) require an exception in the app manifest to allow sniffing of HTTPS traffic. I'd be happy to work with you on this as I'm also curious what is different for your setup so that my solution can be more robust.

@dresslerc
Copy link
Author

Do you still have your debugging environment setup? I could just give you my username/pwd.

@danmandle
Copy link
Owner

Yeah, I can do that. Send me an email at [email protected] (split my username).

@danmandle
Copy link
Owner

Good news @pakmanwg and @dresslerc ! Bond has released official docs: http://docs-local.appbond.com/ . Looks like it only supports V2 firmware. My guess is that the firmware difference is why we were experiencing different API behavior.

@dresslerc
Copy link
Author

dresslerc commented Feb 28, 2019 via email

@pakmanwg
Copy link

pakmanwg commented Feb 28, 2019 via email

@danmandle
Copy link
Owner

There are sign-ups for the v2 beta here: https://forum.bondhome.io/t/bond-local-api-beta-sign-up/250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants