# Creating device with template - how do you find addr and zero\_gap?

**URL:** https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922
**Category:** BETA API
**Created:** [September 9, 2024, 1:36pm UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922 "2024-09-09T13:36:56Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![breeze](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@breeze](https://forum.bondhome.io/u/breeze)
#### Post date: [September 9, 2024, 1:36pm UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922/1 "2024-09-09T13:36:56Z")

</div>

Quick background, I’m trying to get the F2 template to apply to my [Windward IV 52 in. Indoor LED Oil Rubbed Bronze Ceiling Fan with Dimmable Light Kit, Remote Control and Reversible Motor](https://www.homedepot.com/p/Home-Decorators-Collection-Windward-IV-52-in-Indoor-LED-Oil-Rubbed-Bronze-Ceiling-Fan-with-Dimmable-Light-Kit-Remote-Control-and-Reversible-Motor-26661/301163152) ceiling fan. This is Fan Remote Model: HD3 with FCC ID: 2AAZPHD3. The Bond app won’t offer me the F2 template regardless of what I do, so I’m trying to use the API to create the device instead by sending a POST request to /v2/devices.

The issue I’m running into is finding the right values for the properties. In other posts on the forum, it’s noted that to create a device you need to know the addr, bps, zero\_gap, and freq.

I know the freq is either 304150 or 304250 and bps is 40000. But I don’t have values for addr, or zero\_gap.

I tried to look up the addr and zero\_gap for my manually set up fan from the /devices/deviceID/properties endpoint, but it just gives me

```auto
{
"max_speed": 2,
"trust_state": false,
"_": "b17cd87a",
"__": "b17cd87a"
}

```

As you can see, no addr, bps, and zero\_gap, or freq shared.

When I look up a command via API, then use that to look up a signal, I get a little more info, but still no addr or zero\_gap.

```auto
{
"freq": 304150,
"bps": 40000,
"deviation": 0,
"reps": 1,
"modulation": "OOK",
"encoding": "hex",
"data": "F80000000FFFF8........

```

**Can anyone help me figure out how to get the missing `addr` and `zero_gap` values?** Thanks in advance!

**Is `addr` just the pips sequence in the remote? If so, how would I reflect the pips in the attached remote picture?**

Here is my device create call so far - like I said, addr and zero\_gap are just dummy values taken from other posts on this forum:

```auto
{
  "name": "testfan",
  "type": "CF",
  "template": "F2",
    "location": "My Room",
    "properties": {"addr": "1111", "bps": 40000, "zero_gap": 30, "freq": 304150}
}

```

 ![IMG_8742](https://us1.discourse-cdn.com/flex019/uploads/bond1/original/2X/c/cc43113cd6e153b7c46c8e18f931e79b3b1f67c2.jpeg)

---

<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: [September 10, 2024, 2:45am UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922/2 "2024-09-10T02:45:10Z")

</div>

I really like seeing new folks on the forums being so resourceful! Welcome, @breeze .

Now, as far as the actual questions you posed, I don’t have a quick answer.  
Maybe @merck or another Bond staff member will run through here sometime this week.  
Meanwhile, I’ll have a poke around my notes and the forums as well, see if I can jog any nuggets free of things I’ve seen, currently have, or can find buried in a corner in the posts here.

---

<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: [September 11, 2024, 2:41pm UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922/3 "2024-09-11T14:41:52Z")

</div>

Manually creating template devices via the API is not something that we even are able to do well internally, as it is very dependent on reading the correct values of props out of the signal recorded.

Does it work with raw recording? Where you record one signal per button? That should be way easier.

> bps is 40000

That’s the max rate of our radio. Checking our db, users of F2 have bps from 2200–2925. `zero_gap` from 16–31. Address needs to be determined from the signal, unless you just make one up and then manage to get the fan to pair it by doing long reps of the power button (which is usually involved in pairing these remotes).

---

<div class="post-metadata">

### Author: ![breeze](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@breeze](https://forum.bondhome.io/u/breeze)
#### Post date: [September 11, 2024, 3:50pm UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922/4 "2024-09-11T15:50:56Z")

</div>

Thanks for the responses, @merck and @residualimages!

The remote works with raw recording, but because of how the remote works it would be very difficult if not impossible to manually record all fan speeds, etc. Hence my wanting to get the template to work.

I’m trying to reverse engineer the `addr`, `bps`, and `zero_gap` from the raw recording, but the API won’t give me that info. Or I can’t figure out how to get the API to give me that info.

Here’s what I’m doing.

1. Get list of Commands for Ceiling Fan that I manually recorded (/v2/devices/:device\_id/commands)
2. Get Signal associated with Command (/v2/devices/:device\_id/commands/:command\_id/signal)
3. Look at response body and wish it had the addr and zero\_gap details…or an accurate bps!

> [@merck](#):
>
> as it is very dependent on reading the correct values of props out of the signal recorded.

If there is any way for me to read the property values (or for you to look up the values that I’ve manually recorded) I would really appreciate it! Thanks again.

Here’s the response body again, for reference:

```auto
{
    "freq": 304150,
    "bps": 40000,
    "deviation": 0,
    "reps": 1,
    "modulation": "OOK",
    "encoding": "hex",
 "data": "FFFFFFFFC0007FFFF..........

```

---

<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: [September 11, 2024, 4:56pm UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922/5 "2024-09-11T16:56:20Z")

</div>

> [@breeze](#):
>
> I’m trying to reverse engineer the `addr`, `bps`, and `zero_gap` from the raw recording, but the API won’t give me that info. Or I can’t figure out how to get the API to give me that info.

In raw-recording, the Bridge just has a raw waveform. It’s kind of like a WAV file instead of a TXT file. The Bridge doesn’t know the protocol it’s just a 600 ms buffer of 1s and 0s.

Figuring out the address requires inspecting the packet with knowledge of the protocol. This is what our backend tries to do when it checks the “remotes database” based on the recorded signal.

---

<div class="post-metadata">

### Author: ![breeze](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@breeze](https://forum.bondhome.io/u/breeze)
#### Post date: [September 11, 2024, 5:13pm UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922/6 "2024-09-11T17:13:20Z")

</div>

@merck Ah, that makes sense. In that case, do you have any suggestions on how to best get the app to recognize the remote in the remotes database? It’s listed as a [fully supported device](https://bondhome.io/supported-devices/?search=2AAZPHD3) on your website but I can’t get the app to offer a template no matter how many times and different ways I try to raw record. Thanks.

---

<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: [September 11, 2024, 6:29pm UTC](https://forum.bondhome.io/t/creating-device-with-template-how-do-you-find-addr-and-zero-gap/4922/7 "2024-09-11T18:29:01Z")

</div>

Can we jump on a quick video call to sort it out? [https://meetings.hubspot.com/chris-merck/engineering-support-call](https://meetings.hubspot.com/chris-merck/engineering-support-call)
