# App.json overwritten

**URL:** <https://community.homey.app/t/app-json-overwritten/9815>\
**Category:** Developers\
**Created:** [February 27, 2019, 8:13pm UTC](https://community.homey.app/t/app-json-overwritten/9815 "2019-02-27T20:13:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siobhan\_B](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/siobhan_b/32/12963_2.png) [@Siobhan\_B](https://community.homey.app/u/Siobhan_B)\
**Post date:** [February 27, 2019, 8:13pm UTC](https://community.homey.app/t/app-json-overwritten/9815/1 "2019-02-27T20:13:05Z")

</div>

Hi all,

Complete noob here, only received my Homey yesterday.

Trying to write my first app and register a 433 mhz signal, but every time I run it my app.json gets overwritten and the signals section gets removed.

I know I’m doing something stupid but I can’t figure out what it is!

Any help appreciated, Siobhan.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 27, 2019, 8:38pm UTC](https://community.homey.app/t/app-json-overwritten/9815/2 "2019-02-27T20:38:29Z")

</div>

Are you using any [plugins](https://www.npmjs.com/package/athom-cli#plugins)?

---

<div class="post-metadata">

**Author:** ![Siobhan\_B](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/siobhan_b/32/12963_2.png) [@Siobhan\_B](https://community.homey.app/u/Siobhan_B)\
**Post date:** [February 27, 2019, 8:46pm UTC](https://community.homey.app/t/app-json-overwritten/9815/3 "2019-02-27T20:46:57Z")

</div>

Hi Robert,

I don’t think so. I’ve literally just created an app with the lofty goal of getting LightwaveRF working on v 2.0 and added a 433 mhz driver using the CLI, then manually added the signals section to app.json.

As soon as I run it it seems to re-generate app.json using the driver.compose.json section found in the /drivers folder. The signals section just gets removed.

Siobhan.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 27, 2019, 8:52pm UTC](https://community.homey.app/t/app-json-overwritten/9815/4 "2019-02-27T20:52:17Z")

</div>

If you added an RF driver using the CLI, two plugins are added (`rf` and `compose`, see the file `.homeyplugins.js` that should exist in your project folder).

I think that the compose system assumes that you add the relevant signal configuration for your device to the `drivers/DRIVERNAME/driver.compose.json` file, not directly in `app.json`.

---

<div class="post-metadata">

**Author:** ![Siobhan\_B](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/siobhan_b/32/12963_2.png) [@Siobhan\_B](https://community.homey.app/u/Siobhan_B)\
**Post date:** [February 27, 2019, 8:55pm UTC](https://community.homey.app/t/app-json-overwritten/9815/5 "2019-02-27T20:55:46Z")

</div>

Thanks, that’s useful to know. I thought that, but the driver.compose.json just adds one json object that gets added into the drivers array. And would it make sense to register the signal in every driver file?

Thanks for your help, it is appreciated.

Siobhan.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 27, 2019, 9:04pm UTC](https://community.homey.app/t/app-json-overwritten/9815/6 "2019-02-27T21:04:05Z")

</div>

I’ve never used `homey-rfdriver` myself, and [the documentation](https://github.com/athombv/node-homey-rfdriver#usage) seems to be lacking a rather important part, namely where the signal definition should actually be added.

The KaKu app stores them in [`.homeycompose/signals/433/`](https://github.com/athombv/nl.klikaanklikuit/tree/905e43ee67ebc9c92d424817cc8d874b0a7367c9/.homeycompose/signals/433), perhaps that’s the correct location for them.

---

<div class="post-metadata">

**Author:** ![Siobhan\_B](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/siobhan_b/32/12963_2.png) [@Siobhan\_B](https://community.homey.app/u/Siobhan_B)\
**Post date:** [February 27, 2019, 9:15pm UTC](https://community.homey.app/t/app-json-overwritten/9815/7 "2019-02-27T21:15:12Z")

</div>

That’s got it, thanks! Definitely not what the docs [here](https://apps.developer.athom.com/tutorial-Signals.html) say ☹

It looks like the name of the file in that folder becomes the signal ID.

Thanks for your help.

Siobhan.

---

<div class="post-metadata">

**Author:** ![bvdbos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bvdbos/32/2352_2.png) [@bvdbos](https://community.homey.app/u/bvdbos)\
**Post date:** [February 27, 2019, 9:19pm UTC](https://community.homey.app/t/app-json-overwritten/9815/8 "2019-02-27T21:19:19Z")

</div>

The docs are about a “simple” app but the rf-driver is for an app with lots of devices. So both can be used at will…

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 28, 2019, 7:40am UTC](https://community.homey.app/t/app-json-overwritten/9815/9 "2019-02-28T07:40:20Z")

</div>

If you use `athom app driver create`, you’re not told that, though.

---

<div class="post-metadata">

**Author:** ![Siobhan\_B](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/siobhan_b/32/12963_2.png) [@Siobhan\_B](https://community.homey.app/u/Siobhan_B)\
**Post date:** [February 28, 2019, 6:13pm UTC](https://community.homey.app/t/app-json-overwritten/9815/10 "2019-02-28T18:13:54Z")

</div>

Indeed, if you follow the getting started guide [here](https://apps.developer.athom.com/tutorial-Getting%20Started.html) it tells use to use the CLI and then in the [signals](https://apps.developer.athom.com/tutorial-Signals.html) section of the same guide it tells you to add directly in to app.json.
