more G-Labs products

Author Topic: Z-wave/level poll vs. Lights/Smart Lights  (Read 1294 times)

September 24, 2015, 10:27:48 PM
Read 1294 times

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
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.

September 25, 2015, 09:31:51 PM
Reply #1

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
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

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);

September 25, 2015, 09:42:19 PM
Reply #2

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Thx!

I tried! It's works fine for me.