Gpio -> error: Cannot retrieve item

I am up to use GPIO for a LED status board. I have openhab 2.4.0-1 running on a raspberry 3. I installed GPIO binding. The user via adduser was there already. The sysfs->sys is also there.

I made up an items file in \OPENHABIANPI\openHAB-share\openhab2-conf\items

    Group GPIO

    Switch LED "LED" (GPIO) { gpio="pin:21 force:yes" }

I made a sitemap \OPENHABIANPI\openHAB-share\openhab2-conf\sitemaps

sitemap home label="Home"
    {
     //------------------------------------------------------------------------
     // Raspberry Pi
     // GPIO
     //------------------------------------------------------------------------
     Frame label="Rasperry Pi GPIO"
     {
           Switch item=LED
     
     }
    }

Under Basic UI I see the LED switch. However, I get an error message in the log file when I start the sitemap:
2020-02-02 20:57:32.815 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘LED’ for widget org.eclipse.smarthome.model.sitemap.Switch

2020-02-02 20:57:32.819 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch

2020-02-02 20:57:32.823 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'LED' for widget org.eclipse.smarthome.model.sitemap.Switch

2020-02-02 20:57:32.827 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'LED' for widget org.eclipse.smarthome.model.sitemap.Switch

2020-02-02 20:57:32.830 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'LED' for widget org.eclipse.smarthome.model.sitemap.Switch

Also when I use the switch provided in the sitemap I get an error in the log file:
2020-02-02 20:57:34.699 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/LED' for the unknown item 'LED'.

Did I forget to do something to setup the switch or GPIO?

Allowed item types are Contact and Switch . Type Contact is used for input pins, Switch - for output pins.

Does this mean openhab user and all permissions are correct per the doc’s?

Those slashes look like a Windows OS so what is the OS installed and how did you install OH? BTW, OH version 2.4 os over a year old and 2.5 is the latest stable version. Maybe time to upgrade?

Your Item has not been created.

You should see your items file being loaded in the openhab.log.
If there’s something wrong with it, it’ll say so.
Otherwise, if its not being loaded, it must have the filename form xxx.items , and it must be located in the correct /items folder (where you will find an existing readme.txt file)

Thank you for the reply. In the end it was a item vs items in the file extension (letter one was hidden by the windows I use for accessing the file system of the Pi). I was not aware that items file loading is also logged in the log file. That was good to know for diagnosis. In addition, I was expecting it to be more complicated. In the end it was a simple mistake.

I use windows just to access the Pi running the openhab 2. Btw. I upgraded on 2nd of June to the latest version. So I am surprised it is one year old. The release of 2.5 should be later than June. Upgrading was quite some work as several things were just gone even with backup. Anyhow, I will test the LED once the wiring is done. So far from log file the LED switch seems to work by software.

I made the wiring with the LED. It fully works. Way more easy than I thought it would be.
I will use the LEDs windows and door open visual status.

Hi everyone,
How do you install GPIO binding in OPH2.5 ?? because I upgraded the OPH today and I don’t found the GPIO Binding in add-ons.
HW: RPI M3b+
OS: Raspbian
Thanks

because the gpio-binding is a 1.x-binding i suppose you have to open paperui and set “include 1.x-bindings” (found under configuration / system / add-on management

Thanks Stefan,
But I have already On this option, After try and try , I Resolved this problem,
Like the Argentinian people said , “La solucion ingenieril todo lo puede ,probaste con reiniciar”,
thanks