Order of executions when starting Z-Way server.

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
vegardb123
Posts: 5
Joined: 24 Feb 2017 17:18

Order of executions when starting Z-Way server.

Post by vegardb123 » 23 May 2017 18:24

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?

User avatar
PoltoS
Posts: 3739
Joined: 26 Jan 2011 19:36

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

Post by PoltoS » 30 May 2017 20:36

You can make a hook in custom code to trap DummyDevice changes. check of devices.get("myDummy").on(function() {...})

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests