Support for Bond hub

If I remember correctly, in the SmartThings world the official Bond integration has the following speeds

# Description
0 Off*
1 Low
2 Medium
3 High

*0 mapping to Off is a relatively recent update. In the Bond world, I understand that normally there's a separate on/off indication?

Officially speaking, the Hubitat FanControl capability expects a string for the speed (ENUM). That being said, there's some level of (unofficial?) backwards compatibility with integer speeds:

Description Hubitat ENUM Hubitat SmartThings
Off off 0 0
Low low 1 1
Medium-Low medium-low 2
Medium medium 3 2
Medium-High medium-high
High high 4 3
On on 5
Auto auto 6

For backwards compatibility purposes

1 Like

How many speeds does you fan support? There is probably a bug in the mappings.

My fans support 5 speeds (see pic of remote and in bond app). They just don't have a light that's redundant.

could you turn on debug logging? It should log the fan speed translations. This is what it's supposed to be doing for a 5 speed:

[5: "high", 4: "medium-high", 3: "medium", 2: "medium-low", 1: "low"],

Sure no worries. Here you go.

This is when I set fan speed to medium and it then shows in HE as high.

app:8982020-01-01 04:05:30.471 pm debugTranslating 1 to BOND
app:8982020-01-01 04:05:30.325 pm debugTranslating 1 to BOND
app:8982020-01-01 04:05:30.104 pm debugTranslating 3 to BOND
app:8982020-01-01 04:05:00.825 pm debugcalling action SetSpeed {"argument": 3}
app:8982020-01-01 04:05:00.814 pm debugHandling Fan Speed event for 10775f39
app:8982020-01-01 04:05:00.437 pm debugTranslating 1 to BOND
app:8982020-01-01 04:05:00.220 pm debugTranslating 1 to BOND

This is when I set fan speed to medium-low and it then shows in HE as medium.

app:8982020-01-01 04:07:00.335 pm debugTranslating 1 to BOND
app:8982020-01-01 04:07:00.214 pm debugTranslating 1 to BOND
app:8982020-01-01 04:07:00.073 pm debugTranslating 2 to BOND
app:8982020-01-01 04:06:30.418 pm debugTranslating 1 to BOND
app:8982020-01-01 04:06:30.283 pm debugTranslating 1 to BOND
app:8982020-01-01 04:06:30.109 pm debugTranslating 2 to BOND
app:8982020-01-01 04:06:10.889 pm debugcalling action SetSpeed {"argument": 2}
app:8982020-01-01 04:06:10.869 pm debugHandling Fan Speed event for 10775f39

This is when I set the fan speed to high and it then shows as off in HE.

app:8982020-01-01 04:07:30.405 pm debugTranslating 1 to BOND
app:8982020-01-01 04:07:30.273 pm debugTranslating 1 to BOND
app:8982020-01-01 04:07:30.102 pm debugTranslating 5 to BOND
app:8982020-01-01 04:07:27.706 pm debugcalling action SetSpeed {"argument": 5}
app:8982020-01-01 04:07:27.696 pm debugHandling Fan Speed event for 10775f39

Sorry to be a pain, I just updated the app with a bit better logging to help track this down. Could you update and rerun the tests? I might not be able to work on it more until the weekend (back to work tomorrow after the holidays!) but I'll figure out what's wrong here. Looking at the logs, can you just confirm that you have 3 fans configured? That's what it looks like... if not something much more serious is wrong :slight_smile:

No worries here you go.

This is when I set fan speed to medium and it then shows in HE as high.

app:8982020-01-02 10:41:31.291 am debugcalling action SetSpeed {"argument": 3}
app:8982020-01-02 10:41:31.267 am debugTranslating medium:5 to HE 3
app:8982020-01-02 10:41:31.234 am debugHandling Fan Speed event for 10775f39
app:8982020-01-02 10:41:30.147 am debugTranslating 1:3 to BOND low

This is when I set fan speed to medium-low and it then shows in HE as medium.

app:8982020-01-02 10:42:30.105 am debugTranslating 2:3 to BOND medium
app:8982020-01-02 10:42:27.604 am debugcalling action SetSpeed {"argument": 2}
app:8982020-01-02 10:42:27.603 am debugTranslating medium-low:5 to HE 2
app:8982020-01-02 10:42:27.592 am debugHandling Fan Speed event for 10775f39

This is when I set the fan speed to high and it then shows as switch off and speed 0 in HE.

app:8982020-01-02 10:42:57.877 am debugcalling action SetSpeed {"argument": 5}
app:8982020-01-02 10:42:57.875 am debugTranslating high:5 to HE 5
app:8982020-01-02 10:42:57.866 am debugHandling Fan Speed event for 10775f39

