# Adding custom buttons

**URL:** <https://forum.bondhome.io/t/adding-custom-buttons/1230>\
**Category:** BOND Setup and Hardware\
**Created:** [January 18, 2020, 3:09pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230 "2020-01-18T15:09:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deano](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@Deano](https://forum.bondhome.io/u/Deano)\
**Post date:** [January 18, 2020, 3:09pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/1 "2020-01-18T15:09:45Z")

</div>

I’ve added an LED backlight that is IR controlled. I have successfully added a custom remote to the bond hub, and can now power the LED lights on/off using the bond application.

Is there a way to add additional buttons to this generic device? I can only edit the 3 buttons that were provided during the setup process (ON / OFF / Power).

---

<div class="post-metadata">

**Author:** ![marcio](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/marcio/32/210_2.png) [@marcio](https://forum.bondhome.io/u/marcio)\
**Post date:** [January 18, 2020, 5:49pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/2 "2020-01-18T17:49:44Z")

</div>

For now you can do using the API. Check out the docs here: [http://docs-local.appbond.com/#tag/Device-Commands/paths/~1v2~1devices~1{device\_id}~1commands/post](http://docs-local.appbond.com/#tag/Device-Commands/paths/~1v2~1devices~1%7Bdevice_id%7D~1commands/post)

In the future we are planning for additional/custom buttons on generic devices, but that still may take a while

---

<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 18, 2020, 6:45pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/3 "2020-01-18T18:45:35Z")

</div>

Looks good. Do you have a list of available categories, icons, button types?

---

<div class="post-metadata">

**Author:** ![marcio](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/marcio/32/210_2.png) [@marcio](https://forum.bondhome.io/u/marcio)\
**Post date:** [January 18, 2020, 6:59pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/4 "2020-01-18T18:59:56Z")

</div>

- Categories are only strings used to organize the buttons, you can use whatever you want. We use it like `Fan`, `Light`, `Other`…
- Button Types are `tap` for normal buttons and `momentary` for buttons like dimmers, which you have to send a Stop action to stop transmitting.
- Icons we do have a list internally, I’ll ask around if we can have a public doc for that.  
Also I’ll ask if someone can update the docs to add this info

---

<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 19, 2020, 4:09am UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/5 "2020-01-19T04:09:04Z")

</div>

Thank you.

Another question, when I add the new button - how do I program the actual IR or RF it will emit?

---

<div class="post-metadata">

**Author:** ![merck](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/merck/32/1238_2.png) [@merck](https://forum.bondhome.io/u/merck)\
**Post date:** [January 19, 2020, 8:32am UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/6 "2020-01-19T08:32:47Z")

</div>

See here: [http://docs-local.appbond.com/#tag/Device-Command-Signal/paths/~1v2~1devices~1{device\_id}~1commands~1{command\_id}~1signal/put](http://docs-local.appbond.com/#tag/Device-Command-Signal/paths/~1v2~1devices~1%7Bdevice_id%7D~1commands~1%7Bcommand_id%7D~1signal/put)

If you have just completed a successful scan, you can set `use_scan: true` rather than copy-pasting all the scan data back into the API.

* * *

@marcio: Yes we can publish the icon list. It’s just a list of supported slugs.

---

<div class="post-metadata">

**Author:** ![residualimages](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/residualimages/32/74_2.png) [@residualimages](https://forum.bondhome.io/u/residualimages)\
**Post date:** [January 30, 2020, 3:24am UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/7 "2020-01-30T03:24:12Z")

</div>

> [@marcio](#):
>
> additional/custom buttons on generic devices

Will we also need the ability to POST / PATCH / otherwise add or edit “Actions” since that’s a required parameter of creating commands?

Just started working with my first custom device tonight, and while it is spiffy to be able to have a generic device. the limitations of the existing actions and their buttons (seems like commands revert to action icon slugs no matter how many times I PATCH it to use a different icon) make it kinda wonky. Also, it has 4 buttons vs the 3 which are generated on a generic device template.

Most likely it will be transparent in my custom integrations, but in the app it will always seem a little funky. Plus, I shudder to think how Google Assistant is going to interpret this…

---

<div class="post-metadata">

**Author:** ![rustlerski](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rustlerski](https://forum.bondhome.io/u/rustlerski)\
**Post date:** [May 12, 2020, 7:29pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/8 "2020-05-12T19:29:46Z")

</div>

Can anyone provide a little guidance on the Post action to create a custom command?

I’m able to manage all the Get requests through Terminal and Postman. When trying the Post command in Postman, I get a 200 OK response that’s html of the default web gui. In terminal, I’m just way out of practice.

Using the new command example of:  
{“name”: “Light”,“action”: “SetSpeed”,“argument”: 3,“icon”: “speed\_3”,“category\_name”: “fan”,“button\_type”: “tap”,“hidden”: true}

how would you update:

curl -H “BOND-Token:\*\*\*\*\*” -i [http://192.0.0.0/v2/devices/{ABCDE}/commands](http://192.0.0.0/v2/devices/%7BABCDE%7D/commands)

to execute the post to add the new command above?

---

<div class="post-metadata">

**Author:** ![residualimages](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/residualimages/32/74_2.png) [@residualimages](https://forum.bondhome.io/u/residualimages)\
**Post date:** [May 12, 2020, 7:45pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/9 "2020-05-12T19:45:18Z")

</div>

Hey @rustlerski - Since I believe Actions are a required parameter for Commands, and Actions are only (seemingly) added to a device from a prescribed list of Actions during each device’s initial setup / addition to the Bridge, I have not had any luck adding custom Commands.  
I have, however, had decent luck setting up a custom device as a normal Fireplace or Fan, keeping careful track of which Commands / Actions I mapped in the app to the physical original remote, and then PATCH-ing the Commands after finishing setup. [See here](https://forum.bondhome.io/t/unable-to-learn-dyson-remote/1319/2).

---

<div class="post-metadata">

**Author:** ![rustlerski](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rustlerski](https://forum.bondhome.io/u/rustlerski)\
**Post date:** [May 12, 2020, 9:06pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/10 "2020-05-12T21:06:36Z")

</div>

Thanks. I’ll look into that. Did I transpose adding a custom command with adding a custom button (which is really what I was going for)? I setup a few generic devices just to play around with.

---

<div class="post-metadata">

**Author:** ![residualimages](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/residualimages/32/74_2.png) [@residualimages](https://forum.bondhome.io/u/residualimages)\
**Post date:** [May 12, 2020, 9:12pm UTC](https://forum.bondhome.io/t/adding-custom-buttons/1230/11 "2020-05-12T21:12:05Z")

</div>

They’re really all interconnected.

I did have better luck adapting a Fireplace or Fan device (turning off database lookup and recording each button press manually) vs using the Generic Device (which seemed more limited).  
Counter-intuitive, I know.  
But then I could rename the buttons. Sadly, I have not been able to find a way to change the _icon_, but at least the label. You’ll find my notes in that post I linked above. 🙂

For instance, I have an upright floor lamp which is a Fireplace as far as BOND is concerned, because I needed more than the 3 buttons the Generic Device gives.  
I used Flame Up for increase brightness, Flame Down for decrease brightness, Low Flame as a ‘change LED color/temp’, and Toggle Light for power toggle.
