OpenZWave / Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
MIT License
354 stars 93 forks source link

[question] when enabling autoupdate device_classes.xml fail #250

Closed aretakisv closed 4 years ago

aretakisv commented 4 years ago

I have a strange issue and I do not know if I do something wrong OR is a bug. When I enable on zwave to Autoupdate the database. It cannot recognise device classes anymore Also log has this error: Failed to load device_classes.xml

Database adds files on /usr/src/app/config This way it stops using the /usr/local/etc/openzwave DB Device_classes and other XML are missing from the /usr/src/app/config directory

/usr/src/app/config # ls
2gig                 danfoss              enblink              frostdale            horstmann            leviton              polycontrol          sercomm              trane
BeNext               dev.env.js           enerwave             ge                   icare                linear               popp                 shenzen_neo          vera
act                  devolo               eurotronic           gocontrol            idlock               logicsoft            prod.env.js          simon                vision
aeotec               diehlcontrols        everspring           gr                   index.js             mcohome              prowell              smartthings          vitrum
airlinemechanical    dlink                everspringct         graber               ingersoll            merten               qees                 steinel              waynedalton
alfred               dome                 evolve               greenwave            inovelli             miyakawaelectric     qubino               stelpro              wenzhou
app.js               domitech             fakro                guardtec             intermatic           nexia                quby                 store.js             widom
assa_abloy           domux                fibaro               hank                 iris                 nodon                rcs                  sunricher            zipato
august               dragontech           firstalert           heiman               iwatsu               northq               remotec              swiid                zooz
buffalo              duwi                 followgood           heltun               jasco                oomi                 schlage              telldus              zwave.me
comfort              ecolink              forest               homeseer             kaipule              permundo             schlagelink          there                zwp
cooper               electronicsolutions  fortrezz             honeywell            kwikset              philio               sensative            thermofloor
/usr/src/app/config #

Original folder

2gig                         danfoss                      everspringct                 homeseer                     manufacturer_specific.xsd    rcs                          vera
BeNext                       device_classes.xml           evolve                       honeywell                    mcohome                      remotec                      vision
Localization.xml             device_classes.xsd           fakro                        horstmann                    merten                       schlage                      vitrum
Localization.xsd             device_configuration.xsd     fibaro                       icare                        miyakawaelectric             schlagelink                  waynedalton
NotificationCCTypes.xml      devolo                       firstalert                   idlock                       nexia                        sensative                    wenzhou
NotificationCCTypes.xsd      diehlcontrols                followgood                   images                       nodon                        sercomm                      widom
SensorMultiLevelCCTypes.xml  dlink                        forest                       ingersoll                    northq                       shenzen_neo                  zipato
SensorMultiLevelCCTypes.xsd  dome                         fortrezz                     inovelli                     oomi                         simon                        zooz
act                          domitech                     frostdale                    intermatic                   options.xml                  smartthings                  zwave.me
aeotec                       domux                        ge                           iris                         options.xsd                  somfy                        zwcfg.xsd
airlinemechanical            dragontech                   gocontrol                    iwatsu                       permundo                     steinel                      zwp
alfred                       duwi                         gr                           jasco                        philio                       stelpro                      zwscene.xsd
assa_abloy                   ecolink                      graber                       kaipule                      polycontrol                  sunricher
august                       electronicsolutions          greenwave                    kwikset                      popp                         swiid
buffalo                      enblink                      guardtec                     leviton                      prowell                      telldus
comfort                      enerwave                     hank                         linear                       qees                         there
config-template.xml          eurotronic                   heiman                       logicsoft                    qubino                       thermofloor
cooper                       everspring                   heltun                       manufacturer_specific.xml    quby                         trane

I do not know what the behaviour should be.

I copied .xml and .xsd from the original folder to the new config, and seems that fixes the issue!

Once again TRV and other devices been recognised.

I suspect the Config Path is the parameter to change.

robertsLando commented 4 years ago

Database adds files on /usr/src/app/config

Did tou set this as custom path in Zwave settings config path?

varet80 commented 4 years ago

no, using the container build from zwave2mqtt-docker, path was empty. I had to set the original Openzwave path: /usr/local/etc/openzwave and then it tried to update that spot, if you do not set it does update the mentioned path.

robertsLando commented 4 years ago

@billiaz Could you explain it better?

varet80 commented 4 years ago

@robertsLando I built the container based on your repo zwave2mqtt-docker. Modified the Dockerfile to use the latest z2m commit for better features

In practice: Starting the container without config or store. Enable the "Update database" function System downloads device database in folder /usr/src/app/config but without the main manufacturer xml Error begins to occure after DB is downloaded.

Searching the container, I do find two locations of configs once the update database is enabled

  1. /usr/src/app/config
  2. /usr/local/etc/openzwave

Changing the path under Settings -> zwave > config path from empty to /usr/local/etc/openzwave fixes the issue, as now the database is updated directly into the lib location

robertsLando commented 4 years ago

THanks for the clarification @billiaz now I have understand. I don't know how this is handled in ozw side. @Fishwaldo when Update database option is enabled in OZW what path does it uses to store configurations db update? IS this behaviour a bug or what else?

I would like to know if it is possible to OZW to use data path to store its configurations when that option is enabled

robertsLando commented 4 years ago

@Fishwaldo News?

Fishwaldo commented 4 years ago

Downloads are to the config path. (specified in the Options Class or options.xml)

robertsLando commented 4 years ago

@Fishwaldo So is there any reason why this has happen? If he enable Update database option with no config path set (so it sohould use the default /usr/local/etc/openzwave) It seems is using the process.cwd dir instead.