To provide feedback on the openHAB Z-Wave binding, you will need to provide DEBUG level log files. By default, openHAB is configured to only log WARN, INFO and ERROR level - this is sufficient to indicate that something might be wrong, or incorrectly configured, but it will not provide enough information to derive the reason. So, when providing Z-Wave error reports, you will need to provide a DEBUG log. To enable debug logging in openHAB, you need to log on to the console and type the following command on the command line -:

log:set debug org.openhab.binding.zwave

This will set the logging level for the Z-Wave binding.

It is often useful to see the startup sequence for a node that is not working. This provides a lot of useful information about the device as it discovers the devices characteristics and will exercise most of the devices functionality. To ensure the full startup sequence is run, delete the XML file for the node (in /userdata/zwave) and restart the binding.


A few notes on using Karaf console to debug openHAB-2

The OSGi Lifecycle

OpenHAB runs on top of the OSGi runtime, which manages the bundles that make up the openHAB runtime. A bundle can have one of the following states:

  • INSTALLED: The OSGi runtime knows the bundle is there.
  • RESOLVED: The bundle is there and all it’s prerequisites (dependencies) are available. The bundle can be started.
  • STARTING: The bundle is being started. If it has a BundleActivator class, the BundleActivator.start() method is being executed. When done, the bundle will become ACTIVE. Note: Bundles that can be activated lazily (Bundle-ActivationPolicy: lazy) stay in this state until one of their class files is loaded.
  • ACTIVE: The bundle is running.
  • STOPPING: The bundle is being stopped. If it has a BundleActivator class, the BundleActivator.stop() method is being executed. When complete, the bundle will become RESOLVED.
  • UNINSTALLED: The bundle has been removed from the OSGi runtime.



Logging Commands

  • log:clear: clear the log
  • log:display: display the last log entries
  • log:display-exception: display the last exception from the log
  • log:get: show the log levels
  • log:list: show the log levels (but seems to show more than log:get)
  • log:set: set the log levels (eg. log:set info root)
  • log:tail: continuous display of the log entries