[SOLVED] Missing EOF at 'switch'

Hi again,
I am despair of openHAB but still trying to fix very simple things. This is already my 4th try to setup openHAB :slight_smile:

My first setups where based on the Paper UI and I got a lot of things running. At a certain point I was running in Timing issues… so now I am trying to setup openHAB by text files only.I think I understood the concept and created a very simple .things file:

Bridge homematic:bridge:ccu [ gatewayAddress="" ]  // , callbackHost="", binCallbackPort="9126" ]
    Thing HG-HMW-IO-12-Sw7-DR OEQ0862609  "IO Modul1" @ "Office"
    Thing HG-HMW-IO-12-Sw7-DR OEQ0862641  "IO Modul2" @ "Office"

Then I tried to create a very very simple .items file which only has one line:

switch Taster "Licht" {channel="homematic:HG-HMW-IO-12-Sw7-DR:ccu:OEQ0862609:1#PRESS_SHORT"}

But the openhab.log file always Reports Errors:

2018-06-07 22:03:45.620 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'homematic.things'
2018-06-07 22:03:56.520 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'Test.items' has errors, therefore ignoring it: [1,1]: missing EOF at 'switch'

One very simple question: Why do I gett this error

missing EOF at 'switch'

In my opinion erything is OK and really nothing special.

Please help and advise
Best regards,


Try typing Switch instead of switch.
OpenHab is case sensitive.

Additionally the EOF messages may pop up depending on the editor you are using.
I have had similar issues with rule files but once i switched to VisualStudio Code, those errors are not appearing anymore

thank you so much. I am now using Switch instead of switch. this solved my Problem.
I am using VS Code and it was highligting also the switch command.
anyway, now its working.



Because switch is a key word in the switch case statement.

Glad you got it working
Be very careful with your cases in Java.

As a rule of thumb

name your items with Capital letters
name your variables inThisWay (No caps, Caps)

Good luck