This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script Guidance - Auto / On / Off, Lux Condition
#1
Hi,

Looking to script a setup that includes the following, any guidance appreciated...

Mode 0/0/1 -> Off (0) / Auto (127) / On (255) group address (with level noted in brackets).
Lux 0/0/2 -> from brightness sensor.
Setpoint 0/0/3 -> group address set via LM interface.
Output or Lights 0/0/4 -> group address for relay or dimmer etc.
Delay in seconds -> variable set above script.

Function/Script:

When Mode at 'Off' level (0), turn Output Off.

When Mode at 'Auto' level (127) it contentiously loops with comparing Setpoint to Lux group address... 
  When Lux below Setpoint, Output group immediately On if Output currently Off.
  When Lux above Setpoint, after a Delay if Setpoint continues to stay above Lux, Output group Off if Output currently On.

When Mode at 'On' level (255), turn Output On.

Thank you
Reply


Messages In This Thread
Script Guidance - Auto / On / Off, Lux Condition - by JMemphix - 12.11.2024, 05:52

Forum Jump: