I’m slowly expanding my OH2 configuration, and just added an Ikea Trådfri Gateway and just one light bulb.
The binding installed nicely, and my light bulb was found.
I added the light into my items file,
This simple setup lets me switch the light on and off with the switch on the BasicUI page, and specifically the IKEA_1 item seems to be ok.
If I add this simple rule to my rules file,
rule "IKEA_1 ON"
when
Time cron "0 0 22 * * ?"
then
IKEA_1.sendCommand(ON)
end
it doesn’t work.
In ESH Designer, it marks IKEA_1 with error “The method or field IKEA_1 is undefined”, and in the OH log it states
2017-07-20 11:07:34.059 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'default.rules' is either empty or cannot be parsed correctly!
The exact same configuration approach works fine for my z-wave power outlet, so I was expecting this to work as well, but no…
Any suggestions?
(Apart from reading docs. I’ve tried…)
If I remember well: If you open the entire OPENHAB_CONF folder in ESHD (including the items folder) it will recognize the item name and will not display this error.
Your rule looks fine. I don’t know what could be wrong…
Maybe try to use another text editor?
How are you saving the rules file to your OH2 system?
(are you using Samba shares?)
Yes, I use Samba shares, editing the files in ESHD on Win10 while the OH2 is running on an RPi3.
So I guess the parsing “problem” is exactly what’s described in your answer.