# How can I test 'brightness' if I don't have a fan with lights?

**URL:** <https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257>\
**Category:** Integrations\
**Created:** [January 26, 2020, 10:20am UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257 "2020-01-26T10:20:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 26, 2020, 10:20am UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/1 "2020-01-26T10:20:43Z")

</div>

Is it possible in the app to create a fake fan which supports dimmer - so I can test my integration?

---

<div class="post-metadata">

**Author:** ![SDamiano](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@SDamiano](https://forum.bondhome.io/u/SDamiano)\
**Post date:** [January 26, 2020, 5:33pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/2 "2020-01-26T17:33:33Z")

</div>

I have fans with the “A1a” and “RCF98v2” templates both of which include dimmers. Maybe you could create a device via API with one of those templates to test against.

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jacob/32/312_2.png) [@jacob](https://forum.bondhome.io/u/jacob)\
**Post date:** [January 26, 2020, 5:49pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/3 "2020-01-26T17:49:15Z")

</div>

Here’s my recent response to a similar request:

> [@Dummy devices w/ no remote](https://forum.bondhome.io/t/dummy-devices-w-no-remote/1246/3):
>
> That’d work. Here’s a way to get a full remote panel with a single request. (This is what our mobile apps use to build a full panel) POST to devices the body {"template": \<template\_name\>, "name": \<whatever\_you\_want\>, "properties": {"addr": "1111", "bps": 3000, "zero\_gap": 30, "freq": 433400}} This builds a device (and its commands) from a script on the Bond. Here is a spread of commonly-seen template names: "A1": one light, 3 speeds, hold-to-dim, reverse "A1a": two-lighted version of A1 "R…

Here’re four templates for the four dimming “schemes”:

- A1: single light, dimmer cycles between up and down, the action is named StartDimmer (a continuous transmission until you send the `Stop` action, or timeout at 30 seconds)
- A1a: double-light version of A1, it has individual dimmers so we’ve gone with StartUpLightDimmer and StartDownLightDimmer (continuous like A1)
- RCF98v2: has directional dimmers. Similar to A1-style dimmer, but increases to max brightness with one signal and decreases to min brightness with another: StartIncreasingBrightness and StartDecreasingBrightness (continuous like A1)
- RCF118: the only one of these with the `brightness` state. You can directly SetBrightness with an argument or Increase/DecreaseBrightness with an argument. This particular remote script has a minimum brightness of 20, and a max of 100.

The first and the last styles are by far the most common.

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 27, 2020, 6:13am UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/4 "2020-01-27T06:13:19Z")

</div>

Works like a charm, thank you!

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 27, 2020, 10:29am UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/5 "2020-01-27T10:29:03Z")

</div>

Question about setting brightness. It seems like the increment/decrement is 10% and minimum brightness is 20%?

Is it the same for all lights? Or it’s device specific? If so - how do I get it via API?

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 27, 2020, 1:33pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/6 "2020-01-27T13:33:44Z")

</div>

Another question - **RCF98v2** has StartDecreasingBrightness and StartIncreasingBrightness - but doesn’t report “brightness” in the status.

Is it normal? Or a bug?

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jacob/32/312_2.png) [@jacob](https://forum.bondhome.io/u/jacob)\
**Post date:** [January 27, 2020, 2:42pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/7 "2020-01-27T14:42:55Z")

</div>

> [@alexbk66](#):
>
> Is it normal? Or a bug?

Normal. There’s no brightness encoded in the signal, so including a `brightness` state would involve some serious guesswork.

Eventually, if we can reliably time sequenced requests, we could expose the Brightness state and actions, and use the fact that X milliseconds of dimming maps to Y% brightness increase. Until then, we do not expose it.

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 27, 2020, 10:13pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/8 "2020-01-27T22:13:34Z")

</div>

Question about setting brightness. It seems like the increment/decrement is 10% and minimum brightness is 20%?

Is it the same for all lights? Or it’s device specific? If so - how do I get it via API?

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jacob/32/312_2.png) [@jacob](https://forum.bondhome.io/u/jacob)\
**Post date:** [January 27, 2020, 10:46pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/9 "2020-01-27T22:46:34Z")

</div>

> [@alexbk66](#):
>
> Is it the same for all lights? Or it’s device specific? If so - how do I get it via API?

It’s device-specific. We’ve attempted to approximate the user’s experience with the remote. You could get this from the argument of the command, but it’s just presentational. You can also directly set the brightness (with SetBrightness), or increase the brightness by an arbitrary number.

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 28, 2020, 1:41am UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/10 "2020-01-28T01:41:52Z")

</div>

> [@jacob](#):
>
> You could get this from the argument of the command, but it’s just presentational. You can also directly set the brightness (with SetBrightness), or increase the brightness by an arbitrary number.

No, SetBrightness doesn’t seem to work if values are **not** increments of 10%  
Increase/Decrease works if the value is 10%  
Not sure what you mean by “You could get this from the argument of the command”

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jacob/32/312_2.png) [@jacob](https://forum.bondhome.io/u/jacob)\
**Post date:** [January 28, 2020, 3:28am UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/11 "2020-01-28T03:28:06Z")

</div>

You’re using RCF118 right?

Any argument to SetBrightness or Increase/DecreaseBrightness in the range [20, 100] _should_ work (and did work when I was putting this one together ~6 months ago). And any input outside that range should be limited to the min or max. The actual remote sends signals for brightnesses in intervals of 2, but we found that the receiver accepts odd-numbered brightnesses as well.

> [@alexbk66](#):
>
> No, SetBrightness doesn’t seem to work if values are **not** increments of 10%

> [@alexbk66](#):
>
> Increase/Decrease works if the value is 10%

What `_error_msg`s are you seeing?

> [@alexbk66](#):
>
> Not sure what you mean by “You could get this from the argument of the command”

The mobile apps panels are built from Commands, a device created by RCF118 for instance creates, among others, an IncreaseBrightness Command with argument 10, and a DecreaseBrightness Command with argument 10. You shouldn’t rely on this though, it’s just a convenience so the user doesn’t have to press the button 40 times to go from min to max brightness. We will likely replace it with a slider eventually.

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 28, 2020, 10:53am UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/12 "2020-01-28T10:53:11Z")

</div>

Hi @jacob unfortunately **SetBrightness doesn’t seem to work at all**. It doesn’t return any errors - just brightness doesn’t change. And yes, I do use **RCF118**.

The code I’m using for SetBrightness is the same as any other action with an argument, so it can’t be the code:

```
public void IncreaseBrightness(int change)
{
    ExecuteAction("IncreaseBrightness", change);
}

public void DecreaseBrightness(int change)
{
    ExecuteAction("DecreaseBrightness", change);
}

public void SetBrightness(int brightness)
{
    ExecuteAction("SetBrightness", brightness);
}

public void ExecuteAction(string action, int argument)
{
    bridge.ExecuteAction<State>(id, action, new ActionDataInt (argument));
}

class ActionDataInt : DeviceBondBridge.Data
{
    public ActionDataInt(int arg)
    {
        argument = arg;
    }

    public int argument { set; get; }
}

```

class Bridge:

```
public T ExecuteAction<T>(string devid, string action, Data data = null)
    where T : class, new()
{
    string command = $"/v2/devices/{devid}/actions/{action}";

    // Note: since it's using Method.PUT - there's no return value
    T t = ExecuteAction<T>(command, data);

    // so need to request state
    return GetDeviceState<T>(devid);
}
```

---

<div class="post-metadata">

**Author:** ![kingwr](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kingwr](https://forum.bondhome.io/u/kingwr)\
**Post date:** [January 28, 2020, 1:50pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/13 "2020-01-28T13:50:15Z")

</div>

Just two cents worth of opinion on integration philosophy: if a light device doesn’t support the SetBrightness() command (and, by extension, doesn’t have a “brightness” property), I am not enabling dimming commands at all, just on and off, for that light. My thought process is that interactive brightness are not all that valuable to my home controller if the controller cannot rely on state, since the controller can’t “look” at the light and make a decision. IMO, 95% of the reason to integrate a device with my home controller is for automation, especially if that device has plenty of user interactive options available otherwise (Alexa, Bond Home App, remote that came with it, etc.). So a light that requires the user to be present to determine the brightness and indicate start and stop of dimming commands will only be turned on and off by the controller - never dimmed, as part of scenes or for motion, schedules, etc. My fan light is configured to turn on to it’s last brightness setting, so I can configure the “on” brightness with the Bond Home App (or just the original remote), and then rely on the controller to turn it on and off as desired in my automation routines. Where the “brightness” state and the SetBrightness() command are available, they and the DecreaseBrightness() and IncreaseBrightness() commands are integrated into the device model.

---

<div class="post-metadata">

**Author:** ![kingwr](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kingwr](https://forum.bondhome.io/u/kingwr)\
**Post date:** [January 28, 2020, 1:55pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/14 "2020-01-28T13:55:45Z")

</div>

@jacob Also, FYI, StartIncreasingBrightness and StartDecreasingBrightness don’t appear in the current v2.9 docs.

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jacob/32/312_2.png) [@jacob](https://forum.bondhome.io/u/jacob)\
**Post date:** [January 28, 2020, 5:13pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/15 "2020-01-28T17:13:33Z")

</div>

Thanks for pointing that out. I’ve got an open request to merge this (among many other fixes), it’ll get merged in soon.

[Pull Request](https://github.com/bondhome/api-v2/pull/6)

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jacob/32/312_2.png) [@jacob](https://forum.bondhome.io/u/jacob)\
**Post date:** [January 28, 2020, 11:09pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/16 "2020-01-28T23:09:03Z")

</div>

> [@alexbk66](#):
>
> Hi @jacob unfortunately **SetBrightness doesn’t seem to work at all**. It doesn’t return any errors - just brightness doesn’t change. And yes, I do use **RCF118**.

Interesting, I’ll get on this tomorrow.

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [January 28, 2020, 11:23pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/17 "2020-01-28T23:23:03Z")

</div>

> [@kingwr](#):
>
> if a light device doesn’t support the SetBrightness() command (and, by extension, doesn’t have a “brightness” property),

It does have SetBrightness, IncreaseBrightness and DecreaseBrightness, also does have “brightness” property.

---

<div class="post-metadata">

**Author:** ![kingwr](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kingwr](https://forum.bondhome.io/u/kingwr)\
**Post date:** [February 1, 2020, 5:52pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/18 "2020-02-01T17:52:43Z")

</div>

I was responding to:

> [@alexbk66](#):
>
> Another question - **RCF98v2** has StartDecreasingBrightness and StartIncreasingBrightness - but doesn’t report “brightness” in the status.
> 
> Is this a bug?

---

<div class="post-metadata">

**Author:** ![alexbk66](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@alexbk66](https://forum.bondhome.io/u/alexbk66)\
**Post date:** [February 1, 2020, 11:56pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/19 "2020-02-01T23:56:59Z")

</div>

…Any news @jacob ?

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jacob/32/312_2.png) [@jacob](https://forum.bondhome.io/u/jacob)\
**Post date:** [February 3, 2020, 6:22pm UTC](https://forum.bondhome.io/t/how-can-i-test-brightness-if-i-dont-have-a-fan-with-lights/1257/20 "2020-02-03T18:22:59Z")

</div>

Working in most recent versions of firmware (v2.10.16), with test coverage. I’ll send to beta this afternoon.
