Add Paper UI item to a group?

Hi,

I added a NetAtmo Station to my OpenHab environnement.
The items where all created in Paper UI, with Item Linking in simple mode activated.

Now I want to chart my temperature. All my items that needs to be recorded for charting are in a group gChart.

How do I add my items in that group ? When ‘editing’ the items trough Paper UI, nothing is ‘editable’ …

Thank you

I’m not sure that its possible to add items to a group via PaperUI. I’ve found that it’s best to use PaperUI only for binding configurations and define your items in the items file. For charting temp and humidity my item file looks like this:

Group Home_Sensor_Chart (Office, Charts)
Number Home_Sensor_Chart_Period "Period" (Office)
Number ESP_Easy_Temp "Esp8266 Temp [%.1f °F]" <temperature> (Home_Sensor_Chart)
	{ mqtt="<[pibroker:/Esp/DS/Temp:state:default]" }

Number ESP_Easy_Humid "Esp8266 Humid [%.1f %%]" <humidity> (Home_Sensor_Chart)
	{ mqtt="<[pibroker:/Esp/DS/Humid:state:default]" }	

Then add this to persistence file, I’m using rrd4j like:

Strategies {
	// for rrd chart cron strategy every minute
	everyMinute : "0 * * * * ?"
	// get data reduced for older values to keep database small
	everyHour : "0 0 * * * ?"
	everyDay : "0 0 0 * * ?"

	default = everyChange
}

Items {
	// additionally persist Items
	LivingRoom_Light_Temp : strategy = everyUpdate, everyMinute
	LivingRoom_Light_Humidity : strategy = everyUpdate, everyMinute
	Home_Sensor_Chart* : strategy = everyUpdate, everyMinute
	ESP_Easy_Temp : strategy = everyUpdate, everyMinute
	ESP_Easy_Humid : strategy = everyUpdate, everyMinute
}

and for a sitemap something like this:

Frame {
		Switch item=Home_Sensor_Chart_Period mappings=[0="1h", 1="12h", 2="Day", 3="Week", 4="Month"]
		Chart  item=Home_Sensor_Chart period=h   refresh=60000 visibility=[Home_Sensor_Chart_Period==0] //, Home_Sensor_Chart_Period=="Uninitialized"]
		Chart  item=Home_Sensor_Chart period=12h  refresh=60000 visibility=[Home_Sensor_Chart_Period==1]
		Chart  item=Home_Sensor_Chart period=D  refresh=60000 visibility=[Home_Sensor_Chart_Period==2]
		Chart  item=Home_Sensor_Chart period=W refresh=60000 visibility=[Home_Sensor_Chart_Period==3]
		Chart  item=Home_Sensor_Chart period=M   refresh=60000 visibility=[Home_Sensor_Chart_Period==4]
	}

This is what it looks like on my BasicUI:

You can change the period to suit your needs. Hope this helps.

I don’t use PaperUI created Items. But I just created one and when I created the Item I was given the option to click on

image

and choose an Item.

Then I went to the Item and clicked edit and was able to change the Group as well.

Something weird is going on with yours and I’m not sure what is going on for you.

In a pinch, you can add the Item to a Group through the REST API UI (installed from the Misc tab):

Or you can edit the JSONDB manually.

  1. Stop OH. Do not edit jsondb while OH is running.
  2. Edit /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.items.Item.json
  3. Go down to the entry for your Item and add the Group name with quotes to the array of “groupNames”
{
  "foo": {
    "class": "org.eclipse.smarthome.core.items.ManagedItemProvider$PersistedItem",
    "value": {
      "groupNames": ["barGroup"],
      "itemType": "Switch",
      "label": "foo"
    }
  }
}
  1. Start OH.

One tiny thing that I’ve noticed…

If “Simple Linking” is on when creating Things & Items in PaperUI, the Items are then NOT editable

I do most things in PaperUI, but I had to wipe everything and start from scratch with Simple Linking turned off.

Adding Items to Groups is exactly as Rich has described.

groups can be defined in PaperUI as you create new item of type Group. Then this group is available in the item’s definition and you can assign it to the item