Page 1 of 1

Order of executions when starting Z-Way server.

Posted: 23 May 2017 18:24
by vegardb123
Hi!

I've made a virtual device (switch), and in a custom script I try to get and use its level (on/off). The problem is that when I restart the z-way server, it executes the custom scripts before the DummyDevice module is initialized. This leads to errors where the script uses "on" or "get", since the device doesn't "exist" yet (or at least I think that's why?).

Is there any way to change the order of executions when starting the Z-Way server so that the DummyDevice is initialized before the custom script is executed?

Re: Order of executions when starting Z-Way server.

Posted: 30 May 2017 20:36
by PoltoS
You can make a hook in custom code to trap DummyDevice changes. check of devices.get("myDummy").on(function() {...})