Where are config files on Mac?

Hi,

I’m new to OpenHab and I started my first test on a Mac installing OpenHab 2.5.1 stable.
Went to Paper UI and configured bindings and items.

Now, I understand I need to edit the text config files to move further but I can’t find them on my Mac.
Searching for *.items files on my entire HDD does not produce any result.

Thanks for your help.

What document did you follow for installation? At least on Linux, the file location is dependent on how it was installed.
The environment variable $OPENHAB_CONF should point to the configuration folders.

You only will find .item files for stuff that you created manually. In case so far you have used Paper UI only these items were stored in the mongo database - not in the file system.

Thanks Worfgang,
This is the explanation. Will OpenHab use both the item I will create manually and the ones which are in the MongoDB?
Is the following path correct for the new .item file to be created?
~/openhab/conf/intems
there is already a readme.txt in this folder

Thanks Bruce,

I used the new user tutorial until now. https://www.openhab.org/docs/tutorial/
Typing “echo $OPENHAB_CONF” in my Mac terminal does not produce any response.

OK, looking at that, I would guess ~/openhab/conf
In other words, in the openhab/conf folder off your home directory.

Yes, both ( those which are set up by using the UI and those which are setup by editing text files ) are used.

Last question, is there any way to view the syntax of the items or things that were create in the Paper UI and stored in the MongoDB?

Using the REST API? Install restdocs to make it easier to figure out.

In addition to @Wolfgang_S reply you will only want to create one item in either the UI or files but not the same item in both locations.

1 Like

To have a look to the mongo DB content you may try this:

  • login to a shell on openhab computer / raspi
  • connect to mongo db
    mongo -u YourUserHere -p YourPasswordHere openhab
  • db.items.find()
  • result looks like:
{ "_id" : ObjectId("5c7abcf4c5d4f7bb036c2dba"), "last_update" : ISODate("2019-03-02T17:27:16.778Z"), "prev_status" : "", "openhab" : ObjectId("5c4f58ed6cbc6d0a04d42b9b"), "name" : "RXV685Main_Zone_Zone_channels_Power", "last_change" : ISODate("2019-03-02T17:27:16.755Z"), "status" : "ON", "states" : [ ], "groups" : [ ] }
{ "_id" : ObjectId("5c7abcf4c5d4f7bb036c2dbc"), "last_update" : ISODate("2019-03-02T17:27:16.864Z"), "prev_status" : "", "openhab" : ObjectId("5c4f58ed6cbc6d0a04d42b9b"), "name" : "Verstaerker", "last_change" : ISODate("2019-03-02T17:27:16.854Z"), "status" : "ON", "states" : [ ], "groups" : [ ] }
{ "_id" : ObjectId("5c7abcf4c5d4f7bb036c2dbe"), "last_update" : ISODate("2020-02-03T18:06:47.754Z"), "prev_status" : "0", "openhab" : ObjectId("5c4f58ed6cbc6d0a04d42b9b"), "name" : "RXV685Main_Zone_Zone_channels_Volume", "last_change" : ISODate("2019-03-02T17:27:16.974Z"), "status" : "30", "states" : [ ], "groups" : [ ] }
{ "_id" : ObjectId("5c8e2c2543b0954b033fc143"), "last_update" : ISODate("2020-01-28T20:25:53.752Z"), "prev_status" : "HDMI2", "openhab" : ObjectId("5c4f58ed6cbc6d0a04d42b9b"), "name" : "Yamaha_Input", "last_change" : ISODate("2019-03-17T11:14:45.725Z"), "status" : "HDMI1", "states" : [ ], "groups" : [ ] }
{ "_id" : ObjectId("5ce872b98685d27a035ff53b"), "last_update" : ISODate("2019-05-24T22:39:53.502Z"), "prev_status" : "", "openhab" : ObjectId("5c4f58ed6cbc6d0a04d42b9b"), "name" : "Amplifier", "last_change" : ISODate("2019-05-24T22:39:53.488Z"), "status" : "OFF", "states" : [ ], "groups" : [ ] }
{ "_id" : ObjectId("5dfb4fa824a4a1ba03fcd881"), "last_update" : ISODate("2020-02-03T18:06:46.300Z"), "prev_status" : "OFF", "openhab" : ObjectId("5c4f58ed6cbc6d0a04d42b9b"), "name" : "Rule_TV_einschalten", "last_change" : ISODate("2019-12-19T10:23:36.791Z"), "status" : "ON", "states" : [ ], "groups" : [ ] }