#hi is there a way to make a options
1 messages · Page 1 of 1 (latest)
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
The problem here is, that when I paste my config file into the config field, all new lines are gone and it looks like the app needs it's new lines in its config
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
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
can you give me some more info
whats the app and what kinda config does it read (or does it read from env variables?)
It's a ham dmr software and it just reads a very long .ini file. But it looks like it gets parsed by line
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?
That's why I asked how to make a string field multiline. Because the way I do it, all new lines are lost
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
It would just be a simple multiline textfield that's get written into a file. And because there is already lighttpd and PHP there, it's even simpler
Not the nicest way, but possible
are you already using ingress?
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
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
maybe at a later stage. for the moment, i already have a button on the addon page to open the site