[SOLVED] OpenHAB file locations

Hello friends,
I’m running openHAB 2.5.2 on raspberry pi 4 using automatic installation option.
Can anyone tell me in which folder I can find the items file automatically created when creating items in Paper UI?
I want to add HomeKit tags to my items, but I can’t find the items file.

I also want to add the Expire Binding info for a few of my switches. Should I add the expire rules to the items files too?

Second file I’m searching for is the jar file for the Samsung Air Conditioner binding. I need to find my AC’s IP and MAC address, but I can’t find the binding’s location on my system to run the IP and MAC address finder process suggested on the binding’s info page.

Any help will be much appreciated.

There will be no .items file created if you use PaperUI for creating items. They are all stored in jsondb (json files). But it is not recommended to edit these files. The Jsondb is located here.

But you can add tags by using the REST API.

An example how to add tags you can find

here.

It’s for Alexa tags, but you also could put in Homekit tags.

2 Likes

Thank you :pray::pray:
I’ll try your suggestion :slight_smile:

Thanks, Alex. Your suggestion worked and I can see my devices in the Apple Home app :slight_smile:
Do you know if I can use the REST API to add the Expire Binding settings to my items?

1 Like

Sorry, I don’t know this.

It’s ok. You’ve been very helpful :pray: :pray: :pray:

You could try:

REST API:

PUT links/{itemName}/{channelUID}

Before you should do a:

GET links

Then write down (or copy) {itemName} {channelUID}

Then do a GET /links/{itemName}/{channelUID}

At last do:
PUT links/{itemName}/{channelUID}

body:

{
  "itemName": "your_item_name",
  "channelUID": "your_channel_UID",
  "configuration": {
  "profile": "system:default",
   expire="30s,state=CLOSED"},
}

.

But I’ve never did this! Do it ON YOUR OWN RISK!

1 Like

Thank you!
I’ll run a backup of my system and then I’ll try :slight_smile:

Unfortunately, this idea didn’t work.
The Expire command was not sent and the switch continued working after the set time passed.

When you now do a:

GET /links/{itemName}/{channelUID}

What is the result?

Miki
Im pretty sure because the expire binding is a V1 binding, the only way you can create items with expire binding is with item files

1 Like

{
“channelUID”: “zwave:device:b6c71408:node13:switch_binary”,
“configuration”: {
“profile”: “system:default”,
“expire”: “1m,state=OFF”
},
“itemName”: “WaterBoiler_Switch”
}

yeah…, if the REST API solution wont work, my next step will be to create a manual items file.

@Andrew_Rowe
Do I need to delete ALL my Paper UI items and then add them to a manual .items file?
Or can I just delete the particular items that need Expiry settings and add only them to a manual .items file (while items without expiry settings stay as Paper UI items)?

The result should be:

{
“channelUID”: “zwave:device:b6c71408:node13:switch_binary”,
“configuration”: {
“profile”: “system:default”,
expire=“1m,state=OFF”
},
“itemName”: “WaterBoiler_Switch”
}

1 Like

Expire profile has not been merged yet, it is still WIP, see

Only solution for now is using the V1.x Expire Binding.

1 Like

That is what @mjeshurun is using. But he wants to add an expire parameter via REST API.

He has no .items file and created all items via PaperUI. In PaperUI you have to select a profile e. g. “system:default” while linking an item to a channel (+create new item). This is then shown in REST API → GET /links/{itemName}/{channelUID}

1 Like

As already answered in the following thread, this is not possible without items file

1 Like

To use the expire v1.x binding, you must create the item in xxx.items file (to be able to link to a 1.x binding)
When you create an Item from xxx.items file, it is treated as “not manageable” from PaperUI , REST API etc.

1 Like

For some reason, I’m getting an error message when running the PUT, which means the GET /links/{itemName}/{channelUID} doesn’t update with the added expire line in the result.