Fixing OpenZWave’s “Failed to load device_classes.xml”
Have you ever experienced the dreaded “Failed to load device_classes.xml” error when using OpenZWave?
While the error message appears to be quite self-explanatory, I always thought I was making some mistake when mapping docker volumes. After all, this happens on the official official Docker image. After some research, it turns out that the official image is missing two important files that allow OpenZWave to correctly configure a new device when it is included by the controller.
device_classes.xml is actually available on GitHub and represents the class of devices that OpenZWave understands and is able to control more accurately. Its companion file — manufacturer_specific.xml — details the actual product information, including commercial names, manufacturers and device-specific configurations.
As they are being constantly updated, it is important to keep your OpenZWave image up-to-date. For that purpose, you can use my unofficial image ruimarinho/openzwave which correctly bundles both files.
Here is how I run it but always making sure that I stop Home Assistant before as it requires an exclusive lock:
docker run --name openzwave \ -v /volume1/applications/home-assistant/options.xml:/root/open-zwave-control-panel/config/options.xml \ -v "$(ls /volume1/applications/home-assistant/zwcfg_0x*.xml)":/root/open-zwave-control-panel/"$(basename /volume1/applications/home-assistant/zwcfg_0x*.xml)" \ ruimarinho/openzwave
The error message should be gone now. No more unknown devices!