Release Candidate 21 binding problems
Re: Release Candidate 21 binding problems
Certainly because zway is already registered and has started. Your module should run before Z-Way.
-
- Posts: 11
- Joined: 11 Sep 2014 18:53
Re: Release Candidate 21 binding problems
That totally makes sense, I am loading this via the javascript file module, so I'm running up against the issue that during boot time the script gets loaded before the zway variable is initialized and it throws "TypeError: Cannot read property 'zway' of undefined". Is there something else I can do? Thanks!
-
- Posts: 11
- Joined: 11 Sep 2014 18:53
Re: Release Candidate 21 binding problems
to be more clear I am using the script below, this is fine if I load it once ZWAY is already running, but if I need to reboot the device then I get the "TypeError: Cannot read property 'zway' of undefined".
Code: Select all
debugPrint("Binding enabled! ");
var devices = global.ZWave["zway"].zway.devices;
devices[2].DoorLock.data.mode.bind(function(){
debugPrint("DoorLock.data.mode changed! " + this.value);
global.http.request({
method: 'PUT',
url: "http://10.0.10.10:8080/rest/items/ZWAY_LOCK_GET/state",
data:this.value + "",
headers : { "Content-Type": "text/plain" }
});
});
devices[2].Alarm.data.V1event.alarmType.bind(function(){
debugPrint("Alarm.data.V1event.alarmType changed! " + this.value);
global.http.request({
method: 'PUT',
url: "http://10.0.10.10:8080/rest/items/ZWAY_LOCK_ALARM/state",
data:this.value + "",
headers : { "Content-Type": "text/plain" }
});
});
Re: Release Candidate 21 binding problems
I've encountered that several times. I got the impression that it worked after I did a z-way restart after the reboot. I haven't tested it thoroughly yet. (don't know either why it should work. I just observed it)digitaldan wrote:"TypeError: Cannot read property 'zway' of undefined"
Which rc do you use? rc-25 has been released a little while ago. Going to try that tomorrow
Since 29-12-2016 I am no longer a moderator for this forum
-
- Posts: 11
- Joined: 11 Sep 2014 18:53
Re: Release Candidate 21 binding problems
Thanks for the heads up, I'll give rc25 a shot. I have had it work at bootup and not, its seems to depend on how quickly the zway module gets loaded in relation to when it loads the javascript file.
Re: Release Candidate 21 binding problems
v2.0.0-rc28 is now out.
I can't see how to remove notifications so I stopped the service and deleted the file where they are stored! It only contained a few notifications left over from the merging of the z-wave functionality.
I can't see how to remove notifications so I stopped the service and deleted the file where they are stored! It only contained a few notifications left over from the merging of the z-wave functionality.
Re: Release Candidate 21 binding problems
Hi n0ahg,
can you tell me, in which file the notifications are stored - I cannot remove them too.
can you tell me, in which file the notifications are stored - I cannot remove them too.
Re: Release Candidate 21 binding problems
see /opt/z-way-server/automation/storage folderDude wrote:can you tell me, in which file the notifications are stored - I cannot remove them too.
Since 29-12-2016 I am no longer a moderator for this forum