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.

Fasades lighting script by time and outside sensor
#5
Hello,

I use several scripts to achieve I think what you want:

Script 1 : Scheduled Minute 1,16,31,46 every Hour every Month every day name COMMANDE ECLAIRAGE EXTERIEUR (The name is used in a script to disable it):

Code:
-- Commande Eclairage exterieur
ConsigneLux = grp.getvalue('35/1/3') -- Consigne Lux spaceLYNK
StationBat = grp.getvalue('3/0/0') -- Valeur station météo

if ConsigneLux > StationBat then
    grp.write('0/0/53', true)
    grp.write('0/0/54', true)
    --grp.write('0/0/63', true)
elseif ConsigneLux < StationBat then
    grp.write('0/0/53', false)
    grp.write('0/0/54', false)
    --grp.write('0/0/63', false)
end

Script 2 : Event-Based sur 35/1/2=Commande calendrier éclairage extérieur :

Code:
ConsigneH = event.getvalue() -- Retour calendrier - Eclairage exterieur
AutoManu = grp.getvalue('35/1/1') -- Auto / Manu Eclairage exterieur (true=Auto false=Manu)

if ConsigneH == true and AutoManu == true then
    script.enable('COMMANDE ECLAIRAGE EXTERIEUR')
elseif ConsigneH == false and AutoManu == true then
    script.disable('COMMANDE ECLAIRAGE EXTERIEUR')
  grp.write('0/0/53', false)
  grp.write('0/0/54', false)
  --grp.write('0/0/63', false)
end

Script 3 : Event-Based sur 35/1/1=Auto/manu eclairage extérieur :

Code:
ConsigneLux = grp.getvalue('35/1/3') -- Consigne Lux spaceLYNK
StationBat = grp.getvalue('3/0/0') -- Valeur station
ConsigneH = grp.getvalue('35/1/2') -- Retour calendrier - Eclairage exterieur
AutoManu = grp.getvalue('35/1/1') -- Auto / Manu Eclairage exterieur (true=Auto false=Manu)

if AutoManu == false then
    script.disable('COMMANDE ECLAIRAGE EXTERIEUR')                        -- Si nous passons en Mode Manu. alors nous désactivons le script de l'auto. nous gardons l'état précédent de l'éclairage
 
elseif ConsigneH == true and AutoManu == true and ConsigneLux > StationBat then
    grp.write('0/0/53', true)
    grp.write('0/0/54', true)
    --grp.write('0/0/63', true)
    script.enable('COMMANDE ECLAIRAGE EXTERIEUR')                         -- Si nous passons en Auto. et qu'il y a besoin de l'éclairage, que nous sommes dans la tranche Horraire alors nous allumons et nous activons le script Auto.
 
elseif ConsigneH == true and AutoManu == true and ConsigneLux < StationBat then
    grp.write('0/0/53', false)
    grp.write('0/0/54', false)
    --grp.write('0/0/63', false)
    script.enable('COMMANDE ECLAIRAGE EXTERIEUR')                         -- Si nous passons en Auto. et qu'il n'y a pas besoin de l'éclairage, que nous sommes dans la tranche Horraire alors nous éteignons et nous activons le script Auto.
 
elseif ConsigneH == false and AutoManu == true then
    grp.write('0/0/53', false)
    grp.write('0/0/54', false)
    --grp.write('0/0/63', false)
    script.enable('COMMANDE ECLAIRAGE EXTERIEUR')                         -- Si nous passons en Auto. et que nous ne sommes pas dans la tranche Horraire alors nous éteignons et nous désactivons le script Auto.
end

Then you create a calendar with 35/1/2 Exterior lighting control and you integrate it in addition to your lux setpoint (35/1/3) in your supervision which will give the attached photo, the customer can modify via the schedule the start/stop times in the morning and evening as well as the lux setpoint.

I also added on another page the auto/manu object so that the customer can turn on or off his lighting as he wishes without this automation.

B.R.

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: Fasades lighting script by time and outside sensor - by Gadjoken - 26.10.2022, 06:41

Forum Jump: