Defining 'things' in paper UI and code


(Nigel Evans) #1

Am I correct in thinking that ‘things’ cannot be defined in both the Paper UI, AND defined in the ‘items’ folder? The reason for asking is because devices defined in the Paper UI do not seem to be available when creating rules in the ‘rules’ folder e.g. I am trying to create a sunset rule, but the astro binding fields, and the dimmer devices are not available, so I’m guessing that that have to be deined twice?


(Elias Hackradt) #2

Lets start here.

Things and items are different. Graphical source

Things can be defined in both PaperUI and Textual. You can use things( the items linked to the channel ) created via PaperUI and textual configuration both in rules.
Both should be available for rules.

You do note define devices, you define things by adding them from the Inbox.
Things can have Channels, each channel is for a special purpose.
Example:
Xiamoi Gateway
4 Channels

  1. Light On / Off Switch
  2. Color
  3. Color temperature
  4. foo

Each channel needs one Item so you can control the channel.
Channels can be linked to more then 1 Item.

Checkout the Concepts

Another example:

Each channel you see is linked to one Item.
You can use the items linked to the channel with your rules.

Also this Matrix is very useful
Do you know Node-Red? Its a graphical rule engine.


(Nigel Evans) #3

Hi Elias, Yes, I do know the difference between things and items, but the question was more around the availability of items defined in the Paper UI, via discovery, being available in code i.e. Habin panel->automation->rules.

PS there’s some really useful info in your post, thanks. I’ll have a look at the Node-RED rule engine


(Angelos) #4

By default, PaperUI has Simple Mode enabled for Item Linking. This will create 2 new stuff in your OH2 system: 1) an Item and 2) a Link from the Item to the Thing’s channel when you press the radio button next to the thing’s channel (after you have discovered the thing).

To see your auto-created Items (and their names to be used in other places like rules), you can disable Simple Mode and a new section will appear on the left menu.

You can also see the links and the linked items when you browse to the Thing’s channels (just like @BrutalBirdie explained very well above)


(Elias Hackradt) #5

With my knowledge I can tell the following:

Items created via PaperUI or Textual configuration can both be used for rules. (Node-Red, HABMIN and Ruleengine etc)
Items created via Textual configuration can NOT be edited via PaperUI.



(Nigel Evans) #6

Hi Angelos, where would I find the ‘simple mode’ selection?


(Angelos) #7


(Elias Hackradt) #8

I had a bad experience with Simple Mode. With 6x motion detectors all from the same manufacturer I had motion detector1, motion detector2, motion detector3 (something like this) and when I tried to create a rule… I was like F*CK which one is the right one ???


(Rich Koshak) #9

I’m constantly amazed at the number of users who do this to themselves without the benefit of Simple Mode.

Switch A14_P2Z "Bedroom lamp"