Script example 5: Daylight synchronized spot - Daglicht gesynchroniseerde spot
Freek-Jan Buijsman
Administrator
#Example for synchronizing spots with the daylight #This script starts by calculating the maximum sunlight intensity from 3 sides: east, south and west. $MAXSUN = 2BYTE(3/Sunlight East) IF 2BYTE(4/Sunlight South)>$MAXSUN $MAXSUN = 2BYTE(4/Sunlight South) IF 2BYTE(5/Sunlight West)>$MAXSUN $MAXSUN = 2BYTE(5/Sunlight West) #With this maximum we use a formula to reduce this number to a reasonable percentage. For this example we calculate this using the square root of the maximum, divided by 4. $LIGHTX = ($MAXSUN ^ (1/2))/4 #Maximize the level to 100 IF ($LIGHTX>100) $LIGHTX = 100 #Set the light to the calculated level SET BYTE(21/Spots) TO $LIGHTX #Wait for 1 minute and then restart #This synchronises the spot’s light level to the sun intensity WAIT 1 MIN RESTART
Categorieën
- 361 Alle Categorieën
- 28 Release notes
- 8 Release notes - Pairot
- 20 Release notes - xxter
- 12 Pairot
- 48 Algemeen
- 5 Device
- App
- 1 Project
- 3 Voice assistants
- 10 xxter
- 126 Algemeen
- 47 Algemeen
- 34 Nieuwe functionaliteiten en nieuwe features
- 21 Apps
- 20 Apps algemeen
- 1 Apps Beta release
- 24 Profielen
- 7 Profiel algemeen
- 16 Pagina's en pagina elementen
- 1 Waarschuwingsservice
- 94 Project
- 6 Logica
- 2 Aanwezigheidsdetectie
- 12 Acties
- 3 BREEAM
- 14 Cameras
- 16 Componenten
- 1 Config Tool
- 6 Opdrachten
- 28 Native scripts
- 3 LUA scripts
- 3 Statistieken
- 50 Device
- 42 Device algemeen
- 3 Toegangsrechten en lokale gebruikers
- 4 Aanwezigheidssimulatie / Presence simulation