Support for Bond hub

@dman2306 is it possible if you can add this support so I can pull it into my Sharptools dashboard?

Hubitat in the Sharptools app does not recognise the Shades capabilities anywhere so I cannot sync it over.

It looks like the linked driver only implements the Window Shade capability.

Many drivers will often map additional capabilities as a compatibility layer. For example, the Switch and Switch Level capabilities might make sense based on the existing capability definition:

WindowShade

Attributes

position - NUMBER

windowShade - ENUM ["opening", "partially open", "closed", "open", "closing", "unknown"]

Commands

close()

open()

setPosition(position)

position required (NUMBER) - Shade position (0 to 100)

Looking at the driver you linked to, it looks like it just supports the open() and close() commands from the Window Shade capability and doesn't support setting the position.

If that's the case, we could probably modify the driver/app to also treat the device like a switch so you could use on() and off() to control it from a dashboard today. (eg. onopen and offclose )

1 Like

Just wanted to report that today I set up a Bond bridge to control some officially unsupported shades (Motivia, Smith&Noble). Bond was able to learn from the original remote; the only issue (which I reported to Bond support) is that for some reason it may take a 2-3 repeated signals from Bond to convince all the shades to receive the command - even if the bridge is very close to them.

The integration with Hubitat, thanks to this application and drivers, was smooth; I just changed a bit the shades driver to send the open/close signals 5 times in a row (with a 1 second pause in between signals) to make sure that all shades do indeed open/close; that workarounded the integration glitch between Bond and the shades.

Thanks a lot for doing and sharing this.

2 Likes

There is a concept of reps that we use to repeat a signal (API docs). Sounds like you could use that to get these working. We've seen similar issues with fireplaces, and we want to get a way to edit this field in-app sometime soon hopefully. If you're familiar with how to use curl or the like, you could fix this yourself by changing reps for your commands from the default 1 to, say, 3.

2 Likes

There is a concept of reps that we use to repeat a signal (API docs). Sounds like you could use that to get these working. We've seen similar issues with fireplaces, and we want to get a way to edit this field in-app sometime soon hopefully. If you're familiar with how to use curl or the like, you could fix this yourself by changing reps for your commands from the default 1 to, say, 3 .

That worked perfectly! I "patched" reps to 5 for all commands, and it works great - without any changes to the Hubitat driver code. Thanks!

3 Likes

@dman2306 my wife was on to me to get the Shades onto the dashboard so I changed the driver slightly to include the switch function then imported to sharptools.io and changed the tiles to below.

All I did was edit the driver to include the following and it worked. I will update if you change to something else in the future though but for now it's working for me.

capability "Switch"

def on() {
sendEvent(name: "switch", value: "on")
parent.handleOpen(device, device.deviceNetworkId.split(":")[1])
}

def off() {
sendEvent(name: "switch", value: "off", displayed: true)
parent.handleClose(device, device.deviceNetworkId.split(":")[1])
}

def open() {
sendEvent(name: "switch", value: "on")
parent.handleOpen(device, device.deviceNetworkId.split(":")[1])
}

def close() {
sendEvent(name: "switch", value: "off", displayed: true)
parent.handleClose(device, device.deviceNetworkId.split(":")[1])

2 Likes

I have 4 fans (3 being the same model) that Bond can see The Hubitat app sees them but only ever adds one as a device. Maybe I am missing something when I set it up ? Any ideas? The one fan works just fine with the hubitat (thanks for the code btw

quick question. Is there a way for the bond to report back to the hubitat that its on/off? When I use my remote to turn the light off on my fan, the hubitat still says that the light is on. the only way the hubitat reports the on/off is if i shut it on and off thru hubitat

Hoping to work on adding this and other proposed enhancements this weekend. If you’re familiar with GitHub feel Free to submit a pull request.

2 Likes

Sounds like you have some cloud devices. I think you need to have the newest bond app and delete/readd them.

If you’re using the remote neither bond nor hubitat will know about that. Currently bond cannot listen for the remote being used. If you use the bond app however it should synchronize.

Thanks mate. Sorry no idea about pull requests so probably easier for you to take it from here. I did some further "testing" on the above driver change and I can confirm it keeps sync still with the Bond app although I am not sure this is the most appropriate change to get this working as I am not a developer. If you do see a better way using app and driver definitely go that route instead but at least I have something working for now to keep wifey happy :stuck_out_tongue:

now lets say i set up an automation to turn on at 11pm, but it was turned off by the remote earlier so the hub still says the device is on. It wont run the automation?

Can you use the App “Device Watchdog” or similar ??

It should still run the automation it’s just the device state may be out of sync.

Sorry it turns out I never checked this in, but I added the switch capability. However, I did not add these sendEvents. We should wait for BOND to respond that it received our command and processed it before changing the device status, not just sending a command.

1 Like

I tried it out but without that extra bit I am unable to reopen the shades once I close them. As such I have gone back to the changes I made to the driver which works perfectly for me so long as I don't use the remotes (which we don't in our house as they are locked away in a drawer).

@jchurch Can you give this updated version a try? I just realized that the version I modified for you had a typo in the handleClose() method. :see_no_evil:

1 Like

Excellent that is now working. Thanks mate!

1 Like

@dman2306 I have noticed with my fans that they are not reporting all the speeds properly e.g. I select 1 in the bond app and it's low, 2 is medium but 3 then jumps straight to high (not medium-low) when that should be 4? This happens if I try and change it within HE too not just the bond app. Also if I try and select 4 e.g. High then i note the following:

image

Anyways let me know what you need to investigate.

EDIT: Scratch that I am having trouble getting into medium-low without is jumping straight to medium as well. Hmmm... I did install the motorised shade changes from @josh above but that's been the only change I have completed of late.

My name is Bond, Hub Bond...

sorry guys, end of the year/decade for me too.

1 Like