btw, i have 6 ceiling fans with 5 of them being all the same brand e.g. Fanco.

Well that wasn't helpful. Looking at that it seems OK. I just added a bit more logging. Could you do the same tests again? Sorry. I'm confused because looking at the code the only time it should ever be off is if you send a setSpeed with off as the parameter (which you're clearly not) or if BOND says the power level is 0 which would indicate it's off.

Here you go.

This is when I set fan speed to medium and it then shows in HE as high.

app:8982020-01-02 11:07:00.541 am debug1a1e1620 -> setting off because power is off
app:8982020-01-02 11:07:00.475 am debug7d061666 -> setting off because power is off
app:8982020-01-02 11:07:00.401 am debug3da4fca7 -> setting off because power is off
app:8982020-01-02 11:07:00.337 am debug071f0f56 -> setting off because power is off
app:8982020-01-02 11:07:00.261 am debug5c6332df -> setting off because power is off
app:8982020-01-02 11:07:00.092 am debug10775f39 -> Translating 3:3 to HE high
app:8982020-01-02 11:06:44.813 am debugcalling action SetSpeed {"argument": 3}
app:8982020-01-02 11:06:44.797 am debug10775f39 -> Translating medium:5 to BOND 3
app:8982020-01-02 11:06:44.777 am debugHandling Fan Speed event for 10775f39

This is when I set fan speed to medium-low and it then shows in HE as medium.

app:8982020-01-02 11:08:00.478 am debug1a1e1620 -> setting off because power is off
app:8982020-01-02 11:08:00.400 am debug7d061666 -> setting off because power is off
app:8982020-01-02 11:08:00.332 am debug3da4fca7 -> setting off because power is off
app:8982020-01-02 11:08:00.256 am debug071f0f56 -> setting off because power is off
app:8982020-01-02 11:08:00.175 am debug5c6332df -> setting off because power is off
app:8982020-01-02 11:08:00.111 am debug10775f39 -> Translating 2:3 to HE medium
app:8982020-01-02 11:07:30.461 am debug1a1e1620 -> setting off because power is off
app:8982020-01-02 11:07:30.374 am debug7d061666 -> setting off because power is off
app:8982020-01-02 11:07:30.299 am debug3da4fca7 -> setting off because power is off
app:8982020-01-02 11:07:30.233 am debug071f0f56 -> setting off because power is off
app:8982020-01-02 11:07:30.158 am debug5c6332df -> setting off because power is off
app:8982020-01-02 11:07:30.073 am debug10775f39 -> Translating 2:3 to HE medium
app:8982020-01-02 11:07:28.949 am debugcalling action SetSpeed {"argument": 2}
app:8982020-01-02 11:07:28.945 am debug10775f39 -> Translating medium-low:5 to BOND 2
app:8982020-01-02 11:07:28.935 am debugHandling Fan Speed event for 10775f39

This is when I set the fan speed to high and it then shows as switch off and speed 0 in HE yet it's still running full speed right now.

app:8982020-01-02 11:09:00.548 am debug1a1e1620 -> setting off because power is off
app:8982020-01-02 11:09:00.482 am debug7d061666 -> setting off because power is off
app:8982020-01-02 11:09:00.358 am debug3da4fca7 -> setting off because power is off
app:8982020-01-02 11:09:00.290 am debug071f0f56 -> setting off because power is off
app:8982020-01-02 11:09:00.217 am debug5c6332df -> setting off because power is off
app:8982020-01-02 11:08:30.589 am debug1a1e1620 -> setting off because power is off
app:8982020-01-02 11:08:30.506 am debug7d061666 -> setting off because power is off
app:8982020-01-02 11:08:30.330 am debug3da4fca7 -> setting off because power is off
app:8982020-01-02 11:08:30.265 am debug071f0f56 -> setting off because power is off
app:8982020-01-02 11:08:30.193 am debug5c6332df -> setting off because power is off
app:8982020-01-02 11:08:20.395 am debugcalling action SetSpeed {"argument": 5}
app:8982020-01-02 11:08:20.392 am debug10775f39 -> Translating high:5 to BOND 5
app:8982020-01-02 11:08:20.382 am debugHandling Fan Speed event for 10775f39

image

Alright. Think I at least see part of the problem.

1 Like

I know exactly what's not working, I just don't yet see why. I added one more logging. You don't need to run all 3 scenarios, just one test. The problem is the same for all three. Could you paste the logs again? If you could include the app properties page too that'd help.

Sure here you go.

app:8982020-01-03 12:05:00.685 pm debug1a1e1620 -> setting off because power is off

app:8982020-01-03 12:05:00.578 pm debug7d061666 -> setting off because power is off

app:8982020-01-03 12:05:00.494 pm debug3da4fca7 -> setting off because power is off

app:8982020-01-03 12:05:00.394 pm debug071f0f56 -> setting off because power is off

app:8982020-01-03 12:05:00.327 pm debug5c6332df -> setting off because power is off

app:8982020-01-03 12:05:00.137 pm debug10775f39 -> Translating 3:3 to HE high

app:8982020-01-03 12:05:00.130 pm debugfan: 10775f39 -> properties: null max_speed: null

app:8982020-01-03 12:04:36.305 pm debugcalling action SetSpeed {"argument": 3}

app:8982020-01-03 12:04:36.290 pm debug10775f39 -> Translating medium:5 to BOND 3

app:8982020-01-03 12:04:36.268 pm debugHandling Fan Speed event for 10775f39

app:8982020-01-03 12:04:30.761 pm debug1a1e1620 -> setting off because power is off

app:8982020-01-03 12:04:30.641 pm debug7d061666 -> setting off because power is off

app:8982020-01-03 12:04:30.529 pm debug3da4fca7 -> setting off because power is off

app:8982020-01-03 12:04:30.411 pm debug071f0f56 -> setting off because power is off

app:8982020-01-03 12:04:30.229 pm debug5c6332df -> setting off because power is off

app:8982020-01-03 12:04:30.207 pm debug10775f39 -> Translating 1:3 to HE low

app:8982020-01-03 12:04:30.178 pm debugfan: 10775f39 -> properties: null max_speed: null

Interesting, could you show the app status page? For some reason the fan properties aren't being detected which makes it default to a 3 speed fan. That's the cause of the issue

Sorry, no click the little gear icon next to the app name. Edit: You can crop out the access token

1 Like

All done see above.

getting somewhere. Could you update and try again? I made a change and I'm hoping it helped.

1 Like

That seemed to work albeit with an error in the logs.

app:8982020-01-03 12:18:00.099 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 435 (updateDevices)

app:8982020-01-03 12:17:30.124 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 435 (updateDevices)

app:8982020-01-03 12:17:07.260 pm debugcalling action SetSpeed {"argument": 3}

app:8982020-01-03 12:17:07.256 pm debug10775f39 -> Translating medium:5 to BOND 3

app:8982020-01-03 12:17:07.226 pm debugHandling Fan Speed event for 10775f39

EDIT: that definitely fixed the issue but the errors just keep on coming.

Yeah still broken then... I know this bug is staring me right in the face but I'm still not seeing it. Trying one more logging. Can you try again? Sorry for all the back and forth!

No worries at all mate I appreciate you working with me on this.

app:8982020-01-03 12:29:00.127 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 436 (updateDevices)

app:8982020-01-03 12:29:00.126 pm debugfan: 10775f39 -> null -> properties: null

app:8982020-01-03 12:28:30.189 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 436 (updateDevices)

app:8982020-01-03 12:28:30.187 pm debugfan: 10775f39 -> null -> properties: null

app:8982020-01-03 12:28:00.134 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 436 (updateDevices)

app:8982020-01-03 12:28:00.132 pm debugfan: 10775f39 -> null -> properties: null

app:8982020-01-03 12:27:30.128 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 436 (updateDevices)

app:8982020-01-03 12:27:30.124 pm debugfan: 10775f39 -> null -> properties: null

app:8982020-01-03 12:27:00.140 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 436 (updateDevices)

app:8982020-01-03 12:27:00.139 pm debugfan: 10775f39 -> null -> properties: null

app:8982020-01-03 12:26:30.205 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 436 (updateDevices)

app:8982020-01-03 12:26:30.202 pm debugfan: 10775f39 -> null -> properties: null

app:8982020-01-03 12:26:00.103 pm errorjava.lang.NullPointerException: Cannot get property '10775f39' on null object on line 436 (updateDevices)

app:8982020-01-03 12:26:00.098 pm debugfan: 10775f39 -> null -> properties: null

app:8982020-01-03 12:25:44.447 pm debugcalling action SetSpeed {"argument": 3}

app:8982020-01-03 12:25:44.445 pm debug10775f39 -> Translating medium:5 to BOND 3

app:8982020-01-03 12:25:44.436 pm debugHandling Fan Speed event for 10775f39

btw, if it helps I can give you Teamviewer access in? I am sure that would be much quicker.