Z-Wave-Me / home-automation

Z-Way Home Automation engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZAutomation/api/v1/modules/reinitialize/ changed instance number

pmbert opened this issue · comments

After using ZAutomation/api/v1/modules/reinitialize/{module} the running module instance was stopped, and restarted again with a new instance number. (This number was previously used by another instance of another module.)
Strangely that it had a new instance number but an old creationTime.

It should use also the old instance id.

Was very bad, because it destroyed my configuration.

Please check with v3.0.2 - we have fixed few things in it

I tested with V3.1.0, but behavior isn't changed.

reinitialize stops all running instances, reloads js and starts the instances again with reset virtual devices and maybe new instance number.

Maybe this behavior is intended, but for developing actually I need a function which does a module restart in the same way as zway restart does:

  • take new js
  • take new module.json
  • take old data from virtual devices
  • take old instance number
  • take old room assignment

It's annoying always to restart the whole application only for exchanging the javascript.

I'm wondering if there are even people who need the function in the current version.

Unfortunatelly there are no guarantee that the old code is unloaded - it is JS, you can not unload the code. So full restart is better.