mircsicz
(Mirco Schmidt)
March 13, 2018, 1:05pm
1
Platform information:
Hardware: Raspi 3
OS: OpenHABian
Java Runtime Environment:
openHAB version: 2.2
I’ve got some number value’s I’ld like to plot, so my first step was to setup persistence:
-rw-r--r-- 1 openhab openhab 28K Mär 13 14:00 Diesel_BN_AVIA.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 13 14:00 Diesel_BN_JET.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 13 14:01 HG_Luftdruck.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 13 14:01 HG_Luftfeuchtigkeit.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 13 14:01 HG_Temperatur.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 11 01:50 Multisensor1_Luftfeuchtigkeit.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 11 01:50 Multisensor1_Temperatur.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 11 01:50 Multisensor2_Luftfeuchtigkeit.rrd
-rw-r--r-- 1 openhab openhab 28K Mär 11 01:50 Multisensor2_Temperatur.rrd
openhab> items list
Diesel_BN_JET (Type=NumberItem, State=1.129, Label=Diesel, Category=null)
Diesel_BN_AVIA (Type=NumberItem, State=1.139, Label=Diesel, Category=null)
mircsicz@hab ~ $ cat /etc/openhab2/items/diesel.items
Group diesel_group ["Diesel"] [house] [(Diesel_BN_JET, Diesel_BN_AVIA)]
but listing items using PaperUI or “openhab> items list” the group doesn’t show up
Open for any hint you can give
The syntax of the group definition is incorrect.
Group diesel_group "Diesel" <house>
The square brackets in the docs mean, that these values are optional, you don’t write them in the .items file.
Second, you need to put the Diesel_* items into the group “diesel_group”.
Number Diesel_BN_JET "Diesel" (diesel_group)
Number Diesel_BN_AVIA "Diesel" (diesel_group)
The round brackets in an item definition line adds this item to a group.
mircsicz
(Mirco Schmidt)
March 13, 2018, 5:59pm
3
Thank’s that made it clear, now I can define/modify my groups:
openhab> items list
Diesel_BN_JET (Type=NumberItem, State=NULL, Label=Diesel BN Jet, Category=null, Groups=[diesel_group])
Diesel_BN_AVIA (Type=NumberItem, State=NULL, Label=Diesel BN AVIA, Category=null, Groups=[diesel_group])
diesel_group (Type=GroupItem, Members=2, State=NULL, Label=Diesel, Category=car)
But why can’t I add those yahoo weather Item’s to a group?
2018-03-13 18:57:27.284 [WARN ] [rest.core.internal.item.ItemResource] - Cannot update existing item 'HG_Luftdruck', because is not managed.
If it’s not managed I’ld interprete that as “it’s not managed by PaperUI” which would mean there should be an items file which in fact doesn’t exist…
n_c
(nc)
March 14, 2018, 11:16am
4
Did you install the bindung and do the configration?
Are the values updates?
mircsicz
(Mirco Schmidt)
March 14, 2018, 11:22am
5
@n_c : Yes the binding is installed:
openhab> bundle:list
219 │ Active │ 80 │ 2.2.0 │ Tankerkoenig Binding
221 │ Active │ 80 │ 1.11.0 │ openHAB MQTT Persistence Bundle
222 │ Active │ 80 │ 1.11.0 │ openHAB RRD4j Persistence Bundle
223 │ Active │ 80 │ 0.10.0.b1 │ YahooWeather Binding
And it’s configured as the value’s are updateing:
http://hab:8080/rest/persistence/items/HG_Temperatur?serviceId=rrd4j
{"name":"HG_Temperatur","datapoints":"360","data":[{"time":1520940240000,"state":"8"},{"time":1520940480000,"state":"8"},{"time":1520940720000,"state":"8"},{"time":1520940960000,"state":"8"},{"time":1520941200000,"state":"8"},{"time":1520941440000,"state":"8"},{"time":1520941680000,"state":"8"},
EDIT:
Just saw in PaperUI the following error Msg:
Error 405: Item is not editable
vzorglub
(Vincent Regaud)
March 14, 2018, 11:27am
6
2018-03-13 18:57:27.284 [WARN ] [rest.core.internal.item.ItemResource] - Cannot update existing item 'HG_Luftdruck', because is not managed.
Something is not managed but it’s not your item. because ? is not managed
What group do you want to add your item to?
Did you define the group?
mircsicz
(Mirco Schmidt)
March 14, 2018, 11:56am
7
@vzorglub
Wanting to add it to group wetterhg, which is defined in there:
mircsicz@hab ~ $ cat /etc/openhab2/items/group.items
Group diesel_group "Diesel" <car>
Group wohnzimmer "Wohn- Esszimer" <light>
Group behandlung "Behandlungsraum" <light>
Group wetterhg "Wetter in Bad Homburg" <cloud>
vzorglub
(Vincent Regaud)
March 14, 2018, 12:35pm
8
I am not sure.
Maybe try to unlink the item to the channel in PaperUI
Delete the item
and create it again.
I recommend not using the paperUI except for binding configurations and the like
I have all my items defined in *items files as best practice
A typical item look like this:
Switch Kitchen_WallLights "Kitchen Wall Lights" (Kitchen, MLights, MaghribLights, SunsetLights) { mqtt=">[mybroker:House/Kitchen/WallLights:command:*:default]"}
So this item belong to the following groups:
Kitchen
MLights
MaghribLights
SunsetLights
Regards
mircsicz
(Mirco Schmidt)
March 14, 2018, 12:44pm
9
Thought so too, as I’m a Debian user since Potato I too prefer config file’s…
I’ll give it a try tomorow, for today I got to get going on business task’s
mircsicz
(Mirco Schmidt)
March 15, 2018, 8:18am
10
Removed the Thing and Item from pUI and readded them using files, now it works as expected!
And in case someone is looking for an example:
mircsicz@hab ~ $ cat /etc/openhab2/things/yahooweather.things
yahooweather:weather:mycity @ "My City"[ location=xxxxxx ]
mircsicz@hab ~ $ cat /etc/openhab2/items/yahooweather.items
Number HG_Temperatur "Temperatur" (wetterhg) { channel="yahooweather:weather:mycity:temperature" }
Number HG_Luftfeuchtigkeit "Luftfeuchtigkeit" (wetterhg) { channel="yahooweather:weather:mycity:humidity" }
Number HG_Luftdruck "Luftdruck" (wetterhg) { channel="yahooweather:weather:mycity:pressure" }
mircsicz@hab ~ $ grep wetterhg /etc/openhab2/items/group.items
Group wetterhg "Wetter in My City" <cloud>