New install and totally lost

  • Platform information:
    • Hardware: Rasberry Pi
    • OS: OpenHabian
    • Java Runtime Environment: Current?
    • openHAB version: 2.5.8
  • Issue of the topic: Trying to set up E-Mail

I’m sorry, but the beginner’s user experience really isn’t great and I’m lost.

Is there an “OpenHAB for Idiots” book that can help me get comfortable with it?

It took forever to figure out how to set up MQTT and add a few SONOFF power adapters, they now work and I can switch them off and on in the “HABPANEL”.

I’m trying to configure E-Mail things ( and I’ve added SMTP and IMAP items.

After that, everything I see on the web pages refers to things like “mail.things” and “mail.items” and I can’t find anything like that on the Paper UI or on the server.

All of the configuration changes I have made are in “/var/lib/openhab2/jsondb” and there is nothing remotely near to what the bindings page has.

in org.eclipse.smarthome.core.thing.Thing.json:

“mail:imap:bfa4fc4b”: {
“class”: “org.eclipse.smarthome.core.thing.internal.ThingImpl”,
“value”: {
“label”: “IMAP”,
“channels”: [
“acceptedItemType”: “Number”,
“kind”: “STATE”,
“uid”: {
“segments”: [
“channelTypeUID”: {
“segments”: [
“configuration”: {
“properties”: {
“type”: “TOTAL”,
“folder”: “INBOX”
“properties”: {},
“defaultTags”: []
. . . . .

in org.eclipse.smarthome.core.items.Item.json:

“InboxTotal”: {
“class”: “org.eclipse.smarthome.core.items.ManagedItemProvider$PersistedItem”,
“value”: {
“groupNames”: [
“itemType”: “Number:DataAmount”,
“tags”: [],
“label”: “InboxTotal”,
“category”: “IMAP”

It may be self explanatory to people that have been using this for a while, but the UI doesn’t have the kind of input fields like
“Number InboxTotal “INBOX [%d]” { channel=“mail:imap:sampleimap:inbox_total” }”

I have set the label to “InboxTotal”, the Type to “Number” and the Dimension is “DataAmount” but how am I supposed to define the string or the channel?

I am at a total loss.

The documentation describes where to put the thing files ( ) and the items files ( point 2 ).
Editing jsondb is not the right place.

Mm, well that sets off down another path.

Editing text files is essentially a legacy from openHAB-1, but still functional for 2 and 3

Most binding docs describe use with these files, but all the more modern bindings may also be configured with PaperUI in GUI. That’s more self-documenting.

Likewise for Item creation and links.

These methods are complimentary but not the same.

Hi, thanks for the help so far :slight_smile:

I was only looking for where my configuration was being stored, I sure don’t want to mess about in the jsondb files.

So if I understand you both right, V2 Paper UI is WIP and the only way to configure certain things is to create files as described.

I’ll give it a go and hopefully I don’t have to reset the stuff that I have already defined.

Are there parts of this that are mutually exclusive or does it merge both sets of information?

Nope. GUI configuring is the preferred method.

openHAB runs only one config, so yes consider them merged. Changes made in one system are not reflected into the other though; e.g. editing with PaperUI does not update files.
In most cases, PaperUI knows if you are trying to edit file-derived info and blocks you anyway.

But I can’t find/see a way to define the “Number” Items Paper UI the way that they are provided in the example (InboxTotal).

Basically, I’m trying to identify where I should edit what, and the way it looks, because the “Number” option in the Paper UI Item dialog doesn’t provide me with a way to define the formatting string or the source channel, I have to do it in the file system.

If I create “mail.items” in “/etc/openhab2/items”, I should then be able to use the items defined there and then use them in the rest of the system, correct?

In paperUI, you do not type in stuff like {channel="blah;bleh'}

In PaperUI, Things are viewable.
Under each Thing you can see the channels that you have made,or are provided.
Under each channel you can link to an Item (or create a new Item with link).

Yes this is not obvious.
In file Item definitions, the formatting string - the state presentation - is an embedded part of the label text
… “some descriptive text [%s]”
This remains the case in PaperUI. You type text [%s] in the label box of the editing form.

Now I’m even more confused.

As an “Item” in the example (not a Thing), the following is given:

Number InboxTotal “INBOX [%d]” {channel=“mail:imap:sampleimap:inbox_total”}

So, an Item is the same a thing in Paper UI, and I shouldn’t be defining it as a “Item” at all?

When I define an Item in Paper UI I have only the following fields/Drop-downs:
Label: “InboxTotal”
Type: “Number”
Dimension: “DataAmount”

I don’t see any way to add a channel to an item, and I’m guessing, based on what you are saying the Label should be this (label [%s=displayed value]):

Label: “InboxTotal [“INBOX [%d]”]”

Nope. Review concepts

Number InboxTotal …

That creates and describes an Item

… {channel=“mail:imap:sampleimap:inbox_total”}

That points to a channel. Channels belong to Things.
If the channel exists, a link is created between Item and Thing/channel.
If the channel does not exist, nothing else happens.

That is correct. You’re trying to make a link between an Item and a channel.

If you define Item and channel in files, you create the link at the Item “end”. You cannot create the link at the channel file definition.

If instead you use PaperUI, you come at it from the other end, finding the Thing channel and adding the link to an Item there.

There are a lot of moving parts and the initial learning curve is steep, because you need all the parts to work for the most basic “hello world”.

I have the channels already defined:

I can only add “Mail Count” channels there, I don’t see a way to link it to the InboxTotal Item.

My problem is how to link them. Should the Label then be everything after Number from “mail.items”?

Label: InboxTotal “INBOX [%d]” {channel=“mail:imap:bfa4fc4b:inbox_total”}
Type: Number
Dimension: DataAmount

I’ve tried adding it as a String because in HABPANEL because I can only add an “openHAB String Item” as a “URL Source”, then it says "HTTP ERROR 404 not found “/habpanel/NULL”.

Frame Settings:
Name: Inbox Total
URL Source: openHAB Strin Item
openHAB Item: InboxTotal

I don’t know what you’re doing now. HABpanel has nothing to do with linking Items and Channels.
Do yourself a favour and avoid the complexities of HABpanel until you have mastered openHAB basics.
There’s a perfectly usable BasicUI and simple sitemap display control (file based :slight_smile: )

IMAP is defined with 2 Mail Count channels -

InboxTotal is a String Item with formatted Label + channel -

In the basic UI it is simply the Label without anything else -

But the imap channels are number types, it says so in your screenshots.

You have to link similar types of objects. You cannot link, say, a dimmer channel to a location Item.
Or rather, you can try to force it with text files but it won’t work. PaperUI will not let you do this.

On your Thing GUI display, click the blue blob next to a channel. You will be offered to link suitable existing Items, or to create a new Item.

The Item label. Absolutely no-one has ever suggested transcribing the channel from a text-based Item definition into an Item label.
Absolutely no-one has ever suggested transcribing the Item name from a text-based Item definition into an Item label.

The label is the label.
Starting point -.“This Item is my mail count”
So while editing your Item with the GUI, you would type into the form box marked label
This Item is my mail count

Optionally, or in practice usually, the label may include a state presentation instruction (formatting) enclosed in square brackets. [%s] , [%.1f kW] etc.
This is exactly the same whether you’re using files or GUI.
So while editing your Item with the GUI, you would type into the form box marked label
This Item is my mail count [%s]

It is not apparent from the UI that when you press the “Channel” Icon that you can add/bind items there.

That was the missing part!

Thank you for your help and patience!

1 Like

It’s right there in the docs

Regarding that starter guide, I would advise turning ‘simple mode’ off. It invariably just gets in the way as soon you try any real customization.