Trigger example modules?

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
dylancaponi
Posts: 19
Joined: 25 Jun 2014 12:47

Trigger example modules?

Post by dylancaponi »

How are modules normally triggered? For instance, the example modules included in the zautomation folder?

I tried setting the EventLog module.json autoload value to "true" and then restarted the z-way server but wasn't sure where to look for the output / logfile. How can I trigger a sample module and check that it's running?
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Trigger example modules?

Post by PoltoS »

Please see our doc: http://razberry.z-wave.me/docs/zwayDev.pdf
Chapter 4.3
dylancaponi
Posts: 19
Joined: 25 Jun 2014 12:47

Re: Trigger example modules?

Post by dylancaponi »

Thank you. I read this section again but did not find the answer to my question. Is the autoload boolean the only way to instantiate a module?
User avatar
kambis
Posts: 36
Joined: 23 Jun 2014 08:06
Location: Germany
Contact:

Re: Trigger example modules?

Post by kambis »

Any modules located in in automation/modules or automation/userModules
will be started when Z-Way server starts. Have a look inside automation/classes/AutomationController.js and search for AutomationController.prototype.loadModules (line 111). Any subfolder containing a index.js script will be loaded. But you have to follow some rules mentioned in the doc
http://razberry.z-wave.me/docs/zwayDev.pdf, page 49

You can easily follow up which modules are running if you use debugging. Here you find instructions how to implement debugging capability to your system:
viewtopic.php?f=3422&t=20387&start=10#p51463

My understanding is that you force to start a module at startup using autoload=true. If you have created a rule in automation panel for your module, then the module will get started anyhow.
dylancaponi
Posts: 19
Joined: 25 Jun 2014 12:47

Re: Trigger example modules?

Post by dylancaponi »

Thank you!
Post Reply