#hi is there a way to make a options

1 messages · Page 1 of 1 (latest)

vale lantern
#

kinda

#

ive done this in a hacky way before

#

the options that are passed are just passed as a json file

#

so if the app you are using accepts a config file

#

just point it at the options json file and be careful with your naming

#

you still have to write the schema

#

but thats not bad

slate rover
vale lantern
#

you dont copy it into the config field, you build a JSON schema in the config field

#

and then when you run the addon a json config file is created for you

#

which you can then read into your app

#

you can set default settings in the config file

slate rover
#

The problem is, that first, the software don't read JSON, but it could be parsed to the right format. The second even bigger problem, is that there are so much options, that everything other then just pasting in the config, is just to much

vale lantern
#

can you give me some more info

#

whats the app and what kinda config does it read (or does it read from env variables?)

slate rover
#

It's a ham dmr software and it just reads a very long .ini file. But it looks like it gets parsed by line

vale lantern
#

can't you just have a string field called "settings_ini"

#

have the user enter the whole ini file there

#

and then in the dockerfile write whatever is in that environment variable out to wherever the app is looking for the settings.ini file?

slate rover
vale lantern
#

no idea then sorry mate

#

you could take the frigate / doubletake approach

#

and provide a simple webUI for editing the ini file

#

but thats a lot of extra effort for something that feels like it should be simple

slate rover
#

Not the nicest way, but possible

vale lantern
#

are you already using ingress?

slate rover
#

I don't think so

#

I just expose a single port

#

Like you can see in my config.yaml. it's the same add-on for which you help me with the s6/S3 service's

vale lantern
#

ingress isnt hard to use, take a look at either of those examples I sent you and the home assistant addon docs

#

if you turn it on you can add your app to the sidebar

slate rover
#

maybe at a later stage. for the moment, i already have a button on the addon page to open the site