[SOLVED] Run validation manually

  • Platform information:
    • Hardware: MacBook Pro (just for testing purposes)
    • OS: macOS Mojave
    • Java Runtime Environment: 1.8.0_131
    • openHAB version: 2.4.0
  • Issue of the topic: userdata/logs/openhab.log contains validation errors for rules, sitemap, … like
2019-04-09 11:38:57.872 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'default.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>

Is there a way to run the validation that causes such logs manually,
so that I do not nave to restart openHAB and investigate log files after every change?

These files are read each time you save them, restarting openHAB isn’t needed!

Some things seem not to work reliably without restarting after modifications, at least sometimes. (for example IRTrans Ethernet Bridge, Generic MQTT Thing)

Anyway, the question still stands if there is a way to invoke this manually and get direct feedback instead of searching through log files.

You get “instant feedback” when saving the file, but that is in the logs. What is wrong with that?
Using the “openhab logviewer” you have direct access to the logs!

Thanks for your effort!
Seems this is the way to go then.

Perhaps you can help me to improve the experience with that approach.

The log is filled with stuff I’m not interested in.

2019-04-09 14:58:05.441 [DEBUG] [.moquette.spi.impl.ProtocolProcessor] - Processing CONNECT message. CId=059648500723, username=null

is not very helpful to figure how to tweak the log output because the most relevant parts of [.moquette.spi.impl.ProtocolProcessor] are missing.

I guess I can tweak the log format, but is this really how it is supposed to work?

If you use VSCode with the openHAB extension it should identify and inform you of syntax errors like that.

2 Likes

Thanks!
That sounds good. I planned to do that anyway.

VSCode openHAB support exceeded my expectations.
I’d made that step earlier if I knew. Thanks again for nudging me in the right direction!