Homey Community Forum

App.json overwritten

#1

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.

#2

Are you using any plugins?

#3

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.

#4

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.

#5

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.

#6

I’ve never used homey-rfdriver myself, and the documentation 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/, perhaps that’s the correct location for them.

1 Like
#7

That’s got it, thanks! Definitely not what the docs here say :frowning:

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

Thanks for your help.

Siobhan.

1 Like
#8

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…

1 Like
#9

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

#10

Indeed, if you follow the getting started guide here it tells use to use the CLI and then in the signals section of the same guide it tells you to add directly in to app.json.