I’ve been running openHAB on a Raspberry Pie 2 for a while now. But, I am unable to upgrade from 1.6 when packages are ignored in apt. So, I installed a new openHAB2 instead. Problem is, I am unable to locate the configuration directory and the openhab.cfg file. I installed from repos using the offline variant.
I have located theese directorys:
The /etc/openhab2 directory have some typical subdirectories, but no .cfg files:
Any ideas on where to go from here? A hint on how to change trace levels or debug would also be useful:-)
In OH2, there is no openhab.cfg file anymore.
You configure your system via the Paper UI (install bindings, add things, etc) and you can also modify the text based config files in /etc/openhab2/ (e.g. /etc/openhab2/services/mqtt.cfg or /etc/openhab2/items/default.items)
To manage logging, take a look here: http://docs.openhab.org/administration/logging.html & Taming openHAB 2 Logging
Example: to set log level to TRACE to the MQTT binding:
- Enter into the Karaf console (
ssh openhab@localhost -p 8101 with password habopen)
- log:set TRACE org.openhab.mqtt
- log:set TRACE org.openhab.io.transport.mqtt
In general, take a look at http://docs.openhab.org to see how OH2 works
For migration info: Migration from OH 1.x to OH 2 Tutorial
I’ll also add that you can create an openhab.cfg file if you are using older openHAB 1.x bindings in legacy mode. These still require their config to be in the OH1.x style.
The 1.x compatibility layer ensures everything works together, but you need to enable it in the Configuration->System menu via paperUI.
That answers most of my initial questions. I’ll look into those resources.
Might be usefull/necessary to utilise legacy mode, but I hope to avoid that:-)
The reason why I started to look for the openhab.cfg file in the first place, is that the Paper UI did not load after installation. And, based upon the documentation I had read, I was not expecting a functional UI like the default Paper UI. There certainly was references to the Paper and the Classic UI, but it was my understanding that this was a decision that would be made in configuration (meaning after a basic setup of the openHAB2service/daemon).
After a couple of reboots (for debug purposes) there suddenly were a functional (Paper) UI. I have not made any relevant changes, that I am aware of, so this is probably some kind of fluke. But, the documentation suddenly made a lot more sense:-)
Hope this will be of help to anyone that might come across a similar situation.