config.json, loadObject, etc. We Really Need Better Docs!
Posted: 31 Dec 2015 04:00
In my effort to try and decipher how z-way-server is put together I came across this line from the docs:
Only there is no config.json file that I can find, anywhere in the system. I say this because I tried:
and it couldn't find the file. Pretty weird for a file that's that critical
.
I then took a look at main.js. It contains this:
so clearly an attempt is made to load config.json. But how does loadObject work?
That's hard to tell, too. Because I could not find any definition of loadObject in my system, either. And a google search didn't turn up anything that looked promising.
I really hope the developers get around to writing some better docs, with examples, one of these days. It'd be sad for the z-way project to disappear because no one can extend it or utilize it.
So I figured I'd check out config.json and see if, I don't know, maybe it contained information on what modules to load (I'm trying to create a module which will bind to various devices and raise events whenever a light turns on or off).The automation folder consists of several files and subdirectories. The most important file
of the automation is called config.json. This file contains the information about all automation
modules and their instances. This file is automatically generated and should be changed without
proper knowledge.
Only there is no config.json file that I can find, anywhere in the system. I say this because I tried:
Code: Select all
sudo find / -name "config.json"

I then took a look at main.js. It contains this:
Code: Select all
config = loadObject("config.json")
That's hard to tell, too. Because I could not find any definition of loadObject in my system, either. And a google search didn't turn up anything that looked promising.
I really hope the developers get around to writing some better docs, with examples, one of these days. It'd be sad for the z-way project to disappear because no one can extend it or utilize it.