Lightscene feature request

Discussions about RaZberry - Z-Wave board for Raspberry computer
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Lightscene feature request

Post by pz1 »

I am trying to move OpenRemote macros to the RaZberry HA. These macros are rather simple: a sequence of commands with an optional delay between each of the commands.
I use these amongst others to:
  • Smoothly switch off lights and other utilities to avoid unnecessary powe peaks.
  • Position a simple Window opener. The opener only has open/close/stop commands. A delay between open and stop would allow scenes for different opening settings.

Could we have such a delay in Lightscenes?

NB: As lightscenes appear to be rather generic, I think it is better to call this just scenes. Or do you foresee other types of scenes
Since 29-12-2016 I am no longer a moderator for this forum
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Lightscene feature request

Post by pofs »

You may use setTimeout() function to call some JS code after a delay.

But if you have SwitchMultilevel version 2 (or later), you can provide a duration as a second argument to .Set() command. This allows to smoothly change value.
Eric
Posts: 20
Joined: 04 Mar 2014 19:50

Re: Lightscene feature request

Post by Eric »

I second this feature request. This would be useful for a leaving home scene that switches off the lights inside, but leaves the outside lights on for another 5 minutes.

Your second example might be better suited with a virtual switchMultilevel device, so that it can also remember its position. If you know the time it takes from fully open to fully closed that should be quite straightforward. Make the fully open and fully closed commands themselves run for a bit more than that time, then the uncertainty on the position cannot accumulate.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Lightscene feature request

Post by pz1 »

Eric wrote:Your second example might be better suited with a virtual switchMultilevel device
That is not really an option in my case. For the AXA 2.0 Remote window opener I do control a handheld remote via GPIO in a similar way as I do with my poor man's sunshades application
The original IR is encrypted and can't be done by IR gateways unfortunately.

That being said, lets further focus on the the topic of this thread; this or other feature requests for LightScene
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7594
Joined: 26 Jan 2011 19:36

Re: Lightscene feature request

Post by PoltoS »

We can add a generic module to trigger on scene activation and after a delay trigger another scene. Will this solve the problem?

The module is pretty simple to do.

Another q:
You trigger a scene -> timer starts.
You trigger it again before the delay period ends.
What to do? Start second timer or cancel previous?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Lightscene feature request

Post by pz1 »

My window macro looks as follows. It starts with the descriptive title:

Code: Select all

OpenAtriumWindow_half
CloseAtriumWindows
delay (60000 ms)
OpenAtriumWindows
delay (20000 ms)
StopAtriumWindows
I think your suggestion would work. Definitely in the short term.
But I rather call it a work-around, because it can end up in many scenes, that may be awkward to maintain. A sequence of appliances to power on/off can become considerably longer.

Your second question is a realistic scenario indeed. My present thinking is that the initial call should be abandoned. I can imagine people push the wrong button, and want to correct an action asap.

Side note: I am not really in a hurry with this functionality. At the moment I am encountering sofar unexplained "hangs" of the system that force me to reinstall every other day. Son't know if it is the harware, ambient temperature, or running some of the modules together. What I observe is that after restart of Pi, startup of HA becomes increasingly slower, until it finally halts. I may come back on that in a different thread.
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7594
Joined: 26 Jan 2011 19:36

Re: Lightscene feature request

Post by PoltoS »

Try v1.7.1-rc2 - it fixes some issues with http requests that eats memory. Now it is fixed.

Try out DelayedScene module (just added to git), not in rc2 yet.

Yes, it will result in many scenes, but we want to do groupping of modules (like mentioned here: https://github.com/Z-Wave-Me/home-automation/issues/109)
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Lightscene feature request

Post by pz1 »

I'll give the rc2 a try with the latest automation from Git.
I had seen the grouping proposal yesterday. Good!
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Lightscene feature request

Post by pz1 »

pz1 wrote:I'll give the rc2 a try with the latest automation from Git.
Definitely an improvement. System is much more reponsive. Before I had the impression that OpenRemote was missing some data at times. Haven't seen that since this update.
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Lightscene feature request

Post by pz1 »

PoltoS wrote:Try out DelayedScene module (just added to git), not in rc2 yet.

Yes, it will result in many scenes, but we want to do groupping of modules (like mentioned here: https://github.com/Z-Wave-Me/home-automation/issues/109)
Tried it out with 2 real switches an one virtual switch that trigger a rule with one action to start the first scene.

It works, but it is clumsy and awkward to maintain over time. Somewhere I noticed there was a maximum for 16 scenes.
I have now 6 simple automation tasks, but it does take considerable time from selecting a task, and get it fully displayed.

Got one Warning message that I do not understand:

Code: Select all

24/06/14 - 20:12Can not stop module 10: TypeError: Cannot read property 'change:metrics:level' of undefined
What does module 10 refer to?
Since 29-12-2016 I am no longer a moderator for this forum
Post Reply