System configuration options

Every time we update to the latest Snapshot, all those configuraciones that have been done on UI and not saved on config/services/ under a *.cfg file are lost, so we need to set them again.

So far I solved it for: addons.cfg, homekit.cfg, runtime.cfg, weather.cfg etc… as there are some documentation from Openhab1

But with new addons in OH2 there is still some lack of documentation, that is why I need some help on how to configure:

persistance.cfg to set the default persistance
locale.cfg to set the default country and lenguage
audio.cfg (I guess is the file name) to set the default sink and source
voice.cfg (I guess is the file name) to set also its options

runtime.cfg:

# set default persistence
org.eclipse.smarthome.persistence:default=rrd4j

See also

is there also somewhere a complete documentation for the stuff that can be written to the cfgs?

–> default sitemap
–> audio sinks
and so on… acutally anything that can be set in paper ui and is erased when upgrading to a new snapshot

cheers

If so I haven’t found it yet :sunglasses:

Looks like the default settings in /runtime/etc/services.cfg can be overwritten with conf/services/runtime.cfg:

Try (in /etc/openhab2/services/runtime.cfg):

org.eclipse.smarthome.basicui:defaultSitemap=[your_sitemap_name]
org.eclipse.smarthome.classicui:defaultSitemap=[your_sitemap_name]

In general, take a look at the directory: /usr/share/openhab2/runtime/karaf/etc
From there, you can see the parameter and use this info to set something in /etc/openhab2/services/runtime.cfg so that it remains set after an OH2 upgrade.

For example:
The file /usr/share/openhab2/runtime/karaf/etc/org.eclipse.smarthome.audio.cfg has 1 parameter: defaultSink = enhancedjavasound

You could set within /etc/openhab2/services/runtime.cfg the following:
org.eclipse.smarthome.audio:defaultSink=enhancedjavasound
and this would remain after an upgrade (in theory… I haven’t tested it :))

1 Like