Specifying zwave iterms in OH2 basicUI Sitemaps

So I’m moving from using the MQTT Event bus on another system to a windows machine that will also have the controller.

All my devices currently then are nicely grouped sicne it’s just a normal mqtt type config.

While testing, I’ve moved the controller over and scanned for all the devices and they all show up in paperui and the default basicui site.

But now I’ve got my own sitemap file, with all my items nicely grouped, how can I get my zwave items to a, be grouped as per before, and b, to show up up in my sitemap file.

This is my old eventbus config:

Number   zwave_multisensor1_temperature  "Lounge Temperature [%.1f °C]" <temperature> (g_zwave,g_zwave_multisensor1,g_temperature) {mqtt="<[openhabian:openhab/out/zwave_device_15a9b1f6ad6_node2_sensor_temperature/state:state:default]"}
Number   zwave_multisensor1_luminance  "Lounge Luminance [%.1f]" <light> (g_zwave,g_zwave_multisensor1) {mqtt="<[openhabian:openhab/out/zwave_device_15a9b1f6ad6_node2_sensor_luminance/state:state:default]"}
Number   zwave_multisensor1_ultraviolet  "Lounge ultraviolet [%.1f]" <temperature> (g_zwave,g_zwave_multisensor1) {mqtt="<[openhabian:openhab/out/zwave_device_15a9b1f6ad6_node2_sensor_ultraviolet/state:state:default]"}

I assume this is my item name: zwave_device_15a9b1f6ad6_node2_sensor_luminance do I have to create all these items in an items file? Or because they’ve already been picked up in a scan, I can now just use them?

Yes, it is your item name (on your old OH2 system).
But… don’t confuse the things (that were discovered during a scan) with the items. Items are linked to the channels of things.

The best way to proceed would be to create in the new system the items in config file(s) and link them to the channels of the new things.

So it looks like I can pull the item name from paper ui and specify it in the sitemap:
Frame label=“ZWave Local” {
Text item=zwave_device_15a9b1f6ad6_node4_sensor_temperature label=“Node4 Temperature[%.1f °C]” icon=“temperature”
}

Sensor (temperature)
zwave_device_15a9b1f6ad6_node4_sensor_temperature
Number

I just have to work out the grouping now, without respecifying all the items, and to me that seems to defeat the purpose of being able to discover items.

Seems weird to have to specify an item for something that has been autodiscovered. I’d have thought that I could just use them in a sitemap with their name as discovered.

@chris

So I was getting mixed messages, and it looks like I can specify the name from paper ui directory in the sitemap (replacing : with _)

I just need to figure out groups. I could do it as items, but that seems to have the double handling I’m not keen on.

Groups like setting all temperature items to a temperature group.

An item can be auto-created, not (auto)discovered. Things are discovered.

(in Simple Mode for Item Linking):
After you have discovered the thing, you go into its configuration, click on the circle next to the Channel name and a new item is automatically created for you as well as a link between the Channel and the Item.

You can then use the Item name in your sitemap.

to see the linked items in PaperUI, browse in the thing channel and expand the channel. The Item name to be used in the sitemap is in the parenthesis.

To work with Groups, it’s easier to turn off Simple Mode for Item Linking and use the left menu Configuration->Items. Create new Items (with Type Group), then use them in your other items (in the Parent Groups field)

If the items are already defined, and I turn simple mode off, can I still change the linking as you mentioned.

Yes, you can.
With simple mode off, you will need to create the item first, then link it to the channel. I hope that I got the question… :slight_smile:
You can always switch simple mode back on later if you want.

I think what @Dim said is about right…

Personally I don’t like auto linking mode since you can’t change things like the item label. You may also find that there are a lot of channels that get linked that you don’t want - I personally like the control and configurability of setting things myself.

I’m not completely sure what this question relates to, but just to note that with simple mode enabled, the system will automatically create these auto items if no item is linked to a channel. If you disable simple mode, then the item will not be created next time the system starts, so don’t expect it to be there.

1 Like