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
- 348 Alle Categorieën
- 26 Release notes
- 8 Release notes - Pairot
- 18 Release notes - xxter
- 8 Pairot
- 47 Algemeen
- 4 Device
- App
- Project
- 2 Voice assistants
- 3 xxter
- 122 Algemeen
- 46 Algemeen
- 31 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
- 93 Project
- 6 Logica
- 1 Aanwezigheidsdetectie
- 12 Acties
- 3 BREEAM
- 14 Cameras
- 16 Componenten
- 1 Config Tool
- 6 Opdrachten
- 28 Native scripts
- 3 LUA scripts
- 3 Statistieken
- 48 Device
- 41 Device algemeen
- 3 Toegangsrechten en lokale gebruikers
- 4 Aanwezigheidssimulatie / Presence simulation