Problem With Delayed Scene

Discussions about RaZberry - Z-Wave board for Raspberry computer
SolarFlor
Posts: 261
Joined: 22 Mar 2014 15:23

Re: Problem With Delayed Scene

Post by SolarFlor »

dolpheen wrote:SolarFlor, if you write what logic do you want (with exact devices for clarity) I can write an example for you. In eazyLogic it should not take more then a couple of couple lines )
Hi dolpheen,
as example we could use what I posted here viewtopic.php?f=3419&t=21445

Now the logical rules are turning off "cucina" if Motion is off (no presence detected) and if Lux is higher than 100 Lux.
What I would like to do is exactly the same but after 20 sec one of the above conditions are verified.
Thanks
dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: Problem With Delayed Scene

Post by dolpheen »

SolarFlor you can use the next eazyLogic code for your logic.

Code: Select all

 // Turn off dimmer after 10 sec after motion sensor is off.
_z('motion sensor').onOff( function() {
   if(_z('Motion Sensor Luminiscence').getLevel() < 50)  _z('dimmer on desk').delay(10).on()
})
How it works.
We watch when 'motion sensor' is turned off.
When the sensor goes off then function is called.
In this function we check that 'Motion Sensor Luminiscence' level is less then 50 and then turn on 'dimmer on desk' with delay in 10 sec.
All the names used above you can find in widgets list in Preference menu (Widget name field)
You can select not only one device to control (ex.'dimmer on desk'), but a group of device, devices in particular room, etc. more...

Be aware that the eazyLogic module is just at the very beginning of development and there are a lot things to be done to make it error proof, improve stability and usability and all comments are welcome :)

The code above written in plain Javascript and you can use any logic with it, comments, or use variables.
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test
SolarFlor
Posts: 261
Joined: 22 Mar 2014 15:23

Re: Problem With Delayed Scene

Post by SolarFlor »

very interesting but, sorry, I have a stupid question.
Where I can found eazyLogic Module? it seems is not in the Modules section.
dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: Problem With Delayed Scene

Post by dolpheen »

It's not preinstalled, you should install it by yourself. You can find it in Recipes section of this forum, or follow the link I provided in previous post.
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test
SolarFlor
Posts: 261
Joined: 22 Mar 2014 15:23

Re: Problem With Delayed Scene

Post by SolarFlor »

dolpheen wrote:or follow the link I provided in previous post.
do you mind to tell me in which post you provided the link?
Ciao
dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: Problem With Delayed Scene

Post by dolpheen »

SolarFlor wrote:do you mind to tell me in which post you provided the link?
Here it is viewtopic.php?f=3424&t=21448
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test
SolarFlor
Posts: 261
Joined: 22 Mar 2014 15:23

Re: Problem With Delayed Scene

Post by SolarFlor »

Perfect. I will try and will let you know.
To be honest Javascript is a bit tough to me. It would have been bettet php but I will try
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Problem With Delayed Scene

Post by pz1 »

SolarFlor wrote:do you mind to tell me in which post you provided the link?
Ciao
For future reference: We try to keep userModule descriptions, HowTo documents, etc, in the Recipes section of this forum.
SolarFlor
Posts: 261
Joined: 22 Mar 2014 15:23

Re: Problem With Delayed Scene

Post by SolarFlor »

pz1 wrote:
  • I don't know if the issue has been fixed in a later release, because I have not tried
  • Release candidate 25 is pretty stable (see sig)
After the update, going to http://IP:8084 I found as below. What I should do now?
Attachments
config.jpg
config.jpg (26.12 KiB) Viewed 9525 times
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Problem With Delayed Scene

Post by pz1 »

I did observe the same a while ago. I did exit my browser and tried again. The problem had gone than. It appeared that my system had not upgraded properly. I did the upgrade firmware ohnce more. The screen you show did complete properly, and there was an info field in it that showed the latest release notes.
Post Reply