[SOLVED] Manually created files not being found

  • Platform information:
    • OpenHABian Pi running on a RPi 3
  • Issue of the topic: please be detailed explaining your issue

I followed the guide on the website, and made a few simple things and items. However the guide was a little confusing - initially it tells you to switch on simple mode, which auto-creates items - then on the next page it guides you through the manual creation of items.

I followed the steps anyway - but my manually created items do not appear in the Items tab on the Paper UI. (I disabled simple mode after initially making my .items file, in the hopes that would let me find it - but nope, only the pre-generated items are in there)

On top of that, the sitemap I created can’t be found - basic UI tells me “It seems like you have not defined any sitemaps yet. To build one, please check the documentation for guidance.”

As mentioned above, I’m running on a Raspberry Pi 3. I set up Samba sharing so I can access and edit files directly from my windows PC, so I’ve been putting my files in \openhabianpi.local\openHAB-conf\items (or sitemaps respectively).

my default.items file (in all its one-line glory)

Switch Presence_Mobile_Fureniku "Fureniku's Galaxy" <network> { "channel=network:pingdevice:9d7c1659:online" }

and my default.sitemap file (also very simple; from following the tutorial):

sitemap default label="My first sitemap"
    Switch item=Presence_Mobile_Fureniku label="Fureniku's Phone"

Anyone got any ideas why these aren’t loading?

check the file permissions in your linux host (ssh to the rPi3 running openHABian):

root@homer:/etc/openhab2/items# ls -al
total 80
drwxrwxr-x  2 openhab openhab  4096 Dec 28 15:27 .
drwxr-xr-x 13 openhab openhab  4096 Nov 15  2016 ..
-rw-r--r--  1 openhab openhab   742 Feb  6  2017 Astro.items
-rw-r--r--  1 openhab openhab   220 Jun  3  2017 ESP.items
-rw-r--r--  1 openhab openhab  2437 Dec  2 10:12 Groups.items
-rw-r--r--  1 openhab openhab  5131 Jul  9 13:16 KNX.items
-rw-r--r--  1 openhab openhab 11111 Jul 10 16:23 mPower.items
-rw-r--r--  1 openhab openhab   106 Jan 28  2017 ntp.items
-rw-r--r--  1 openhab openhab  1806 Jul 26 06:20 Paradox.items
-rw-r--r--  1 openhab openhab  1176 May  6  2017 SamsungTV.items
-rw-r--r--  1 openhab openhab    57 Dec  2 10:13 Simulation.items
-rw-r--r--  1 openhab openhab  1087 Dec  2 12:22 Unifi.items
-rw-r--r--  1 openhab openhab   520 Sep 19 08:46 UPS.items
-rw-r--r--  1 openhab openhab  3333 Jul 26 06:05 Weather.items
-rw-r--r--  1 openhab openhab   150 Aug  5 11:38 WoL.items
-rw-r--r--  1 openhab openhab  4335 Dec  2 10:14 ZWave.items
root@homer:/etc/openhab2/items# (note: this example is from a debian 8, not an openHABian system)

your configs look good… one possible root-cause would be the permissions (OH2 can’t read the files maybe?).
Check your Samba configs for sharing permissions etc.
Also, check the logfile to see if OH2 spits any errors when loading the files.

Ps: link to the guide that you used please?

In addition to file permissions mentioned by @Dim, my experience is that it often is wrong file extensions (check for up/low case) and/or syntax errors in the files (especially for sitemaps). Sitemaps becomes “in-visible” if there are errors in them, but you can check openhab.log for errors right after you save a sitemap.

I’m an idiot.

At some point, I must’ve changed my windows setting for “hide known file extensions”. I’ve always had them to show all extensions for various other projects in the past but for some reason, it was set to hide them again and I hadn’t noticed.

So my nice little default.items was actually called “default.items.txt” - noticed it when I connected to the Pi via FTP to see if I could find them in the /etc/openhab2 folder you mentioned (as they aren’t in /etc/ on the share).

So thanks for the help, even if it wasn’t directly the help you intended to give :smiley: they are now loading nicely.

EDIT for reference though, here’s the guide I used- the official one, from the site. This page shows defining items etc and the page before it is where it says to enable simple mode, so I guess it’s a discrepancy of some kind?

1 Like