HomeGenie Forum

Development => Bug reporting => Topic started by: KaZe on September 24, 2015, 10:27:48 PM

Title: Z-wave/level poll vs. Lights/Smart Lights
Post by: KaZe on September 24, 2015, 10:27:48 PM
Hi!

In my test, if I config "level poll" option to 20 sec, and my Z-Wave dimmer  "Smart Lights" "Turn off after inactivity timeout (seconds)" option to 30 sec and "Controlled by motion sensor" to my motion sensor, i found a bug. The light turns on motion, but never turn off automaticaly. It"s only turn off, when i set level poll more than 30.
Title: Re: Z-wave/level poll vs. Lights/Smart Lights
Post by: nolio on September 25, 2015, 09:31:51 PM
Hi KaZe,

I had the same problem and i update the code of my own "smart light" script, you can find here (i do other modifications) :
http://www.homegenie.it/forum/index.php?topic=845.msg5924#msg5924 (http://www.homegenie.it/forum/index.php?topic=845.msg5924#msg5924)

I think the comments like that can work (if i remember wel ;)) :
Code: [Select]
          //var lastupdate = mod.Parameter("Status.Level").UpdateTime;
          var checktime = lastevent.Ticks;
          //if (checktime < lastupdate.Ticks) checktime = lastupdate.Ticks;
          var elapsed = new TimeSpan(DateTime.UtcNow.Ticks - checktime);
Title: Re: Z-wave/level poll vs. Lights/Smart Lights
Post by: KaZe on September 25, 2015, 09:42:19 PM
Thx!

I tried! It's works fine for me.