[SOLVED] Beginner help with raspberry pi and items

  • Platform information:
    • Hardware: Raspberry Pi
    • openHAB version: 2.3.0

I have the pi up and running with Openhab and I have Nest bindings. I can add items in paper ui and then link them with things, they appear to work in control. My question, is there a simpler way to add a bunch of items? I see here, https://docs.openhab.org/addons/bindings/nest1/readme.html that there is example nest.items. How can I copy/paste this example, changing the specific info obviously, in the raspberry pi? I’m a windows guy and I’m struggling on how to get around.

Is there an import/export feature I’m missing?

Thanks…

Are you looking to use config files vs the paper ui?

If so in Windows you can follow \ip_of_pi In Windows explorer. you should see some shares there that allow for modification of config files in windows.

Login with raspberry pi username and password.

This option also assumes you used openhabian. If not these shares would need to be setup.

You can’t do config files and paper ui at the same time? I guess that’s my first confusion, I thought paper ui would save as config files anyways?

Typing the ip in windows explorer worked, kind of silly i didn’t try that first. So, there is nothing in \IP\OpenHAB Config\configurations\items, so where does paper ui store the config? Within homebuilder it states store items as text, not DB.

unfortunately Paper ui stores in a database not config files. You would have to read through the forums on paper ui. Plenty of posts about moving to config files.

I was a little confused at first about the paper ui also. I personally only use it to install bindings. I came from an older version of openhab so I prefer the files.

The short answer though is the directory was empty and will be until you build files.

Thank you. So, if I continue to use paper ui, how do I build/create a sitemap?

honest recommendation, don’t use paperui to create items automatically (if I recall it correctly you need to turn of simple mode, or similar)

@Phrog30

As @StefanH said, don’t use the PaperUI to create items for you.
Use the PaperUI for autodiscovery and things creation.

Than use the *.items files to create your items.
Three reasons:

  • You can easily change the name onf the item and choose a name that suits you better (I know you can do that in paperUI but it’s a pain)
  • You can add binding that are not creating things like mqtt and expire
  • You have a file with all your items under your nose, easy to follow in the order you want.

https://www.openhab.org/docs/tutorial/sitemap.html

Certainly, I guess that’s where I’m confused. How do I create the *.items file? I’m assuming you can have more than one? Is there a good guide/tutorial on this? I’ve seen a few guides, but I ended up more confused after I read/saw them.

Thanks for all of the help. I have two lights switches installed, setup and configured. I setup myopenhab and have my mobile device working. What I’m seeing is that if I control via my phone it works, but if my phone turns a switch on and I use the switch to turn it off, the mobile doesn’t refresh… I waited a while. Is this a limitation? I didn’t have this problem with SmartThings, but I hated SmartThings and was trying to find something better.

That depends on the type of the switch, without knowing which type you use and how this switch is “talking” to openHAB we can’t tell.

What binding are you using?

Yeah, guess that was important info to include. I’m using inovelli nzw30, raspberry pi with Aeotec z-stick. Like I said, I didn’t see this on SmartThings. You say depends on the switch, why would this behavior ever be desired?

I don’t know your hardware, however there is hardware out there which does NOT Support two-way communication (i.e. the switch recieves the comand only, but does not report ist state). One example are 433mhz RF-Pluggs like Intertechno…

Using some common sense, if it was hardware it wouldn’t work on any platform. Since it worked on SmartThings it’s something either software related or something I did or didn’t do.

I think I understand how to add items and sitemaps now. At least I was able to create a simple switch and add it to a sitemap, then open the sitemap and operate the switch. However, I’m still not understanding how I can add an item and then link it to things that are already created in the paper UI. Can someone please give me some direction on this?

Go on the Things screen. then on the channels, click on the blue circle and an option to link to an item will apear, you can them link to an item you defined in the test files.

A better way is to get the channel id and add it at the end of your item in the text file between {}

for example:

Number:Temperature House_NestAmbientTemperature          "Ambient Temperature [%.1f %unit%]"             <temperature> (Thermostats, Temperatures)                                           [ "CurrentTemperature" ] { channel="nest:thermostat:bca14bfe:dCd2AOytHIiKRTYPM00jxva1Q3Ryl-jm:temperature" }

Yeah, I can link in the UI, but I’m still struggling to do it manually. I’m obviously fat fingering something. Thanks for the example.

Yep, not sure why it took so long, but light bulb and I think I understand things better now. Thanks all for your help.