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

data.nodescript.lighteffects.NeoControlEWS_setlights.nodescript Maven / Gradle / Ivy

## Script only for NeoControl EWS!
## This script defines the light port parameters for a sequence of light ports 
##
## Hardware: Neocontrol with NeoControl EWS firmware
## Software:
##
## history: 2017-01-08 V.Dierkes, first version
##          2017-01-08 V.Dierkes, correct a typo
##          2017-02-18 V.Dierkes, use predefined variables to calculate CV addresses
##          2017-02-18 V.Dierkes, check VID and PID
##          2017-02-18 V.Dierkes, predefined variable light_count was renamed
##          2017-03-18 V.Dierkes, replaced tabs by spaces
##          2017-04-24 V.Dierkes, missed one change for predefined variable light_count
##          2017-04-24 V.Dierkes, improve instruction text, use application
##          2019-11-25 V.Dierkes, merge GIT with local version
##          2020-04-07 V.Dierkes, Fix size of 20 instead of ${node_accessory_count} for accessory CV area
##
## how to use:
## A) configure
##    Not needed
## B) load and run this script
##    what will happen?
##    1. a sequence of light port parameters will be written
##

##require(vid="13", pid="129")

##application(text:de="NeoEWS: Lightport-Parameter - Definiere einen Block Lightports mit den gleichen Einstellungen", text:en="NeoEWS: Lightport parameter: define a block of lightports with the same setting")
##instruction(text:de="F?r die NeoEWS!
Alle Lightport-Parameter wie Farbe, Helligkeit bei an/aus, Dimmzeit an/aus k?nnen f?r einen Block an Lightports (definiert durch die Nummer des ersten Lightports und die Anzahl) gesetzt werden.", text:en="For NeoEWS!
All light port parameters like color, brightness for on/off dimming time for on/off can be set for a given range of light ports (defined by the number of the first lightport and the quantity)", link="https://forum.opendcc.de/wiki/doku.php?id=onews:onewsi#lightports_farben") ## ##input($start_light:light, text:de="Erster Lightport", text:en="First light port", default=0) ##input($quantity:int, text:de="Anzahl der LEDs", text:en="Quantity of LEDs", default=1) ##input($lp_color:int, text:de="Lightport: Farbe", text:en="Light port: color", default=0) ##input($lp_on:int, text:de="Lightport: Helligkeit Ein", text:en="Light port: Brightness On", default=255) ##input($lp_off:int, text:de="Lightport: Helligkeit Aus", text:en="Light port: Brightness Off", default=0) ##input($lp_dimmon:int, text:de="Lightport: Dimmzeit Ein", text:en="Light port: Dimming delay On", default=2) ##input($lp_dimmoff:int, text:de="Lightport: Dimmzeit Aus", text:en="Light port: Dimming delay Off", default=2) ## -------------- 1. Select Target #if((${vid} == 13) && (${pid} == 129)) ## Only for Neo_EWS ## -------------- 2. Define default values #set($cv_base_lights = 81) #set($cv_base_accessory = $cv_base_lights + ( 5 * ${node_light_count}) ) ## Fix size of 20 instead of ${node_accessory_count} for accessory CV area #set($cv_base_colors = $cv_base_accessory + ( 10 * 20) ) #set($cv_base_groups = $cv_base_colors + ( 3 * 32 ) ) #set($cv_base_mapping = $cv_base_groups + ( 6 * 16 ) ) #set($cv_base_config = $cv_base_mapping + ( 1 * 256 ) ) #set($cv_base_acc_cfg = $cv_base_config + ( 6 ) ) ## -------------- 3. execute part of the script #if($start_light + $quantity - 1 <= ${node_light_count}) #set($cv_base = $cv_base_lights) #set($cv_addr = $cv_base + 5 * $start_light) #foreach ($i in [1..$quantity]) set CV ${cv_addr} ${lp_color} #set ($cv_addr = $cv_addr + 1) set CV ${cv_addr} ${lp_off} #set ($cv_addr = $cv_addr + 1) set CV ${cv_addr} ${lp_on} #set ($cv_addr = $cv_addr + 1) set CV ${cv_addr} ${lp_dimmoff} #set ($cv_addr = $cv_addr + 1) set CV ${cv_addr} ${lp_dimmon} #set ($cv_addr = $cv_addr + 1) #end #end #end #######################################




© 2015 - 2024 Weber Informatics LLC | Privacy Policy