All Downloads are FREE. Search and download functionalities are using the official Maven repository.

data.nodescript.lighteffects.Fernseher_V2.1.nodescript Maven / Gradle / Ivy

### Dieses Script definiert ein Accessory, 
### um mit drei LED's (rot, grüm, blau) ein Fernseheffekt zu starten
###
### Hardware: 3 Lightport (Port 0 = led_red, 1 = led_green, 2 = led_blue)
### Software: 1 accessory
###           2 macros, 0 = Aus, 1 = Ein (Macro 1 läuft entlos)
###
### history: 2017-05-04 A.Tillner, erste Version
### history: 2024-01-21 A.Tillner, Erweitert um einige zufällige Lichtwechsel
###
###
### -------------- 1. Select Target
##application(text:de="Fernsehsimulation V 2.1", text:en="TV Simulation V 2.1")
##instruction(text:de="Fernsehsimulation: 
Lightports: 0 = led_red, 1 = led_green, 2 = led_blue
Macros = Aus, An", text:en="TV Simulation:
lightports: 0 = led_red, 1 = led_green, 2 = led_blue
macros = off, on") ### ##input($AccessoryName:string, text:de="Name des Accessories: ", text:en="Name of the Accessory: ", default="Fernsehsimulation") ##input($my_accessory:accessory, text:de="Nummer des zu erzeugenden Accessory: ", text:en="Nummber of the Accessory: ", default=0) ##input($my_macro:macro, text:de="Nummer des ersten Macros (TV Aus): ", text:en="Number of the first macro (TV off): ", default=0) ##input($led_red:light, text:de="Lightport roten LED: ", text:en="Lightport of the red LED: ", default=0) ##input($led_green:light, text:de="Lightport grünen LED: ", text:en="Lightport of the green LED: ", default=0) ##input($led_blue:light, text:de="Lightport blauen LED: ", text:en="Lightport of the blue LED: ", default=0) ##input($prevent_replace_labels:boolean, text:de="Keine Namen fuer Accessory, Makros, Ports ersetzen", text:en="Prevent replace labels for accessory, macro and ports", default=false) #set($led_gap = 1) ### die anderen drei LED sind an den folgenden drei Lightports angeschlossen ### ### -------------- 2. set Parameters for Ports #set($greenWertbeiOff = 0) #set($greenWertbeiOn = 100) #set($redWertbeiOff = 0) #set($redWertbeiOn = 100) #set($blueWertbeiOff = 0) #set($blueWertbeiOn = 100) #set($Ueberblenden_fast = 15) #set($Ueberblenden_slow = 75) #set($OnTime = 0) #if (${dimm_range} == 8) ### Es handelt sich um einen Knoten mit 8 Bit Dimming #set($DimmzeitOffFast = 15) #set($DimmzeitOffSlow = 20) #set($DimmzeitOnFast = 15) #set($DimmzeitOnSlow = 40) #set($DimmzeitOffFast_Param = "DimmOff=${DimmzeitOffFast}") #set($DimmzeitOnFast_Param = "DimmOn=${DimmzeitOnFast}") #set($DimmzeitOffSlow_Param = "DimmOff=${DimmzeitOffSlow}") #set($DimmzeitOnSlow_Param = "DimmOn=${DimmzeitOnSlow}") #else ### Es handelt sich um einen Knoten mit 16 Bit Dimming #set($DimmzeitOffFast = 15) #set($DimmzeitOffSlow = 20) #set($DimmzeitOnFast = 15) #set($DimmzeitOnSlow = 40) #set($DimmzeitOffFast_Param = "DimmOff88=${DimmzeitOffFast}") #set($DimmzeitOnFast_Param = "DimmOn88=${DimmzeitOnFast}") #set($DimmzeitOffSlow_Param = "DimmOff88=${DimmzeitOffSlow}") #set($DimmzeitOnSlow_Param = "DimmOn88=${DimmzeitOnSlow}") #end ### -------------- 3. execute part of the script #set($macro_off = $my_macro) ### need some additional macros #set($macro_on = $my_macro + 1) ### need some additional macros ######################################## ### Setzt label, wenn ${prevent_replace_labels} NICHT true #if (!${prevent_replace_labels}) ### ### Set label of Ports set light ${led_red} name="${AccessoryName}_${my_accessory}_${led_red}_red" set light ${led_green} name="${AccessoryName}_${my_accessory}_${led_green}_green" set light ${led_blue} name="${AccessoryName}_${my_accessory}_${led_blue}_blue" ### Set label of Macro set macro ${macro_off} name="${AccessoryName}_${my_accessory}_Off" set macro ${macro_on} name="${AccessoryName}_${my_accessory}_On" ### Set label of Accessories set accessory ${my_accessory} name="${AccessoryName}_${my_accessory}" #end ######################################## ### ### Ports: (set Parameters) config port ptype=light ValueOff=${redWertbeiOff} ValueOn=${redWertbeiOn} ${DimmzeitOffFast_Param} ${DimmzeitOnFast_Param} number=${led_red} config port ptype=light ValueOff=${greenWertbeiOff} ValueOn=${greenWertbeiOn} ${DimmzeitOffFast_Param} ${DimmzeitOnFast_Param} number=${led_green} config port ptype=light ValueOff=${blueWertbeiOff} ValueOn=${blueWertbeiOn} ${DimmzeitOffSlow_Param} ${DimmzeitOnSlow_Param} number=${led_blue} ################################################/ ### Macro TV aus ### select macro ${macro_off} config macro repeat=1 slowdown=1 ### Macro stoppen add step ptype=macro action=stop number=${macro_on} ### nicht benoetigte LED's ausschalten add step ptype=light action=off number=${led_red} add step ptype=light action=off number=${led_green} add step ptype=light action=off number=${led_blue} ### ### Ende TV aus ### ################################################/ ### Macro TV an ### select macro ${macro_on} config macro repeat=0 slowdown=1 add step ptype=randomdelay delay=${Ueberblenden_fast} add step ptype=light delay=${Ueberblenden_fast} action=neon number=${led_red} add step ptype=light delay=${Ueberblenden_fast} action=neon number=${led_blue} add step ptype=randomdelay delay=${Ueberblenden_fast} add step ptype=light delay=${Ueberblenden_fast} action=off number=${led_red} add step ptype=randomdelay delay=${Ueberblenden_fast} add step ptype=light delay=${Ueberblenden_fast} action=neon number=${led_green} add step ptype=randomdelay delay=${Ueberblenden_slow} add step ptype=light delay=${Ueberblenden_slow} action=neon number=${led_blue} add step ptype=randomdelay delay=${Ueberblenden_slow} add step ptype=light delay=${Ueberblenden_slow} action=neon number=${led_green} add step ptype=light delay=${Ueberblenden_fast} action=neon number=${led_blue} add step ptype=randomdelay delay=${Ueberblenden_fast} add step ptype=light delay=${Ueberblenden_fast} action=neon number=${led_red} add step ptype=light delay=${Ueberblenden_fast} action=neon number=${led_blue} add step ptype=randomdelay delay=${Ueberblenden_slow} add step ptype=light delay=${Ueberblenden_slow} action=neon number=${led_green} add step ptype=light delay=${Ueberblenden_fast} action=neon number=${led_blue} ### ### Ende TV an ### ################################################/ ### Define Accessory select accessory ${my_accessory} add aspect 0 macroname="${AccessoryName}_${my_accessory}_Off" add aspect 1 macroname="${AccessoryName}_${my_accessory}_On"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy