Support for Bond hub

Thanks... just wanted to be sure that this was normal behavior. Just found it odd that only just started happening.

Was it the first time you’ve set a fan speed since installing the app?

No. I had done it before. The fan is still on in the guest room (they’re late risers LOL!). I’ll see if the message goes away when the fan is turned off. Appreciate the follow up.

Voice control to turn off the fan stopped the logging messages.

This is intentional. As soon as there’s any commands added with a Brightness-related action, the whole Brightness feature becomes available.

The intention is that a 3rd party client need only be concerned about supporting Brightness and need not be concerned with all the corner cases and different types of control protocols that exist.

The idea is, when you call the SetBrightness (75) Action with current brightness at 25%, Bond Bridge would send twice the IncreaseBrightness(25) Command that is available.

Similarly with TurnOn and ToggleLight — the best place to dead-reckon is on the Bridge. This support we will be improving in coming months.

I posted this on a different thread, but though I would cross post in case someone else is trying to get this to work as well.

I have a smart by bond fan controller:
https://www.homedepot.com/p/Universal-Smart-Wi-Fi-4-Speed-Ceiling-Fan-Remote-Works-with-Google-Assistant-SmartThings-and-Alexa-99434/311264804

and have it working with dman2306's bond integration.

I have it working by simply using the token and IP of the smart fan controller, but there seems to be a problem with getting the device ID: here is device list from curl output:

curl -H "BOND-Token: [mytoken]" -i http://[myip]/v2/devices
HTTP/1.1 200 OK
Content-Length: 39
Content-Type: application/json; charset=utf-8

{" ":"83777720","1":{" ":"f1013395"}}

If I hardcode 1 as the device ID in the function getDeviceById and getParmetersById, everything works.

outputting ${deviceId} at the line that calls this function reveals it is sending: "1={_=f1013395}" which ends up with a null result.

I am fine with the hardcoding, but would I be able to run a second instance of the app if I got another controller?

Could you show me where you hard coded it? When you run the app does it list your device? Also where are you seeing that the device id is wrong? We’re you getting errors? More info would probably help me figure out what’s going on.

In the app, If I change line 162:
path: "/v2/devices/${id}",

to
path: "/v2/devices/1",

and line 206 from:
path: "/v2/devices/${id}/properties",

to
path: "/v2/devices/1/properties",

then it lists a fan and it works in hubitat. If I did not, then getDeviceByID was returning null and there were no devices able to be selected.

On line 145 of the app, I used

logDebug "${deviceid}"

to show what was being passed to getDeviceById(deviceid);

and it outputs:

"1={_=f1013395}"

I got the "1" from the curl output in my post above.

Could you go to the app and click the gear and show me the properties? E.g. mine looks like this:

here it is

Could you test changing line 145 to getDeviceById(deviceid.key); I think that .key is needed. You'd need to uninstall and reinstall the app to really test.

That gave the error

app:362020-01-28 09:10:11.224 am errorgroovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.getResponse() is applicable for argument types: () values: [] Possible solutions: getMessage(), getMessage(), getMessage() on line 154 (prefListDevices)

Ok, I think that the following changes:

line 162:
path: "/v2/devices/${id.key}",

and line 206:
path: "/v2/devices/${id.key}/properties",

fixes the problem.

1 Like

You're absolutely right. It's a bug but I guess the BOND Hub works in spite of this. I have added your fix to the newest code. Thanks!

I was just wondering if I can use more than one hub. Thinking of getting another smart by bond controller like this one since it is now working really well.

I haven’t tested as I only have one hub, but just install another copy of the app and point that one to the other IP address.

Just checking back if anyone had a chance to look further into this :slight_smile:
I sent the Bond ID in pm previously. Thanks!

Hey @olivier , yeah I've done some work on this recently and I believe SetBrightness should work for your device in the beta firmware (v2.10.17). You could try that out by getting the beta app, instructions are here. I'd be grateful if you could try it out and let me know whether or not it's working as expected now!

Seems to work indeed! Thanks a lot for the effort and making it happen!

2 Likes

wow what a successful collaboration here. Impressed with this community

3 Likes