Page 1 of 1

Scene Set/Reset

Posted: 02 Oct 2015 19:15
by victoryred
I'm using the logical rules app to control a particular scene. I'm using a different scene as a qualifier to test some binary switch state. During testing I found that the qualifying state was set a day ago and remains set. I may have overlooked it but I can't find how to reset the state of a scene. For example I may want a scene to be valid for only 2 hours. When I use the term reset I am not implying active/deactivate which I take to mean enable/disable or arm/disarm. The logic should work like a state machine where the output (valid/invalid) is a function of the current state and the state inputs (ie. binary switches).

By the way, this z-wave package is awesome and I have been able to do some amazing things with it. I want to thank you guys for your efforts. Very cool.

Re: Scene Set/Reset

Posted: 02 Oct 2015 19:23
by victoryred
I would like to follow up with a request for the Scheduled Scene or Scene function to include a means to turn off a scene in the UI.

Re: Scene Set/Reset

Posted: 02 Oct 2015 22:02
by pz1
Have you looked into the Delayed Action app? Or RoundRobin scene

Re: Scene Set/Reset

Posted: 04 Oct 2015 21:55
by victoryred
In LightScene I found code that confirmed what I was seeing during testing-

this.vDev = this.controller.devices.create({
deviceId: "LightScene_" +,
defaults: {
deviceType: "toggleButton",
metrics: {
level: 'on', // it is always on, but useful to allow bind
icon: '',
title: 'Light Scene ' +

So a couple of things came to mind when I read this snippet of code.
1.) Scenes are deviceType: "toogleButton" the comment in the code says always 'on'. Hmmm...interesting
2.) which means I should be able to the "change:metrics:level" on/off as needed as I found in the LogicalRules code

LogicalRules.prototype.stop = function () {
var self = this;

if (this.config.eventSource) {
this.config.eventSource.forEach(function(scene) {, "change:metrics:level", self._testRule);

Only problem is that the second snippet of code is in .prototype.stop and I may only want to change the level without stopping the devices in the scene.

Are there any side effects to the z-way core or something else by simply doing something equivalent to, "change:metrics:level", "Off");

when the scene is no longer needed?

Re: Scene Set/Reset

Posted: 02 Nov 2015 03:27
by PoltoS
the last argument here is the handler function. .off() is unsubscribing, not turning off