[SOLVED] OpenHAB file locations

I don’t know how else we can put it, the “some reason” is that you cannot add a link to a v.1 binding in that way.

1 Like

No
In fact all your Paper UI items can remain, the items with expire binding can be in a file all by themselves and coexist with your Paper UI created items. Just create unique switch items with expire configuration
here is example

Switch BedtimeTimer { expire="60s,command=OFF" }
1 Like

ok… I’m going to post my reply… from April 2019…

To use the expire binding you must create a switch item. If creating an item is already over your head, I’ll post link to learn. When the switch is triggered, however long you have configured it to run, then the stuff you coded in happens

Jee whiz… I can’t believe you found that Hans
and for completeness here is link to docs for folks stumbling across this thread in the future

and items files docos

Items are defined using the following syntax:

itemtype itemname "labeltext [stateformat]" <iconname> (group1, group2, ...) ["tag1", "tag2", ...] {bindingconfig}
  • Fields must be entered in the order shown
  • itemtype and itemname are mandatory
  • All other fields are optional
  • Fields may be separated by one or more spaces, or tabs
  • An Item definition may span multiple lines
1 Like

Thanks!
After I create the .items file with the expiry info how do I connect those items to specific things?
because PAPERUI doesn’t show the items listed in the .items file.
Do I need to use HABmin for that?

Please show us your items file.

I started with a test of one item till i get things working. Then I’ll add the other items that require Expire.

Switch WaterBoiler_Switch “Water Boiler” “Switchable” {zwave=“13”, expire=“1m,command=OFF” }

// vim: syntax=Xtend

This cannot work, as you are using V1 syntax for zwave and wrong tagging. Please try

Switch WaterBoiler_Switch "Water Boiler" [ "Switchable" ] { channel="zwave:device:b6c71408:node13:switch_binary", expire="1m,command=OFF" }

1 Like

To link a file based Item to a channel of a Thing, whether it is a PaperUI creatd Thing, or a xxx.things file based Thing, you edit the channel UID (“name”) into the Item definition.
Examples at bottom of doc -

You’ll need to use keyword channel= of course
and you’ll need to UID, which you either defined yourself in a xxx.things file or you can read off from PaperUI

1 Like

Jackpot! This worked!!!
Many thanks to all of you for your patience and for teaching me something new :pray: :pray: :pray: :pray: :pray: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face:

1 Like

I’m facing a strange behavior with this switch and the expire command, and I could use your help.

When I’m running the expire command exactly as you wrote it, my water heater switch stops working automatically after 1m, but when I tried to change the expire time to 30m, 45m or 1h, the expire command did not automatically turn off the water heater switch.

The thing is I added two more switches to the .items file and their expire time work properly for 30m, 45m, and 1h.
Is there a special reason the water heater switch would not work (while the two other works)?

Here is my current .items files:

Switch Bathroom_Switch1 "Bathroom Fan" [ "Switchable" ] { channel="zwave:device:b6c71408:node6:switch_binary1", expire="30m,command=OFF" }

Switch Bathroom_Switch3 "Bathroom Heater" [ "Switchable" ] { channel="zwave:device:b6c71408:node6:switch_binary3", expire="30m,command=OFF" }

Switch WaterBoiler_Switch "Water Boiler" [ "Switchable" ] { channel="zwave:device:b6c71408:node13:switch_binary", expire="30m,command=OFF" }

// vim: syntax=Xtend

No special reason. The expire binding is v1.x , and so not very good at picking up in-flight edits. Be sure to restart the binding or system to pick up changes.

Unfortunately, a complete Raspberry pi restart did not solve the water boiler expire issue.
The two other switches in my expire .items list are working properly based on the expire rules – and they worked properly also before the restart.

There’s something amiss with your setup. What are you going to do about it?

Check carefully for Items with duplicate names in all your xxx.items files.

Presuming you are editing remotely, be sure your file editor is saving files, saving them with the correct extension, and saving them in the right folder. See next para for a proof.

Look in your openhab.log for Loading model 'xxx.items' messages, and make sure your files load error free.

On occasion, people get into trouble with an Item created in both PaperUI and xxx.items file. That can be difficult to sort out - simple deletion doesn’t do it. The simplest workaround is to choose a new Item name altogether.

1 Like

After running a few tests and double checks I can confirm this method fixed the problem.
Thanks again for your help and patience :slight_smile: