AdamMagaluk on spdy-upgrade
Add osx to travis (compare)
This link from Sep 2014 mentions Zetta integrating with Z-Wave devices, but I don't see any driver or documentation mentioning it anymore, was the support removed for some reason?
zetta()
.use(runtime => {
appsEmitter.on(‘ready’, app => {
app.call(null, runtime);
});
})
.listen(process.env.PORT || 1337);
seems there is a delta between code and docs: I tried to set 2 parameters (a, b) via map():
.map('thresh', this.setThresh, [
{'type':'Number','name':'thresh'}
,{'type':'text','name':'config'}
] )
seems my callback gets called as setThresh(threshValue, configValue, cb()) instead of setThresh(propertiesMap, cb())
also, is there a way to set an initial value? I’d like to specify something like
{'type':'Number','name':’thresh’, ‘value’: this.threshold }
?
setThresh(threshValue, configValue, cb)
. Can you point to the broken docs?
Ok, I replayed my search; I started looking at https://github.com/zettajs/zetta/wiki/Device at the config.map() docs, which explains how stuff works with one argument; the documentation is consistent here with the behaviour, but adding an example with 2 could clarify the situation
In order to find out what happens (because my callback failed ( with a ‘cb is not a function prototype’), I tripped over the config.remoteUpdate(handler) which does pass a properties object, so I assumed the callback could do the same thing..
as for value: It’s used as a default value right now: When I leave a field in the web browser empty, the function gets called with this value.
Hello! I have an issue about Zetta. Can someone help?
This is the first time I'm using Zetta and I'm trying to do the 'hello-world' tutorial. When I try to run index.js, continuously getting this error:
node:internal/modules/cjs/loader:361
throw err;
^
Error: Cannot find module '/home/dogac/Desktop/projects/hello-world/node_modules/zetta/zetta.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:353:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (/home/dogac/Desktop/projects/hello-world/index.js:1:13)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
code: 'MODULE_NOT_FOUND',
path: '/home/dogac/Desktop/projects/hello-world/node_modules/zetta/package.json',
requestPath: 'zetta'
}
I saw a lot of topics like mine, tried everything but couldn't solve. I would be very appreciated if someone can help. Thanks!