OH2, PaperUI, sitemaps and items. Oh and there's Google Assistant as well!

  • Platform information:
    • Hardware: Raspberry Pi3b+
    • OS: _openhabian
    • Java Runtime Environment: ask those who compiled the appliance image for Raspberry Pi
    • openHAB version: 2.3.0

I have wasted half of my weekend trying to figure out how this software suite “thinks”. Items are automatically generated via Paper UI, and that’s great. I figured out how to use the experimental binding for BTicino/Legrand openwebnet protocol and have all my devices discovered and all of them are working as expected. However:

  1. every item seems to be added to a “hidden” sitemap called “home” that I can’t edit. In home builder I can’t add any item discovered from paper UI wich renders the home builder tool…useless… If I have to write down everything in separate files (items and sitemaps in the so-called openhab 1.x style) because is totally obscure how instert the auto generated items into a user defined sitemap, what’s the purpose of paper UI?

  2. I succeeded in exporting all the items to myopenhab and from there to the Google Assistant extension. For that reason I can see all the items in Google Home. However there are only “switch” objects, “brightness” objects and so on without a description or a location (even if I have named the items in paper UI according to their position in the house using meaningful names).

Sorry for the strange “pissed of” tone of my message but I have lost half of my spare time trying to stitch the things togheter and now I’m stalled. I have no idea about what to do next.

Thanks for your patience and for any suggestion you can give.

You need the Item name from PaperUI and to use it in your sitemap.
I don’t think that the home builder can grab the auto-generated Item names from the system. It helps you create a “skeleton” that you can further customize.
PaperUI is mostly for administration purposes, not user interaction and control.
It is not easy to work with auto-generated Item names (they are long) but it gets easier with time and experience.

The Google integration takes into account the Item Label and the Item Tag (not the Item Name).
Also: You will need to place them in Rooms manually in the GH app.

Ps: I added [Ranting] on your thread title. I hope that you don’t mind :stuck_out_tongue:

1 Like

Ok I found out the files in /var/lib/openhab2/jsondb and promptly made a local backup and started analyzing them. That’s what I figured out:

org.eclipse.smarthome.config.discovery.DiscoveryResult.json contains the item discovered on the openwebnet that I decided to ignore (something i have prepared but it’s not connected to anything)

org.eclipse.smarthome.core.items.Item.json is empty (just two {})

org.eclipse.smarthome.core.items.Metadata.json seems to contain al lot of interesting things related to what I get when linking my openhab to google. It seems to me that these metadata are passed to the myopenhab portal.

org.eclipse.smarthome.core.thing.link.ItemChannelLink.json this seems to contain all the links between items and what each item does (I suppose this is created via simple link mode when I add a thing from Paper UI, am I right?).

org.eclipse.smarthome.core.thing.Thing.json finally this one contains all the things discovered including my own set labels for each thing, each section is really long and contains lots of tags and infos.

How to proceed? Do i have to convert somehow all these files into the “legacy” versions and work from there creating item groups containing items, channels for each item describing what it does, then calling those item groups in sitemaps ?

Oh yea I have found out already that GH app needs me to categorize all the stuff passed from myopenhab portal :grinning: but at the actual state of things I can’t figure out what’s what :yum:

Nah it’s not exactly a “rant” more of a desperate call for help. I have to finish this thing in a short amount of time, christmas is approaching and I don’t wanna waste all my spare and holiday time debugging a smart home gateway that’s supposed to bridge and control less than 40 elements :stuck_out_tongue_winking_eye:

Thanks for your help so far
Kai

1 Like

If you haven’t yet, make sure to go through the Beginner’s Tutorial and the Concepts section of the User’s Guide. OH has a lot of parts that all need to work together. These are the documentation for how OH “thinks”.

The “home” sitemap is automatically generated and is really not intended for use. It is basically a duplicate of the Control tab in PaperUI. You must create your own .sitemap file and populate it manually with a text editor using your Items.

Home Builder is intended to work the other direction than you are working. Rather than add your devices and automatically create Things, Home Builder has you create the model (i.e. Items) and view (i.e. sitemap) first. Then you can link those created Items to the proper Channels of the discovered and created Things.

PaperUI is a tool in progress of being developed. It is really good right now for automatic discovery and management of Things, installation and management of add-ons, and configuration of OH itself. It has incomplete support for managing Items and experimental support for Rules. Sitemaps will probably never be supported in PaperUI as if you want to do everything in the web UI you should use HABPanel anyway.

You probably need to turn off Simple Mode and create your Items yourself. I really think Simple Mode where Items are automatically created causes more problems in the long run than it solves. I don’t know if automatically created Items get saved to the JSONDB.

Thanks everybody for answering my posts. At the actual state of things I managed to set up manually through .things .items .sitemap all my BTicino MyHome devices and almost everything works as intended, including Google Home voice control. I couldn’t find a solution for these perplexities of mine:

  1. why dimmers are seen sometimes as 2 devices either as a switch to turn them on and off, and a brightness slide to adjust their power, or a combo of slider and switch (for example in google home I can both turn on/off dimmable lights through the brightness item exported, in this configuration the switch item does nothing)
  2. I have installed by mistake wheater underground (I didn’t know they want to be paid for API keys so I decided to remove it). If I remove the bundle, via PaperUI or Karaf, the addon is gone, but all items and things definitions are still there and I couldn’t get rid of them no matter what.
  3. to finalize my sitemap a few items are to be added: my chromecast endpoints (1 Sony Bravia TV, 1 chromecast connected to a small Samsung TV and 2 audio (Google Home)), my Denon AVR and the Hue from Philips. All these devices are discovered by PaperUI and named accordingly its own scheme, How do I integrate them into my sitemap and openhabcloud without rewriting both .things and .items for them accordingly?
  4. finally my Plex media server refuses to be seen by its openhab connector. But that’s not so important and I can pospone it…

It took a lot of time however I’m slowly seeing the light out of this experience…
Thank you all for your kind help!

Kai

Not very clear… Help me to understand the question. Where do you see this? (in a sitemap, in PaperUI, in Google Home App?)

For example, for a Z-Wave Dimmer (FGRGBW RGBW Controller), I have 2 Items bound on the Channel with Type: Dimmer:

My Items are defined as follows:

/* Fibaro RGBW Controller */
Dimmer	WDim01_Dim		"Staircase LED Dim [%d %%]"	<slider>	(gZWave,GF_P02_Corridor)	{channel="zwave:device:512:node4:switch_dimmer"}
Switch  WDim01_Switch		"Staircase LED Switch"		<switch>	(gZWave,GF_P02_Corridor)	{channel="zwave:device:512:node4:switch_dimmer"}

One is acting as a Switch (ON/OFF) and the other one is acting as a Dimmer (0%-100%). Both are linked to the same Channel and I can use them separately to place them on my sitemap.

You should delete the existing stuff in the following order:
i) Break the links in the Things Channels (see green box in screenshot above for example)
ii) Delete the Items
iii) Delete the Things

To be able to delete the Items, you need to disable Simple Mode in PaperUI->Configuration->System->Item Linking

Disable Simple Mode and find the Item names from the list (or browse to the Thing’s Channel and see which Item names are linked there).

Use the Item name (not label) to place the Item in your *.sitemap file

This binding: https://www.openhab.org/addons/bindings/plex1/ ?
post some logs. maybe we can debug the situation

You are welcome!
Ps: I have removed the previous keyword from the title of this thread :slight_smile: