openHAB: Configuration model '....rules' has errors, therefore ignoring it: no viable alternative at input '...'

Posted by ads' corner on Friday, 2020-12-25
Posted in [Openhab]

The openHAB rule system is not very helpful by pointing out when it’s missing something, or when there is an error to actually point to the problem.

Was debugging an error message for a while and couldn’t figure out what is wrong:

1
Configuration model '....rules' has errors, therefore ignoring it: [152,5]: no viable alternative at input '...'

The line number specified was somewhere else in the file, and had nothing to do with the rule in question. After removing almost everything from the rule, except a logInfo() message, the error still happened - and then it occured to me: I forgot to specify Item.

My faulty code was:

1
2
3
4
rule "Rule Name"
when
    Sensor_name received update
then

where it should have been:

1
2
3
4
rule "Rule Name"
when
    Item Sensor_name received update
then

Error message totally not helpful …


Categories: [Openhab]